Update fixes use default functions for modules if empty
This commit is contained in:
1 parent
c4e01526b7
commit
67318ef3b8
3 files changed
+8
-3
No files matched your search
@@ -11,7 +11,11 @@ end
|
|||||||
|
|
||||||
function Bridge.RegisterModule(moduleName, moduleTable, defaultsTable)
|
function Bridge.RegisterModule(moduleName, moduleTable, defaultsTable)
|
||||||
if not moduleTable then
|
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)
|
registerModule(moduleName, moduleTable)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
DefaultInventory = DefaultInventory or {}
|
DefaultInventory = DefaultInventory or {}
|
||||||
|
|
||||||
DefaultInventory.GetItemInfo = function(item)
|
DefaultInventory.GetItemInfo = function(item)
|
||||||
|
print('client funct')
|
||||||
return Framework.GetItemInfo(item)
|
return Framework.GetItemInfo(item)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ DefaultInventory.RemoveItem = function(src, item, count, slot, metadata)
|
|||||||
end
|
end
|
||||||
|
|
||||||
DefaultInventory.GetItemInfo = function(item)
|
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
|
end
|
||||||
|
|
||||||
DefaultInventory.GetItemCount = function(src, item, metadata)
|
DefaultInventory.GetItemCount = function(src, item, metadata)
|
||||||
@@ -25,7 +25,7 @@ DefaultInventory.SetMetadata = function(src, item, slot, metadata)
|
|||||||
end
|
end
|
||||||
|
|
||||||
DefaultInventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords)
|
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
|
end
|
||||||
|
|
||||||
DefaultInventory.GetImagePath = function(item)
|
DefaultInventory.GetImagePath = function(item)
|
||||||
|
|||||||
Reference in new issue
Block a user