Update fixes use default functions for modules if empty

This commit is contained in:
qwezert committed 2025-01-09 18:45:57 +02:00
1 parent c4e01526b7
commit 67318ef3b8
3 files changed
+8 -3

No files matched your search

+5 -1
View File
@@ -11,7 +11,11 @@ end
function Bridge.RegisterModule(moduleName, moduleTable, defaultsTable)
if not moduleTable then
moduleTable = Framework
if not defaultsTable then
print("No moduleTable or defaultsTable provided for module:", moduleName)
return
end
moduleTable = defaultsTable
registerModule(moduleName, moduleTable)
return
end
+1
View File
@@ -1,6 +1,7 @@
DefaultInventory = DefaultInventory or {}
DefaultInventory.GetItemInfo = function(item)
print('client funct')
return Framework.GetItemInfo(item)
end
+2 -2
View File
@@ -9,7 +9,7 @@ DefaultInventory.RemoveItem = function(src, item, count, slot, metadata)
end
DefaultInventory.GetItemInfo = function(item)
return false, Print.Error("This Inventory Has Not Been Bridged For An Item Info Feature.")
return false, print("This Inventory Has Not Been Bridged For An Item Info Feature.")
end
DefaultInventory.GetItemCount = function(src, item, metadata)
@@ -25,7 +25,7 @@ DefaultInventory.SetMetadata = function(src, item, slot, metadata)
end
DefaultInventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords)
return false, Print.Error("This Inventory Has Not Been Bridged For A Stash Feature.")
return false, print("This Inventory Has Not Been Bridged For A Stash Feature.")
end
DefaultInventory.GetImagePath = function(item)