mirror of
https://github.com/batfasturd/BetterNPCEditor.git
synced 2025-04-19 10:51:18 +00:00
Fixed a typo in the Hoodie wearable as well as the edit form loading the proper existing item.
This commit is contained in:
parent
1f5498bdc6
commit
42d3c704a0
@ -11,7 +11,7 @@ namespace Better_NCP_Editor
|
||||
private Control inputControl;
|
||||
|
||||
// Constructor now takes an extra parameter: parentNodeName.
|
||||
public EditValueForm(string propertyName, string currentValue, Type valueType, List<string>? comboItems)
|
||||
public EditValueForm(string propertyName, string currentValue, Type valueType, List<string>? comboItems,Dictionary<String,String> allItems)
|
||||
{
|
||||
// Set the minimum and default size.
|
||||
this.MinimumSize = new Size(210, 120);
|
||||
@ -84,9 +84,10 @@ namespace Better_NCP_Editor
|
||||
combo.Width = paddedWidth;
|
||||
|
||||
// Set selected item to currentValue if found, otherwise select the first item.
|
||||
if (comboItems.Contains(currentValue))
|
||||
var matchingPair = allItems.FirstOrDefault(x => x.Value == currentValue);
|
||||
if (matchingPair.Key != null)
|
||||
{
|
||||
combo.SelectedItem = currentValue;
|
||||
combo.SelectedItem = matchingPair.Key;
|
||||
}
|
||||
else if (combo.Items.Count > 0)
|
||||
{
|
||||
|
@ -381,7 +381,7 @@ namespace Better_NCP_Editor
|
||||
|
||||
|
||||
|
||||
using (EditValueForm editForm = new EditValueForm(propName, currentVal, valueType, comboList))
|
||||
using (EditValueForm editForm = new EditValueForm(propName, currentVal, valueType, comboList, _allItems))
|
||||
{
|
||||
if (editForm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
"40mm HE Grenade": "ammo.grenadelauncher.he",
|
||||
"40mm Shotgun Round": "ammo.grenadelauncher.buckshot",
|
||||
"40mm Smoke Grenade": "ammo.grenadelauncher.smoke",
|
||||
"A Barrel Costume": "barrelcostume",
|
||||
"Barrel Costume": "barrelcostume",
|
||||
"Above Ground Pool": "abovegroundpool",
|
||||
"Abyss Assault Rifle": "rifle.ak.diver",
|
||||
"Abyss Divers Suit": "hazmatsuit.diver",
|
||||
|
@ -48,6 +48,7 @@
|
||||
"Hide Skirt",
|
||||
"Hide Vest",
|
||||
"Hockey Mask",
|
||||
"Hoodie",
|
||||
"Ice Metal Chest Plate",
|
||||
"Ice Metal Facemask",
|
||||
"Improvised Balaclava",
|
||||
|
Loading…
x
Reference in New Issue
Block a user