diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 99944ace869..bae022293d9 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -38,6 +38,9 @@
#define APC_CHARGING 1
#define APC_FULLY_CHARGED 2
+#define APC_DRAIN_TIME 75
+#define APC_POWER_GAIN 10
+
// the Area Power Controller (APC), formerly Power Distribution Unit (PDU)
// one per area, needs wire connection to power network through a terminal
@@ -794,23 +797,24 @@
if(isethereal(user))
var/mob/living/carbon/human/H = user
var/datum/species/ethereal/E = H.dna.species
+ var/charge_limit = ETHEREAL_CHARGE_DANGEROUS - APC_POWER_GAIN
if((H.a_intent == INTENT_HARM) && (E.drain_time < world.time))
- if(cell.charge <= (cell.maxcharge / 2)) // if charge is under 50% you shouldn't drain it
- to_chat(H, "The APC doesn't have much power, you probably shouldn't drain any.")
+ if(cell.charge <= (cell.maxcharge / 2)) // ethereals can't drain APCs under half charge, this is so that they are forced to look to alternative power sources if the station is running low
+ to_chat(H, "The APC's syphon safeties prevent you from draining power!")
return
var/obj/item/organ/stomach/ethereal/stomach = H.getorganslot(ORGAN_SLOT_STOMACH)
- if(stomach.crystal_charge > 145)
+ if(stomach.crystal_charge > charge_limit)
to_chat(H, "Your charge is full!")
return
- E.drain_time = world.time + 75
+ E.drain_time = world.time + APC_DRAIN_TIME
to_chat(H, "You start channeling some power through the APC into your body.")
- if(do_after(user, 75, target = src))
- if(cell.charge <= (cell.maxcharge / 2) || (stomach.crystal_charge > 145))
+ if(do_after(user, APC_DRAIN_TIME, target = src))
+ if(cell.charge <= (cell.maxcharge / 2) || (stomach.crystal_charge > charge_limit))
return
if(istype(stomach))
to_chat(H, "You receive some charge from the APC.")
- stomach.adjust_charge(10)
- cell.charge -= 10
+ stomach.adjust_charge(APC_POWER_GAIN)
+ cell.charge -= APC_POWER_GAIN
else
to_chat(H, "You can't receive charge from the APC!")
return
@@ -819,18 +823,18 @@
to_chat(H, "The APC is full!")
return
var/obj/item/organ/stomach/ethereal/stomach = H.getorganslot(ORGAN_SLOT_STOMACH)
- if(stomach.crystal_charge < 10)
+ if(stomach.crystal_charge < APC_POWER_GAIN)
to_chat(H, "Your charge is too low!")
return
- E.drain_time = world.time + 75
+ E.drain_time = world.time + APC_DRAIN_TIME
to_chat(H, "You start channeling power through your body into the APC.")
- if(do_after(user, 75, target = src))
- if(cell.charge == cell.maxcharge || (stomach.crystal_charge < 10))
+ if(do_after(user, APC_DRAIN_TIME, target = src))
+ if(cell.charge == cell.maxcharge || (stomach.crystal_charge < APC_POWER_GAIN))
return
if(istype(stomach))
to_chat(H, "You transfer some power to the APC.")
- stomach.adjust_charge(-10)
- cell.charge += 10
+ stomach.adjust_charge(-APC_POWER_GAIN)
+ cell.charge += APC_POWER_GAIN
else
to_chat(H, "You can't transfer power to the APC!")
return
@@ -1461,6 +1465,9 @@
#undef APC_CHARGING
#undef APC_FULLY_CHARGED
+#undef APC_DRAIN_TIME
+#undef APC_POWER_GAIN
+
//update_overlay
#undef APC_UPOVERLAY_CHARGEING0
#undef APC_UPOVERLAY_CHARGEING1
diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm
index f2af1196e57..94f5023bc89 100644
--- a/code/modules/power/cell.dm
+++ b/code/modules/power/cell.dm
@@ -1,3 +1,7 @@
+#define CELL_DRAIN_TIME 20
+#define CELL_POWER_GAIN 3
+#define CELL_POWER_DRAIN 100
+
/obj/item/stock_parts/cell
name = "power cell"
desc = "A rechargeable electrochemical power cell."
@@ -154,26 +158,27 @@
if(isethereal(user))
var/mob/living/carbon/human/H = user
var/datum/species/ethereal/E = H.dna.species
+ var/charge_limit = ETHEREAL_CHARGE_DANGEROUS - CELL_POWER_GAIN
if(E.drain_time > world.time)
return
- if(charge < 100)
- to_chat(H, "The [src] doesn't have enough power!")
+ if(charge < CELL_POWER_DRAIN)
+ to_chat(H, "[src] doesn't have enough power!")
return
var/obj/item/organ/stomach/ethereal/stomach = H.getorganslot(ORGAN_SLOT_STOMACH)
- if(stomach.crystal_charge > 146)
+ if(stomach.crystal_charge > charge_limit)
to_chat(H, "Your charge is full!")
return
- to_chat(H, "You clumsily channel power through the [src] and into your body, wasting some in the process.")
- E.drain_time = world.time + 20
- if(do_after(user, 20, target = src))
- if((charge < 100) || (stomach.crystal_charge > 146))
+ to_chat(H, "You clumsily channel power through [src] and into your body, wasting some in the process.")
+ E.drain_time = world.time + CELL_DRAIN_TIME
+ if(do_after(user, CELL_DRAIN_TIME, target = src))
+ if((charge < CELL_POWER_DRAIN) || (stomach.crystal_charge > charge_limit))
return
if(istype(stomach))
- to_chat(H, "You receive some charge from the [src].")
- stomach.adjust_charge(3)
- charge -= 100 //you waste way more than you receive, so that ethereals cant just steal one cell and forget about hunger
+ to_chat(H, "You receive some charge from [src].")
+ stomach.adjust_charge(CELL_POWER_GAIN)
+ charge -= CELL_POWER_DRAIN //you waste way more than you receive, so that ethereals cant just steal one cell and forget about hunger
else
- to_chat(H, "You can't receive charge from the [src]!")
+ to_chat(H, "You can't receive charge from [src]!")
return
@@ -398,3 +403,7 @@
var/area/A = get_area(src)
if(!A.lightswitch || !A.light_power)
charge = 0 //For naturally depowered areas, we start with no power
+
+#undef CELL_DRAIN_TIME
+#undef CELL_POWER_GAIN
+#undef CELL_POWER_DRAIN
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 06c22220649..f82a03f723e 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -12,6 +12,9 @@
#define BROKEN_SPARKS_MIN (30 SECONDS)
#define BROKEN_SPARKS_MAX (90 SECONDS)
+#define LIGHT_DRAIN_TIME 30
+#define LIGHT_POWER_GAIN 2
+
/obj/item/wallframe/light_fixture
name = "light fixture frame"
desc = "Used for building lights."
@@ -658,12 +661,12 @@
if(E.drain_time > world.time)
return
to_chat(H, "You start channeling some power through the [fitting] into your body.")
- E.drain_time = world.time + 30
- if(do_after(user, 30, target = src))
+ E.drain_time = world.time + LIGHT_DRAIN_TIME
+ if(do_after(user, LIGHT_DRAIN_TIME, target = src))
var/obj/item/organ/stomach/ethereal/stomach = H.getorganslot(ORGAN_SLOT_STOMACH)
if(istype(stomach))
to_chat(H, "You receive some charge from the [fitting].")
- stomach.adjust_charge(2)
+ stomach.adjust_charge(LIGHT_POWER_GAIN)
else
to_chat(H, "You can't receive charge from the [fitting]!")
return
@@ -916,3 +919,6 @@
layer = 2.5
light_type = /obj/item/light/bulb
fitting = "bulb"
+
+#undef LIGHT_DRAIN_TIME
+#undef LIGHT_POWER_GAIN