Merge pull request #11347 from Arkatos1/StackCancel

Working with stacks QoL update
This commit is contained in:
variableundefined
2019-04-29 23:00:15 +08:00
committed by GitHub
+3 -3
View File
@@ -54,7 +54,7 @@
to_chat(user, "There are [amount] [singular_name]\s in the stack.")
else
to_chat(user, "There are [amount] [name]\s in the stack.")
to_chat(user,"<span class='notice'>Ctrl-Shift-click to take a custom amount.</span>")
to_chat(user,"<span class='notice'>Alt-click to take a custom amount.</span>")
/obj/item/stack/proc/add(newamount)
amount += newamount
@@ -263,7 +263,7 @@
else
..()
/obj/item/stack/CtrlShiftClick(mob/living/user)
/obj/item/stack/AltClick(mob/living/user)
if(!istype(user) || user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
@@ -276,7 +276,7 @@
//get amount from user
var/min = 0
var/max = get_amount()
var/stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack? (Maximum: [max])") as num)
var/stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack? (Maximum: [max])") as null|num)
if(stackmaterial == null || stackmaterial <= min || stackmaterial > get_amount())
return
change_stack(user,stackmaterial)