Synthetic Smörgåsbord (#12417)

This commit is contained in:
Geeves
2021-09-06 22:47:27 +02:00
committed by GitHub
parent bb825c024b
commit c4b0089749
28 changed files with 552 additions and 501 deletions
+9
View File
@@ -12,6 +12,7 @@
/obj/item/stack
gender = PLURAL
origin_tech = list(TECH_MATERIAL = 1)
flags = HELDMAPTEXT
var/list/datum/stack_recipe/recipes
var/singular_name
var/amount = 1
@@ -43,6 +44,10 @@
item_state = icon_state
update_icon()
return INITIALIZE_HINT_LATELOAD
/obj/item/stack/LateInitialize()
check_maptext(SMALL_FONTS(7, get_amount()))
/obj/item/stack/Destroy()
if (src && usr && usr.machine == src)
@@ -50,6 +55,8 @@
return ..()
/obj/item/stack/update_icon()
check_maptext(SMALL_FONTS(7, get_amount()))
if (!icon_has_variants)
return ..()
@@ -212,6 +219,7 @@
var/datum/matter_synth/S = synths[i]
if(!S.use_charge(charge_costs[i] * used)) // Doesn't need to be deleted
return 0
check_maptext(SMALL_FONTS(7, get_amount()))
return 1
/obj/item/stack/proc/add(var/extra)
@@ -228,6 +236,7 @@
for(var/i = 1 to uses_charge)
var/datum/matter_synth/S = synths[i]
S.add_charge(charge_costs[i] * extra)
check_maptext(SMALL_FONTS(7, get_amount()))
/*
The transfer and split procs work differently than use() and add().