mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #5423 from Anewbe/dirt_floors
Implements ways to make floors not get dirty
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
nitrogen = MOLES_N2STANDARD
|
nitrogen = MOLES_N2STANDARD
|
||||||
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
|
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/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/dirt = 0
|
var/dirt = 0
|
||||||
|
|
||||||
// This is not great.
|
// This is not great.
|
||||||
@@ -65,12 +66,13 @@
|
|||||||
tracks.AddTracks(bloodDNA,comingdir,goingdir,bloodcolor)
|
tracks.AddTracks(bloodDNA,comingdir,goingdir,bloodcolor)
|
||||||
|
|
||||||
/turf/simulated/proc/update_dirt()
|
/turf/simulated/proc/update_dirt()
|
||||||
dirt = min(dirt+1, 101)
|
if(can_dirty)
|
||||||
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
|
dirt = min(dirt+1, 101)
|
||||||
if (dirt > 50)
|
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
|
||||||
if (!dirtoverlay)
|
if (dirt > 50)
|
||||||
dirtoverlay = new/obj/effect/decal/cleanable/dirt(src)
|
if (!dirtoverlay)
|
||||||
dirtoverlay.alpha = min((dirt - 50) * 5, 255)
|
dirtoverlay = new/obj/effect/decal/cleanable/dirt(src)
|
||||||
|
dirtoverlay.alpha = min((dirt - 50) * 5, 255)
|
||||||
|
|
||||||
/turf/simulated/Entered(atom/A, atom/OL)
|
/turf/simulated/Entered(atom/A, atom/OL)
|
||||||
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
||||||
@@ -82,8 +84,9 @@
|
|||||||
if(M.lying)
|
if(M.lying)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
// Dirt overlays.
|
if(M.dirties_floor())
|
||||||
update_dirt()
|
// Dirt overlays.
|
||||||
|
update_dirt()
|
||||||
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
if(istype(M, /mob/living/carbon/human))
|
||||||
var/mob/living/carbon/human/H = M
|
var/mob/living/carbon/human/H = M
|
||||||
|
|||||||
@@ -1278,3 +1278,7 @@ default behaviour is:
|
|||||||
|
|
||||||
/mob/living/proc/has_vision()
|
/mob/living/proc/has_vision()
|
||||||
return !(eye_blind || (disabilities & BLIND) || stat || blinded)
|
return !(eye_blind || (disabilities & BLIND) || stat || blinded)
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/proc/dirties_floor() // If we ever decide to add fancy conditionals for making dirty floors (floating, etc), here's the proc.
|
||||||
|
return makes_dirt
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
|
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
|
||||||
var/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off.
|
var/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off.
|
||||||
|
|
||||||
|
|
||||||
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
|
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
|
||||||
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm
|
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm
|
||||||
|
|
||||||
@@ -59,3 +58,5 @@
|
|||||||
|
|
||||||
var/list/hud_list //Holder for health hud, status hud, wanted hud, etc (not like inventory slots)
|
var/list/hud_list //Holder for health hud, status hud, wanted hud, etc (not like inventory slots)
|
||||||
var/has_huds = FALSE //Whether or not we should bother initializing the above list
|
var/has_huds = FALSE //Whether or not we should bother initializing the above list
|
||||||
|
|
||||||
|
var/makes_dirt = TRUE //FALSE if the mob shouldn't be making dirt on the ground when it walks
|
||||||
Reference in New Issue
Block a user