mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +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
@@ -14,17 +14,16 @@
|
||||
/// Footstep sounds when stepped on
|
||||
var/list/footstep_sound
|
||||
|
||||
var/material/material
|
||||
var/singleton/material/material
|
||||
/// Used by some structures to determine into how many pieces they should disassemble into or be made with
|
||||
var/build_amt = 2
|
||||
|
||||
/// Amount that pulling mobs have their movement delayed by
|
||||
var/slowdown = 0
|
||||
|
||||
/obj/structure/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!isnull(material) && !istype(material))
|
||||
material = SSmaterials.get_material_by_name(material)
|
||||
material = GET_SINGLETON(material)
|
||||
if (!mapload)
|
||||
updateVisibility(src) // No point checking this before visualnet initializes.
|
||||
if(climbable)
|
||||
@@ -101,9 +100,9 @@
|
||||
add_damage(maxhealth * 0.25)
|
||||
|
||||
/obj/structure/proc/dismantle()
|
||||
var/material/dismantle_material
|
||||
var/singleton/material/dismantle_material
|
||||
if(!get_material())
|
||||
dismantle_material = SSmaterials.get_material_by_name(DEFAULT_WALL_MATERIAL) //if there is no defined material, it will use steel
|
||||
dismantle_material = GET_SINGLETON(MATERIAL_STEEL)
|
||||
else
|
||||
dismantle_material = get_material()
|
||||
if(should_use_health && health <= 0)
|
||||
|
||||
Reference in New Issue
Block a user