biggest gridinv update OF ALL TIME (#25834)

* add SaveItemLocation keybind

* make item direction public to avoid having to change between Angle for no reason

* add item location saving

* show

* Added a better save keybind, made it draw saved positions, and trying to save in a position it has already been saved in removes that position.

* w

* code style

* Make taken spots appear blue

* style

* !

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: notquitehadouken <tripwiregamer@gmail.com>
Co-authored-by: I.K <45953835+notquitehadouken@users.noreply.github.com>
This commit is contained in:
deltanedas
2024-03-28 06:31:47 +00:00
committed by GitHub
parent 65fa3ae211
commit 6863a7cc26
10 changed files with 188 additions and 5 deletions

View File

@@ -8,16 +8,16 @@ public partial record struct ItemStorageLocation
/// <summary>
/// The rotation, stored a cardinal direction in order to reduce rounding errors.
/// </summary>
[DataField]
private Direction _rotation;
[DataField("_rotation")]
public Direction Direction;
/// <summary>
/// The rotation of the piece in storage.
/// </summary>
public Angle Rotation
{
get => _rotation.ToAngle();
set => _rotation = value.GetCardinalDir();
get => Direction.ToAngle();
set => Direction = value.GetCardinalDir();
}
/// <summary>