mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +01:00
Materials Repath (#22388)
Soft-ish port of https://github.com/NebulaSS13/Nebula/pull/540. Except we call them singletons. Repaths all materials as singletons instead of datums, and replaces material defines from strings to paths so that we can just run GET_SINGLETON instead of needing to use SSMaterials. This is Step One. This PR has no player-facing changes. changes: - refactor: "Repaths /material to /singleton/material." - refactor: "Replaces all material string defines to path defines, replacing SSmaterials procs w/ GET_SINGLETON instead." - refactor: "Removes all material var edited objects from all maps, adding new presets where necessary." - refactor: "Updates recipes unit test to run all recipes against all material singletons." --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com> Co-authored-by: kano-dot <bhutanlikanoxy@gmail.com>
This commit is contained in:
co-authored by
kano-dot
parent
2e61d8fd15
commit
eebb8b971c
@@ -184,10 +184,10 @@
|
||||
|
||||
/obj/item/reagent_containers/cooking_container/skillet/Initialize(var/mapload, var/mat_key)
|
||||
. = ..(mapload)
|
||||
var/material/material = SSmaterials.get_material_by_name(mat_key || MATERIAL_STEEL)
|
||||
var/singleton/material/material = GET_SINGLETON(mat_key || MATERIAL_STEEL)
|
||||
if(!material)
|
||||
return
|
||||
if(material.name != MATERIAL_STEEL)
|
||||
if(material.type != MATERIAL_STEEL)
|
||||
color = material.icon_colour
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
|
||||
@@ -205,10 +205,10 @@
|
||||
|
||||
/obj/item/reagent_containers/cooking_container/saucepan/Initialize(var/mapload, var/mat_key)
|
||||
. = ..(mapload)
|
||||
var/material/material = SSmaterials.get_material_by_name(mat_key || MATERIAL_STEEL)
|
||||
var/singleton/material/material = GET_SINGLETON(mat_key || MATERIAL_STEEL)
|
||||
if(!material)
|
||||
return
|
||||
if(material.name != MATERIAL_STEEL)
|
||||
if(material.type != MATERIAL_STEEL)
|
||||
color = material.icon_colour
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
/obj/item/reagent_containers/cooking_container/pot/Initialize(mapload, mat_key)
|
||||
. = ..(mapload)
|
||||
var/material/material = SSmaterials.get_material_by_name(mat_key || MATERIAL_STEEL)
|
||||
var/singleton/material/material = GET_SINGLETON(mat_key || MATERIAL_STEEL)
|
||||
if(!material)
|
||||
return
|
||||
if(mat_key && mat_key != MATERIAL_STEEL)
|
||||
|
||||
@@ -11,7 +11,7 @@ Plates that can hold your cooking stuff
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "bowl"
|
||||
fragile = 3
|
||||
shatter_material = DEFAULT_TABLE_MATERIAL // Slight typecasting abuse here, gets converted to a material in Initialize().
|
||||
shatter_material = MATERIAL_PLASTIC
|
||||
can_be_placed_into = list()
|
||||
atom_flags = ATOM_FLAG_OPEN_CONTAINER
|
||||
var/grease = FALSE
|
||||
|
||||
Reference in New Issue
Block a user