Refining/fixing material ejection from exo/pros fab.

This commit is contained in:
MistakeNot4892
2023-07-21 02:00:02 +10:00
parent 9a8d1bd12b
commit 45fa973646
11 changed files with 75 additions and 77 deletions
+3 -4
View File
@@ -227,7 +227,7 @@
to_chat(user, "<span class='notice'>There isn't enough material here to construct a wall.</span>")
return 0
var/datum/material/M = name_to_material[S.default_type]
var/datum/material/M = get_material_by_name(S.default_type)
if(!istype(M))
return 0
@@ -268,7 +268,7 @@
to_chat(user, "<span class='notice'>There isn't enough material here to reinforce the girder.</span>")
return 0
var/datum/material/M = name_to_material[S.default_type]
var/datum/material/M = get_material_by_name(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
@@ -402,7 +402,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/datum/material/M = name_to_material[the_rcd.material_to_use]
var/datum/material/M = get_material_by_name(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)
@@ -412,4 +412,3 @@
to_chat(user, span("notice", "You deconstruct \the [src]."))
qdel(src)
return TRUE