Skip to content

Commit

Permalink
fix(fueltank): empty tank can no longer be blown up
Browse files Browse the repository at this point in the history
  • Loading branch information
i1yadobr authored Sep 24, 2024
1 parent d79ee31 commit 394911e
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion code/modules/reagents/reagent_dispenser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,14 @@
SPAN("notice", "You rig [W] to \the [src].")
)
update_icon()

else if(W.get_temperature_as_from_ignitor())
if (reagents.total_volume == 0)
user.visible_message(
SPAN("danger", "[user] puts [W] to [src]."),
SPAN("danger", "You put \the [W] to \the [src] and nothing happens.")
)
return
log_and_message_admins("triggered a fueltank explosion with [W].")
user.visible_message(
SPAN("danger", "[user] puts [W] to [src]!"),
Expand Down Expand Up @@ -215,7 +222,19 @@
if(!istype(Proj ,/obj/item/projectile/beam/lasertag) && !istype(Proj ,/obj/item/projectile/beam/practice) )
explode()

/obj/structure/reagent_dispensers/fueltank/ex_act()
/obj/structure/reagent_dispensers/fueltank/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if (prob(50))
qdel(src)
return
if(3.0)
if (prob(5))
qdel(src)
return
explode()

/obj/structure/reagent_dispensers/fueltank/proc/explode()
Expand All @@ -225,6 +244,8 @@
explosion(src.loc,0,1,3,sfx_to_play=SFX_EXPLOSION_FUEL)
else if (reagents.total_volume > 50)
explosion(src.loc,-1,1,2,sfx_to_play=SFX_EXPLOSION_FUEL)
else if (reagents.total_volume == 0)
return
if(src)
qdel(src)

Expand Down

0 comments on commit 394911e

Please sign in to comment.