Unstable 1.1.14.0
This commit is contained in:
@@ -134,7 +134,13 @@ namespace Barotrauma
|
||||
foreach (XElement itemElement in spawnItems.GetChildElements("Item"))
|
||||
{
|
||||
InitializeJobItem(character, itemElement, spawnPoint);
|
||||
}
|
||||
}
|
||||
|
||||
if (GameMain.GameSession is { TraitorsEnabled: true } && character.IsSecurity)
|
||||
{
|
||||
var traitorGuidelineItem = ItemPrefab.Prefabs.Find(ip => ip.Tags.Contains(Tags.TraitorGuidelinesForSecurity));
|
||||
Entity.Spawner.AddItemToSpawnQueue(traitorGuidelineItem, character.Inventory);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeJobItem(Character character, XElement itemElement, WayPoint spawnPoint = null, Item parentItem = null)
|
||||
@@ -144,7 +150,7 @@ namespace Barotrauma
|
||||
{
|
||||
string itemName = itemElement.Attribute("name").Value;
|
||||
DebugConsole.ThrowError("Error in Job config (" + Name + ") - use item identifiers instead of names to configure the items.");
|
||||
itemPrefab = MapEntityPrefab.Find(itemName) as ItemPrefab;
|
||||
itemPrefab = MapEntityPrefab.FindByName(itemName) as ItemPrefab;
|
||||
if (itemPrefab == null)
|
||||
{
|
||||
DebugConsole.ThrowError("Tried to spawn \"" + Name + "\" with the item \"" + itemName + "\". Matching item prefab not found.");
|
||||
|
||||
Reference in New Issue
Block a user