mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
fix
This commit is contained in:
@@ -566,3 +566,16 @@
|
||||
config_entry_value = 0.333
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
/// Amount of dirtyness tiles need to spawn dirt.
|
||||
/datum/config_entry/number/turf_dirt_threshold
|
||||
config_entry_value = 100
|
||||
min_value = 1
|
||||
integer = TRUE
|
||||
|
||||
/// Alpha dirt starts at
|
||||
/datum/config_entry/number/dirt_alpha_starting
|
||||
config_entry_value = 127
|
||||
max_val = 255
|
||||
min_val = 0
|
||||
integer = TRUE
|
||||
|
||||
@@ -65,7 +65,11 @@
|
||||
mergeable_decal = TRUE
|
||||
persistent = TRUE
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/proc/dirty(strength)
|
||||
/obj/effect/decal/cleanable/dirt/Initialize(mapload)
|
||||
. = ..()
|
||||
alpha = CONFIG_GET(number/dirt_alpha_starting)
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/proc/dirty(strength = 1)
|
||||
if(alpha < 255)
|
||||
alpha += strength
|
||||
if(alpha > 255)
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
var/dirt_buildup_allowed = FALSE
|
||||
/// Dirt level.
|
||||
var/dirtyness = 0
|
||||
/// Dirt level to spawn dirt.
|
||||
var/dirt_spawn_threshold = 100
|
||||
/// Dirt level to spawn dirt. Null to use config.
|
||||
var/dirt_spawn_threshold
|
||||
/// Slowdown applied to mobs on us.
|
||||
var/slowdown = 0 //negative for faster, positive for slower
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
/**
|
||||
* Attempts to make the floor dirty.
|
||||
*/
|
||||
/mob/living/proc/dirt_buildup(strength)
|
||||
/mob/living/proc/dirt_buildup(strength =)
|
||||
var/turf/open/T = loc
|
||||
if(!istype(T) || !T.dirt_buildup_allowed)
|
||||
return
|
||||
@@ -119,7 +119,7 @@
|
||||
D.dirty(strength)
|
||||
else
|
||||
T.dirtyness += strength
|
||||
if(T.dirtyness >= 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.
|
||||
|
||||
@@ -668,4 +668,10 @@ ALLOW_CUSTOM_SKINTONES
|
||||
|
||||
## Enables the FoV component, which hides objects and mobs behind the parent from their sight, unless they turn around, duh.
|
||||
## Camera mobs, AIs, ghosts and some other are of course exempt from this. This also doesn't influence simplemob AI, for the best.
|
||||
#USE_FIELD_OF_VISION
|
||||
#USE_FIELD_OF_VISION
|
||||
|
||||
## Default turf threshold to get dirt
|
||||
TURF_DIRT_THRESHOLD 100
|
||||
|
||||
## Default alpha of dirt on spawn
|
||||
DIRT_ALPHA_STARTING 127
|
||||
|
||||
Reference in New Issue
Block a user