From e9ec57225b204ca0cdbaa2bdce9ca3e86d56a418 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sat, 24 Apr 2021 00:28:19 +0100 Subject: [PATCH] Added Selection.get_arguments --- modules/control/selection.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/control/selection.lua b/modules/control/selection.lua index 4b966332..cc9b44d3 100644 --- a/modules/control/selection.lua +++ b/modules/control/selection.lua @@ -62,6 +62,12 @@ function Selection.stop(player) end end +--- Get the selection arguments for a player +function Selection.get_arguments(player) + if not selections[player.index] then return end + return selections[player.index].arguments +end + --- Alias to Event.add(defines.events.on_player_selected_area) function Selection.on_selection(handler) return Event.add(defines.events.on_player_selected_area, handler)