diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index ae968fc3ee9..b0d9d00fd5e 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -21,6 +21,8 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A) if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1)) A.clean_blood() + var/turf/simulated/floor/F = A + F.dirt = 0 for(var/obj/effect/O in A) if(istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay)) qdel(O) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 1011cef9c50..56c208db908 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -37,12 +37,10 @@ if (istype(A,/mob/living/carbon)) var/mob/living/carbon/M = A if(M.lying) return - switch (src.wet) if(1) //wet floor if(!M.slip(4, 2, null, (NO_SLIP_WHEN_WALKING|STEP))) M.inertia_dir = 0 return - if(2) //lube M.slip(0, 7, null, (STEP|SLIDE|GALOSHES_DONT_HELP)) \ No newline at end of file diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 0be1070747c..94bf8673290 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -32,6 +32,8 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," var/obj/item/stack/tile/builtin_tile = null //needed for performance reasons when the singularity rips off floor tiles var/list/broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5") var/list/burnt_states = list() + var/dirt = 0 + var/ignoredirt = 0 /turf/simulated/floor/New() ..() @@ -161,4 +163,20 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," /turf/simulated/floor/narsie_act() if(prob(20)) - ChangeTurf(/turf/simulated/floor/engine/cult) \ No newline at end of file + ChangeTurf(/turf/simulated/floor/engine/cult) + +/turf/simulated/floor/Entered(atom/A, atom/OL) + ..() + if(!ignoredirt) + if(has_gravity(src)) + if(istype(A,/mob/living/carbon)) + var/mob/living/carbon/M = A + if(M.lying) return + dirt++ + var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src) + if (dirt >= 30) + if (!dirtoverlay) + dirtoverlay = new/obj/effect/decal/cleanable/dirt(src) + dirtoverlay.alpha = 15 + else if (dirt > 30) + dirtoverlay.alpha = min(dirtoverlay.alpha+20, 255) \ No newline at end of file diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 7fb99942189..4fe22480e21 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -41,6 +41,7 @@ icon_state = "grass1" floor_tile = /obj/item/stack/tile/grass broken_states = list("sand1", "sand2", "sand3") + ignoredirt = 1 /turf/simulated/floor/fancy/grass/New() ..() diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 4a808d7be61..15be7dfd212 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -63,6 +63,7 @@ /turf/simulated/floor/beach name = "Beach" icon = 'icons/misc/beach.dmi' + ignoredirt = 1 /turf/simulated/floor/beach/ex_act(severity, target) contents_explosion(severity, target) @@ -84,11 +85,13 @@ ..() name = "Iron Sand" icon_state = "ironsand[rand(1,15)]" + ignoredirt = 1 /turf/simulated/floor/plating/snow name = "snow" icon = 'icons/turf/snow.dmi' icon_state = "snow" + ignoredirt = 1 /turf/simulated/floor/plating/snow/ex_act(severity, target) contents_explosion(severity, target) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 018f6e491ed..581ab4f176d 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -475,6 +475,7 @@ icon_state = "asteroid" icon_plating = "asteroid" var/dug = 0 //0 = has not yet been dug, 1 = has already been dug + ignoredirt = 1 /turf/simulated/floor/plating/asteroid/airless oxygen = 0.01 diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index b3707f263cb..d2fabd8f836 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -846,6 +846,9 @@ var/turf/tile = loc if(isturf(tile)) tile.clean_blood() + if (istype(tile, /turf/simulated/floor)) + var/turf/simulated/floor/F = tile + F.dirt = 0 for(var/A in tile) if(istype(A, /obj/effect)) if(istype(A, /obj/effect/rune) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay)) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents.dm index 2151bbec53f..bfc36dc4b3f 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents.dm @@ -650,6 +650,10 @@ datum/reagent/space_cleaner/reaction_turf(var/turf/T, var/volume) for(var/mob/living/carbon/slime/M in T) M.adjustToxLoss(rand(5,10)) + if(istype(T, /turf/simulated/floor)) + var/turf/simulated/floor/F = T + if(volume >= 1) + F.dirt = 0 datum/reagent/space_cleaner/reaction_mob(var/mob/M, var/method=TOUCH, var/volume) if(iscarbon(M)) @@ -854,4 +858,4 @@ datum/reagent/plantnutriment/robustharvestnutriment // Undefine the alias for REAGENTS_EFFECT_MULTIPLER -#undef REM \ No newline at end of file +#undef REM