mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-18 19:53:00 +01:00
Merge pull request #8672 from Atermonera/cellcharge-iteration
Cellcharge artifact effect iterates over shorter lists
This commit is contained in:
@@ -19,17 +19,20 @@
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/obj/machinery/power/apc/C in range(200, T))
|
||||
for (var/obj/item/cell/B in C.contents)
|
||||
B.charge += 25
|
||||
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
|
||||
S.charge += 25
|
||||
for (var/mob/living/silicon/robot/M in range(50, T))
|
||||
for (var/obj/item/cell/D in M.contents)
|
||||
D.charge += 25
|
||||
if(world.time - last_message > 200)
|
||||
to_chat(M, "<font color='blue'>SYSTEM ALERT: Energy boost detected!</font>")
|
||||
last_message = world.time
|
||||
for (var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
if(get_dist(holder, C) <= 200)
|
||||
for (var/obj/item/cell/B in C.contents)
|
||||
B.charge += 25
|
||||
for (var/obj/machinery/power/smes/S in GLOB.smeses)
|
||||
if(get_dist(holder, S) <= src.effectrange)
|
||||
S.charge += 25
|
||||
for (var/mob/living/silicon/robot/M in global.silicon_mob_list)
|
||||
if(get_dist(holder, M) < 50)
|
||||
for (var/obj/item/cell/D in M.contents)
|
||||
D.charge += 25
|
||||
if(world.time - last_message > 200)
|
||||
to_chat(M, "<font color='blue'>SYSTEM ALERT: Energy boost detected!</font>")
|
||||
last_message = world.time
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/uncommon/cellcharge/DoEffectPulse()
|
||||
|
||||
Reference in New Issue
Block a user