mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
More Overload Lighting Performance
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
S.update_icon()
|
||||
S.power_change()
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
for(var/obj/machinery/power/apc/C in apcs)
|
||||
var/area/current_area = get_area(C)
|
||||
// TODO: Tie into space manager
|
||||
if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels))
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
if(announce)
|
||||
command_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 machines)
|
||||
for(var/obj/machinery/power/apc/C in apcs)
|
||||
var/area/current_area = get_area(C)
|
||||
// TODO: Tie into space manager
|
||||
if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels))
|
||||
|
||||
@@ -977,8 +977,8 @@
|
||||
return 0
|
||||
|
||||
else if(href_list["overload"])
|
||||
if(istype(usr, /mob/living/silicon) && !aidisabled)
|
||||
src.overload_lighting()
|
||||
if(issilicon(usr) && !aidisabled)
|
||||
overload_lighting()
|
||||
|
||||
else if(href_list["malfhack"])
|
||||
var/mob/living/silicon/ai/malfai = usr
|
||||
@@ -1383,17 +1383,17 @@
|
||||
|
||||
// overload all the lights in this APC area
|
||||
|
||||
/obj/machinery/power/apc/proc/overload_lighting(var/chance = 100)
|
||||
if(/* !get_connection() || */ !operating || shorted)
|
||||
/obj/machinery/power/apc/proc/overload_lighting(chance = 100)
|
||||
if(!operating || shorted)
|
||||
return
|
||||
if( cell && cell.charge>=20)
|
||||
cell.use(20);
|
||||
if(cell && cell.charge >= 20)
|
||||
cell.use(20)
|
||||
spawn(0)
|
||||
for(var/obj/machinery/light/L in area)
|
||||
if(prob(chance))
|
||||
L.on = 1
|
||||
L.broken()
|
||||
sleep(1)
|
||||
stoplag()
|
||||
|
||||
/obj/machinery/power/apc/proc/setsubsystem(val)
|
||||
if(cell && cell.charge > 0)
|
||||
|
||||
@@ -514,7 +514,7 @@
|
||||
status = LIGHT_EMPTY
|
||||
update()
|
||||
|
||||
/obj/machinery/light/proc/broken(var/skip_sound_and_sparks = 0)
|
||||
/obj/machinery/light/proc/broken(skip_sound_and_sparks = 0)
|
||||
if(status == LIGHT_EMPTY || status == LIGHT_BROKEN)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user