Skip to content

Commit

Permalink
GM button: delete nearby xenos (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Nov 28, 2023
1 parent 34518e7 commit d57a33b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
9 changes: 9 additions & 0 deletions code/modules/admin/game_master/game_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)

return

if("delete_xenos_in_view")
if(tgui_alert(ui.user, "Do you want to delete all xenos within your view range?", "Confirmation", list("Yes", "No")) != "Yes")
return

for(var/mob/living/carbon/xenomorph/viewed_xeno in view(ui.user.client))
qdel(viewed_xeno)

return

//Behavior Section
if("set_selected_behavior")
selected_behavior = params["new_behavior"]
Expand Down
24 changes: 18 additions & 6 deletions tgui/packages/tgui/interfaces/GameMaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,24 @@ export const GameMasterSpawningPanel = (props, context) => {
</Stack>
</Stack.Item>
<Stack.Item>
<Button
content="Delete all xenos"
onClick={() => {
act('delete_all_xenos');
}}
/>
<Stack>
<Stack.Item>
<Button
content="Delete all xenos"
onClick={() => {
act('delete_all_xenos');
}}
/>
</Stack.Item>
<Stack.Item>
<Button
content="Delete viewed xenos"
onClick={() => {
act('delete_xenos_in_view');
}}
/>
</Stack.Item>
</Stack>
</Stack.Item>
</Stack>
</Section>
Expand Down

0 comments on commit d57a33b

Please sign in to comment.