mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +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
|
||||
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/dirt = 0
|
||||
|
||||
// This is not great.
|
||||
@@ -65,12 +66,13 @@
|
||||
tracks.AddTracks(bloodDNA,comingdir,goingdir,bloodcolor)
|
||||
|
||||
/turf/simulated/proc/update_dirt()
|
||||
dirt = min(dirt+1, 101)
|
||||
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
|
||||
if (dirt > 50)
|
||||
if (!dirtoverlay)
|
||||
dirtoverlay = new/obj/effect/decal/cleanable/dirt(src)
|
||||
dirtoverlay.alpha = min((dirt - 50) * 5, 255)
|
||||
if(can_dirty)
|
||||
dirt = min(dirt+1, 101)
|
||||
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
|
||||
if (dirt > 50)
|
||||
if (!dirtoverlay)
|
||||
dirtoverlay = new/obj/effect/decal/cleanable/dirt(src)
|
||||
dirtoverlay.alpha = min((dirt - 50) * 5, 255)
|
||||
|
||||
/turf/simulated/Entered(atom/A, atom/OL)
|
||||
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
||||
@@ -82,8 +84,9 @@
|
||||
if(M.lying)
|
||||
return ..()
|
||||
|
||||
// Dirt overlays.
|
||||
update_dirt()
|
||||
if(M.dirties_floor())
|
||||
// Dirt overlays.
|
||||
update_dirt()
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
@@ -1277,4 +1277,8 @@ default behaviour is:
|
||||
|
||||
|
||||
/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/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/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/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