Don't send network events
This commit is contained in:
@@ -168,7 +168,7 @@ local function tryStackFabricator(character)
|
||||
local previous = nil
|
||||
for _, item in ipairs(items) do
|
||||
if previous ~= item.Prefab.Identifier then slot = slot + 1 end
|
||||
local moved = inputInventory.TryPutItem(item, slot, false, true, Character.Controlled, true)
|
||||
local moved = inputInventory.TryPutItem(item, slot, false, true, nil)
|
||||
if not moved then
|
||||
MyModGlobal.debugPrint(string.format("Failed to move %s", item.Prefab.Identifier.Value))
|
||||
end
|
||||
|
@@ -164,7 +164,7 @@ local function tryReloadSlot(slot, preferMinCondition)
|
||||
break
|
||||
end
|
||||
|
||||
local moved = inventorySlot.inventory.TryPutItem(ititem, inventorySlot.slotIndex, false, true, Character.Controlled, true)
|
||||
local moved = inventorySlot.inventory.TryPutItem(ititem, inventorySlot.slotIndex, false, true, nil)
|
||||
-- When the slot is full no more will be able to be moved
|
||||
-- And tat that point we're done with that slot
|
||||
if not moved then break end
|
||||
|
@@ -23,6 +23,10 @@ local LOAD_MAP = {
|
||||
revolver = { revolverround = 999 },
|
||||
underwaterscooter = battery,
|
||||
weldingtool = { weldingfueltank = 1 },
|
||||
exosuit = { fuelrot = 1, oxygentank = 1 },
|
||||
healthscanner = battery,
|
||||
portablepump = battery,
|
||||
handcannon = { handcannonround = 999 },
|
||||
}
|
||||
|
||||
return LOAD_MAP
|
||||
|
@@ -126,8 +126,7 @@ local function tryMoveItem(item, itemTree, force)
|
||||
|
||||
if itemLocation.maxFits > 0 and canBePut then
|
||||
moved = moved or
|
||||
itemLocation.inventory.TryPutItem(item, itemLocation.slotIndex, false, true, Character.Controlled,
|
||||
true)
|
||||
itemLocation.inventory.TryPutItem(item, itemLocation.slotIndex, false, true, nil)
|
||||
if moved then
|
||||
itemLocation.maxFits = itemLocation.inventory.HowManyCanBePut(item.Prefab, itemLocation.slotIndex)
|
||||
break
|
||||
@@ -160,8 +159,7 @@ local function tryMoveItem(item, itemTree, force)
|
||||
if maxFits > 0 then
|
||||
-- MyModGlobal.debugPrint(string.format("Trying to move item to empty slot at index: %d", itemLocation.slotIndex))
|
||||
moved = moved or
|
||||
itemLocation.inventory.TryPutItem(item, itemLocation.slotIndex, true, false, Character.Controlled,
|
||||
true)
|
||||
itemLocation.inventory.TryPutItem(item, itemLocation.slotIndex, true, false, nil)
|
||||
if moved then
|
||||
itemLocation.maxFits = itemLocation.inventory.HowManyCanBePut(item.Prefab, itemLocation.slotIndex)
|
||||
break
|
||||
@@ -379,8 +377,7 @@ local function stackToCursor()
|
||||
-- UPDATE: OK well that was a stupid idea, it returns an error for other shit as well
|
||||
-- What other shit? Wish I knew
|
||||
-- So we'll use HowManyCanBePut instead...
|
||||
local moved = slot.inventory.TryPutItem(ititem, slot.slotIndex - 1, false, true, Character.Controlled,
|
||||
true)
|
||||
local moved = slot.inventory.TryPutItem(ititem, slot.slotIndex - 1, false, true, nil)
|
||||
if not moved then
|
||||
MyModGlobal.debugPrint(string.format("Failed to move item %s to slot %d", ititem.Name, slot
|
||||
.slotIndex - 1))
|
||||
@@ -440,8 +437,7 @@ local function stackAllToCursor()
|
||||
-- UPDATE: OK well that was a stupid idea, it returns an error for other shit as well
|
||||
-- What other shit? Wish I knew
|
||||
-- So we'll use HowManyCanBePut instead...
|
||||
local moved = slot.inventory.TryPutItem(ititem, slot.slotIndex - 1, false, true, Character.Controlled,
|
||||
true)
|
||||
local moved = slot.inventory.TryPutItem(ititem, slot.slotIndex - 1, false, true, nil)
|
||||
if not moved then
|
||||
MyModGlobal.debugPrint(string.format("Failed to move item %s to slot %d", ititem.Name, slot
|
||||
.slotIndex - 1))
|
||||
|
@@ -99,7 +99,7 @@ local function tryUnloadSlot(slot)
|
||||
local canAccept = nearbySlot.inventory.CanBePutInSlot(iitem.Prefab, nearbySlot.slotIndex)
|
||||
if canAccept then
|
||||
local moved = nearbySlot.inventory.TryPutItem(iitem, nearbySlot.slotIndex, true, false,
|
||||
Character.Controlled, true)
|
||||
nil)
|
||||
-- print(string.format("Moved item %s to slot %d", iitem.Name, nearbySlot.slotIndex))
|
||||
if moved then break end
|
||||
end
|
||||
|
Reference in New Issue
Block a user