try just the enum
This commit is contained in:
@@ -503,7 +503,7 @@ public class LocationLootGenerator(
|
||||
{
|
||||
X = result.X,
|
||||
Y = result.Y,
|
||||
R = result.Rotation.GetValueOrDefault(false) ? 1 : 0
|
||||
R = result.Rotation.GetValueOrDefault(false) ? ItemRotation.Vertical : ItemRotation.Horizontal
|
||||
};
|
||||
|
||||
// Add loot to container before returning
|
||||
|
||||
@@ -651,7 +651,7 @@ public class BotGeneratorHelper(
|
||||
{
|
||||
X = findSlotResult.X,
|
||||
Y = findSlotResult.Y,
|
||||
R = findSlotResult.Rotation ?? false ? 1 : 0
|
||||
R = findSlotResult.Rotation ?? false ? ItemRotation.Vertical : ItemRotation.Horizontal
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ public class InventoryHelper(
|
||||
{
|
||||
X = findSlotResult.X,
|
||||
Y = findSlotResult.Y,
|
||||
R = findSlotResult.Rotation.GetValueOrDefault(false) ? 1 : 0,
|
||||
R = findSlotResult.Rotation.GetValueOrDefault(false) ? ItemRotation.Vertical : ItemRotation.Horizontal,
|
||||
Rotation = findSlotResult.Rotation
|
||||
};
|
||||
|
||||
@@ -382,7 +382,7 @@ public class InventoryHelper(
|
||||
{
|
||||
X = findSlotResult.X,
|
||||
Y = findSlotResult.Y,
|
||||
R = findSlotResult.Rotation.Value ? 1 : 0,
|
||||
R = findSlotResult.Rotation.Value ? ItemRotation.Vertical : ItemRotation.Horizontal,
|
||||
Rotation = findSlotResult.Rotation
|
||||
};
|
||||
|
||||
@@ -423,7 +423,7 @@ public class InventoryHelper(
|
||||
{
|
||||
X = findSortingSlotResult.X,
|
||||
Y = findSortingSlotResult.Y,
|
||||
R = findSortingSlotResult.Rotation.Value ? 1 : 0,
|
||||
R = findSortingSlotResult.Rotation.Value ? ItemRotation.Vertical : ItemRotation.Horizontal,
|
||||
Rotation = findSortingSlotResult.Rotation
|
||||
};
|
||||
}
|
||||
@@ -845,6 +845,7 @@ public class InventoryHelper(
|
||||
ItemLocation? itemLocation;
|
||||
if (item.Location is JsonElement)
|
||||
{
|
||||
Console.WriteLine(item.Location);
|
||||
itemLocation = ((JsonElement) item.Location).ToObject<ItemLocation>();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -168,13 +168,6 @@ public record ItemLocation
|
||||
set;
|
||||
}
|
||||
|
||||
[JsonPropertyName("r")]
|
||||
public int R
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[JsonPropertyName("isSearched")]
|
||||
public bool? IsSearched
|
||||
{
|
||||
@@ -191,6 +184,21 @@ public record ItemLocation
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[JsonPropertyName("r")]
|
||||
public ItemRotation R
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ItemRotation
|
||||
{
|
||||
// Token: 0x0400259F RID: 9631
|
||||
Horizontal,
|
||||
// Token: 0x040025A0 RID: 9632
|
||||
Vertical
|
||||
}
|
||||
|
||||
public record Upd
|
||||
|
||||
@@ -59,6 +59,7 @@ public class JsonUtil
|
||||
new EftEnumConverter<LogLevel>(),
|
||||
new EftEnumConverter<LogTextColor>(),
|
||||
new EftEnumConverter<LogBackgroundColor>(),
|
||||
new EftEnumConverter<ItemRotation>(),
|
||||
|
||||
new EftListEnumConverter<EquipmentSlots>(),
|
||||
new EftListEnumConverter<PlayerSide>(),
|
||||
|
||||
Reference in New Issue
Block a user