Medical stacks (#20824)

* Fixes gauze upgrading

* Fixes accidental line removal

* Unessassary boolean

* shortens code, adds flag to /stack/medical

* Clarity and proper inhertance
This commit is contained in:
Silverplate
2023-04-25 17:00:37 -04:00
committed by GitHub
parent d2f55feefb
commit 19af733ad2
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -31,6 +31,8 @@
var/table_type
/// If this stack has a dynamic icon_state based on amount / max_amount
var/dynamic_icon_state = FALSE
/// if true, then this item can't stack with subtypes
var/parent_stack = FALSE
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
. = ..()
@@ -360,7 +362,7 @@
use(amount)
/obj/item/stack/attackby(obj/item/W, mob/user, params)
if(istype(W, merge_type))
if((!parent_stack && istype(W, merge_type)) || (parent_stack && W.type == type))
var/obj/item/stack/S = W
merge(S)
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")