- Joined
- Nov 17, 2010
- Messages
- 6,830
- Solutions
- 586
- Reaction score
- 5,413
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
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()