Allows filling welders from open containers that have welding fuel in them (#32143)
🆑 tweak: You can now use beakers/cups/etc that have welding fuel in them on welders to refuel them. /🆑 Closes #31339
This commit is contained in:
committed by
CitadelStationBot
parent
2715fa9953
commit
ebef4e6607
@@ -457,6 +457,15 @@
|
||||
flamethrower_screwdriver(I, user)
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
flamethrower_rods(I, user)
|
||||
else if(istype(I, /obj/item/reagent_containers) && is_open_container())
|
||||
var/amountNeeded = max_fuel - get_fuel()
|
||||
var/obj/item/reagent_containers/container = I
|
||||
if(length(container.reagents.reagent_list) > 1)
|
||||
to_chat(user, "<span class='warning'>[container] has too many chemicals mixed into it. You wouldn't want to put the wrong chemicals into [src].</span>")
|
||||
return ..()
|
||||
if(amountNeeded > 0 && container.reagents.has_reagent("welding_fuel"))
|
||||
container.reagents.trans_id_to(src, "welding_fuel", amountNeeded)
|
||||
to_chat(user, "<span class='notice'>You transfer some fuel from [container] to [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user