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
|
||||
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*)
|
||||
|
|
|
@ -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)
|
Loading…
Reference in New Issue
Block a user