Materials subsystem, material defines instead of strings, structure materials. (#8447)

The shitcode crusade begins.
This commit is contained in:
Matt Atlas
2020-03-18 20:19:11 +01:00
committed by GitHub
parent d952493ca0
commit 82437acd43
127 changed files with 687 additions and 646 deletions
-22
View File
@@ -1,22 +0,0 @@
// Mostly for debugging table connections
// This file is not #included in the .dme.
/obj/structure/table/debug
New()
material = get_material_by_name("debugium")
..()
/material/debug
name = "debugium"
stack_type = /obj/item/stack/material/debug
icon_base = "debug"
icon_reinf = "rdebug"
icon_colour = "#FFFFFF"
/obj/item/stack/material/debug
name = "debugium"
icon = 'icons/obj/tables.dmi'
icon_state = "debugium"
default_type = "debugium"
+2 -2
View File
@@ -4,9 +4,9 @@
/obj/structure/table/Initialize()
if(table_mat)
material = get_material_by_name(table_mat)
material = SSmaterials.get_material_by_name(table_mat)
if(table_reinf)
reinforced = get_material_by_name(table_reinf)
reinforced = SSmaterials.get_material_by_name(table_reinf)
. = ..()
/obj/structure/table/standard
+1 -2
View File
@@ -17,7 +17,6 @@
var/can_plate = 1
var/manipulating = 0
var/material/material = null
var/material/reinforced = null
// Gambling tables. I'd prefer reinforced with carpet/felt/cloth/whatever, but AFAIK it's either harder or impossible to get /obj/item/stack/material of those.
@@ -302,7 +301,7 @@
if(full_return || prob(20))
new /obj/item/stack/material/steel(src.loc)
else
var/material/M = get_material_by_name(DEFAULT_WALL_MATERIAL)
var/material/M = SSmaterials.get_material_by_name(DEFAULT_WALL_MATERIAL)
S = M.place_shard(loc)
if(S) shards += S
qdel(src)