This commit is contained in:
SandPoot
2023-12-13 00:08:58 -03:00
parent 3e45c18ab4
commit f626df9d1d
7 changed files with 25 additions and 9 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
anchored = TRUE
layer = GHOST_LAYER
color = "#ff0000" // text color
appearance_flags = NO_CLIENT_COLOR | RESET_ALPHA | RESET_COLOR | RESET_TRANSFORM
appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
vis_flags = VIS_INHERIT_ID
var/text_size = 3 // larger values clip when the displayed text is larger than 2 digits.
var/started = FALSE
+16
View File
@@ -132,6 +132,14 @@
else
icon_state = "[initial(icon_state)]_3"
/obj/item/stack/update_overlays()
. = ..()
if(isturf(loc))
return
var/mutable_appearance/number = mutable_appearance(appearance_flags = APPEARANCE_UI_IGNORE_ALPHA)
number.maptext = MAPTEXT(get_amount())
. += number
/obj/item/stack/examine(mob/user)
. = ..()
if (is_cyborg)
@@ -151,6 +159,14 @@
. += "There is [get_amount()] in the stack."
. += "<span class='notice'>Alt-click to take a custom amount.</span>"
/obj/item/stack/equipped(mob/user, slot)
. = ..()
update_icon()
/obj/item/stack/dropped(mob/user, slot)
. = ..()
update_icon()
/obj/item/stack/proc/get_amount()
if(is_cyborg)
. = round(source?.energy / cost)
+1 -1
View File
@@ -11,7 +11,7 @@
. = ..()
update_icon()
/obj/item/stack/arcadeticket/update_icon()
/obj/item/stack/arcadeticket/update_icon_state()
var/amount = get_amount()
if((amount >= 12) && (amount > 0))
icon_state = "arcade-ticket_4"