Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added BumpMines (#36) #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CSGSI/Nodes/NodeBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class NodeBase
/// <summary>
/// The data that was passed via JSON.
/// </summary>
protected JObject _data;
protected readonly JObject _data;

/// <summary>
/// The raw JSON string that was used to construct this node.
Expand All @@ -22,7 +22,7 @@ public class NodeBase
/// <summary>
/// Whether or not this node contains data (i.e. JSON string is not empty)
/// </summary>
public bool HasData => !string.IsNullOrWhiteSpace(JSON);
public bool HasData { get; private set; }

internal NodeBase(string json)
{
Expand All @@ -31,6 +31,7 @@ internal NodeBase(string json)
if (json.Equals("") || json.Equals("true", StringComparison.InvariantCultureIgnoreCase))
{
json = "{}";
HasData = false;
}
_data = JObject.Parse(json);
JSON = json;
Expand Down
7 changes: 6 additions & 1 deletion CSGSI/Nodes/WeaponNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ public enum WeaponType
/// <summary>
/// Melee weapons (such as hammer/wrench) in Danger Zone.
/// </summary>
Melee
Melee,

/// <summary>
/// Bump mine in Danger Zone.
/// </summary>
BumpMine
}

/// <summary>
Expand Down