Skip to content

Commit

Permalink
alt clicking a reagent tank will now toggle whether its dispensing or…
Browse files Browse the repository at this point in the history
… filling (#6176)

# About the pull request
the title

# Explain why it's good for the game
its QOL
better OT speedrunning

# Testing Photographs and Procedure
testing seems to work fine but I'm not sure if there could be any
undesired side effects

# Changelog
:cl:
qol: Alt clicking a reagent tank will now toggle whether its dispensing
or filling
/:cl:

---------

Co-authored-by: Drathek <[email protected]>
  • Loading branch information
iloveloopers and Drulikar authored Apr 23, 2024
1 parent a389eef commit 2e6f6dd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions code/game/objects/structures/reagent_dispensers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,25 @@
if(N)
amount_per_transfer_from_this = N

/obj/structure/reagent_dispensers/clicked(mob/user, list/mods)
if(!Adjacent(user))
return ..()

if(!ishuman(user))
return ..()

if(!reagents || reagents.locked)
return ..()

if(mods["alt"])
dispensing = !dispensing
if(dispensing)
to_chat(user, SPAN_NOTICE("[src] is now dispensing"))
else
to_chat(user, SPAN_NOTICE("[src] is now filling"))
return TRUE
return ..()

/obj/structure/reagent_dispensers/attackby(obj/item/hit_item, mob/living/user)
if(istype(hit_item, /obj/item/reagent_container))
return
Expand Down

0 comments on commit 2e6f6dd

Please sign in to comment.