Merge pull request #5522 from Citadel-Station-13/upstream-merge-35703

[MIRROR] Fixes powercell injecting attaching the wrong value to rigged
This commit is contained in:
deathride58
2018-02-16 14:17:53 +00:00
committed by GitHub
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -362,7 +362,7 @@
pocell.desc = "A rechargeable plant-based power cell. This one has a rating of [DisplayEnergy(pocell.maxcharge)], and you should not swallow it."
if(G.reagents.has_reagent("plasma", 2))
pocell.rigged = 1
pocell.rigged = TRUE
qdel(G)
else
+4 -4
View File
@@ -15,7 +15,7 @@
var/maxcharge = 1000
materials = list(MAT_METAL=700, MAT_GLASS=50)
grind_results = list("lithium" = 15, "iron" = 5, "silicon" = 5)
var/rigged = 0 // true if rigged to explode
var/rigged = FALSE // true if rigged to explode
var/chargerate = 100 //how much power is given every tick in a recharger
var/self_recharge = 0 //does it self recharge, over time, or not?
var/ratingdesc = TRUE
@@ -104,7 +104,7 @@
return (FIRELOSS)
/obj/item/stock_parts/cell/on_reagent_change(changetype)
rigged = reagents.has_reagent("plasma", 5)
rigged = !isnull(reagents.has_reagent("plasma", 5)) //has_reagent returns the reagent datum
..()
@@ -117,7 +117,7 @@
var/light_impact_range = round(sqrt(charge)/30)
var/flash_range = light_impact_range
if (light_impact_range==0)
rigged = 0
rigged = FALSE
corrupt()
return
//explosion(T, 0, 1, 2, 2)
@@ -128,7 +128,7 @@
charge /= 2
maxcharge = max(maxcharge/2, chargerate)
if (prob(10))
rigged = 1 //broken batterys are dangerous
rigged = TRUE //broken batterys are dangerous
/obj/item/stock_parts/cell/emp_act(severity)
charge -= 1000 / severity