From 38a8b58ec883598da48aba2178cd0af23bf9cf27 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Thu, 26 Dec 2013 16:27:09 +0400 Subject: [PATCH] Replaced weird ass space indenetation with tabs in tracks.dm --- .../effects/decals/Cleanable/tracks.dm | 300 +++++++++--------- 1 file changed, 150 insertions(+), 150 deletions(-) diff --git a/code/game/objects/effects/decals/Cleanable/tracks.dm b/code/game/objects/effects/decals/Cleanable/tracks.dm index d1c329014ce..4af9bd97cc7 100644 --- a/code/game/objects/effects/decals/Cleanable/tracks.dm +++ b/code/game/objects/effects/decals/Cleanable/tracks.dm @@ -17,178 +17,178 @@ var/global/list/image/fluidtrack_cache=list() /datum/fluidtrack - var/direction=0 - var/basecolor="#A10808" - var/wet=0 - var/fresh=1 - var/crusty=0 - var/image/overlay + var/direction=0 + var/basecolor="#A10808" + var/wet=0 + var/fresh=1 + var/crusty=0 + var/image/overlay - New(_direction,_color,_wet) - src.direction=_direction - src.basecolor=_color - src.wet=_wet + New(_direction,_color,_wet) + src.direction=_direction + src.basecolor=_color + src.wet=_wet // Footprints, tire trails... /obj/effect/decal/cleanable/blood/tracks - amount = 0 - random_icon_states = null - var/dirs=0 - icon = 'icons/effects/fluidtracks.dmi' - var/coming_state="blood1" - var/going_state="blood2" - var/updatedtracks=0 + amount = 0 + random_icon_states = null + var/dirs=0 + icon = 'icons/effects/fluidtracks.dmi' + var/coming_state="blood1" + var/going_state="blood2" + var/updatedtracks=0 - // dir = id in stack - var/list/setdirs=list( - "1"=0, - "2"=0, - "4"=0, - "8"=0, - "16"=0, - "32"=0, - "64"=0, - "128"=0 - ) + // dir = id in stack + var/list/setdirs=list( + "1"=0, + "2"=0, + "4"=0, + "8"=0, + "16"=0, + "32"=0, + "64"=0, + "128"=0 + ) - // List of laid tracks and their colors. - var/list/datum/fluidtrack/stack=list() + // List of laid tracks and their colors. + var/list/datum/fluidtrack/stack=list() - /** - * Add tracks to an existing trail. - * - * @param DNA bloodDNA to add to collection. - * @param comingdir Direction tracks come from, or 0. - * @param goingdir Direction tracks are going to (or 0). - * @param bloodcolor Color of the blood when wet. - */ - proc/AddTracks(var/list/DNA, var/comingdir, var/goingdir, var/bloodcolor="#A10808") - var/updated=0 - // Shift our goingdir 4 spaces to the left so it's in the GOING bitblock. - var/realgoing=goingdir<<4 + /** + * Add tracks to an existing trail. + * + * @param DNA bloodDNA to add to collection. + * @param comingdir Direction tracks come from, or 0. + * @param goingdir Direction tracks are going to (or 0). + * @param bloodcolor Color of the blood when wet. + */ + proc/AddTracks(var/list/DNA, var/comingdir, var/goingdir, var/bloodcolor="#A10808") + var/updated=0 + // Shift our goingdir 4 spaces to the left so it's in the GOING bitblock. + var/realgoing=goingdir<<4 - // Current bit - var/b=0 + // Current bit + var/b=0 - // When tracks will start to dry out - var/t=world.time + TRACKS_CRUSTIFY_TIME + // When tracks will start to dry out + var/t=world.time + TRACKS_CRUSTIFY_TIME - var/datum/fluidtrack/track + var/datum/fluidtrack/track - // Process 4 bits - for(var/bi=0;bi<4;bi++) - b=1<>4 + /* FIXME: This shit doesn't work for some reason. + The Remove line doesn't remove the overlay given, so this is defunct. + var/b=0 + for(var/image/overlay in overlays) + b=overlay.dir + if(overlay.icon_state==going_state) + b=b<<4 + if(updatedtracks&b) + overlays.Remove(overlay) + //del(overlay) + */ + // Update ONLY the overlays that have changed. + for(var/datum/fluidtrack/track in stack) + // TODO: Uncomment when the block above is fixed. + //if(!(updatedtracks&track.direction) && !track.fresh) + // continue + var/stack_idx=setdirs["[track.direction]"] + var/state=coming_state + truedir=track.direction + if(truedir&240) // Check if we're in the GOING block + state=going_state + truedir=truedir>>4 - if(track.overlay) - track.overlay=null + if(track.overlay) + track.overlay=null - //var/cache_key="[track.basecolor]|[state]|[track.direction]|[track.wet