mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
Stack items have a number indicating stack size in inventory (#94705)
## About The Pull Request <img width="528" height="200" alt="image" src="https://github.com/user-attachments/assets/41a30b57-2799-44c8-82cd-ce2f8c8c22c4" /> Number only shows up when it's in the inventory or held - in world it looks as-normal (I'm pretty sure this idea was subconsciously inspired by another server, but I don't remember...) ## Why It's Good For The Game Makes it easier to use stacks that don't have a visual sprite change - IE you no longer have to spam examine to see how many you have left ## Changelog 🆑 Melbert qol: Stack items have a number indicating stack size while held or in inventory. /🆑
This commit is contained in:
@@ -125,10 +125,16 @@
|
||||
mats_per_unit = null
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/update_name(updates)
|
||||
. = ..()
|
||||
maptext = (ismob(loc) || loc?.atom_storage) ? MAPTEXT("<font color='white'>[amount]</font>") : ""
|
||||
|
||||
/obj/item/stack/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change)
|
||||
. = ..()
|
||||
if((!throwing || throwing.target_turf == loc) && old_loc != loc && (flags_1 & INITIALIZED_1))
|
||||
merge_with_loc(merge_into_ourselves = !isnull(pulledby))
|
||||
if(ismob(loc) || ismob(old_loc) || loc?.atom_storage || old_loc?.atom_storage)
|
||||
update_appearance(UPDATE_NAME)
|
||||
|
||||
///Called to lazily update the materials of the item whenever the used or if more is added
|
||||
/obj/item/stack/proc/update_custom_materials()
|
||||
|
||||
Reference in New Issue
Block a user