Fixed a typo in the Hoodie wearable as well as the edit form loading the proper existing item.

This commit is contained in:
Matthew Neumann 2025-03-07 13:36:00 -08:00
parent 1f5498bdc6
commit 42d3c704a0
4 changed files with 7 additions and 5 deletions

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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",

View File

@ -48,6 +48,7 @@
"Hide Skirt",
"Hide Vest",
"Hockey Mask",
"Hoodie",
"Ice Metal Chest Plate",
"Ice Metal Facemask",
"Improvised Balaclava",