mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
@@ -17,12 +17,12 @@
|
||||
if(announce)
|
||||
event_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg')
|
||||
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai, /area/syndicate_depot)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering, /area/syndicate_depot)
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering)
|
||||
|
||||
for(var/obj/machinery/power/smes/S in machines)
|
||||
var/area/current_area = get_area(S)
|
||||
if(current_area.type in skipped_areas || !is_station_level(S.z))
|
||||
if((current_area.type in skipped_areas) || !is_station_level(S.z))
|
||||
continue
|
||||
S.last_charge = S.charge
|
||||
S.last_output_attempt = S.output_attempt
|
||||
@@ -35,26 +35,26 @@
|
||||
|
||||
for(var/obj/machinery/power/apc/C in apcs)
|
||||
var/area/current_area = get_area(C)
|
||||
if(current_area.type in skipped_areas_apc || !is_station_level(C.z))
|
||||
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
|
||||
continue
|
||||
if(C.cell)
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore(var/announce = 1)
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai, /area/syndicate_depot)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering, /area/syndicate_depot)
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering)
|
||||
|
||||
if(announce)
|
||||
event_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in apcs)
|
||||
var/area/current_area = get_area(C)
|
||||
if(current_area.type in skipped_areas_apc || !is_station_level(C.z))
|
||||
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
|
||||
continue
|
||||
if(C.cell)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in machines)
|
||||
var/area/current_area = get_area(S)
|
||||
if(current_area.type in skipped_areas || !is_station_level(S.z))
|
||||
if((current_area.type in skipped_areas) || !is_station_level(S.z))
|
||||
continue
|
||||
S.charge = S.last_charge
|
||||
S.output_attempt = S.last_output_attempt
|
||||
|
||||
@@ -51,7 +51,10 @@
|
||||
var/damage = O.force
|
||||
if(O.damtype == STAMINA)
|
||||
damage = 0
|
||||
health -= damage
|
||||
if(force_threshold && damage < force_threshold)
|
||||
visible_message("<span class='boldwarning'>[src] is unharmed by [O]!</span>")
|
||||
return
|
||||
adjustHealth(damage)
|
||||
visible_message("<span class='boldwarning'>[src] has been attacked with the [O] by [user]. </span>")
|
||||
playsound(loc, O.hitsound, 25, 1, -1)
|
||||
else
|
||||
@@ -125,6 +128,9 @@
|
||||
seen_revived_enemy = TRUE
|
||||
raise_alert("[name] reports intruder [target] has returned from death!")
|
||||
depotarea.list_remove(target, depotarea.dead_list)
|
||||
if(!atoms_share_level(src, target) && prob(20))
|
||||
// This prevents someone from aggroing a depot mob, then hiding in a locker, perfectly safe, while the mob stands there getting killed by their friends.
|
||||
LoseTarget()
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/handle_automated_action()
|
||||
if(seen_enemy)
|
||||
@@ -134,6 +140,14 @@
|
||||
if(scan_cycles >= 15 && istype(depotarea))
|
||||
scan_cycles = 0
|
||||
if(!atoms_share_level(src, spawn_turf))
|
||||
if(istype(loc, /obj/structure/closet))
|
||||
var/obj/structure/closet/O = loc
|
||||
forceMove(get_turf(src))
|
||||
visible_message("<span class='boldwarning'>[src] smashes their way out of [O]!</span>")
|
||||
qdel(O)
|
||||
raise_alert("[src] reported being trapped in a locker.")
|
||||
raised_alert = FALSE
|
||||
return
|
||||
if(alert_on_spacing)
|
||||
raise_alert("[src] lost in space.")
|
||||
death()
|
||||
@@ -196,12 +210,6 @@
|
||||
alert_on_timeout = TRUE
|
||||
alert_on_shield_breach = TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/armory/death()
|
||||
if(depotarea)
|
||||
depotarea.declare_finished()
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/armory/Initialize()
|
||||
. = ..()
|
||||
if(istype(depotarea))
|
||||
|
||||
@@ -258,6 +258,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/disposalconstruct/rpd_act(mob/user, obj/item/rpd/our_rpd)
|
||||
. = TRUE
|
||||
if(our_rpd.mode == RPD_ROTATE_MODE)
|
||||
rotate()
|
||||
else if(our_rpd.mode == RPD_FLIP_MODE)
|
||||
@@ -265,4 +266,4 @@
|
||||
else if(our_rpd.mode == RPD_DELETE_MODE)
|
||||
our_rpd.delete_single_pipe(user, src)
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user