Merge pull request #4796 from Anewbe/charger_radiation

Cyborg charger lessens FBP radiation.
This commit is contained in:
Mechoid
2018-02-12 20:22:53 -08:00
committed by GitHub
2 changed files with 51 additions and 4 deletions
+13 -4
View File
@@ -105,16 +105,25 @@
var/mob/living/carbon/human/H = occupant
// In case they somehow end up with positive values for otherwise unobtainable damage...
if(H.getToxLoss()>0) H.adjustToxLoss(-(rand(1,3)))
if(H.getOxyLoss()>0) H.adjustOxyLoss(-(rand(1,3)))
if(H.getCloneLoss()>0) H.adjustCloneLoss(-(rand(1,3)))
if(H.getBrainLoss()>0) H.adjustBrainLoss(-(rand(1,3)))
if(H.getToxLoss() > 0)
H.adjustToxLoss(-(rand(1,3)))
if(H.getOxyLoss() > 0)
H.adjustOxyLoss(-(rand(1,3)))
if(H.getCloneLoss() > 0)
H.adjustCloneLoss(-(rand(1,3)))
if(H.getBrainLoss() > 0)
H.adjustBrainLoss(-(rand(1,3)))
// Also recharge their internal battery.
if(!isnull(H.internal_organs_by_name["cell"]) && H.nutrition < 450)
H.nutrition = min(H.nutrition+10, 450)
cell.use(7000/450*10)
// And clear up radiation
if(H.radiation > 0)
H.radiation = max(H.radiation - rand(5, 15), 0)
/obj/machinery/recharge_station/examine(mob/user)
..(user)
user << "The charge meter reads: [round(chargepercentage())]%"