handles pods, double agents, shield phase-through

This commit is contained in:
Kyep
2018-08-02 16:43:48 -07:00
parent 62b7f6b55b
commit b5852af194
2 changed files with 39 additions and 2 deletions
+23
View File
@@ -570,6 +570,8 @@ var/list/ghostteleportlocs = list()
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
@@ -603,6 +605,8 @@ var/list/ghostteleportlocs = list()
used_self_destruct = FALSE
something_looted = FALSE
detected_mech = FALSE
detected_pod = FALSE
detected_double_agent = FALSE
updateicon()
despawn_guards()
@@ -645,6 +649,18 @@ var/list/ghostteleportlocs = list()
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")
@@ -839,6 +855,13 @@ var/list/ghostteleportlocs = list()
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)
@@ -83,6 +83,7 @@
var/alert_on_death = FALSE
var/alert_on_timeout = FALSE
var/alert_on_spacing = TRUE
var/alert_on_shield_breach = FALSE
var/seen_enemy = FALSE
var/seen_enemy_name = null
var/seen_revived_enemy = FALSE
@@ -103,11 +104,23 @@
if(!seen_enemy)
seen_enemy = TRUE
playsound(loc, 'sound/weapons/saberon.ogg', 35, 1)
depotarea.list_add(target, depotarea.hostile_list)
if(alert_on_shield_breach)
if(depotarea.shield_list.len)
raise_alert("[name] reports that an intruder is trying to breach the armory shield!")
alert_on_shield_breach = FALSE
raised_alert = FALSE
alert_on_death = TRUE
if(isliving(target))
var/mob/living/M = target
depotarea.list_add(M, depotarea.hostile_list)
if(M.mind && M.mind.special_role == SPECIAL_ROLE_TRAITOR)
depotarea.saw_double_agent(M)
depotarea.declare_started()
seen_enemy_name = target.name
if(istype(target, /obj/mecha))
depotarea.saw_mech(target)
if(istype(target, /obj/spacepod))
depotarea.saw_pod(target)
if(depotarea.list_includes(target, depotarea.dead_list))
seen_revived_enemy = TRUE
raise_alert("[name] reports intruder [target] has returned from death!")
@@ -153,7 +166,7 @@
else
raise_alert("[name] has died.")
if(shield_key && depotarea)
depotarea.shields_down()
depotarea.shields_key_check()
if(depotarea)
depotarea.list_remove(src, depotarea.guard_list)
return ..()
@@ -182,6 +195,7 @@
health = 250
melee_block_chance = 80
alert_on_timeout = TRUE
alert_on_shield_breach = TRUE
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/armory/death()
if(depotarea)