• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[TFS 1.4] Disallow items from being moved into corpses

Xikini

I whore myself out for likes
Senator
Premium User
Joined
Nov 17, 2010
Messages
6,788
Solutions
581
Reaction score
5,354
Someone asked for this in private, and I figured it'd be useful to other people as well. :)

Does exactly what title says. Disallow's items from being moved into corpses.

Just throw it into data/scripts
Lua:
local disableMovingItemsToCorpses = EventCallback

disableMovingItemsToCorpses.onMoveItem = function(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
    if toCylinder and toCylinder:isItem() then 
        if ItemType(toCylinder:getTopParent():getId()):isCorpse() or ItemType(toCylinder:getId()):isCorpse() then
            return false
        end
    end
    return true
end

disableMovingItemsToCorpses:register()
 
Is possible to make 1 itemID avoid getting to thrown to ground? I couldn't manage this without bugging backpacks or inventory.
 
Is possible to make 1 itemID avoid getting to thrown to ground? I couldn't manage this without bugging backpacks or inventory.
Possibly.

Can you open a support / request thread and explain what you want to happen more explicitly?

-- edit

I have created this functionality for you.
I hope it's as you wanted.
 
Last edited:
Back
Top