Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footprint Offset #17776

Merged
merged 2 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions code/game/objects/effects/decals/Cleanable/tracks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions html/changelogs/geeves-footprint_offset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
author: Geeves

delete-after: True

changes:
- rscadd: "Added a very small offset to footprints to break up the grid-like look."
Loading