IPC feeding from APCs, IPC lack of reagent processing.

Conflicts:
	code/modules/mob/living/carbon/human/life.dm
	code/modules/power/apc.dm
This commit is contained in:
Zuhayr
2014-01-29 15:37:08 +10:30
committed by ZomgPonies
parent f77a8a6a9e
commit e3ce3d4b66
2 changed files with 40 additions and 2 deletions
+9 -1
View File
@@ -929,6 +929,14 @@
proc/handle_chemicals_in_body()
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
var/alien = 0 //Not the best way to handle it, but neater than checking this for every single reagent proc.
if(species && species.name == "Diona")
alien = 1
else if(species && species.name == "Vox")
alien = 2
reagents.metabolize(src,alien)
if(reagents) reagents.metabolize(src)
var/total_plasmaloss = 0
for(var/obj/item/I in src)
@@ -1028,7 +1036,7 @@
if(species && species.flags & NO_INTORGANS) return
handle_trace_chems()
if(!(species.flags & IS_SYNTHETIC)) handle_trace_chems()
var/datum/organ/internal/liver/liver = internal_organs["liver"]
liver.process()
+31 -1
View File
@@ -440,7 +440,37 @@
if(!user)
return
src.add_fingerprint(user)
if(usr == user && opened)
//Synthetic human mob goes here.
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.flags & IS_SYNTHETIC && H.a_intent == "grab")
if(emagged || stat & BROKEN)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
H << "\red The APC power currents surge eratically, damaging your chassis!"
H.adjustFireLoss(10,0)
else if(src.cell && src.cell.charge > 0)
if(H.nutrition < 450)
if(src.cell.charge >= 500)
H.nutrition += 50
src.cell.charge -= 500
else
H.nutrition += src.cell.charge/10
src.cell.charge = 0
user << "\blue You slot your fingers into the APC interface and siphon off some of the stored charge for your own use."
if(src.cell.charge < 0) src.cell.charge = 0
if(H.nutrition > 500) H.nutrition = 500
else
user << "\blue You are already fully charged."
else
user << "There is no charge to draw from that APC."
return
if(usr == user && opened && (!issilicon(user)))
if(cell)
if(issilicon(user))
cell.loc=src.loc // Drop it, whoops.