mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-29 16:19:36 +01:00
Convert /material to /datum/material
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
var/current_damage = 0
|
||||
var/cover = 50 //how much cover the girder provides against projectiles.
|
||||
var/default_material = DEFAULT_WALL_MATERIAL
|
||||
var/material/girder_material
|
||||
var/material/reinf_material
|
||||
var/datum/material/girder_material
|
||||
var/datum/material/reinf_material
|
||||
var/reinforcing = 0
|
||||
var/applies_material_colour = 1
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
to_chat(user, "<span class='notice'>There isn't enough material here to construct a wall.</span>")
|
||||
return 0
|
||||
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
var/datum/material/M = name_to_material[S.default_type]
|
||||
if(!istype(M))
|
||||
return 0
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
to_chat(user, "<span class='notice'>There isn't enough material here to reinforce the girder.</span>")
|
||||
return 0
|
||||
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
var/datum/material/M = name_to_material[S.default_type]
|
||||
if(!istype(M) || M.integrity < 50)
|
||||
to_chat(user, "You cannot reinforce \the [src] with that; it is too soft.")
|
||||
return 0
|
||||
@@ -401,7 +401,7 @@
|
||||
var/turf/simulated/wall/new_T = get_turf(src) // Ref to the wall we just built.
|
||||
// Apparently set_material(...) for walls requires refs to the material singletons and not strings.
|
||||
// This is different from how other material objects with their own set_material(...) do it, but whatever.
|
||||
var/material/M = name_to_material[the_rcd.material_to_use]
|
||||
var/datum/material/M = name_to_material[the_rcd.material_to_use]
|
||||
new_T.set_material(M, the_rcd.make_rwalls ? M : null, girder_material)
|
||||
new_T.add_hiddenprint(user)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user