diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 0d5c9c291f0..d482dae7ddb 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -148,6 +148,30 @@ if(prob(25)) corrupt() +/obj/item/stock_parts/cell/attack_self(mob/user) + var/mob/living/carbon/human/H = user + if(istype(H)) + var/datum/species/ethereal/eth_species = H.dna?.species + if(istype(eth_species)) + if(charge < 25) + to_chat(H, "The [src] doesn't have enough power!") + return + var/obj/item/organ/stomach/ethereal/stomach = H.getorganslot(ORGAN_SLOT_STOMACH) + if(stomach.crystal_charge > 96) + 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.") + if(do_after(user, 5, target = src)) + if((charge < 25) || (stomach.crystal_charge > 96)) + 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 + else + to_chat(H, "You can't receive charge from the [src]!") + return + /obj/item/stock_parts/cell/blob_act(obj/structure/blob/B) ex_act(EXPLODE_DEVASTATE)