fix
This commit is contained in:
@@ -579,3 +579,7 @@
|
||||
max_val = 255
|
||||
min_val = 0
|
||||
integer = TRUE
|
||||
|
||||
/// Dirtyness multiplier for making turfs dirty
|
||||
/datum/config_entry/number/turf_dirty_multiplier
|
||||
config_entry_value = 1
|
||||
|
||||
@@ -34,13 +34,19 @@
|
||||
var/sz = SSmapping.z_to_station_z_index[z]
|
||||
z_lookup[num2text(sz)] = z
|
||||
for(var/z in data)
|
||||
to_chat(world, "DEBUG: looking at z [z]")
|
||||
var/actual_z = z_lookup[z]
|
||||
to_chat(world, "DEBUG: actual z [actual_z]")
|
||||
var/list/L1 = data[z]
|
||||
for(var/x in L1)
|
||||
to_chat(world, "DEBUG: looking at x [x]")
|
||||
var/list/L2 = data[z][x]
|
||||
for(var/y in L2)
|
||||
to_chat(world, "DEBUG: looking at y [y]")
|
||||
var/turf/tile = locate(x, y, actual_z)
|
||||
to_chat(world, "DEBUG: finding turf [x] [y] [z]: [tile]")
|
||||
if(!tile)
|
||||
to_chat(world, "DEBUG: aborting due to no turf")
|
||||
continue
|
||||
var/list/objects = data[z][x][y]
|
||||
for(var/_L in objects)
|
||||
@@ -48,13 +54,15 @@
|
||||
var/path
|
||||
if(islist(_L))
|
||||
objdata = _L
|
||||
path = objdata["__PATH__"]
|
||||
path = text2path(objdata["__PATH__"])
|
||||
else
|
||||
path = _L
|
||||
path = text2path(_L)
|
||||
objdata = objects[_L]
|
||||
if(!IsValidDebrisLocation(tile, allowed_turf_typecache, allowed_z_cache, path, TRUE))
|
||||
continue
|
||||
if(!path)
|
||||
to_chat(world, "DEBUG: Aborting: No path")
|
||||
continue
|
||||
if(!IsValidDebrisLocation(tile, allowed_turf_typecache, allowed_z_cache, path, TRUE))
|
||||
to_chat(world, "DEBUG: Aborting: Invalid location")
|
||||
continue
|
||||
var/obj/effect/decal/cleanable/instantiated = new path(tile)
|
||||
if(objdata)
|
||||
@@ -81,9 +89,9 @@
|
||||
continue
|
||||
if(stored_by_type[path] > type_max)
|
||||
continue
|
||||
var/text_z = num2text(saving.z)
|
||||
var/text_z = num2text(z_lookup[num2text(saving.z)])
|
||||
var/text_y = num2text(saving.y)
|
||||
var/text_x = num2text(z_lookup[num2text(saving.x)])
|
||||
var/text_x = num2text(saving.x)
|
||||
LAZYINITLIST(data[text_z])
|
||||
LAZYINITLIST(data[text_z][text_x])
|
||||
LAZYINITLIST(data[text_z][text_x][text_y])
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
block_parry_data = /datum/block_parry_data/unarmed/human
|
||||
default_block_parry_data = /datum/block_parry_data/unarmed/pugilist
|
||||
causes_dirt_buildup_on_floor = TRUE
|
||||
|
||||
//Hair colour and style
|
||||
var/hair_color = "000"
|
||||
|
||||
@@ -100,3 +100,8 @@
|
||||
if(dna.species.space_move(src))
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/dirt_buildup(strength)
|
||||
if(!shoes || !(shoes.body_parts_covered & FEET))
|
||||
return // barefoot advantage
|
||||
return ..()
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
var/incorporeal_move = FALSE //FALSE is off, INCORPOREAL_MOVE_BASIC is normal, INCORPOREAL_MOVE_SHADOW is for ninjas
|
||||
//and INCORPOREAL_MOVE_JAUNT is blocked by holy water/salt
|
||||
/// Do we make floors dirty as we move?
|
||||
var/causes_dirt_buildup_on_floor = TRUE
|
||||
var/causes_dirt_buildup_on_floor = FALSE
|
||||
|
||||
var/list/roundstart_quirks = list()
|
||||
|
||||
|
||||
@@ -114,12 +114,14 @@
|
||||
var/area/A = T.loc
|
||||
if(!A.dirt_buildup_allowed)
|
||||
return
|
||||
var/multiplier = CONFIG_GET(number/turf_dirty_multiplier)
|
||||
strength *= multiplier
|
||||
var/obj/effect/decal/cleanable/dirt/D = locate() in T
|
||||
if(D)
|
||||
D.dirty(strength)
|
||||
else
|
||||
T.dirtyness += strength
|
||||
if(T.dirtyness >= isnull(T.dirt_spawn_threshold)? CONFIG_GET(number/turf_dirt_threshold) : T.dirt_spawn_threshold)
|
||||
if(T.dirtyness >= (isnull(T.dirt_spawn_threshold)? CONFIG_GET(number/turf_dirt_threshold) : T.dirt_spawn_threshold))
|
||||
D = new /obj/effect/decal/cleanable/dirt(T)
|
||||
D.dirty(T.dirt_spawn_threshold - T.dirtyness)
|
||||
T.dirtyness = 0 // reset.
|
||||
|
||||
Reference in New Issue
Block a user