diff --git a/remote.lua b/remote.lua index 8b82286..78b4828 100644 --- a/remote.lua +++ b/remote.lua @@ -12,18 +12,20 @@ function interface.reset_player(player_name_or_index) player_data.remote_viewer = nil end -function interface.hide_expando(event) - if global.player_data[event.player_index].expandoed then - resmon.on_click.YARM_expando(event) +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(event) - if not global.player_data[event.player_index].expandoed then - resmon.on_click.YARM_expando(event) +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