mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Footprint Offset (#17776)
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
var/crusty = FALSE
|
||||
var/image/overlay
|
||||
|
||||
var/offset_pixel_y = 0
|
||||
var/offset_pixel_x = 0
|
||||
|
||||
/datum/fluidtrack/New(_direction, _color, _wet)
|
||||
src.direction = _direction
|
||||
src.basecolor = _color
|
||||
@@ -51,6 +54,9 @@
|
||||
// List of laid tracks and their colors.
|
||||
var/list/datum/fluidtrack/stack = list()
|
||||
|
||||
/// Amount of pixels to shift either way in an attempt to make the tracks more organic
|
||||
var/transverse_amplitude = 3
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/reveal_blood()
|
||||
if(!fluorescent)
|
||||
if(stack?.len)
|
||||
@@ -139,6 +145,15 @@
|
||||
var/image/I = image(icon, icon_state = state, dir = num2dir(truedir))
|
||||
I.color = track.basecolor
|
||||
|
||||
switch(truedir)
|
||||
if(NORTH, SOUTH)
|
||||
I.pixel_x += track.offset_pixel_x ? track.offset_pixel_x : rand(-transverse_amplitude, transverse_amplitude)
|
||||
if(EAST, WEST)
|
||||
I.pixel_y += track.offset_pixel_y ? track.offset_pixel_y : rand(-transverse_amplitude, transverse_amplitude)
|
||||
|
||||
track.offset_pixel_x = I.pixel_x
|
||||
track.offset_pixel_y = I.pixel_y
|
||||
|
||||
track.fresh = 0
|
||||
track.overlay = I
|
||||
stack[stack_idx] = track
|
||||
|
||||
Reference in New Issue
Block a user