This fix was one hell of a debug journey. Icon.Insert() was the issue here but I'm not sure if it counts as byond bug in this particular case. When you insert a single frame icon, if an existing icon state of the same name exists normally it would be overridden. However different things happen if the icon that gets overridden has multiple frames. I'm not fully sure of the different behaviors but depending on what the icons consisted of you could get animated sprites where every frame was the same or appending frames to animated sprites in strange ways.
This has been fixed by making sure no Inserts are overriding existing icon states so that the strange behavior doesn't have to be dealt with.
The GAGS debug menu has been upgraded a bit on the way to fixing this bug. A toggle to automatically refresh icons when the dmi or json configuration are updated has been added and the step by step preview will only show steps now involved in the creation of the icon state you select.
Stationary gas tanks have been in a terrible place for a long time, this addresses some of the issues with a more balance focused change coming in a second mapping pr after this one.
Stationary gas tanks have been made constructable and act similarly to canisters in that they can be damaged, repaired, and over-pressurized to explode. Additionally, they can be made with any rigid material and their stats depend on that material. A glass tank is going to have far less pressure capability than one made of plasteel.
In terms of gameplay there are two main differences now: Adjacent stationary tanks will merge together both graphically and with their internal storage. Any port on any of the tanks can access this shared storage. Also stationary tanks no longer magically have many times the volume for gas as the tile it's in, instead they have a pressure cap and a normal amount of volume.
Of interest to coders this pr also adds a generic grouping datum that acts similar to how pipe networks work. It maintains a listing of all adjacent objects whose type falls within a specified filter. In this case it's used for the gas tanks to know of every other tank in the group. I'll be looking into spreading it's usage elsewhere where this can replace existing one off systems.
Some (de)construction:
First a glass tank is constructed which is then immediately damaged by the high pressure in the gas storage that is now shared. After repairing it for a moment another metal tank is built.
Yes this is blatant bait to get more things converted.
While working on this I fixed item greyscale updates to include their held and worn states, the vending machine ui is now tsx instead of js, icons generated by gags are created with an error state by default, the greyscale color menu defaults to not show you the full debug preview, and the wording in the debug menu is a bit more in-character friendly.
Changelog
cl
add: Greyscale items using GAGS in vending machines can have their colors chosen before vending. Not many things are capable of this yet but expect more to come.
/cl
Previously, the menu wouldn't show you the generation steps for icons other than the south dir icons. You can now specify which you want to see. In addition the config type itself can be changed so as to allow previewing of icons that normally are not displayed directly on the map.
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Relatively simple change that allows you to specify icon states in greyscale config so as to allow generating icon files with multiple states. This is a requisite for GAS to work with icon smoothing.
Also a couple bits of additional warnings and documentation.
* Nonfunctional greyscale code
* Functional greyscale sprites via filter
Probably going to set the icon instead later
* Switches to greyscale json config
* Adds the reference layer type and converts the other canister types
* Working previews
* Adds readme
* Fixes overlays and breaking
* Removes old canister sprites
* Removes an unused var
* Fixes tgui lints
* Removes a bunch of the old canister icon states
Yeah I need to fix relabeling as well
* Removes some debug sprites
* Sorts canister type list and breaks up base shader step
* Removes an unnecessary preview hack
* Makes prototype canister greyscale
* Properly sizes the ui
* Fills in the canister map sprite
* Adds some more warnings to layers
* Makes broken overlay more prominent
* Removes a preview var that isn't needed anymore
* Cleans up client ref in Destroy
* Cleans up the tgui window a bit
* Update GreyscaleModifyMenu.tsx
* Animates the canister falling over
* Removes a commented out line that's no longer needed
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>