mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-27 11:10:39 +01:00
Return invalid items in singleplayer mode
This commit is contained in:
parent
f960fc1a41
commit
6f99803d2d
@ -143,13 +143,13 @@ local function validate_armor_inventory(player)
|
|||||||
else
|
else
|
||||||
inv:remove_item("armor", stack)
|
inv:remove_item("armor", stack)
|
||||||
-- The following code returns invalid items to the player's main
|
-- The following code returns invalid items to the player's main
|
||||||
-- inventory but could open up the possibity for hacked client
|
-- inventory but could open up the possibity for a hacked client
|
||||||
-- to receive items back they never really had. I am not certain
|
-- to receive items back they never really had. I am not certain
|
||||||
-- so un-comment this section at your own risk :)
|
-- so remove the is_singleplayer check at your own risk :]
|
||||||
|
if minetest.is_singleplayer() and player_inv and
|
||||||
--if player_inv and player_inv:room_for_item("main", stack) then
|
player_inv:room_for_item("main", stack) then
|
||||||
-- player_inv:add_item("main", stack)
|
player_inv:add_item("main", stack)
|
||||||
--end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user