Files
VOREStation/code/modules/xenoarcheaology/effects/celldrain.dm
Cameron653 e158fcd3cc Macro Replacements. (#3574)
* A preface to my madness

Travis failed one of my PR's because I copied old code
that used /red /blue /green.

Because of this, I am going to find and replace every
instance of it that I find.

Also this is a test commit to make sure I'm comitting
to the correct branch.

* /blue /green /red replacements

Dear god.

A slow and painful death from acid is more fun than this.

I wouldn't wish this torture on my worst enemy.
And this is only the beginning

* Replace part 2.

Time to fix the human error.

* Fixes mismatches

* Sets macro count to 220

One above the current number of macros in the code.

* Fixes last of the mismatches.

* Removes spaces, replaces \black

Removes spaces
Replaces \black in a few areas where seen
Replaces \bold with <B> </B> where seen

* Updating macro count again

* More fixes!

* Issues fixed! For real this time!

I swear!

* Fixing all the merge conflict files.
2017-07-19 12:47:23 -05:00

49 lines
1.7 KiB
Plaintext

//todo
/datum/artifact_effect/celldrain
name = "cell drain"
effect_type = EFFECT_ELECTRO
var/last_message
/datum/artifact_effect/celldrain/DoEffectTouch(var/mob/user)
if(user)
if(istype(user, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = user
for (var/obj/item/weapon/cell/D in R.contents)
D.charge = max(D.charge - rand() * 100, 0)
R << "<font color='blue'>SYSTEM ALERT: Energy drain detected!</font>"
return 1
return 1
/datum/artifact_effect/celldrain/DoEffectAura()
if(holder)
var/turf/T = get_turf(holder)
for (var/obj/machinery/power/apc/C in range(200, T))
for (var/obj/item/weapon/cell/B in C.contents)
B.charge = max(B.charge - 50,0)
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge = max(S.charge - 100,0)
for (var/mob/living/silicon/robot/M in range(50, T))
for (var/obj/item/weapon/cell/D in M.contents)
D.charge = max(D.charge - 50,0)
if(world.time - last_message > 200)
M << "<font color='red'>SYSTEM ALERT: Energy drain detected!</font>"
last_message = world.time
return 1
/datum/artifact_effect/celldrain/DoEffectPulse()
if(holder)
var/turf/T = get_turf(holder)
for (var/obj/machinery/power/apc/C in range(200, T))
for (var/obj/item/weapon/cell/B in C.contents)
B.charge = max(B.charge - rand() * 150,0)
for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge = max(S.charge - 250,0)
for (var/mob/living/silicon/robot/M in range(100, T))
for (var/obj/item/weapon/cell/D in M.contents)
D.charge = max(D.charge - rand() * 150,0)
if(world.time - last_message > 200)
M << "<font color='red'>SYSTEM ALERT: Energy drain detected!</font>"
last_message = world.time
return 1