mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +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
@@ -3,15 +3,15 @@
|
||||
desc = "A wall that had a hole burnt into it. Nasty."
|
||||
icon = 'icons/turf/flooring/plating.dmi'
|
||||
icon_state = "wall_thermite"
|
||||
var/material/material
|
||||
var/material/reinf_material
|
||||
var/singleton/material/material
|
||||
var/singleton/material/reinf_material
|
||||
|
||||
/obj/effect/overlay/burnt_wall/Initialize(mapload, new_name, new_mat, new_reinf_mat)
|
||||
. = ..()
|
||||
name = "burnt [new_name]"
|
||||
material = SSmaterials.get_material_by_name(new_mat)
|
||||
material = GET_SINGLETON(new_mat)
|
||||
if(new_reinf_mat)
|
||||
reinf_material = SSmaterials.get_material_by_name(new_reinf_mat)
|
||||
reinf_material = GET_SINGLETON(new_reinf_mat)
|
||||
color = material.icon_colour
|
||||
if(material.opacity < 0.5)
|
||||
alpha = 125
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
to_chat(user, SPAN_NOTICE("There isn't enough material here to construct a wall."))
|
||||
return TRUE
|
||||
|
||||
var/material/M = SSmaterials.get_material_by_name(S.default_type)
|
||||
var/singleton/material/M = GET_SINGLETON(S.default_type)
|
||||
if(!istype(M))
|
||||
return TRUE
|
||||
if(M.integrity < 50)
|
||||
|
||||
Reference in New Issue
Block a user