Demote keyboard layouts from MessagePack

This commit is contained in:
Meta Vens 2026-06-13 08:46:09 +01:00
commit 37af47863a
4 changed files with 18 additions and 53 deletions

Binary file not shown.

View file

@ -1,23 +0,0 @@
using MessagePack;
using MessagePack.Resolvers;
using UnityEngine;
namespace Assets.Scripts
{
class InitialSettings
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void RegisterResolvers()
{
// NOTE: Currently, CompositeResolver doesn't work on Unity IL2CPP build. Use StaticCompositeResolver instead of it.
StaticCompositeResolver.Instance.Register(
MathResolver.Instance,
BuiltinResolver.Instance,
PrimitiveObjectResolver.Instance
);
MessagePackSerializer.DefaultOptions = MessagePackSerializer.DefaultOptions
.WithResolver(StaticCompositeResolver.Instance);
}
}
}

View file

@ -1,9 +1,8 @@
using System.Collections.Generic;
using MessagePack;
[MessagePackObject]
public class InputLayout
{
[Key(0)] public InputLayoutRow[] Rows;
public InputLayoutRow[] Rows;
public IEnumerable<InputLayoutBindableKey> GetBindableKeys()
{
@ -22,49 +21,33 @@ public class InputLayout
}
}
[MessagePackObject,
Union(0, typeof(InputLayoutRowSpacer)),
Union(1, typeof(InputLayoutKeyRow))
]
public abstract class InputLayoutRow { }
[MessagePackObject]
public class InputLayoutRowSpacer : InputLayoutRow
{
[Key(0)] public float Height;
public float Height;
}
[MessagePackObject]
public class InputLayoutKeyRow : InputLayoutRow
{
[Key(0)] public InputLayoutColumn[] Columns;
public InputLayoutColumn[] Columns;
}
[MessagePackObject,
Union(0, typeof(InputLayoutColumnSpacer)),
Union(1, typeof(InputLayoutKey)),
Union(2, typeof(InputLayoutBindableKey)),
Union(3, typeof(InputLayoutMultiRowKey))
]
public abstract class InputLayoutColumn
{
[Key(0)] public float Width;
public float Width;
}
[MessagePackObject]
public class InputLayoutColumnSpacer : InputLayoutColumn { }
[MessagePackObject]
public class InputLayoutKey : InputLayoutColumn { }
[MessagePackObject]
public class InputLayoutBindableKey : InputLayoutKey, IBindableButton
{
[Key(1)] public string MainLabel;
[Key(2)] public string AltLabel;
[Key(3)] public string ShortPath;
public string MainLabel;
public string AltLabel;
public string ShortPath;
[IgnoreMember]
public string InputSystemPath
{
get
@ -80,7 +63,7 @@ public class InputLayoutBindableKey : InputLayoutKey, IBindableButton
public class InputLayoutMultiRowKey : InputLayoutBindableKey
{
[Key(4)] public int Height;
public int Height;
}
public class InputLayoutMouseButton : IBindableButton
@ -96,4 +79,4 @@ public class InputLayoutMouseButton : IBindableButton
public interface IBindableButton
{
public string InputSystemPath { get; set; }
}
}

View file

@ -28,7 +28,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
`Economy.Shared` wrapper have been removed from live source. The stale
`StrategyGameManager.csbak` backup file and unused Unity asset MessagePack
formatter classes have also been deleted, so the remaining direct
`MessagePackSerializer` calls are the two legacy catalog deserializers.
`MessagePackSerializer` calls are the two legacy catalog deserializers and
their resolver setup.
- Local legacy catalog data remains in `GameData/AetherDB.msgpack` and
`GameData/NameFile/*.msgpack` as migration/catalog inputs. The old
`PlayerSettings.msgpack`, `.loadout`, `.zone`, and
@ -91,8 +92,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
`EntitySettings`, and UI/player-settings startup no longer registers the old
MessagePack resolver. Resolver registration is confined to legacy catalog
deserialization. Unused Unity asset formatters for GameObject, Material,
Sprite, and Texture2D are deleted. The slime compute settings path no longer
serializes its local parameter struct for change detection.
Sprite, and Texture2D are deleted. Keyboard layout DTOs are plain runtime
parse/display models, not MessagePack save shapes. The global scene-load
MessagePack resolver hook is deleted. The slime compute settings path no
longer serializes its local parameter struct for change detection.
- The dead story compiled-JSON cache sketch and its SHA helper are deleted;
story compilation currently reads Ink source directly until a typed Verse
story/cache document exists.
@ -272,6 +275,8 @@ First Aetheria surfaces to publish:
- Done: delete public legacy catalog cache mutation APIs.
- Done: delete the stale `StrategyGameManager.csbak` backup source and
unused Unity asset MessagePack formatters.
- Done: demote keyboard layout DTOs from MessagePack shapes and delete the
global scene-load MessagePack resolver hook.
- Remaining: delete or quarantine old cache abstractions that no longer
protect an invariant once catalog migration has a typed reader.