Merge pull request #6323 from Heroman3003/dirtining

Makes roundstart dirt work more properly
This commit is contained in:
Atermonera
2019-07-23 20:37:26 -08:00
committed by GitHub
2 changed files with 6 additions and 3 deletions
+2
View File
@@ -13,6 +13,8 @@
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to
var/can_dirty = TRUE // If false, tile never gets dirty
var/can_start_dirty = TRUE // If false, cannot start dirty roundstart
var/dirty_prob = 2 // Chance of being dirty roundstart
var/dirt = 0
// This is not great.
+4 -3
View File
@@ -41,9 +41,10 @@
set_flooring(get_flooring_data(floortype))
else
footstep_sounds = base_footstep_sounds
if(can_dirty)
if(prob(2))
new /obj/effect/decal/cleanable/dirt(src) //5% chance to start with dirt on a floor tile- give the janitor something to do
if(can_dirty && can_start_dirty)
if(prob(dirty_prob))
dirt += rand(50,100)
update_dirt() //5% chance to start with dirt on a floor tile- give the janitor something to do
/turf/simulated/floor/proc/set_flooring(var/decl/flooring/newflooring)
make_plating(defer_icon_update = 1)