Skip to content

Commit

Permalink
some more missing fields and defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaPiggy committed Jul 14, 2024
1 parent 27aa764 commit c470023
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions Winch/Serialization/Item/HarvestableItemDataConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class HarvestableItemDataConverter : SpatialItemDataConverter
{
private readonly Dictionary<string, FieldDefinition> _definitions = new()
{
{ "damageMode", new(DamageMode.DESTROY, null) },
{ "itemColor", new(new Color(0.2264f, 0.1563f, 0.125f, 255f), null)},
{ "harvestMinigameType", new( HarvestMinigameType.DREDGE_RADIAL, o => DredgeTypeHelpers.GetEnumValue<HarvestMinigameType>(o)) },
{ "perSpotMin", new( 1, o => int.Parse(o.ToString())) },
Expand Down
5 changes: 4 additions & 1 deletion Winch/Serialization/Item/HarvesterItemDataConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ public class HarvesterItemDataConverter : SpatialItemDataConverter
{
{ "itemType", new(ItemType.EQUIPMENT, null) },
{ "harvestableTypes", new(new HarvestableType[]{}, o => ParseHarvestableTypes((JArray)o)) },
{ "aberrationBonus", new(0f, o => float.Parse(o.ToString())) }
{ "aberrationBonus", new(0f, o => float.Parse(o.ToString())) },
{ "showAlertOnDiscardHold", new(true, null) },
{ "discardHoldTimeOverride", new(true, null) },
{ "discardHoldTimeSec", new(2, null) }
};

public HarvesterItemDataConverter()
Expand Down
5 changes: 4 additions & 1 deletion Winch/Serialization/Item/RelicItemDataConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ public class RelicItemDataConverter : HarvestableItemDataConverter
{ "canBeDiscardedByPlayer", new(false, null) },
{ "harvestPOICategory", new(HarvestPOICategory.RELIC, null) },
{ "harvestableType", new(HarvestableType.DREDGE, null) },
{ "itemColor", new(new Color(0.5294f, 0.1137f, 0.3451f, 255f), null)}
{ "itemColor", new(new Color(0.5294f, 0.1137f, 0.3451f, 255f), null)},
{ "showAlertOnDiscardHold", new(true, null) },
{ "discardHoldTimeOverride", new(true, null) },
{ "discardHoldTimeSec", new(2, null) }
};
public RelicItemDataConverter()
{
Expand Down
5 changes: 5 additions & 0 deletions Winch/Serialization/Item/SpatialItemDataConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public class SpatialItemDataConverter : ItemDataConverter
{ "itemColor", new(new Color(0.1922f, 0.1922f, 0.1922f, 255), o=> DredgeTypeHelpers.GetColorFromJsonObject(o)) }, // default game uses
{ "canBeDiscardedByPlayer", new(true, o => bool.Parse(o.ToString())) },
{ "canBeDiscardedDuringQuestPickup", new(true, o => bool.Parse(o.ToString())) },
{ "hasSpecialDiscardAction", new(false, o => bool.Parse(o.ToString())) },
{ "discardPromptOverride", new("", null) },
{ "showAlertOnDiscardHold", new(false, o => bool.Parse(o.ToString())) },
{ "discardHoldTimeOverride", new(false, o => bool.Parse(o.ToString())) },
{ "discardHoldTimeSec", new(0, o => float.Parse(o.ToString())) },
{ "damageMode", new(DamageMode.NONE, o=> DredgeTypeHelpers.GetEnumValue<DamageMode>(o)) },
{ "moveMode", new(MoveMode.FREE, o=> DredgeTypeHelpers.GetEnumValue<MoveMode>(o)) },
{ "ignoreDamageWhenPlacing", new(false, o => bool.Parse(o.ToString())) },
Expand Down

0 comments on commit c470023

Please sign in to comment.