Merge pull request #9388 from Techhead0/prisonBreak2.0

Refactors and expands the Prison Break event.
This commit is contained in:
PsiOmegaDelta
2015-06-02 18:58:20 +02:00
6 changed files with 102 additions and 40 deletions

View File

@@ -1181,17 +1181,18 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
update_icon()
update()
// overload all the lights in this APC area
// overload the lights in this APC area
/obj/machinery/power/apc/proc/overload_lighting()
/obj/machinery/power/apc/proc/overload_lighting(var/chance = 100)
if(/* !get_connection() || */ !operating || shorted)
return
if( cell && cell.charge>=20)
cell.use(20);
spawn(0)
for(var/obj/machinery/light/L in area)
L.on = 1
L.broken()
if(prob(chance))
L.on = 1
L.broken()
sleep(1)
/obj/machinery/power/apc/proc/setsubsystem(val)