184 Commits over 183 Days - 0.04cph!
Undo some of this json stuff for now. Has a lot more edge cases than I thought....
Display default name in TilesetTileControl when tiles are unnamed
AutotileBrushListControl no longer shows add button when inspecting the asset, only in the Tileset Editor
Implemented "Inherit Autotile From" setting, display inherited autotiles in the brush list
https://files.facepunch.com/CarsonKompon/2024/December/20_10-14-LoathsomeWhale.mp4
Remove "NOT IMPLEMENTED" text from 15 tiles since it is implemented
Add a few NRE checks for niche edge cases
AutotileBrush.Tileset reference to associated Tileset. Fixed a few more edge cases
TilesetResource.GetAllAutotileBrushes() now returns new copies of the inherited brushes instead of the original brushes themselves, referencing tiles from this tileset in the same positions.
Fix TilesetResource.Tile deserialization error
More Documentation, removed unused code, fixed Tile.Copy(), and added internal setter to Tile.Tileset
Added JsonConverters for AutotileBrush so it serializes as refereces by default but serializes the entire brush within the associated resource.
Added documentation to properties/functions that were missing them
Make TilesetResource.InternalUpdateTiles() internal
Clearing the Tileset in a ResourceTileControlWidget/AutotileBrushControlWidget sets the value to null
Created ReferencedResourceWidget which the two controls now derive from
TileResource.Tile now implements IJsonConvert, only serializing info necessary to complete the reference.
Fix TileAtlas error
Fix NREs in AutotileTileControl
Fix another TileAtlas oversight
Refactored TilesetResource.Tile. TilesetResource has it's own JsonConverter to ensure data is serialized in it's entirety in the resource but not elsewhere (references)
Fix TilesetResource.AddTile and TilesetResource.RemoveTile
Make TilesetResource.TileMap internal and add TilesetResource.GetTileFromId
Created AutotileBrushControlWidget so you can have a reference to an Autotile Brush via a Property (and edit inline)
[Hide] a few variables that shouldn't be editable
Created ResourceTileControlWidget which allows you to have a reference to a specific tile in a TilesetResource (and edit the tile right from the reference)
https://files.facepunch.com/CarsonKompon/2024/December/18_15-05-SubstantialRaccoon.mp4
Added TilesetResource.GetName() and make Tile.Tileset [ReadOnly]
Don't create an invalid Tileset state when no autotiles are present
Clean out all the old unused files
Added GetTextureFromFrame docs
Support 3x3m and 3x3c guides with new TextureAtlas approach
TextureAtlas.GetTextureFromFrame now grabs proper coordinates for all ratios
Fix NRE in TextureAtlas.FromSpritesheet
Optimize TextureAtlas class and fix random green pixels in TextureAtlas.GetTextureFromFrame
Use TextureAtlas for Autotile Guides
TextureAtlas.GetPreviewTexture no longer has 1px padding or texture bleed
Refactor over-complicated tile caching process and do everything from TileAtlas
Condense individual guide images into single images. Saves on a ton of space.
Autotile Example/Test Assets. Published Autotiling to sbox.game
Refactor Autotile serialization so we can support stuff like merging
Fix erasing Autotile updates
Save merge state to Autotiles, and fix SetAutotile override not working as intended
Finally got merged autotile working, visual still displays incorrectly at times however
https://files.facepunch.com/CarsonKompon/2024/December/04_12-02-FearlessAruanas.mp4
Fixed merged autotiles not patching themselves when erasing nearby autotiles
Do tile validation before updating bitmask instead of during so tiles destroyed after those that already updated their bitmask don't leave behind invalid tiles
Fix Autotile Rectangle Tool
Fix all the issues that the last 2 fixes caused
2x2 Edge now has proper tile count
Added bitmask mappings for each valid autotile position of 2x2 autotiles. Now all brush types are officially supported
https://files.facepunch.com/CarsonKompon/2024/December/03_15-57-FlakyPlanthopper.mp4
Fix rectangle delete not deleting non-autotile tiles when in autotile mode
Placing Autotiles near Autotiles of another type while merging is enabled will no longer override the old tile type
Autotile Merge setting now visually shows how the merge will end up looking (although not yet functional when painted. will need to refactor how autotiles are saved)
https://files.facepunch.com/CarsonKompon/2024/December/03_16-32-RegularAfricanbushviper.mp4
Change tile guide asset names
Added 256 tile guides
Can now create Autotile Brushes of each type. Remove Corner Type
Implemented 3x3 Complete (255) Autotiling
Fix Rectangle Tool preview
Brush Rotation no longer incorrectly displays Autotile preview
Paint Tool now supports 2x2 Autotile Brushes
Fix issues when using Round brush with 2x2 Autotile
Added descriptions to each tool Property
Added "Merge Different Autotiles" Brush setting.
Fix eraser not drawing above other tiles
Check for the validity of a 2x2 Autotile existing when painting/erasing
Maintain 2x2 validity check while using 255 size bitmask
Is47Tiles -> AutotileType enum with 4 bitmask types.
GetAutotileBitmask now returns proper values for each type
Basic 2x2 Edge and Corner bitmask implementations
Fix PaintTileTool warning and NREs
Can now change Autotile type after initially creating it, fixed all NREs that come with that change
Changing Autotile Brush type now gives popup warning telling you its a potentially destructive change. Cleaned up a bunch of unused code
Fix AutotileWidget not being created with unnamed autotile brush
Fix brush type not serializing
Fixed not being able to select brush while tile was selected in Tileset Editor
Replaced separate create buttons with a single button that has a dropdown for brush type
https://files.facepunch.com/CarsonKompon/2024/December/02_13-37-FrigidUintagroundsquirrel.mp4
Fix rectangle tool erase not erasing autotiles properly
Added autotile preview support to Rectangle Tool
Fix Rectangle Tool issues
Added Autotile Preview to Line Tool
Painting with an Autotile Brush now displays how the tiles will change before you paint instead of showing blank previews
https://files.facepunch.com/CarsonKompon/2024/November/26_14-50-ForthrightPolyp.mp4
Update SceneObject tags of Sprites and Tilesets
Can now change the size of the Paint and Eraser tool. Using the eraser tool with an autotile selected will erase using autotile rules
https://files.facepunch.com/CarsonKompon/2024/November/25_16-26-AromaticFrog.mp4
Line and Rectangle Tool now support Autotile Brushes
https://files.facepunch.com/CarsonKompon/2024/November/25_15-53-BluevioletLeafbird.mp4
Calculate tile bitmask and find matching tile on paint
https://files.facepunch.com/CarsonKompon/2024/November/25_14-17-MotherlyQueenbee.mp4
Added mappings for each bitmask value of a 47-tile tileset
https://files.facepunch.com/CarsonKompon/2024/November/25_15-38-ElegantBighornsheep.mp4
Slight refactor so you can paint autotiles over existing autotiles
https://files.facepunch.com/CarsonKompon/2024/November/25_15-46-AlienatedIndochinesetiger.mp4
Added BaseTileTool.AutotileBrush
Tileset Tool Preview updates to show selected Autotile Brush if there is one
https://files.facepunch.com/CarsonKompon/2024/November/25_11-44-GhostwhiteGenet.mp4
Add collapse-able groups for line and rectangle tool inspector values
Highlight selected autotile tiles with selected color
Painting with the PaintTileTool while an Autotile Brush is set will paint to that Autotile layer instead of drawing tiles directly (and draw some debug visuals for now)
Fix TilesetPreview aspect issues
Added Autotile Test Resource
Added AutotileWidget which holds autotile paint controls, display in TilesetTool Inspector
Autotile Example Scene
Update TilesetTool Inspector layout and reset autotile brush when changing layers
Can click on preview tiles to add them to the selected brush/tile
Updated tileset guides
Created Autotile Reference ControlWidget
Make Reference ControlWidget look nicer
Can add multiple tile variations to an Autotile Tile
Can now rename/clear/delete/configure Autotile Brushes, added Right Click menus to Brush, Tile, and Tile Reference ControlWidgets
https://files.facepunch.com/CarsonKompon/2024/November/21_15-42-ImmaterialSphinx.mp4
Added "Autotile Brushes" tab to Tileset Editor with custom widget for Brushes
Created custom Controls/Widgets for Autotile Brush List and individual tiles, with support for proper wrapping to fit width
https://files.facepunch.com/CarsonKompon/2024/November/21_09-20-QuarrelsomeBorzoi.mp4
Can now select tiles from a brush
Selected autotiles now show a small inspector beneath the brush list
Brushes with unset tiles show guide images so you know which tile(s) you're meant to select for each
https://files.facepunch.com/CarsonKompon/2024/November/21_10-23-DrearyThrush.mp4
Remove logs
Fix TilesetComponent upgrade order
Can now set height directly on a layer instead of having a single distance-between float. Added JsonUpgrader where needed
Added PreviewTileset so Tilesets have thumbnails
Updated TilesetToolInspector to have Brush settings visible in the tab + reformatted
Added AngleIntWidget for Brush Angle
Maintain selected tile when changing layers
Fix all the warnings
Bring back selection fix
Exit Tileset Tool when selecting a GameObject
Switch layers properly when changing Selected Tileset Component
Fix TilesetTool OnEnabled NRE
Fix Sprite Flash Tint not being applied if set when disabled
Fix TilesetResource not hotloading when adding/removing tiles
Added TilesetComponent.GetBounds()
Remove "Component" from Sprite/Tileset Titles, add [Tint] to each
Fix NREs when hotloading
Added 2D Sprite and 2D Tileset prefab templates
https://files.facepunch.com/CarsonKompon/2024/November/07_08-25-LightyellowLynx.png
Fix issues with setting SpriteComponent.Sprite to/from null
Updated example scene
Proper Tileset Bounds calculation for any Rotation
https://files.facepunch.com/CarsonKompon/2024/November/07_08-07-PoisedMorpho.mp4
Can now click on a TilesetComponent to select it in object mode
https://files.facepunch.com/CarsonKompon/2024/November/07_06-54-BasicDonkey.mp4
Prevent TilesetTool from being able to place out-of-bounds, throwing a warning
Make sure all Tileset Tools account for offset Tilesets
Can change selected Tileset Component in Tileset Tool
https://files.facepunch.com/CarsonKompon/2024/November/06_19-30-MotherlyDiscus.mp4
Fix a silly bounds issue
https://files.facepunch.com/CarsonKompon/2024/November/06_19-35-FabulousLunamoth.mp4
TilesetTool draws grid at the TilesetComponent's position so the grid is actually aligned to the object
Fix TilesetCollider not always building immediately
Proper Bake Selected Description
TilesetComponent docs
LayerControl Italics when Layer is locked, lighter text when hidden
Missed some other StatusTexts
Fix TilesetToolInspector not updating when switching Layers or changing Tilesets
Don't display Layers in the TilesetComponent, only in the TilesetTool so it's less confusing (hopefully)
Don't display Surface Properties in Tileset Tool
Refactor TilesetComponent so the Collider is a separate hidden component used invisibly.
Moved TilesetComponent Collision variables into their own feature tab which can be removed
Fixed "Set as Collision Layer" not instantly rebuilding Collisions
Don't show Collision Variables in the TilesetToolInspector
Fixed Tileset Tool Inspector. Resolves Facepunch/sbox-spritetools#26
Updated to fit the changes of Asset/AssetEntry