mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-24 14:11:29 +00:00
fix LBP1 slot serialization
This commit is contained in:
parent
bb0473e463
commit
cf37aa308b
2 changed files with 8 additions and 6 deletions
|
@ -1,3 +1,4 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ezoiar/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=lbpme/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=lolcatftw/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
|
@ -33,7 +33,7 @@ namespace ProjectLighthouse.Types {
|
|||
public int FreeSlots => EntitledSlots - this.UsedSlots;
|
||||
|
||||
private static string[] slotTypes = {
|
||||
"lbp1",
|
||||
// "lbp1",
|
||||
"lbp2",
|
||||
"lbp3",
|
||||
"crossControl"
|
||||
|
@ -41,12 +41,13 @@ namespace ProjectLighthouse.Types {
|
|||
|
||||
private string SerializeSlots() {
|
||||
string slots = string.Empty;
|
||||
|
||||
foreach(string s in slotTypes) {
|
||||
string slotType = s; // vars in foreach are immutable, define helper var
|
||||
|
||||
|
||||
slots += LbpSerializer.StringElement("lbp1UsedSlots", this.UsedSlots);
|
||||
slots += LbpSerializer.StringElement("entitledSlots", EntitledSlots);
|
||||
slots += LbpSerializer.StringElement("freeSlots", this.FreeSlots);
|
||||
|
||||
foreach(string slotType in slotTypes) {
|
||||
slots += LbpSerializer.StringElement(slotType + "UsedSlots", this.UsedSlots);
|
||||
if(slotType == "lbp1") slotType = "";
|
||||
slots += LbpSerializer.StringElement(slotType + "EntitledSlots", EntitledSlots);
|
||||
// ReSharper disable once StringLiteralTypo
|
||||
slots += LbpSerializer.StringElement(slotType + slotType == "crossControl" ? "PurchsedSlots" : "PurchasedSlots", 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue