Files
Bubberstation/tools/ScrollAnimationAssembler/assemble.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

24 lines
789 B
Plaintext

/// Pull the icons from their files, iterate over frames, constructing each using Apply() and inserting into the output dmi
/proc/Assemble(background_dmi as file, foreground_dmi as file, mask_dmi as file, frames, duration)
var/icon/source_icon = new(background_dmi, icon_state = "", frame = 1)
var/icon/target_icon = new(foreground_dmi, icon_state = "", frame = 1)
var/icon/mask_icon = new(mask_dmi, icon_state = "", frame = 1)
var/icon/output_icon = new /icon()
var/filename = "output.dmi"
fdel(filename)
for(var/framenum in 1 to frames)
output_icon = icon(filename)
var/icon/curr_frame = Apply(source_icon, mask_icon, target_icon, framenum)
output_icon.Insert(curr_frame, "", frame = framenum, delay = duration)
fcopy(output_icon, filename)
world << "Finished!"