mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Grid Changes
- added good, warning and bad icons to the map spawner and prevent transfer grids.
This commit is contained in:
parent
9df02ec05e
commit
ca9c053f08
8 changed files with 172 additions and 17 deletions
|
|
@ -183,6 +183,8 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
public static IEnumerable<NPCReplacement> GetNPCReplacements() => dinoSpawns.Select(d => new NPCReplacement() { FromClassName = d.ClassName, ToClassName = d.ClassName });
|
||||
|
||||
public static bool HasCreatureForClass(string className) => !string.IsNullOrWhiteSpace(className) && dinoSpawns.Any(e => e.ClassName.Equals(className));
|
||||
|
||||
public static bool IsSpawnableForClass(string className) => gameData?.Creatures?.FirstOrDefault(c => c.ClassName.Equals(className))?.IsSpawnable ?? true;
|
||||
|
||||
public static DinoTamable IsTameableForClass(string className) => gameData?.Creatures?.FirstOrDefault(c => c.ClassName.Equals(className))?.IsTameable ?? DinoTamable.True;
|
||||
|
|
|
|||
|
|
@ -17,11 +17,9 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
public IEnumerable<string> RenderToView()
|
||||
{
|
||||
List<string> errors = new List<string>();
|
||||
|
||||
Update();
|
||||
|
||||
return errors;
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
public void RenderToModel()
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
public IEnumerable<string> RenderToView()
|
||||
{
|
||||
Update();
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
|
|
@ -26,6 +28,14 @@ namespace ServerManagerTool.Lib
|
|||
public void UpdateForLocalization()
|
||||
{
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
IsEnabled = this.Count > 0;
|
||||
|
||||
foreach (var preventTransfer in this)
|
||||
preventTransfer.Update();
|
||||
}
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
|
|
@ -53,7 +63,10 @@ namespace ServerManagerTool.Lib
|
|||
public override void InitializeFromINIValue(string value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
Update();
|
||||
return;
|
||||
}
|
||||
|
||||
var kvPair = value.Split(new[] { '=' }, 2);
|
||||
var kvValue = kvPair[1].Trim(' ');
|
||||
|
|
@ -74,5 +87,18 @@ namespace ServerManagerTool.Lib
|
|||
{
|
||||
return IsValid;
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty ValidStatusProperty = DependencyProperty.Register(nameof(ValidStatus), typeof(string), typeof(PreventTransferOverride), new PropertyMetadata("N"));
|
||||
|
||||
public string ValidStatus
|
||||
{
|
||||
get { return (string)GetValue(ValidStatusProperty); }
|
||||
set { SetValue(ValidStatusProperty, value); }
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
ValidStatus = IsValid ? (GameData.HasCreatureForClass(DinoClassString) ? "Y" : "W") : "N";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ namespace ServerManagerTool.Lib.ViewModel
|
|||
Reset();
|
||||
}
|
||||
|
||||
public NPCSpawnSettingsList(NPCSpawnContainerList<NPCSpawnContainer> configAddNPCSpawnEntriesContainer,
|
||||
public NPCSpawnSettingsList(
|
||||
NPCSpawnContainerList<NPCSpawnContainer> configAddNPCSpawnEntriesContainer,
|
||||
NPCSpawnContainerList<NPCSpawnContainer> configSubtractNPCSpawnEntriesContainer,
|
||||
NPCSpawnContainerList<NPCSpawnContainer> configOverrideNPCSpawnEntriesContainer)
|
||||
{
|
||||
|
|
@ -138,6 +139,8 @@ namespace ServerManagerTool.Lib.ViewModel
|
|||
|
||||
this.Add(spawnSettings);
|
||||
}
|
||||
|
||||
Update();
|
||||
}
|
||||
|
||||
public void RenderToModel()
|
||||
|
|
@ -195,6 +198,12 @@ namespace ServerManagerTool.Lib.ViewModel
|
|||
public void UpdateForLocalization()
|
||||
{
|
||||
}
|
||||
|
||||
public void Update(bool recursive = true)
|
||||
{
|
||||
foreach (var npcSpawn in this)
|
||||
npcSpawn.Update(recursive);
|
||||
}
|
||||
}
|
||||
|
||||
public class NPCSpawnSettings : DependencyObject, IEnumerable<NPCSpawnEntrySettings>
|
||||
|
|
@ -280,6 +289,26 @@ namespace ServerManagerTool.Lib.ViewModel
|
|||
{
|
||||
return NPCSpawnEntrySettings.GetEnumerator();
|
||||
}
|
||||
|
||||
public bool IsViewValid => !string.IsNullOrWhiteSpace(NPCSpawnEntriesContainerClassString) && (NPCSpawnEntrySettings?.Count ?? 0) > 0;
|
||||
|
||||
public static readonly DependencyProperty ValidStatusProperty = DependencyProperty.Register(nameof(ValidStatus), typeof(string), typeof(NPCSpawnSettings), new PropertyMetadata("N"));
|
||||
public string ValidStatus
|
||||
{
|
||||
get { return (string)GetValue(ValidStatusProperty); }
|
||||
set { SetValue(ValidStatusProperty, value); }
|
||||
}
|
||||
|
||||
public void Update(bool recursive = true)
|
||||
{
|
||||
if (recursive && NPCSpawnEntrySettings != null)
|
||||
{
|
||||
foreach (var itemSet in NPCSpawnEntrySettings)
|
||||
itemSet.Update();
|
||||
}
|
||||
|
||||
ValidStatus = IsViewValid ? (NPCSpawnEntrySettings.Any(i => i.ValidStatus == "N") ? "N" : (NPCSpawnEntrySettings.Any(i => i.ValidStatus == "W") ? "W" : "Y")) : "N";
|
||||
}
|
||||
}
|
||||
|
||||
public class NPCSpawnEntrySettings : DependencyObject
|
||||
|
|
@ -315,5 +344,17 @@ namespace ServerManagerTool.Lib.ViewModel
|
|||
public string DisplayName => GameData.FriendlyCreatureNameForClass(NPCClassString);
|
||||
|
||||
public bool IsValid => !string.IsNullOrWhiteSpace(NPCClassString);
|
||||
|
||||
public static readonly DependencyProperty ValidStatusProperty = DependencyProperty.Register(nameof(ValidStatus), typeof(string), typeof(NPCSpawnEntrySettings), new PropertyMetadata("N"));
|
||||
public string ValidStatus
|
||||
{
|
||||
get { return (string)GetValue(ValidStatusProperty); }
|
||||
set { SetValue(ValidStatusProperty, value); }
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
ValidStatus = IsValid ? (GameData.HasCreatureForClass(NPCClassString) ? "Y" : "W") : "N";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5212,7 +5212,7 @@
|
|||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
|
||||
<DataGrid Name="NPCSpawnSettingsGrid" ItemsSource="{Binding NPCSpawnSettings}" SelectedItem="{Binding Path=SelectedNPCSpawnSetting, ElementName=SettingsControl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeColumns="False" CanUserResizeRows="False" RowHeaderWidth="25">
|
||||
<DataGrid Name="NPCSpawnSettingsGrid" ItemsSource="{Binding NPCSpawnSettings}" SelectedItem="{Binding Path=SelectedNPCSpawnSetting, ElementName=SettingsControl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeColumns="False" CanUserResizeRows="False" RowHeaderWidth="25" SourceUpdated="NPCSpawnSettingsGrids_SourceUpdated">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Resources>
|
||||
|
|
@ -5229,6 +5229,28 @@
|
|||
<SolidColorBrush Color="#FFB4B4B4"/>
|
||||
</DataGrid.VerticalGridLinesBrush>
|
||||
|
||||
<DataGrid.RowHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="Y">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusGood.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="N">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusBad.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="W">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusWarning.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="1*" CanUserSort="True">
|
||||
<DataGridTemplateColumn.Header>
|
||||
|
|
@ -5236,7 +5258,7 @@
|
|||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsReadOnly="True" IsEditable="True" ItemsSource="{Binding Source={StaticResource NPCSpawnContainerTypes}}" Text="{Binding ContainerType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
<ComboBox IsReadOnly="True" IsEditable="True" ItemsSource="{Binding Source={StaticResource NPCSpawnContainerTypes}}" Text="{Binding ContainerType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
|
@ -5246,7 +5268,7 @@
|
|||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BaseMapSpawnerList, ElementName=SettingsControl}" SelectedValue="{Binding NPCSpawnEntriesContainerClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BaseMapSpawnerList, ElementName=SettingsControl}" SelectedValue="{Binding NPCSpawnEntriesContainerClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit, NotifyOnSourceUpdated=True}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
|
@ -5287,7 +5309,7 @@
|
|||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
|
||||
<DataGrid Name="NPCSpawnEntrySettingsGrid" ItemsSource="{Binding Path=SelectedNPCSpawnSetting.NPCSpawnEntrySettings, ElementName=SettingsControl}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeColumns="False" CanUserResizeRows="False" RowHeaderWidth="25">
|
||||
<DataGrid Name="NPCSpawnEntrySettingsGrid" ItemsSource="{Binding Path=SelectedNPCSpawnSetting.NPCSpawnEntrySettings, ElementName=SettingsControl}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeColumns="False" CanUserResizeRows="False" RowHeaderWidth="25" SourceUpdated="NPCSpawnSettingsGrids_SourceUpdated">
|
||||
<DataGrid.Resources>
|
||||
<clib:BindingProxy x:Key="proxySelectedNPCSpawnSetting" Data="{Binding Path=SelectedNPCSpawnSetting, ElementName=SettingsControl}" />
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
|
|
@ -5305,6 +5327,28 @@
|
|||
<SolidColorBrush Color="#FFB4B4B4"/>
|
||||
</DataGrid.VerticalGridLinesBrush>
|
||||
|
||||
<DataGrid.RowHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="Y">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusGood.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="N">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusBad.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="W">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusWarning.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Width="1*" Binding="{Binding AnEntryName}" Visibility="{Binding Data.ShowEntryNameColumn, Converter={StaticResource BooleanToVisibilityConverter}, Source={StaticResource proxySelectedNPCSpawnSetting}}">
|
||||
<DataGridTextColumn.Header>
|
||||
|
|
@ -5318,7 +5362,7 @@
|
|||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BaseDinoList, ElementName=SettingsControl}" SelectedValue="{Binding NPCClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BaseDinoList, ElementName=SettingsControl}" SelectedValue="{Binding NPCClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit, NotifyOnSourceUpdated=True}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
|
@ -5947,7 +5991,7 @@
|
|||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
|
||||
<DataGrid Name="PreventTransferOverrideGrid" ItemsSource="{Binding PreventTransferForClassNames}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25">
|
||||
<DataGrid Name="PreventTransferOverrideGrid" ItemsSource="{Binding PreventTransferForClassNames}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserSortColumns="true" SelectionMode="Single" CanUserResizeRows="False" RowHeaderWidth="25" SourceUpdated="PreventTransferOverrideGrids_SourceUpdated">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Resources>
|
||||
|
|
@ -5964,6 +6008,28 @@
|
|||
<SolidColorBrush Color="#FFB4B4B4"/>
|
||||
</DataGrid.VerticalGridLinesBrush>
|
||||
|
||||
<DataGrid.RowHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="Y">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusGood.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="N">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusBad.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DataContext.ValidStatus, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="W">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusWarning.ico,Size=32}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="2*" CanUserSort="True" SortMemberPath="DisplayName">
|
||||
<DataGridTemplateColumn.Header>
|
||||
|
|
@ -5971,7 +6037,7 @@
|
|||
</DataGridTemplateColumn.Header>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BaseDinoList, ElementName=SettingsControl}" SelectedValue="{Binding DinoClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
<ComboBox IsEditable="True" ItemsSource="{Binding BaseDinoList, ElementName=SettingsControl}" SelectedValue="{Binding DinoClassString, Mode=TwoWay, UpdateSourceTrigger=Explicit, NotifyOnSourceUpdated=True}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" LostFocus="ComboBoxItemList_LostFocus" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
|
|
|||
|
|
@ -1319,6 +1319,16 @@ namespace ServerManagerTool
|
|||
Settings.ConfigOverrideItemCraftingCosts.Update();
|
||||
}
|
||||
|
||||
private void PreventTransferOverrideGrids_SourceUpdated(object sender, DataTransferEventArgs e)
|
||||
{
|
||||
Settings.PreventTransferForClassNames.Update();
|
||||
}
|
||||
|
||||
private void NPCSpawnSettingsGrids_SourceUpdated(object sender, DataTransferEventArgs e)
|
||||
{
|
||||
Settings.NPCSpawnSettings.Update();
|
||||
}
|
||||
|
||||
#region Dinos
|
||||
private void DinoCustomization_Reset(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
|
@ -2895,6 +2905,7 @@ namespace ServerManagerTool
|
|||
private void AddNPCSpawn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Settings.NPCSpawnSettings.Add(new NPCSpawnSettings());
|
||||
Settings.NPCSpawnSettings.Update();
|
||||
}
|
||||
|
||||
private void AddNPCSpawnEntry_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -2906,6 +2917,7 @@ namespace ServerManagerTool
|
|||
}
|
||||
|
||||
SelectedNPCSpawnSetting.NPCSpawnEntrySettings.Add(new NPCSpawnEntrySettings());
|
||||
Settings.NPCSpawnSettings.Update();
|
||||
}
|
||||
|
||||
private void ClearNPCSpawn_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -2915,6 +2927,7 @@ namespace ServerManagerTool
|
|||
|
||||
SelectedNPCSpawnSetting = null;
|
||||
Settings.NPCSpawnSettings.Clear();
|
||||
Settings.NPCSpawnSettings.Update();
|
||||
}
|
||||
|
||||
private void ClearNPCSpawnEntry_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -2923,6 +2936,7 @@ namespace ServerManagerTool
|
|||
return;
|
||||
|
||||
SelectedNPCSpawnSetting?.NPCSpawnEntrySettings.Clear();
|
||||
Settings.NPCSpawnSettings.Update();
|
||||
}
|
||||
|
||||
private void PasteNPCSpawn_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -2973,6 +2987,7 @@ namespace ServerManagerTool
|
|||
|
||||
var item = ((NPCSpawnSettings)((Button)e.Source).DataContext);
|
||||
Settings.NPCSpawnSettings.Remove(item);
|
||||
Settings.NPCSpawnSettings.Update();
|
||||
}
|
||||
|
||||
private void RemoveNPCSpawnEntry_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -2985,6 +3000,7 @@ namespace ServerManagerTool
|
|||
|
||||
var item = ((NPCSpawnEntrySettings)((Button)e.Source).DataContext);
|
||||
SelectedNPCSpawnSetting.NPCSpawnEntrySettings.Remove(item);
|
||||
Settings.NPCSpawnSettings.Update();
|
||||
}
|
||||
|
||||
private void SaveNPCSpawns_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3007,12 +3023,12 @@ namespace ServerManagerTool
|
|||
|
||||
private void SaveNPCSpawn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Settings.NPCSpawnSettings.RenderToModel();
|
||||
|
||||
var item = ((NPCSpawnSettings)((Button)e.Source).DataContext);
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
Settings.NPCSpawnSettings.RenderToModel();
|
||||
|
||||
string iniName = null;
|
||||
string iniValue = null;
|
||||
switch (item.ContainerType)
|
||||
|
|
@ -3362,7 +3378,7 @@ namespace ServerManagerTool
|
|||
private void AddPreventTransferOverride_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Settings.PreventTransferForClassNames.Add(new PreventTransferOverride());
|
||||
Settings.PreventTransferForClassNames.IsEnabled = true;
|
||||
Settings.PreventTransferForClassNames.Update();
|
||||
}
|
||||
|
||||
private void ClearPreventTransferOverrides_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3371,7 +3387,7 @@ namespace ServerManagerTool
|
|||
return;
|
||||
|
||||
Settings.PreventTransferForClassNames.Clear();
|
||||
Settings.PreventTransferForClassNames.IsEnabled = false;
|
||||
Settings.PreventTransferForClassNames.Update();
|
||||
}
|
||||
|
||||
private void PastePreventTransferOverride_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3422,7 +3438,7 @@ namespace ServerManagerTool
|
|||
|
||||
var item = ((PreventTransferOverride)((Button)e.Source).DataContext);
|
||||
Settings.PreventTransferForClassNames.Remove(item);
|
||||
Settings.PreventTransferForClassNames.IsEnabled = Settings.PreventTransferForClassNames.Count > 0;
|
||||
Settings.PreventTransferForClassNames.Update();
|
||||
}
|
||||
|
||||
private void SavePreventTransferOverride_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -3447,6 +3463,8 @@ namespace ServerManagerTool
|
|||
if (item == null)
|
||||
return;
|
||||
|
||||
Settings.PreventTransferForClassNames.RenderToModel();
|
||||
|
||||
var iniName = Settings.PreventTransferForClassNames.IniCollectionKey;
|
||||
var iniValue = $"{iniName}={item.ToINIValue()}";
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
<ul>
|
||||
<li>Gamedata Files - changed the Fjordur official mod to the correct mod id.</li>
|
||||
<li>Crafting Override Grids - Added new icons to show Good (green), Warning (orange) or Bad (red). Warnings will show for resources not familiar with (raw class names, not loaded via gamedata files), Errors will show for empty resources.</li>
|
||||
<li>Prevent Transfer Grids - Added new icons to show Good (green), Warning (orange) or Bad (red). Warnings will show for creatures not familiar with (raw class names, not loaded via gamedata files), Errors will show for missing creatures.</li>
|
||||
<li>Map Spawner Grids - Added new icons to show Good (green), Warning (orange) or Bad (red). Warnings will show for spawners/creatures not familiar with (raw class names, not loaded via gamedata files), Errors will show for missing spawners/creatures.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@
|
|||
<u style="font-size: .9em;">CHANGE</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Crafting Override Grids - Added new icons to show Good (green), Warning (orange) or Bad (red). Warnings will show for resources not familiar with (raw class names, not loaded via gamedata files), Errors will show for empty resources.</li>
|
||||
<li>Crafting Override Grids - Added new icons to show Good (green), Warning (orange) or Bad (red). Warnings will show for resources not familiar with (raw class names, not loaded via gamedata files), Errors will show for missing resources.</li>
|
||||
<li>Prevent Transfer Grids - Added new icons to show Good (green), Warning (orange) or Bad (red). Warnings will show for creatures not familiar with (raw class names, not loaded via gamedata files), Errors will show for missing creatures.</li>
|
||||
<li>Map Spawner Grids - Added new icons to show Good (green), Warning (orange) or Bad (red). Warnings will show for spawners/creatures not familiar with (raw class names, not loaded via gamedata files), Errors will show for missing spawners/creatures.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue