mirror of
https://github.com/batfasturd/BetterNPCEditor.git
synced 2025-06-23 16:05:34 +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;
|
private Control inputControl;
|
||||||
|
|
||||||
// Constructor now takes an extra parameter: parentNodeName.
|
// 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.
|
// Set the minimum and default size.
|
||||||
this.MinimumSize = new Size(210, 120);
|
this.MinimumSize = new Size(210, 120);
|
||||||
@ -84,9 +84,10 @@ namespace Better_NCP_Editor
|
|||||||
combo.Width = paddedWidth;
|
combo.Width = paddedWidth;
|
||||||
|
|
||||||
// Set selected item to currentValue if found, otherwise select the first item.
|
// 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)
|
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)
|
if (editForm.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"40mm HE Grenade": "ammo.grenadelauncher.he",
|
"40mm HE Grenade": "ammo.grenadelauncher.he",
|
||||||
"40mm Shotgun Round": "ammo.grenadelauncher.buckshot",
|
"40mm Shotgun Round": "ammo.grenadelauncher.buckshot",
|
||||||
"40mm Smoke Grenade": "ammo.grenadelauncher.smoke",
|
"40mm Smoke Grenade": "ammo.grenadelauncher.smoke",
|
||||||
"A Barrel Costume": "barrelcostume",
|
"Barrel Costume": "barrelcostume",
|
||||||
"Above Ground Pool": "abovegroundpool",
|
"Above Ground Pool": "abovegroundpool",
|
||||||
"Abyss Assault Rifle": "rifle.ak.diver",
|
"Abyss Assault Rifle": "rifle.ak.diver",
|
||||||
"Abyss Divers Suit": "hazmatsuit.diver",
|
"Abyss Divers Suit": "hazmatsuit.diver",
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
"Hide Skirt",
|
"Hide Skirt",
|
||||||
"Hide Vest",
|
"Hide Vest",
|
||||||
"Hockey Mask",
|
"Hockey Mask",
|
||||||
|
"Hoodie",
|
||||||
"Ice Metal Chest Plate",
|
"Ice Metal Chest Plate",
|
||||||
"Ice Metal Facemask",
|
"Ice Metal Facemask",
|
||||||
"Improvised Balaclava",
|
"Improvised Balaclava",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user