mirror of
https://github.com/kwsch/NHSE.git
synced 2026-04-24 07:07:44 -05:00
rename some classes to match internal naming
This commit is contained in:
parent
4fa77c9242
commit
5d51cf65df
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace NHSE.Core
|
||||
{
|
||||
public static class ActivityNames
|
||||
public static class LifeSupportAchievement
|
||||
{
|
||||
private const string Unknown = "???";
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ public static class ActivityNames
|
|||
{90,"BuildFence"}, // 柵を置くハチを5連続捕まえた
|
||||
};
|
||||
|
||||
public static string GetActivityName(int index, uint count)
|
||||
public static string GetName(int index, uint count)
|
||||
{
|
||||
var dict = Dictionary;
|
||||
if (dict.TryGetValue(index, out var val))
|
||||
22
NHSE.WinForms/Editor.Designer.cs
generated
22
NHSE.WinForms/Editor.Designer.cs
generated
|
|
@ -42,7 +42,7 @@ private void InitializeComponent()
|
|||
this.TC_Editors = new System.Windows.Forms.TabControl();
|
||||
this.Tab_Players = new System.Windows.Forms.TabPage();
|
||||
this.B_EditPlayerFlags = new System.Windows.Forms.Button();
|
||||
this.B_EditActivities = new System.Windows.Forms.Button();
|
||||
this.B_EditAchievements = new System.Windows.Forms.Button();
|
||||
this.B_EditPlayerReceivedItems = new System.Windows.Forms.Button();
|
||||
this.B_EditPlayerStorage = new System.Windows.Forms.Button();
|
||||
this.B_EditPlayerRecipes = new System.Windows.Forms.Button();
|
||||
|
|
@ -188,7 +188,7 @@ private void InitializeComponent()
|
|||
// Tab_Players
|
||||
//
|
||||
this.Tab_Players.Controls.Add(this.B_EditPlayerFlags);
|
||||
this.Tab_Players.Controls.Add(this.B_EditActivities);
|
||||
this.Tab_Players.Controls.Add(this.B_EditAchievements);
|
||||
this.Tab_Players.Controls.Add(this.B_EditPlayerReceivedItems);
|
||||
this.Tab_Players.Controls.Add(this.B_EditPlayerStorage);
|
||||
this.Tab_Players.Controls.Add(this.B_EditPlayerRecipes);
|
||||
|
|
@ -223,15 +223,15 @@ private void InitializeComponent()
|
|||
this.B_EditPlayerFlags.UseVisualStyleBackColor = true;
|
||||
this.B_EditPlayerFlags.Click += new System.EventHandler(this.B_EditPlayerFlags_Click);
|
||||
//
|
||||
// B_EditActivities
|
||||
// B_EditAchievements
|
||||
//
|
||||
this.B_EditActivities.Location = new System.Drawing.Point(301, 122);
|
||||
this.B_EditActivities.Name = "B_EditActivities";
|
||||
this.B_EditActivities.Size = new System.Drawing.Size(92, 40);
|
||||
this.B_EditActivities.TabIndex = 16;
|
||||
this.B_EditActivities.Text = "Edit Activities";
|
||||
this.B_EditActivities.UseVisualStyleBackColor = true;
|
||||
this.B_EditActivities.Click += new System.EventHandler(this.B_EditActivities_Click);
|
||||
this.B_EditAchievements.Location = new System.Drawing.Point(301, 122);
|
||||
this.B_EditAchievements.Name = "B_EditAchievements";
|
||||
this.B_EditAchievements.Size = new System.Drawing.Size(92, 40);
|
||||
this.B_EditAchievements.TabIndex = 16;
|
||||
this.B_EditAchievements.Text = "Edit Achievements";
|
||||
this.B_EditAchievements.UseVisualStyleBackColor = true;
|
||||
this.B_EditAchievements.Click += new System.EventHandler(this.B_EditAchievements_Click);
|
||||
//
|
||||
// B_EditPlayerReceivedItems
|
||||
//
|
||||
|
|
@ -668,7 +668,7 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.Label L_PatternName;
|
||||
private System.Windows.Forms.PictureBox PB_Palette;
|
||||
private System.Windows.Forms.Button B_EditBuildings;
|
||||
private System.Windows.Forms.Button B_EditActivities;
|
||||
private System.Windows.Forms.Button B_EditAchievements;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_RAMEdit;
|
||||
private System.Windows.Forms.Button B_EditTurnipExchange;
|
||||
private System.Windows.Forms.Button B_EditAcres;
|
||||
|
|
|
|||
|
|
@ -266,11 +266,11 @@ private void SavePlayer(int index)
|
|||
pers.Wallet = wallet;
|
||||
}
|
||||
|
||||
private void B_EditActivities_Click(object sender, EventArgs e)
|
||||
private void B_EditAchievements_Click(object sender, EventArgs e)
|
||||
{
|
||||
var pers = SAV.Players[PlayerIndex].Personal;
|
||||
var records = pers.GetActivities();
|
||||
using var editor = new ActivityEditor(records);
|
||||
using var editor = new AchievementEditor(records);
|
||||
if (editor.ShowDialog() == DialogResult.OK)
|
||||
pers.SetActivities(records);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
<Compile Update="Subforms\Player\ItemReceivedEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Subforms\Player\ActivityEditor.cs">
|
||||
<Compile Update="Subforms\Player\AchievementEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Subforms\SysBot\SysBotRAMEdit.cs">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace NHSE.WinForms
|
||||
{
|
||||
partial class ActivityEditor
|
||||
partial class AchievementEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
|
@ -4,16 +4,16 @@
|
|||
|
||||
namespace NHSE.WinForms
|
||||
{
|
||||
public partial class ActivityEditor : Form
|
||||
public partial class AchievementEditor : Form
|
||||
{
|
||||
private readonly uint[] Counts;
|
||||
|
||||
public ActivityEditor(uint[] counts)
|
||||
public AchievementEditor(uint[] counts)
|
||||
{
|
||||
Counts = counts;
|
||||
InitializeComponent();
|
||||
for (int i = 0; i < counts.Length; i++)
|
||||
LB_Counts.Items.Add(ActivityNames.GetActivityName(i, counts[i]));
|
||||
LB_Counts.Items.Add(LifeSupportAchievement.GetName(i, counts[i]));
|
||||
DialogResult = DialogResult.Cancel;
|
||||
LB_Counts.SelectedIndex = 0;
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ private void NUD_Count_ValueChanged(object sender, EventArgs e)
|
|||
return;
|
||||
|
||||
Counts[Index] = (uint) NUD_Count.Value;
|
||||
LB_Counts.Items[Index] = ActivityNames.GetActivityName(Index, Counts[Index]);
|
||||
LB_Counts.Items[Index] = LifeSupportAchievement.GetName(Index, Counts[Index]);
|
||||
}
|
||||
|
||||
private void LB_Counts_SelectedIndexChanged(object sender, EventArgs e)
|
||||
Loading…
Reference in New Issue
Block a user