From 75058a97448a425e2689f5b9ca66032adbe473ab Mon Sep 17 00:00:00 2001
From: S34N <12197162+S34NW@users.noreply.github.com>
Date: Wed, 25 May 2022 18:10:00 +0100
Subject: [PATCH] [GBP no update] Fixes DS spawning in the SST base. (#17863)
* these two got me confused
* tidies this
---
code/modules/admin/verbs/striketeam.dm | 5 +-
.../admin/verbs/striketeam_syndicate.dm | 56 +++++++++----------
2 files changed, 28 insertions(+), 33 deletions(-)
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index 3654b717611..d9c60392b70 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -49,9 +49,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
var/commando_number = COMMANDOS_POSSIBLE //for selecting a leader
var/is_leader = TRUE // set to FALSE after leader is spawned
- for(var/obj/effect/landmark/spawner/syndicate_commando/L in GLOB.landmarks_list)
-
- if(commando_number <= 0)
+ for(var/obj/effect/landmark/spawner/ds/L in GLOB.landmarks_list)
+ if(!commando_number)
break
if(!length(commando_ghosts))
diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm
index a49283d4ed1..8fafc1e4fde 100644
--- a/code/modules/admin/verbs/striketeam_syndicate.dm
+++ b/code/modules/admin/verbs/striketeam_syndicate.dm
@@ -54,45 +54,41 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
GLOB.sent_syndicate_strike_team = 1
//Spawns commandos and equips them.
- for(var/thing in GLOB.landmarks_list)
- var/obj/effect/landmark/L = thing
-
- if(syndicate_commando_number <= 0)
+ for(var/obj/effect/landmark/spawner/syndicate_commando/L in GLOB.landmarks_list)
+ if(!syndicate_commando_number)
break
- if(L.name == "Syndicate-Commando")
+ if(!length(commando_ghosts))
+ break
- if(!length(commando_ghosts))
- break
+ var/mob/ghost_mob = pick(commando_ghosts)
+ commando_ghosts -= ghost_mob
- var/mob/ghost_mob = pick(commando_ghosts)
- commando_ghosts -= ghost_mob
+ if(!ghost_mob || !ghost_mob.key || !ghost_mob.client)
+ continue
- if(!ghost_mob || !ghost_mob.key || !ghost_mob.client)
- continue
+ var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, is_leader)
- var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, is_leader)
+ if(!new_syndicate_commando)
+ continue
- if(!new_syndicate_commando)
- continue
+ new_syndicate_commando.key = ghost_mob.key
+ new_syndicate_commando.internal = new_syndicate_commando.s_store
+ new_syndicate_commando.update_action_buttons_icon()
- new_syndicate_commando.key = ghost_mob.key
- new_syndicate_commando.internal = new_syndicate_commando.s_store
- new_syndicate_commando.update_action_buttons_icon()
+ //So they don't forget their code or mission.
+ if(nuke_code)
+ new_syndicate_commando.mind.store_memory("Nuke Code: [nuke_code].")
+ new_syndicate_commando.mind.store_memory("Mission: [input].")
- //So they don't forget their code or mission.
- if(nuke_code)
- new_syndicate_commando.mind.store_memory("Nuke Code: [nuke_code].")
- new_syndicate_commando.mind.store_memory("Mission: [input].")
-
- to_chat(new_syndicate_commando, "You are an Elite Syndicate [is_leader ? "TEAM LEADER" : "commando"] in the service of the Syndicate. \nYour current mission is: [input]")
- new_syndicate_commando.faction += "syndicate"
- var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS]
- opshud.join_hud(new_syndicate_commando.mind.current)
- set_antag_hud(new_syndicate_commando.mind.current, "hudoperative")
- new_syndicate_commando.regenerate_icons()
- is_leader = FALSE
- syndicate_commando_number--
+ to_chat(new_syndicate_commando, "You are an Elite Syndicate [is_leader ? "TEAM LEADER" : "commando"] in the service of the Syndicate. \nYour current mission is: [input]")
+ new_syndicate_commando.faction += "syndicate"
+ var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS]
+ opshud.join_hud(new_syndicate_commando.mind.current)
+ set_antag_hud(new_syndicate_commando.mind.current, "hudoperative")
+ new_syndicate_commando.regenerate_icons()
+ is_leader = FALSE
+ syndicate_commando_number--
message_admins("[key_name_admin(usr)] has spawned a Syndicate strike squad.", 1)
log_admin("[key_name(usr)] used Spawn Syndicate Squad.")