[GBP no update] Fixes DS spawning in the SST base. (#17863)

* these two got me confused

* tidies this
This commit is contained in:
S34N
2022-05-25 18:10:00 +01:00
committed by GitHub
parent 5d9dbe82ed
commit 75058a9744
2 changed files with 28 additions and 33 deletions
+2 -3
View File
@@ -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))
@@ -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("<B>Nuke Code:</B> <span class='warning'>[nuke_code]</span>.")
new_syndicate_commando.mind.store_memory("<B>Mission:</B> <span class='warning'>[input]</span>.")
//So they don't forget their code or mission.
if(nuke_code)
new_syndicate_commando.mind.store_memory("<B>Nuke Code:</B> <span class='warning'>[nuke_code]</span>.")
new_syndicate_commando.mind.store_memory("<B>Mission:</B> <span class='warning'>[input]</span>.")
to_chat(new_syndicate_commando, "<span class='notice'>You are an Elite Syndicate [is_leader ? "<B>TEAM LEADER</B>" : "commando"] in the service of the Syndicate. \nYour current mission is: <span class='userdanger'>[input]</span></span>")
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, "<span class='notice'>You are an Elite Syndicate [is_leader ? "<B>TEAM LEADER</B>" : "commando"] in the service of the Syndicate. \nYour current mission is: <span class='userdanger'>[input]</span></span>")
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("<span class='notice'>[key_name_admin(usr)] has spawned a Syndicate strike squad.</span>", 1)
log_admin("[key_name(usr)] used Spawn Syndicate Squad.")