mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Axes grind & juice vars into procs (#94592)
## About The Pull Request Inspired by #94233. `grind_results`(list) & `juice_typepath`(typepath) are only used when grinding & juicing after which the atom is deleted. This means if that object is not processed these vars occupy memory & don't do anything. Now these values are only generated on demand by calling their respective procs. Considering how these vars are on the obj level the memory savings are quite significant ## Changelog 🆑 refactor: grinding & juicing have been refactored to occupy low memory. Report bugs on github code: improved grinding & juicing code /🆑
This commit is contained in:
@@ -342,7 +342,6 @@
|
||||
eatverbs = list("devour")
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/vitamin = 2)
|
||||
foodtypes = GORE | MEAT | RAW
|
||||
grind_results = list(/datum/reagent/blood = 20, /datum/reagent/consumable/liquidgibs = 5)
|
||||
decomp_req_handle = TRUE
|
||||
ant_attracting = FALSE
|
||||
decomp_type = /obj/item/food/deadmouse/moldy
|
||||
@@ -354,6 +353,9 @@
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_MOUSE, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 10)
|
||||
RegisterSignal(src, COMSIG_ATOM_ON_LAZARUS_INJECTOR, PROC_REF(use_lazarus))
|
||||
|
||||
/obj/item/food/deadmouse/grind_results()
|
||||
return list(/datum/reagent/blood = 20, /datum/reagent/consumable/liquidgibs = 5)
|
||||
|
||||
/// Copy properties from an imminently dead mouse
|
||||
/obj/item/food/deadmouse/proc/copy_corpse(mob/living/basic/mouse/dead_critter)
|
||||
body_color = dead_critter.body_color
|
||||
@@ -415,9 +417,11 @@
|
||||
icon_state = "mouse_gray_dead"
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/vitamin = 2, /datum/reagent/consumable/mold = 10)
|
||||
foodtypes = GORE | MEAT | RAW | GROSS
|
||||
grind_results = list(/datum/reagent/blood = 20, /datum/reagent/consumable/liquidgibs = 5, /datum/reagent/consumable/mold = 10)
|
||||
preserved_food = TRUE
|
||||
|
||||
/obj/item/food/deadmouse/moldy/grind_results()
|
||||
return list(/datum/reagent/blood = 20, /datum/reagent/consumable/liquidgibs = 5, /datum/reagent/consumable/mold = 10)
|
||||
|
||||
/// The mouse AI controller
|
||||
/datum/ai_controller/basic_controller/mouse
|
||||
blackboard = list( // Always cowardly
|
||||
|
||||
Reference in New Issue
Block a user