mirror of
https://github.com/peter-tanner/spidertron-squad-control.git
synced 2024-11-30 11:00:17 +08:00
0.1.1: Fixed issue removing 'residual' remotes from non god controllers
This commit is contained in:
parent
522383bb23
commit
9d56dad154
|
@ -3,3 +3,9 @@ Version: 0.1.0
|
||||||
Date: 2020-08-14
|
Date: 2020-08-14
|
||||||
Features:
|
Features:
|
||||||
- Initial release: Adds shortcut to command a squad of spidertrons
|
- 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*)
|
||||||
|
|
|
@ -83,8 +83,11 @@ script.on_event("squad-spidertron-remote", function(event)
|
||||||
local player = game.players[event.player_index]
|
local player = game.players[event.player_index]
|
||||||
local stack = {name="squad-spidertron-remote-sel",count=1}
|
local stack = {name="squad-spidertron-remote-sel",count=1}
|
||||||
if player.clean_cursor() and player.cursor_stack.can_set_stack(stack) then
|
if player.clean_cursor() and player.cursor_stack.can_set_stack(stack) then
|
||||||
player.get_inventory(2).remove("squad-spidertron-remote-sel")
|
if player.get_main_inventory() then
|
||||||
player.get_inventory(2).remove("squad-spidertron-remote")
|
player.get_main_inventory().remove("squad-spidertron-remote-sel")
|
||||||
|
player.get_main_inventory().remove("squad-spidertron-remote")
|
||||||
|
end
|
||||||
|
|
||||||
player.cursor_stack.set_stack(stack)
|
player.cursor_stack.set_stack(stack)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Spider_Control",
|
"name": "Spider_Control",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"factorio_version": "1.0",
|
"factorio_version": "1.0",
|
||||||
"title": "Spidertron squad control",
|
"title": "Spidertron squad control",
|
||||||
"author": "npc_strider(morley376)",
|
"author": "npc_strider(morley376)",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user