2f107db...5202af9
This commit is contained in:
@@ -96,6 +96,12 @@ namespace Barotrauma
|
||||
{
|
||||
skill.Level += increase;
|
||||
}
|
||||
else
|
||||
{
|
||||
skills.Add(
|
||||
skillIdentifier,
|
||||
new Skill(skillIdentifier, increase));
|
||||
}
|
||||
}
|
||||
|
||||
public void GiveJobItems(Character character, WayPoint spawnPoint = null)
|
||||
@@ -134,11 +140,13 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
Item item = new Item(itemPrefab, character.Position, null);
|
||||
|
||||
|
||||
#if SERVER
|
||||
if (GameMain.Server != null && Entity.Spawner != null)
|
||||
{
|
||||
Entity.Spawner.CreateNetworkEvent(item, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (itemElement.GetAttributeBool("equip", false))
|
||||
{
|
||||
|
||||
@@ -41,6 +41,13 @@ namespace Barotrauma
|
||||
private set;
|
||||
}
|
||||
|
||||
[Serialize(false, false)]
|
||||
public bool OnlyJobSpecificDialog
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
//the number of these characters in the crew the player starts with in the single player campaign
|
||||
[Serialize(0, false)]
|
||||
public int InitialCount
|
||||
@@ -101,12 +108,8 @@ namespace Barotrauma
|
||||
public JobPrefab(XElement element)
|
||||
{
|
||||
SerializableProperty.DeserializeProperties(this, element);
|
||||
|
||||
string translatedName = TextManager.Get("JobName." + Identifier, true);
|
||||
if (!string.IsNullOrEmpty(translatedName)) Name = translatedName;
|
||||
|
||||
string translatedDescription = TextManager.Get("JobDescription." + Identifier, true);
|
||||
if (!string.IsNullOrEmpty(translatedDescription)) Description = translatedDescription;
|
||||
Name = TextManager.Get("JobName." + Identifier);
|
||||
Description = TextManager.Get("JobDescription." + Identifier);
|
||||
|
||||
ItemNames = new List<string>();
|
||||
|
||||
|
||||
@@ -5,21 +5,9 @@ namespace Barotrauma
|
||||
{
|
||||
class SkillPrefab
|
||||
{
|
||||
private string description;
|
||||
|
||||
private Vector2 levelRange;
|
||||
|
||||
public readonly string Identifier;
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return description; }
|
||||
}
|
||||
|
||||
public Vector2 LevelRange
|
||||
{
|
||||
get { return levelRange; }
|
||||
}
|
||||
public Vector2 LevelRange { get; private set; }
|
||||
|
||||
public SkillPrefab(XElement element)
|
||||
{
|
||||
@@ -28,12 +16,12 @@ namespace Barotrauma
|
||||
var levelString = element.GetAttributeString("level", "");
|
||||
if (levelString.Contains(","))
|
||||
{
|
||||
levelRange = XMLExtensions.ParseVector2(levelString, false);
|
||||
LevelRange = XMLExtensions.ParseVector2(levelString, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
float skillLevel = float.Parse(levelString, System.Globalization.CultureInfo.InvariantCulture);
|
||||
levelRange = new Vector2(skillLevel, skillLevel);
|
||||
LevelRange = new Vector2(skillLevel, skillLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user