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 16:51:11 -05:00
committed by ZomgPonies
parent f77a8a6a9e
commit e3ce3d4b66
2 changed files with 40 additions and 2 deletions
+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.