mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
moves depot areas to new file
This commit is contained in:
@@ -543,434 +543,6 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper Syndicate Infiltrators"
|
||||
icon_state = "syndie-elite"
|
||||
|
||||
/area/syndicate_depot
|
||||
name = "Suspicious Supply Depot"
|
||||
icon_state = "red"
|
||||
tele_proof = 1
|
||||
|
||||
var/local_alarm = FALSE // Level 1: Local alarm tripped, bot spawned, red fire overlay activated
|
||||
var/called_backup = FALSE // Level 2: Remote alarm tripped. Bot may path through depot. Backup spawned.
|
||||
var/used_self_destruct = FALSE // Level 3: Self destruct activated. Depot will be destroyed shortly.
|
||||
|
||||
var/run_started = FALSE
|
||||
var/run_finished = FALSE
|
||||
|
||||
// Soft UID-based refs
|
||||
var/list/guard_list = list()
|
||||
var/list/hostile_list = list()
|
||||
var/list/dead_list = list()
|
||||
var/list/peaceful_list = list()
|
||||
var/list/shield_list = list()
|
||||
|
||||
var/list/alert_log = list() // no refs, just a simple list of text strings
|
||||
|
||||
var/used_lockdown = FALSE
|
||||
var/destroyed = FALSE
|
||||
var/something_looted = FALSE
|
||||
var/on_peaceful = FALSE
|
||||
var/peace_betrayed = FALSE
|
||||
var/detected_mech = FALSE
|
||||
var/detected_pod = FALSE
|
||||
var/detected_double_agent = FALSE
|
||||
var/obj/machinery/computer/syndicate_depot/syndiecomms/comms_computer = null
|
||||
var/obj/structure/fusionreactor/reactor
|
||||
|
||||
/area/syndicate_depot/updateicon()
|
||||
if(destroyed)
|
||||
icon_state = null
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
else if(on_peaceful)
|
||||
icon_state = "green"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else if(used_self_destruct)
|
||||
icon_state = "radiation"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else if(called_backup)
|
||||
icon_state = "red"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else if(local_alarm)
|
||||
icon_state = "bluenew"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else
|
||||
icon_state = null
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
|
||||
/area/syndicate_depot/proc/reset_alert()
|
||||
|
||||
if(used_self_destruct)
|
||||
return
|
||||
|
||||
local_alarm = FALSE
|
||||
called_backup = FALSE
|
||||
used_self_destruct = FALSE
|
||||
something_looted = FALSE
|
||||
detected_mech = FALSE
|
||||
detected_pod = FALSE
|
||||
detected_double_agent = FALSE
|
||||
updateicon()
|
||||
despawn_guards()
|
||||
|
||||
guard_list = list()
|
||||
hostile_list = list()
|
||||
dead_list = list()
|
||||
peaceful_list = list()
|
||||
|
||||
alert_log += "Alert level reset."
|
||||
|
||||
/area/syndicate_depot/proc/increase_alert(reason)
|
||||
if(on_peaceful)
|
||||
peaceful_mode(FALSE, FALSE)
|
||||
peace_betrayed = TRUE
|
||||
activate_self_destruct("Depot has been infiltrated by double-agents.", TRUE, null)
|
||||
return
|
||||
if(!local_alarm)
|
||||
local_alarm(reason, FALSE)
|
||||
return
|
||||
if(!called_backup)
|
||||
call_backup(reason, FALSE)
|
||||
return
|
||||
if(!used_self_destruct)
|
||||
activate_self_destruct(reason, FALSE, null)
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/locker_looted()
|
||||
something_looted = TRUE
|
||||
if(on_peaceful)
|
||||
increase_alert("Thieves!")
|
||||
|
||||
/area/syndicate_depot/proc/turret_died()
|
||||
something_looted = TRUE
|
||||
if(on_peaceful)
|
||||
increase_alert("Vandals!")
|
||||
|
||||
/area/syndicate_depot/proc/saw_mech(obj/mecha/E)
|
||||
if(detected_mech)
|
||||
return
|
||||
detected_mech = TRUE
|
||||
increase_alert("Hostile mecha detected: [E]")
|
||||
|
||||
/area/syndicate_depot/proc/saw_pod(obj/spacepod/P)
|
||||
if(detected_pod)
|
||||
return
|
||||
detected_pod = TRUE
|
||||
increase_alert("Hostile spacepod detected: [P]")
|
||||
|
||||
/area/syndicate_depot/proc/saw_double_agent(mob/living/M)
|
||||
if(detected_double_agent)
|
||||
return
|
||||
detected_double_agent = TRUE
|
||||
increase_alert("Hostile double-agent detected: [M]")
|
||||
|
||||
/area/syndicate_depot/proc/peaceful_mode(newvalue, bycomputer)
|
||||
if(newvalue)
|
||||
log_game("Depot visit: started")
|
||||
alert_log += "Code GREEN: visitor mode started."
|
||||
ghostlog("The syndicate depot has visitors")
|
||||
for(var/mob/living/simple_animal/bot/medbot/syndicate/B in src)
|
||||
qdel(B)
|
||||
for(var/mob/living/simple_animal/hostile/syndicate/N in src)
|
||||
N.a_intent = INTENT_HELP
|
||||
for(var/obj/structure/closet/secure_closet/syndicate/depot/L in src)
|
||||
if(L.opened)
|
||||
L.close()
|
||||
if(!L.locked)
|
||||
L.locked = 1
|
||||
L.req_access = list(access_syndicate_leader)
|
||||
L.update_icon()
|
||||
for(var/obj/machinery/computer/syndicate_depot/teleporter/P in src)
|
||||
if(!P.portal_enabled)
|
||||
P.toggle_portal()
|
||||
for(var/obj/machinery/door/airlock/hatch/syndicate/vault/V in src)
|
||||
if(!V.density)
|
||||
V.close()
|
||||
V.emergency = 0
|
||||
if(!V.locked)
|
||||
V.locked = !V.locked
|
||||
V.update_icon()
|
||||
else
|
||||
log_game("Depot visit: ended")
|
||||
alert_log += "Visitor mode ended."
|
||||
for(var/mob/living/simple_animal/hostile/syndicate/N in src)
|
||||
N.a_intent = INTENT_HARM
|
||||
for(var/obj/machinery/door/airlock/A in src)
|
||||
A.req_access_txt = "[access_syndicate_leader]"
|
||||
for(var/obj/structure/closet/secure_closet/syndicate/depot/L in src)
|
||||
if(L.locked)
|
||||
L.locked = !L.locked
|
||||
L.req_access = list()
|
||||
L.update_icon()
|
||||
on_peaceful = newvalue
|
||||
if(newvalue)
|
||||
announce_here("Depot Visitor","A Syndicate agent is visiting the depot.")
|
||||
else
|
||||
if(bycomputer)
|
||||
message_admins("Syndicate Depot visitor mode deactivated. Visitors:")
|
||||
announce_here("Depot Alert","Visit ended. All visting agents signed out.")
|
||||
else
|
||||
message_admins("Syndicate Depot visitor mode auto-deactivated because visitors robbed depot! Visitors:")
|
||||
announce_here("Depot Alert","A visiting agent has betrayed the Syndicate. Shoot all visitors on sight!")
|
||||
for(var/mob/M in list_getmobs(peaceful_list))
|
||||
if("syndicate" in M.faction)
|
||||
M.faction -= "syndicate"
|
||||
message_admins("- SYNDI DEPOT VISITOR: [ADMIN_FULLMONTY(M)]")
|
||||
list_add(M, hostile_list)
|
||||
peaceful_list = list()
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/local_alarm(reason, silent)
|
||||
if(local_alarm)
|
||||
return
|
||||
log_game("Depot code: blue: " + list_show(hostile_list, TRUE))
|
||||
ghostlog("The syndicate depot has declared code blue.")
|
||||
alert_log += "Code BLUE: [reason]"
|
||||
local_alarm = TRUE
|
||||
if(!silent)
|
||||
announce_here("Depot Code BLUE", reason)
|
||||
var/list/possible_bot_spawns = list()
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "syndi_depot_bot")
|
||||
possible_bot_spawns |= L
|
||||
if(possible_bot_spawns.len)
|
||||
var/obj/effect/landmark/S = pick(possible_bot_spawns)
|
||||
new /obj/effect/portal(get_turf(S))
|
||||
var/mob/living/simple_animal/bot/ed209/syndicate/B = new /mob/living/simple_animal/bot/ed209/syndicate(get_turf(S))
|
||||
list_add(B, guard_list)
|
||||
B.depotarea = src
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/call_backup(reason, silent)
|
||||
if(called_backup || used_self_destruct)
|
||||
return
|
||||
log_game("Depot code: red: " + list_show(hostile_list, TRUE))
|
||||
ghostlog("The syndicate depot has declared code red.")
|
||||
alert_log += "Code RED: [reason]"
|
||||
called_backup = TRUE
|
||||
lockout_computers()
|
||||
for(var/obj/machinery/door/poddoor/P in airlocks)
|
||||
if(P.density && P.id_tag == "syndi_depot_lvl2" && !P.operating)
|
||||
spawn(0)
|
||||
P.open()
|
||||
if(!silent)
|
||||
announce_here("Depot Code RED", reason)
|
||||
|
||||
var/comms_online = FALSE
|
||||
if(istype(comms_computer))
|
||||
if(!(comms_computer.stat & (NOPOWER|BROKEN)))
|
||||
comms_online = TRUE
|
||||
if(comms_online)
|
||||
spawn(0)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(prob(50))
|
||||
if(L.name == "syndi_depot_backup")
|
||||
var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space/S = new /mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space(get_turf(L))
|
||||
S.name = "Syndicate Backup " + "([rand(1, 1000)])"
|
||||
S.depotarea = src
|
||||
list_add(S, guard_list)
|
||||
else if(!silent)
|
||||
announce_here("Depot Communications Offline", "Comms computer is damaged, destroyed or depowered. Unable to call in backup from Syndicate HQ.")
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/activate_self_destruct(reason, containment_failure, mob/user)
|
||||
if(used_self_destruct)
|
||||
return
|
||||
log_game("Depot code: delta: " + list_show(hostile_list, TRUE))
|
||||
ghostlog("The syndicate depot is about to self-destruct.")
|
||||
alert_log += "Code DELTA: [reason]"
|
||||
used_self_destruct = TRUE
|
||||
local_alarm = TRUE
|
||||
called_backup = TRUE
|
||||
activate_lockdown(TRUE)
|
||||
lockout_computers()
|
||||
updateicon()
|
||||
despawn_guards()
|
||||
if(containment_failure)
|
||||
announce_here("Depot Code DELTA", reason)
|
||||
else
|
||||
announce_here("Depot Code DELTA","[reason] Depot declared lost to hostile forces. Priming self-destruct!")
|
||||
|
||||
if(user)
|
||||
var/turf/T = get_turf(user)
|
||||
var/area/A = get_area(T)
|
||||
var/log_msg = "[key_name(user)] has armed the depot self destruct device at [A.name] ([T.x],[T.y],[T.z])"
|
||||
message_admins(log_msg)
|
||||
log_game(log_msg)
|
||||
playsound(user, 'sound/machines/Alarm.ogg', 100, 0, 0)
|
||||
else
|
||||
log_game("Depot self destruct activated.")
|
||||
if(reactor)
|
||||
reactor.overload(containment_failure)
|
||||
else
|
||||
message_admins("<span class='adminnotice'>Syndicate Depot lacks reactor to initiate self-destruct. Must be destroyed manually.</span>")
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/activate_lockdown()
|
||||
if(used_lockdown)
|
||||
return
|
||||
used_lockdown = TRUE
|
||||
for(var/obj/machinery/door/airlock/A in src)
|
||||
spawn(0)
|
||||
A.close()
|
||||
if(A.density)
|
||||
A.lock()
|
||||
|
||||
/area/syndicate_depot/proc/lockout_computers()
|
||||
for(var/obj/machinery/computer/syndicate_depot/C in src)
|
||||
C.activate_security_lockout()
|
||||
|
||||
/area/syndicate_depot/proc/toggle_door_locks()
|
||||
for(var/obj/machinery/door/airlock/A in src)
|
||||
A.emergency = !A.emergency
|
||||
if(A.locked)
|
||||
A.locked = !A.locked
|
||||
A.update_icon()
|
||||
|
||||
/area/syndicate_depot/proc/toggle_falsewalls()
|
||||
for(var/obj/structure/falsewall/reinforced/F in src)
|
||||
spawn(0)
|
||||
F.toggle()
|
||||
|
||||
/area/syndicate_depot/proc/toggle_teleport_beacon()
|
||||
for(var/obj/machinery/bluespace_beacon/syndicate/B in src)
|
||||
return B.toggle()
|
||||
|
||||
/area/syndicate_depot/proc/announce_here(a_header = "Depot Defense Alert", a_text = "")
|
||||
var/msg_text = "<font size=4 color='red'>[a_header]</font><br><font color='red'>[a_text]</font>"
|
||||
var/list/receivers = list()
|
||||
for(var/mob/M in mob_list)
|
||||
if(!M.ckey)
|
||||
continue
|
||||
var/turf/T = get_turf(M)
|
||||
if(T.loc != src)
|
||||
continue
|
||||
receivers |= M
|
||||
for(var/mob/R in receivers)
|
||||
to_chat(R, msg_text)
|
||||
R << sound('sound/misc/notice1.ogg')
|
||||
|
||||
/area/syndicate_depot/proc/shields_up()
|
||||
if(shield_list.len)
|
||||
return
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "syndi_depot_shield")
|
||||
var/obj/machinery/shieldwall/syndicate/S = new /obj/machinery/shieldwall/syndicate(L.loc)
|
||||
shield_list += S.UID()
|
||||
|
||||
/area/syndicate_depot/proc/shields_key_check()
|
||||
if(!shield_list.len)
|
||||
return
|
||||
if(detected_mech || detected_pod || detected_double_agent)
|
||||
return
|
||||
shields_down()
|
||||
|
||||
/area/syndicate_depot/proc/shields_down()
|
||||
for(var/shuid in shield_list)
|
||||
var/obj/machinery/shieldwall/syndicate/S = locateUID(shuid)
|
||||
if(S)
|
||||
qdel(S)
|
||||
shield_list = list()
|
||||
|
||||
/area/syndicate_depot/proc/despawn_guards()
|
||||
for(var/mob/thismob in list_getmobs(guard_list))
|
||||
new /obj/effect/portal(get_turf(thismob))
|
||||
qdel(thismob)
|
||||
guard_list = list()
|
||||
|
||||
/area/syndicate_depot/proc/ghostlog(gmsg)
|
||||
if(istype(reactor))
|
||||
var/image/alert_overlay = image('icons/obj/flag.dmi', "syndiflag")
|
||||
notify_ghosts(gmsg, title = "Depot News", source = reactor, alert_overlay = alert_overlay, action = NOTIFY_JUMP)
|
||||
|
||||
/area/syndicate_depot/proc/declare_started()
|
||||
if(!run_started)
|
||||
run_started = TRUE
|
||||
log_game("Depot run: started: " + list_show(hostile_list, TRUE))
|
||||
|
||||
/area/syndicate_depot/proc/declare_finished()
|
||||
if(!run_finished && !used_self_destruct)
|
||||
run_finished = TRUE
|
||||
log_game("Depot run: finished successfully: " + list_show(hostile_list, TRUE))
|
||||
|
||||
/area/syndicate_depot/proc/list_add(mob/M, list/L)
|
||||
if(!istype(M))
|
||||
return
|
||||
var/mob_uid = M.UID()
|
||||
if(mob_uid in L)
|
||||
return
|
||||
L += mob_uid
|
||||
|
||||
/area/syndicate_depot/proc/list_remove(mob/M, list/L)
|
||||
if(!istype(M))
|
||||
return
|
||||
var/mob_uid = M.UID()
|
||||
if(mob_uid in L)
|
||||
L -= mob_uid
|
||||
|
||||
/area/syndicate_depot/proc/list_includes(mob/M, list/L)
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
var/mob_uid = M.UID()
|
||||
if(mob_uid in L)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/area/syndicate_depot/proc/list_show(list/L, show_ckeys = FALSE)
|
||||
var/list/formatted = list()
|
||||
for(var/uid in L)
|
||||
var/mob/M = locateUID(uid)
|
||||
if(!istype(M))
|
||||
continue
|
||||
if(show_ckeys)
|
||||
formatted += "[M.ckey]([M])"
|
||||
else
|
||||
formatted += "[M]"
|
||||
return formatted.Join(", ")
|
||||
|
||||
/area/syndicate_depot/proc/list_getmobs(list/L, show_ckeys = FALSE)
|
||||
var/list/moblist = list()
|
||||
for(var/uid in L)
|
||||
var/mob/M = locateUID(uid)
|
||||
if(!istype(M))
|
||||
continue
|
||||
moblist += M
|
||||
return moblist
|
||||
|
||||
/area/syndicate_depot/proc/list_gethtmlmobs(list/L)
|
||||
var/returntext = ""
|
||||
var/list/moblist = list_getmobs(L)
|
||||
if(moblist.len)
|
||||
returntext += "<UL>"
|
||||
for(var/mob/thismob in moblist)
|
||||
returntext += "<LI>[thismob]</LI>"
|
||||
returntext += "</UL>"
|
||||
else
|
||||
returntext += "<BR>NONE"
|
||||
return returntext
|
||||
|
||||
/area/syndicate_depot/outer
|
||||
name = "Suspicious Asteroid"
|
||||
icon_state = "green"
|
||||
|
||||
/area/syndicate_depot/perimeter
|
||||
name = "Suspicious Asteroid Perimeter"
|
||||
icon_state = "yellow"
|
||||
|
||||
|
||||
/area/syndicate_depot/perimeter/proc/perimeter_shields_up()
|
||||
if(shield_list.len)
|
||||
return
|
||||
for(var/turf/T in src)
|
||||
var/obj/machinery/shieldwall/syndicate/S = new /obj/machinery/shieldwall/syndicate(T)
|
||||
S.alpha = 0
|
||||
shield_list += S.UID()
|
||||
|
||||
/area/syndicate_depot/perimeter/proc/perimeter_shields_down()
|
||||
for(var/shuid in shield_list)
|
||||
var/obj/machinery/shieldwall/syndicate/S = locateUID(shuid)
|
||||
if(S)
|
||||
qdel(S)
|
||||
shield_list = list()
|
||||
|
||||
|
||||
//EXTRA
|
||||
|
||||
/area/asteroid // -- TLE
|
||||
|
||||
@@ -0,0 +1,427 @@
|
||||
|
||||
/area/syndicate_depot
|
||||
name = "Suspicious Supply Depot"
|
||||
icon_state = "red"
|
||||
tele_proof = 1
|
||||
|
||||
var/local_alarm = FALSE // Level 1: Local alarm tripped, bot spawned, red fire overlay activated
|
||||
var/called_backup = FALSE // Level 2: Remote alarm tripped. Bot may path through depot. Backup spawned.
|
||||
var/used_self_destruct = FALSE // Level 3: Self destruct activated. Depot will be destroyed shortly.
|
||||
|
||||
var/run_started = FALSE
|
||||
var/run_finished = FALSE
|
||||
|
||||
// Soft UID-based refs
|
||||
var/list/guard_list = list()
|
||||
var/list/hostile_list = list()
|
||||
var/list/dead_list = list()
|
||||
var/list/peaceful_list = list()
|
||||
var/list/shield_list = list()
|
||||
|
||||
var/list/alert_log = list() // no refs, just a simple list of text strings
|
||||
|
||||
var/used_lockdown = FALSE
|
||||
var/destroyed = FALSE
|
||||
var/something_looted = FALSE
|
||||
var/on_peaceful = FALSE
|
||||
var/peace_betrayed = FALSE
|
||||
var/detected_mech = FALSE
|
||||
var/detected_pod = FALSE
|
||||
var/detected_double_agent = FALSE
|
||||
var/obj/machinery/computer/syndicate_depot/syndiecomms/comms_computer = null
|
||||
var/obj/structure/fusionreactor/reactor
|
||||
|
||||
/area/syndicate_depot/updateicon()
|
||||
if(destroyed)
|
||||
icon_state = null
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
else if(on_peaceful)
|
||||
icon_state = "green"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else if(used_self_destruct)
|
||||
icon_state = "radiation"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else if(called_backup)
|
||||
icon_state = "red"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else if(local_alarm)
|
||||
icon_state = "bluenew"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else
|
||||
icon_state = null
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
|
||||
/area/syndicate_depot/proc/reset_alert()
|
||||
|
||||
if(used_self_destruct)
|
||||
return
|
||||
|
||||
local_alarm = FALSE
|
||||
called_backup = FALSE
|
||||
used_self_destruct = FALSE
|
||||
something_looted = FALSE
|
||||
detected_mech = FALSE
|
||||
detected_pod = FALSE
|
||||
detected_double_agent = FALSE
|
||||
updateicon()
|
||||
despawn_guards()
|
||||
|
||||
guard_list = list()
|
||||
hostile_list = list()
|
||||
dead_list = list()
|
||||
peaceful_list = list()
|
||||
|
||||
alert_log += "Alert level reset."
|
||||
|
||||
/area/syndicate_depot/proc/increase_alert(reason)
|
||||
if(on_peaceful)
|
||||
peaceful_mode(FALSE, FALSE)
|
||||
peace_betrayed = TRUE
|
||||
activate_self_destruct("Depot has been infiltrated by double-agents.", TRUE, null)
|
||||
return
|
||||
if(!local_alarm)
|
||||
local_alarm(reason, FALSE)
|
||||
return
|
||||
if(!called_backup)
|
||||
call_backup(reason, FALSE)
|
||||
return
|
||||
if(!used_self_destruct)
|
||||
activate_self_destruct(reason, FALSE, null)
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/locker_looted()
|
||||
something_looted = TRUE
|
||||
if(on_peaceful)
|
||||
increase_alert("Thieves!")
|
||||
|
||||
/area/syndicate_depot/proc/turret_died()
|
||||
something_looted = TRUE
|
||||
if(on_peaceful)
|
||||
increase_alert("Vandals!")
|
||||
|
||||
/area/syndicate_depot/proc/saw_mech(obj/mecha/E)
|
||||
if(detected_mech)
|
||||
return
|
||||
detected_mech = TRUE
|
||||
increase_alert("Hostile mecha detected: [E]")
|
||||
|
||||
/area/syndicate_depot/proc/saw_pod(obj/spacepod/P)
|
||||
if(detected_pod)
|
||||
return
|
||||
detected_pod = TRUE
|
||||
increase_alert("Hostile spacepod detected: [P]")
|
||||
|
||||
/area/syndicate_depot/proc/saw_double_agent(mob/living/M)
|
||||
if(detected_double_agent)
|
||||
return
|
||||
detected_double_agent = TRUE
|
||||
increase_alert("Hostile double-agent detected: [M]")
|
||||
|
||||
/area/syndicate_depot/proc/peaceful_mode(newvalue, bycomputer)
|
||||
if(newvalue)
|
||||
log_game("Depot visit: started")
|
||||
alert_log += "Code GREEN: visitor mode started."
|
||||
ghostlog("The syndicate depot has visitors")
|
||||
for(var/mob/living/simple_animal/bot/medbot/syndicate/B in src)
|
||||
qdel(B)
|
||||
for(var/mob/living/simple_animal/hostile/syndicate/N in src)
|
||||
N.a_intent = INTENT_HELP
|
||||
for(var/obj/structure/closet/secure_closet/syndicate/depot/L in src)
|
||||
if(L.opened)
|
||||
L.close()
|
||||
if(!L.locked)
|
||||
L.locked = 1
|
||||
L.req_access = list(access_syndicate_leader)
|
||||
L.update_icon()
|
||||
for(var/obj/machinery/computer/syndicate_depot/teleporter/P in src)
|
||||
if(!P.portal_enabled)
|
||||
P.toggle_portal()
|
||||
for(var/obj/machinery/door/airlock/hatch/syndicate/vault/V in src)
|
||||
if(!V.density)
|
||||
V.close()
|
||||
V.emergency = 0
|
||||
if(!V.locked)
|
||||
V.locked = !V.locked
|
||||
V.update_icon()
|
||||
else
|
||||
log_game("Depot visit: ended")
|
||||
alert_log += "Visitor mode ended."
|
||||
for(var/mob/living/simple_animal/hostile/syndicate/N in src)
|
||||
N.a_intent = INTENT_HARM
|
||||
for(var/obj/machinery/door/airlock/A in src)
|
||||
A.req_access_txt = "[access_syndicate_leader]"
|
||||
for(var/obj/structure/closet/secure_closet/syndicate/depot/L in src)
|
||||
if(L.locked)
|
||||
L.locked = !L.locked
|
||||
L.req_access = list()
|
||||
L.update_icon()
|
||||
on_peaceful = newvalue
|
||||
if(newvalue)
|
||||
announce_here("Depot Visitor","A Syndicate agent is visiting the depot.")
|
||||
else
|
||||
if(bycomputer)
|
||||
message_admins("Syndicate Depot visitor mode deactivated. Visitors:")
|
||||
announce_here("Depot Alert","Visit ended. All visting agents signed out.")
|
||||
else
|
||||
message_admins("Syndicate Depot visitor mode auto-deactivated because visitors robbed depot! Visitors:")
|
||||
announce_here("Depot Alert","A visiting agent has betrayed the Syndicate. Shoot all visitors on sight!")
|
||||
for(var/mob/M in list_getmobs(peaceful_list))
|
||||
if("syndicate" in M.faction)
|
||||
M.faction -= "syndicate"
|
||||
message_admins("- SYNDI DEPOT VISITOR: [ADMIN_FULLMONTY(M)]")
|
||||
list_add(M, hostile_list)
|
||||
peaceful_list = list()
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/local_alarm(reason, silent)
|
||||
if(local_alarm)
|
||||
return
|
||||
log_game("Depot code: blue: " + list_show(hostile_list, TRUE))
|
||||
ghostlog("The syndicate depot has declared code blue.")
|
||||
alert_log += "Code BLUE: [reason]"
|
||||
local_alarm = TRUE
|
||||
if(!silent)
|
||||
announce_here("Depot Code BLUE", reason)
|
||||
var/list/possible_bot_spawns = list()
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "syndi_depot_bot")
|
||||
possible_bot_spawns |= L
|
||||
if(possible_bot_spawns.len)
|
||||
var/obj/effect/landmark/S = pick(possible_bot_spawns)
|
||||
new /obj/effect/portal(get_turf(S))
|
||||
var/mob/living/simple_animal/bot/ed209/syndicate/B = new /mob/living/simple_animal/bot/ed209/syndicate(get_turf(S))
|
||||
list_add(B, guard_list)
|
||||
B.depotarea = src
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/call_backup(reason, silent)
|
||||
if(called_backup || used_self_destruct)
|
||||
return
|
||||
log_game("Depot code: red: " + list_show(hostile_list, TRUE))
|
||||
ghostlog("The syndicate depot has declared code red.")
|
||||
alert_log += "Code RED: [reason]"
|
||||
called_backup = TRUE
|
||||
lockout_computers()
|
||||
for(var/obj/machinery/door/poddoor/P in airlocks)
|
||||
if(P.density && P.id_tag == "syndi_depot_lvl2" && !P.operating)
|
||||
spawn(0)
|
||||
P.open()
|
||||
if(!silent)
|
||||
announce_here("Depot Code RED", reason)
|
||||
|
||||
var/comms_online = FALSE
|
||||
if(istype(comms_computer))
|
||||
if(!(comms_computer.stat & (NOPOWER|BROKEN)))
|
||||
comms_online = TRUE
|
||||
if(comms_online)
|
||||
spawn(0)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(prob(50))
|
||||
if(L.name == "syndi_depot_backup")
|
||||
var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space/S = new /mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space(get_turf(L))
|
||||
S.name = "Syndicate Backup " + "([rand(1, 1000)])"
|
||||
S.depotarea = src
|
||||
list_add(S, guard_list)
|
||||
else if(!silent)
|
||||
announce_here("Depot Communications Offline", "Comms computer is damaged, destroyed or depowered. Unable to call in backup from Syndicate HQ.")
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/activate_self_destruct(reason, containment_failure, mob/user)
|
||||
if(used_self_destruct)
|
||||
return
|
||||
log_game("Depot code: delta: " + list_show(hostile_list, TRUE))
|
||||
ghostlog("The syndicate depot is about to self-destruct.")
|
||||
alert_log += "Code DELTA: [reason]"
|
||||
used_self_destruct = TRUE
|
||||
local_alarm = TRUE
|
||||
called_backup = TRUE
|
||||
activate_lockdown(TRUE)
|
||||
lockout_computers()
|
||||
updateicon()
|
||||
despawn_guards()
|
||||
if(containment_failure)
|
||||
announce_here("Depot Code DELTA", reason)
|
||||
else
|
||||
announce_here("Depot Code DELTA","[reason] Depot declared lost to hostile forces. Priming self-destruct!")
|
||||
|
||||
if(user)
|
||||
var/turf/T = get_turf(user)
|
||||
var/area/A = get_area(T)
|
||||
var/log_msg = "[key_name(user)] has armed the depot self destruct device at [A.name] ([T.x],[T.y],[T.z])"
|
||||
message_admins(log_msg)
|
||||
log_game(log_msg)
|
||||
playsound(user, 'sound/machines/Alarm.ogg', 100, 0, 0)
|
||||
else
|
||||
log_game("Depot self destruct activated.")
|
||||
if(reactor)
|
||||
reactor.overload(containment_failure)
|
||||
else
|
||||
message_admins("<span class='adminnotice'>Syndicate Depot lacks reactor to initiate self-destruct. Must be destroyed manually.</span>")
|
||||
updateicon()
|
||||
|
||||
/area/syndicate_depot/proc/activate_lockdown()
|
||||
if(used_lockdown)
|
||||
return
|
||||
used_lockdown = TRUE
|
||||
for(var/obj/machinery/door/airlock/A in src)
|
||||
spawn(0)
|
||||
A.close()
|
||||
if(A.density)
|
||||
A.lock()
|
||||
|
||||
/area/syndicate_depot/proc/lockout_computers()
|
||||
for(var/obj/machinery/computer/syndicate_depot/C in src)
|
||||
C.activate_security_lockout()
|
||||
|
||||
/area/syndicate_depot/proc/toggle_door_locks()
|
||||
for(var/obj/machinery/door/airlock/A in src)
|
||||
A.emergency = !A.emergency
|
||||
if(A.locked)
|
||||
A.locked = !A.locked
|
||||
A.update_icon()
|
||||
|
||||
/area/syndicate_depot/proc/toggle_falsewalls()
|
||||
for(var/obj/structure/falsewall/reinforced/F in src)
|
||||
spawn(0)
|
||||
F.toggle()
|
||||
|
||||
/area/syndicate_depot/proc/toggle_teleport_beacon()
|
||||
for(var/obj/machinery/bluespace_beacon/syndicate/B in src)
|
||||
return B.toggle()
|
||||
|
||||
/area/syndicate_depot/proc/announce_here(a_header = "Depot Defense Alert", a_text = "")
|
||||
var/msg_text = "<font size=4 color='red'>[a_header]</font><br><font color='red'>[a_text]</font>"
|
||||
var/list/receivers = list()
|
||||
for(var/mob/M in mob_list)
|
||||
if(!M.ckey)
|
||||
continue
|
||||
var/turf/T = get_turf(M)
|
||||
if(T.loc != src)
|
||||
continue
|
||||
receivers |= M
|
||||
for(var/mob/R in receivers)
|
||||
to_chat(R, msg_text)
|
||||
R << sound('sound/misc/notice1.ogg')
|
||||
|
||||
/area/syndicate_depot/proc/shields_up()
|
||||
if(shield_list.len)
|
||||
return
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "syndi_depot_shield")
|
||||
var/obj/machinery/shieldwall/syndicate/S = new /obj/machinery/shieldwall/syndicate(L.loc)
|
||||
shield_list += S.UID()
|
||||
|
||||
/area/syndicate_depot/proc/shields_key_check()
|
||||
if(!shield_list.len)
|
||||
return
|
||||
if(detected_mech || detected_pod || detected_double_agent)
|
||||
return
|
||||
shields_down()
|
||||
|
||||
/area/syndicate_depot/proc/shields_down()
|
||||
for(var/shuid in shield_list)
|
||||
var/obj/machinery/shieldwall/syndicate/S = locateUID(shuid)
|
||||
if(S)
|
||||
qdel(S)
|
||||
shield_list = list()
|
||||
|
||||
/area/syndicate_depot/proc/despawn_guards()
|
||||
for(var/mob/thismob in list_getmobs(guard_list))
|
||||
new /obj/effect/portal(get_turf(thismob))
|
||||
qdel(thismob)
|
||||
guard_list = list()
|
||||
|
||||
/area/syndicate_depot/proc/ghostlog(gmsg)
|
||||
if(istype(reactor))
|
||||
var/image/alert_overlay = image('icons/obj/flag.dmi', "syndiflag")
|
||||
notify_ghosts(gmsg, title = "Depot News", source = reactor, alert_overlay = alert_overlay, action = NOTIFY_JUMP)
|
||||
|
||||
/area/syndicate_depot/proc/declare_started()
|
||||
if(!run_started)
|
||||
run_started = TRUE
|
||||
log_game("Depot run: started: " + list_show(hostile_list, TRUE))
|
||||
|
||||
/area/syndicate_depot/proc/declare_finished()
|
||||
if(!run_finished && !used_self_destruct)
|
||||
run_finished = TRUE
|
||||
log_game("Depot run: finished successfully: " + list_show(hostile_list, TRUE))
|
||||
|
||||
/area/syndicate_depot/proc/list_add(mob/M, list/L)
|
||||
if(!istype(M))
|
||||
return
|
||||
var/mob_uid = M.UID()
|
||||
if(mob_uid in L)
|
||||
return
|
||||
L += mob_uid
|
||||
|
||||
/area/syndicate_depot/proc/list_remove(mob/M, list/L)
|
||||
if(!istype(M))
|
||||
return
|
||||
var/mob_uid = M.UID()
|
||||
if(mob_uid in L)
|
||||
L -= mob_uid
|
||||
|
||||
/area/syndicate_depot/proc/list_includes(mob/M, list/L)
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
var/mob_uid = M.UID()
|
||||
if(mob_uid in L)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/area/syndicate_depot/proc/list_show(list/L, show_ckeys = FALSE)
|
||||
var/list/formatted = list()
|
||||
for(var/uid in L)
|
||||
var/mob/M = locateUID(uid)
|
||||
if(!istype(M))
|
||||
continue
|
||||
if(show_ckeys)
|
||||
formatted += "[M.ckey]([M])"
|
||||
else
|
||||
formatted += "[M]"
|
||||
return formatted.Join(", ")
|
||||
|
||||
/area/syndicate_depot/proc/list_getmobs(list/L, show_ckeys = FALSE)
|
||||
var/list/moblist = list()
|
||||
for(var/uid in L)
|
||||
var/mob/M = locateUID(uid)
|
||||
if(!istype(M))
|
||||
continue
|
||||
moblist += M
|
||||
return moblist
|
||||
|
||||
/area/syndicate_depot/proc/list_gethtmlmobs(list/L)
|
||||
var/returntext = ""
|
||||
var/list/moblist = list_getmobs(L)
|
||||
if(moblist.len)
|
||||
returntext += "<UL>"
|
||||
for(var/mob/thismob in moblist)
|
||||
returntext += "<LI>[thismob]</LI>"
|
||||
returntext += "</UL>"
|
||||
else
|
||||
returntext += "<BR>NONE"
|
||||
return returntext
|
||||
|
||||
/area/syndicate_depot/outer
|
||||
name = "Suspicious Asteroid"
|
||||
icon_state = "green"
|
||||
|
||||
/area/syndicate_depot/perimeter
|
||||
name = "Suspicious Asteroid Perimeter"
|
||||
icon_state = "yellow"
|
||||
|
||||
|
||||
/area/syndicate_depot/perimeter/proc/perimeter_shields_up()
|
||||
if(shield_list.len)
|
||||
return
|
||||
for(var/turf/T in src)
|
||||
var/obj/machinery/shieldwall/syndicate/S = new /obj/machinery/shieldwall/syndicate(T)
|
||||
S.alpha = 0
|
||||
shield_list += S.UID()
|
||||
|
||||
/area/syndicate_depot/perimeter/proc/perimeter_shields_down()
|
||||
for(var/shuid in shield_list)
|
||||
var/obj/machinery/shieldwall/syndicate/S = locateUID(shuid)
|
||||
if(S)
|
||||
qdel(S)
|
||||
shield_list = list()
|
||||
@@ -395,6 +395,7 @@
|
||||
#include "code\game\world.dm"
|
||||
#include "code\game\area\ai_monitored.dm"
|
||||
#include "code\game\area\areas.dm"
|
||||
#include "code\game\area\depot-areas.dm"
|
||||
#include "code\game\area\Dynamic areas.dm"
|
||||
#include "code\game\area\Space Station 13 areas.dm"
|
||||
#include "code\game\dna\dna2.dm"
|
||||
|
||||
Reference in New Issue
Block a user