mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +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
@@ -8,8 +8,8 @@
|
||||
max_amount = 50
|
||||
recyclable = TRUE // Pretty much all materials should be recyclable
|
||||
|
||||
var/default_type = DEFAULT_WALL_MATERIAL
|
||||
var/material/material
|
||||
var/default_type = MATERIAL_STEEL
|
||||
var/singleton/material/material
|
||||
var/perunit
|
||||
var/apply_colour //temp pending icon rewrite
|
||||
var/painted_colour
|
||||
@@ -25,8 +25,8 @@
|
||||
randpixel_xy()
|
||||
|
||||
if(!default_type)
|
||||
default_type = DEFAULT_WALL_MATERIAL
|
||||
material = SSmaterials.get_material_by_name(default_type)
|
||||
default_type = MATERIAL_STEEL
|
||||
material = GET_SINGLETON(default_type)
|
||||
if(!material)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
/obj/item/stack/material/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified)
|
||||
var/obj/item/stack/material/M = S
|
||||
if(!istype(M) || material.name != M.material.name)
|
||||
if(!istype(M) || material.type != M.material.type)
|
||||
return 0
|
||||
var/transfer = ..(S,tamount,1)
|
||||
if(src)
|
||||
@@ -285,7 +285,7 @@
|
||||
/obj/item/stack/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
icon_state = "sheet-metal"
|
||||
default_type = DEFAULT_WALL_MATERIAL
|
||||
default_type = MATERIAL_STEEL
|
||||
icon_has_variants = TRUE
|
||||
|
||||
/obj/item/stack/material/steel/attackby(obj/item/attacking_item, mob/user)
|
||||
@@ -562,7 +562,7 @@
|
||||
/obj/item/stack/material/bronze
|
||||
name = "bronze"
|
||||
icon_state = "sheet-brass"
|
||||
default_type = "bronze"
|
||||
default_type = MATERIAL_BRONZE
|
||||
icon_has_variants = TRUE
|
||||
|
||||
/obj/item/stack/material/bronze/full/Initialize()
|
||||
|
||||
Reference in New Issue
Block a user