Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: editor NSE for instance type strings #2260

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Intersect.Editor/Forms/DockingElements/frmMapLayers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void Init()
// We do not want to iterate over the "NoChange" enum
foreach (MapInstanceType instanceType in Enum.GetValues(typeof(MapInstanceType)))
{
cmbInstanceType.Items.Add(instanceType.ToString());
cmbInstanceType.Items.Add(Strings.MapInstance.InstanceTypes[instanceType]);
}
cmbInstanceType.SelectedIndex = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public EventCommandWarp(WarpCommand refCommand, FrmEvent editor)
// We do not want to iterate over the "NoChange" enum
foreach (MapInstanceType instanceType in Enum.GetValues(typeof(MapInstanceType)))
{
cmbInstanceType.Items.Add(instanceType.ToString());
cmbInstanceType.Items.Add(Strings.MapInstance.InstanceTypes[instanceType]);
}
cmbInstanceType.SelectedIndex = (int) mMyCommand.InstanceType;
}
Expand Down
20 changes: 12 additions & 8 deletions Intersect.Editor/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4195,6 +4195,18 @@ public partial struct MapGrid

}

public partial struct MapInstance
{
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public static Dictionary<MapInstanceType, LocalizedString> InstanceTypes = new Dictionary<MapInstanceType, LocalizedString>
{
{MapInstanceType.Overworld, @"Overworld" },
{MapInstanceType.Personal, @"Personal" },
{MapInstanceType.Guild, @"Guild" },
{MapInstanceType.Shared, @"Shared" }
};
}

public partial struct MapLayers
{

Expand Down Expand Up @@ -4247,14 +4259,6 @@ public partial struct MapList

public partial struct Mapping
{
public static LocaleDictionary<MapInstanceType, LocalizedString> InstanceTypes = new LocaleDictionary<MapInstanceType, LocalizedString>()
{
{MapInstanceType.Overworld, @"Overworld"},
{MapInstanceType.Personal, @"Personal"},
{MapInstanceType.Guild, @"Guild"},
{MapInstanceType.Shared, @"Shared"},
};

public static LocalizedString createmap = @"Create new map.";

public static LocalizedString createmapdialogue = @"Do you want to create a map here?";
Expand Down
Loading