mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 22:13:24 +00:00
cellcharge DoEffectAura sends a message per robot
This commit is contained in:
@@ -17,22 +17,30 @@
|
||||
|
||||
/datum/artifact_effect/uncommon/cellcharge/DoEffectAura()
|
||||
var/atom/holder = get_master_holder()
|
||||
if(holder)
|
||||
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
|
||||
if (!holder)
|
||||
return
|
||||
var/turf/turf = get_turf(holder)
|
||||
if (!turf)
|
||||
return
|
||||
for (var/obj/machinery/power/apc/apc as anything in GLOB.apcs)
|
||||
if (get_dist(turf, apc) <= 200)
|
||||
for (var/obj/item/cell/cell in apc.contents)
|
||||
cell.charge += 25
|
||||
for (var/obj/machinery/power/smes/smes as anything in GLOB.smeses)
|
||||
if (get_dist(turf, smes) <= effectrange)
|
||||
smes.charge += 25
|
||||
var/charged_robots
|
||||
for (var/mob/living/silicon/robot/robot as anything in global.silicon_mob_list)
|
||||
if (get_dist(turf, robot) < 50)
|
||||
var/charged_cells
|
||||
for (var/obj/item/cell/cell in robot.contents)
|
||||
cell.charge += 25
|
||||
charged_cells = TRUE
|
||||
if (charged_cells)
|
||||
to_chat(robot, "<font color='blue'>SYSTEM ALERT: Energy boost detected!</font>")
|
||||
charged_robots = TRUE
|
||||
if (charged_robots)
|
||||
last_message = world.time
|
||||
|
||||
/datum/artifact_effect/uncommon/cellcharge/DoEffectPulse()
|
||||
var/atom/holder = get_master_holder()
|
||||
|
||||
Reference in New Issue
Block a user