mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
Merge pull request #7740 from VOREStation/upstream-merge-7061
[MIRROR] FloorTiles now properly show damage.
This commit is contained in:
@@ -216,7 +216,7 @@ var/list/flooring_types
|
||||
icon_base = "lino"
|
||||
can_paint = 1
|
||||
build_type = /obj/item/stack/tile/linoleum
|
||||
flags = TURF_REMOVE_SCREWDRIVER
|
||||
flags = TURF_REMOVE_SCREWDRIVER | TURF_CAN_BREAK | TURF_CAN_BURN
|
||||
|
||||
/decl/flooring/tiling/red
|
||||
name = "floor"
|
||||
@@ -239,7 +239,6 @@ var/list/flooring_types
|
||||
name = "floor"
|
||||
icon_base = "asteroidfloor"
|
||||
has_damage_range = null
|
||||
flags = TURF_REMOVE_CROWBAR
|
||||
build_type = /obj/item/stack/tile/floor/steel
|
||||
|
||||
/decl/flooring/tiling/white
|
||||
@@ -252,7 +251,6 @@ var/list/flooring_types
|
||||
name = "floor"
|
||||
icon_base = "white"
|
||||
has_damage_range = null
|
||||
flags = TURF_REMOVE_CROWBAR
|
||||
build_type = /obj/item/stack/tile/floor/yellow
|
||||
|
||||
/decl/flooring/tiling/dark
|
||||
@@ -260,7 +258,6 @@ var/list/flooring_types
|
||||
desc = "How ominous."
|
||||
icon_base = "dark"
|
||||
has_damage_range = null
|
||||
flags = TURF_REMOVE_CROWBAR
|
||||
build_type = /obj/item/stack/tile/floor/dark
|
||||
|
||||
/decl/flooring/tiling/hydro
|
||||
@@ -308,7 +305,7 @@ var/list/flooring_types
|
||||
desc = "Heavily reinforced with steel rods."
|
||||
icon = 'icons/turf/flooring/tiles.dmi'
|
||||
icon_base = "reinforced"
|
||||
flags = TURF_REMOVE_WRENCH | TURF_ACID_IMMUNE
|
||||
flags = TURF_REMOVE_WRENCH | TURF_ACID_IMMUNE | TURF_CAN_BURN | TURF_CAN_BREAK
|
||||
build_type = /obj/item/stack/rods
|
||||
build_cost = 2
|
||||
build_time = 30
|
||||
@@ -321,7 +318,7 @@ var/list/flooring_types
|
||||
icon = 'icons/turf/flooring/circuit.dmi'
|
||||
icon_base = "bcircuit"
|
||||
build_type = null
|
||||
flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_CROWBAR
|
||||
flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_CAN_BURN | TURF_REMOVE_CROWBAR
|
||||
can_paint = 1
|
||||
|
||||
/decl/flooring/reinforced/circuit/green
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/flooring_cache = list()
|
||||
GLOBAL_LIST_EMPTY(flooring_cache)
|
||||
|
||||
var/image/no_ceiling_image = null
|
||||
|
||||
@@ -79,10 +79,11 @@ var/image/no_ceiling_image = null
|
||||
icon = 'icons/turf/flooring/plating.dmi'
|
||||
icon_state = "dmg[rand(1,4)]"
|
||||
else if(flooring)
|
||||
var/rand_key = rand(0,2)
|
||||
if(!isnull(broken) && (flooring.flags & TURF_CAN_BREAK))
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-broken-[broken]","broken[broken]")) // VOREStation Edit - Eris overlays
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-broken-[rand_key]","broken[rand_key]"))
|
||||
if(!isnull(burnt) && (flooring.flags & TURF_CAN_BURN))
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-burned-[burnt]","burned[burnt]")) // VOREStation Edit - Eris overlays
|
||||
add_overlay(get_flooring_overlay("[flooring.icon_base]-burned-[rand_key]","burned[rand_key]"))
|
||||
|
||||
if(update_neighbors)
|
||||
for(var/turf/simulated/floor/F in range(src, 1))
|
||||
@@ -96,8 +97,8 @@ var/image/no_ceiling_image = null
|
||||
add_overlay(no_ceiling_image)
|
||||
|
||||
/turf/simulated/floor/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0)
|
||||
if(!flooring_cache[cache_key])
|
||||
if(!GLOB.flooring_cache[cache_key])
|
||||
var/image/I = image(icon = flooring.icon, icon_state = icon_base, dir = icon_dir)
|
||||
I.layer = layer
|
||||
flooring_cache[cache_key] = I
|
||||
return flooring_cache[cache_key]
|
||||
GLOB.flooring_cache[cache_key] = I
|
||||
return GLOB.flooring_cache[cache_key]
|
||||
|
||||
Reference in New Issue
Block a user