mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 14:55:11 +00:00
Split Input.Control and Input.ControlAttr
This commit is contained in:
@@ -230,7 +230,7 @@ namespace SabreTools.Serialization.CrossModel
|
||||
var input = new Input
|
||||
{
|
||||
Players = item.Players,
|
||||
Control = item.ReadString(Data.Models.Metadata.Input.ControlKey),
|
||||
Control = item.ControlAttr,
|
||||
Buttons = item.Buttons,
|
||||
Coins = item.Coins,
|
||||
Tilt = item.Tilt,
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace SabreTools.Serialization.CrossModel
|
||||
var input = new Data.Models.Metadata.Input
|
||||
{
|
||||
Players = item.Players,
|
||||
[Data.Models.Metadata.Input.ControlKey] = item.Control,
|
||||
ControlAttr = item.Control,
|
||||
Buttons = item.Buttons,
|
||||
Coins = item.Coins,
|
||||
Tilt = item.Tilt,
|
||||
|
||||
@@ -499,14 +499,11 @@ namespace SabreTools.Serialization.CrossModel
|
||||
Service = item.Service,
|
||||
Tilt = item.Tilt,
|
||||
Players = item.Players,
|
||||
ControlAttr = item.ControlAttr,
|
||||
Buttons = item.Buttons,
|
||||
Coins = item.Coins,
|
||||
};
|
||||
|
||||
var controlAttr = item.ReadString(Data.Models.Metadata.Input.ControlKey);
|
||||
if (controlAttr is not null)
|
||||
input.ControlAttr = controlAttr;
|
||||
|
||||
var controls = item.Read<Data.Models.Metadata.Control[]>(Data.Models.Metadata.Input.ControlKey);
|
||||
if (controls is not null && controls.Length > 0)
|
||||
input.Control = Array.ConvertAll(controls, ConvertFromInternalModel);
|
||||
|
||||
@@ -537,7 +537,7 @@ namespace SabreTools.Serialization.CrossModel
|
||||
Service = item.Service,
|
||||
Tilt = item.Tilt,
|
||||
Players = item.Players,
|
||||
[Data.Models.Metadata.Input.ControlKey] = item.ControlAttr,
|
||||
ControlAttr = item.ControlAttr,
|
||||
Buttons = item.Buttons,
|
||||
Coins = item.Coins,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user