Porting further material datum features and improvements.

This commit is contained in:
Ghommie
2020-06-24 20:45:17 +02:00
parent 07c7432f43
commit c5cbfa64e5
66 changed files with 945 additions and 234 deletions
+14 -1
View File
@@ -189,9 +189,12 @@
if(user && !silent)
to_chat(user, "<span class='notice'>You remove the floor tile.</span>")
if(floor_tile && make_tile)
new floor_tile(src)
spawn_tile()
return make_plating()
/turf/open/floor/proc/spawn_tile()
new floor_tile(src)
/turf/open/floor/singularity_pull(S, current_size)
. = ..()
switch(current_size)
@@ -293,3 +296,13 @@
return TRUE
return FALSE
/turf/open/floor/material
name = "floor"
icon_state = "materialfloor"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
/turf/open/floor/material/spawn_tile()
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(src, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
+9 -5
View File
@@ -76,11 +76,15 @@
var/obj/item/stack/tile/W = C
if(!W.use(1))
return
var/turf/open/floor/T = PlaceOnTop(W.turf_type, flags = CHANGETURF_INHERIT_AIR)
if(istype(W, /obj/item/stack/tile/light)) //TODO: get rid of this ugly check somehow
var/obj/item/stack/tile/light/L = W
var/turf/open/floor/light/F = T
F.state = L.state
if(istype(W, /obj/item/stack/tile/material))
var/turf/newturf = PlaceOnTop(/turf/open/floor/material, flags = CHANGETURF_INHERIT_AIR)
newturf.set_custom_materials(W.custom_materials)
else if(W.turf_type)
var/turf/open/floor/T = PlaceOnTop(W.turf_type, flags = CHANGETURF_INHERIT_AIR)
if(istype(W, /obj/item/stack/tile/light)) //TODO: get rid of this ugly check somehow
var/obj/item/stack/tile/light/L = W
var/turf/open/floor/light/F = T
F.state = L.state
playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
else
to_chat(user, "<span class='warning'>This section is too damaged to support a tile! Use a welder to fix the damage.</span>")
@@ -0,0 +1,22 @@
/turf/closed/wall/material
name = "wall"
desc = "A huge chunk of material used to separate rooms."
icon = 'icons/turf/walls/materialwall.dmi'
icon_state = "wall"
canSmoothWith = list(/turf/closed/wall/material)
smooth = SMOOTH_TRUE
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
/turf/closed/wall/material/break_wall()
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(src, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
return new girder_type(src)
/turf/closed/wall/material/devastate_wall()
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(src, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
/turf/closed/wall/material/mat_update_desc(mat)
desc = "A huge chunk of [mat] used to separate rooms."