mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
[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:
committed by
Gary Lafortune
parent
e3c4cae445
commit
7e3bfd7e18
@@ -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"
|
||||
|
||||
@@ -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(..())
|
||||
|
||||
Reference in New Issue
Block a user