Files
Bubberstation/tools/ScrollAnimationAssembler/apply.dm
SkyratBot 99da4dee45 [MIRROR] Galaxy Suitskirts + Scrolling Animation Icon Tool [MDB IGNORE] (#20051)
* Galaxy Suitskirts + Scrolling Animation Icon Tool (#74183)

## About The Pull Request

Adds skirt variants of the lawyer's galaxy suits. Dyeing lawyer
suitskirts will now create galaxy suitskirts instead of normal galaxy
suits.

![blu](https://user-images.githubusercontent.com/5479091/227040864-d524560c-f364-4547-b212-7dbbc645b3b2.gif)

![redd](https://user-images.githubusercontent.com/5479091/227040871-69950d08-5a02-42a4-aeb8-d5d5d7b62c02.gif)

Bundled with the tooling I created to assemble these sprites, and the
input DMIs as examples. Tool only creates right to left scrolling, other
directions can be achieved by suitably rotating/flipping the inputs, and
then transforming the output back to the intended direction.

## Why It's Good For The Game

Allows skirt-wearers to participate in the sick ass suits, and prevents
skirts from magically turning into trousers. Tooling could prove useful
in future for other spriters who want to make scrolling animations.

## Changelog
🆑
add: Added skirt variants of the galaxy suits
/🆑

* Galaxy Suitskirts + Scrolling Animation Icon Tool

---------

Co-authored-by: Thunder12345 <Thunder12345@users.noreply.github.com>
2023-03-25 01:05:25 -07:00

23 lines
875 B
Plaintext

/// Cut out a piece of the background at a specified frame, and paste it on top of the foreground
/proc/Apply(var/icon/source, var/icon/mask, var/icon/target, frame)
//Temporary copies of source, mask and target
var/icon/source_copy = new(source)
var/icon/mask_copy = new(mask)
var/icon/target_copy = new(target)
//Automatically invert the mask
mask_copy.SwapColor(rgb(255, 0, 220, 255), rgb(10, 20, 30, 40))
mask_copy.SwapColor(rgb(0, 0, 0, 0), rgb(255, 0, 220, 255))
mask_copy.SwapColor(rgb(10, 20, 30, 40), rgb(0, 0, 0, 0))
//Overlay the mask onto the image then erase the covered area
source_copy.Crop(frame, 1, frame+31, 32)
source_copy.Blend(mask_copy, ICON_OVERLAY, 1, 1)
source_copy.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
//Overlay the masked source onto the target
target_copy.Blend(source_copy, ICON_OVERLAY, 1, 1)
return target_copy