(f0d812055) v0.9.9.0
This commit is contained in:
@@ -62,7 +62,7 @@ namespace Barotrauma
|
||||
skills = new Dictionary<string, Skill>();
|
||||
foreach (XElement subElement in element.Elements())
|
||||
{
|
||||
if (subElement.Name.ToString().ToLowerInvariant() != "skill") { continue; }
|
||||
if (!subElement.Name.ToString().Equals("skill", System.StringComparison.OrdinalIgnoreCase)) { continue; }
|
||||
string skillIdentifier = subElement.GetAttributeString("identifier", "");
|
||||
if (string.IsNullOrEmpty(skillIdentifier)) { continue; }
|
||||
skills.Add(
|
||||
@@ -80,8 +80,8 @@ namespace Barotrauma
|
||||
|
||||
public float GetSkillLevel(string skillIdentifier)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(skillIdentifier)) { return 0.0f; }
|
||||
skills.TryGetValue(skillIdentifier, out Skill skill);
|
||||
|
||||
return (skill == null) ? 0.0f : skill.Level;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ namespace Barotrauma
|
||||
private set;
|
||||
}
|
||||
|
||||
// TODO: not used
|
||||
[Serialize(10.0f, false)]
|
||||
public float Commonness
|
||||
{
|
||||
@@ -262,7 +263,7 @@ namespace Barotrauma
|
||||
}
|
||||
foreach (XElement element in mainElement.Elements())
|
||||
{
|
||||
if (element.Name.ToString().ToLowerInvariant() == "nojob") { continue; }
|
||||
if (element.Name.ToString().Equals("nojob", StringComparison.OrdinalIgnoreCase)) { continue; }
|
||||
if (element.IsOverride())
|
||||
{
|
||||
var job = new JobPrefab(element.FirstElement(), file.Path)
|
||||
|
||||
Reference in New Issue
Block a user