[MIRROR] Fixes a firebot runtime (#4652)

Firebots were runtiming due to multiple initializations, so this fixes that
issue by calling a proc to refill the extinguisher rather than going through
the initialize proc to do it.
This commit is contained in:
yogstation13-bot
2019-03-03 10:59:40 +01:00
committed by Gary Lafortune
parent e3c4cae445
commit 7e3bfd7e18
2 changed files with 8 additions and 4 deletions

View File

@@ -41,11 +41,13 @@
sprite_name = "miniFE"
dog_fashion = null
/obj/item/extinguisher/Initialize()
. = ..()
/obj/item/extinguisher/proc/refill()
create_reagents(max_water, AMOUNT_VISIBLE)
reagents.add_reagent(chem, max_water)
/obj/item/extinguisher/Initialize()
. = ..()
refill()
/obj/item/extinguisher/advanced
name = "advanced fire extinguisher"

View File

@@ -50,7 +50,6 @@
internal_ext.safety = FALSE
internal_ext.precision = TRUE
internal_ext.max_water = INFINITY
internal_ext.Initialize()
/mob/living/simple_animal/bot/firebot/turn_on()
. = ..()
@@ -109,10 +108,13 @@
extinguish_fires = FALSE
extinguish_people = TRUE
internal_ext = new /obj/item/extinguisher(src)
internal_ext.chem = "clf3" //Refill the internal extinguisher with liquid fire
internal_ext.power = 3
internal_ext.safety = FALSE
internal_ext.precision = FALSE
internal_ext.Initialize()
internal_ext.max_water = INFINITY
internal_ext.refill()
/mob/living/simple_animal/bot/firebot/Topic(href, href_list)
if(..())