mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
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:
@@ -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>")
|
||||
|
||||
Reference in New Issue
Block a user