0.1.1: Fixed issue removing 'residual' remotes from non god controllers

This commit is contained in:
Peter 2020-08-15 00:57:47 +08:00
parent 522383bb23
commit 9d56dad154
3 changed files with 12 additions and 3 deletions

View File

@ -3,3 +3,9 @@ Version: 0.1.0
Date: 2020-08-14
Features:
- Initial release: Adds shortcut to command a squad of spidertrons
---------------------------------------------------------------------------------------------------
Version: 0.1.1
Date: 2020-08-15
Bugfixes:
- Fixed issue clearing inventory of 'residual' remotes with non-god controllers (*Facepalm*)

View File

@ -83,8 +83,11 @@ script.on_event("squad-spidertron-remote", function(event)
local player = game.players[event.player_index]
local stack = {name="squad-spidertron-remote-sel",count=1}
if player.clean_cursor() and player.cursor_stack.can_set_stack(stack) then
player.get_inventory(2).remove("squad-spidertron-remote-sel")
player.get_inventory(2).remove("squad-spidertron-remote")
if player.get_main_inventory() then
player.get_main_inventory().remove("squad-spidertron-remote-sel")
player.get_main_inventory().remove("squad-spidertron-remote")
end
player.cursor_stack.set_stack(stack)
end
end)

View File

@ -1,6 +1,6 @@
{
"name": "Spider_Control",
"version": "0.1.0",
"version": "0.1.1",
"factorio_version": "1.0",
"title": "Spidertron squad control",
"author": "npc_strider(morley376)",