Skip to content

Commit

Permalink
Merge pull request #20 from Choumiko/master
Browse files Browse the repository at this point in the history
Remote interface to toggle the expando. Returns previous state
  • Loading branch information
narc0tiq committed Oct 27, 2015
2 parents 36c5fce + 978318d commit b4e72c1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions remote.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,24 @@ function interface.reset_player(player_name_or_index)
player_data.remote_viewer = nil
end

function interface.hide_expando(player_name_or_index)
local player = game.get_player(player_name_or_index)
if global.player_data[player.index].expandoed then
resmon.on_click.YARM_expando({player_index=player.index})
return true
end

return false
end

function interface.show_expando(player_name_or_index)
local player = game.get_player(player_name_or_index)
if not global.player_data[player.index].expandoed then
resmon.on_click.YARM_expando({player_index=player.index})
return false
end

return true
end

remote.add_interface("YARM", interface)

0 comments on commit b4e72c1

Please sign in to comment.