diff --git a/control.lua b/control.lua index 9b8fbbc..67d9102 100644 --- a/control.lua +++ b/control.lua @@ -41,12 +41,16 @@ end end local toolbelt = player.get_quickbar() - toolbelt.remove{name="grenade", count="100"} -- New hope / Level 03 - --toolbelt.remove{type="ammo", count="100"} - toolbelt.remove{name="gun-turret", count="100"} + if toolbelt then + toolbelt.remove{name="grenade", count="100"} -- New hope / Level 03 + --toolbelt.remove{type="ammo", count="100"} + toolbelt.remove{name="gun-turret", count="100"} + end local inv = player.get_inventory(defines.inventory.player_main) - inv.remove{name="gun-turret", count="100"} + if inv then + inv.remove{name="gun-turret", count="100"} + end local car = player.get_inventory(defines.inventory.player_vehicle) if car then diff --git a/info.json b/info.json index 4d89359..4c2e7ba 100644 --- a/info.json +++ b/info.json @@ -1,7 +1,7 @@ { "name": "SimplePeaceMod", - "version": "0.16.3", + "version": "0.16.4", "title": "Simple Peace Mod", "author": "Anton-V-K", "contact": "ka5@ua.fm",