Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Nov 23, 2023
1 parent a883027 commit 5ad11b7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
19 changes: 19 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,25 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)

return

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

var/turf/current_turf = get_turf(usr)
var/view_min_x = current_turf.x - usr.client.view
var/view_min_y = current_turf.y - usr.client.view
var/view_max_x = current_turf.x + usr.client.view
var/view_max_y = current_turf.y + usr.client.view

for(var/mob/living/carbon/xenomorph/nearby_xeno as anything in GLOB.xeno_mob_list)
var/turf/xeno_turf = get_turf(nearby_xeno)
if(xeno_turf.z != current_turf.z || !ISINRANGE(xeno_turf.x, view_min_x, view_max_x) || !ISINRANGE(xeno_turf.y, view_min_y, view_max_y))
continue

qdel(nearby_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 near xenos"
onClick={() => {
act('delete_near_xenos');
}}
/>
</Stack.Item>
</Stack>
</Stack.Item>
</Stack>
</Section>
Expand Down

0 comments on commit 5ad11b7

Please sign in to comment.