Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the failure message when trying to switch pyro fuels #5321

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions code/game/objects/items/storage/large_holster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,12 @@
to_chat(user, SPAN_WARNING("[src] must be equipped before you can switch types."))
return

var/obj/item/weapon/gun/flamer/M240T/flamer = user.get_active_hand()
if(!istype(flamer))
to_chat(user, SPAN_WARNING("You must be holding [flamer] to use [src]."))
if(!linked_flamer)
to_chat(user, SPAN_WARNING("An incinerator unit must be linked in order to switch fuel types."))
return

if(user.get_active_hand() != linked_flamer)
to_chat(user, SPAN_WARNING("You must be holding [linked_flamer] to use [src]."))
return

if(!active_fuel)
Expand All @@ -276,8 +279,8 @@

to_chat(user, "You switch the fuel tank to <b>[active_fuel.caliber]</b>")
playsound(src, 'sound/machines/click.ogg', 25, TRUE)
flamer.current_mag = active_fuel
flamer.update_icon()
linked_flamer.current_mag = active_fuel
linked_flamer.update_icon()

return TRUE

Expand Down
Loading