Build 0.18.0.0
This commit is contained in:
@@ -323,7 +323,7 @@ namespace Barotrauma
|
||||
{
|
||||
var newEvent = eventPrefab.CreateInstance();
|
||||
GameMain.GameSession.EventManager.ActiveEvents.Add(newEvent);
|
||||
newEvent.Init(true);
|
||||
newEvent.Init();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,7 +382,8 @@ namespace Barotrauma
|
||||
#if SERVER
|
||||
totalReward = DistributeRewardsToCrew(GameSession.GetSessionCrewCharacters(CharacterType.Player), totalReward);
|
||||
#endif
|
||||
if (totalReward > 0)
|
||||
bool isSingleplayerOrServer = GameMain.IsSingleplayer || GameMain.NetworkMember is { IsServer: true };
|
||||
if (isSingleplayerOrServer && totalReward > 0)
|
||||
{
|
||||
campaign.Bank.Give(totalReward);
|
||||
}
|
||||
|
||||
@@ -146,8 +146,15 @@ namespace Barotrauma
|
||||
|
||||
tags = element.GetAttributeStringArray("tags", Array.Empty<string>(), convertToLowerInvariant: true);
|
||||
|
||||
Name = TextManager.Get($"MissionName.{TextIdentifier}").Fallback(element.GetAttributeString("name", ""));
|
||||
Description = TextManager.Get($"MissionDescription.{TextIdentifier}").Fallback(element.GetAttributeString("description", ""));
|
||||
Name =
|
||||
TextManager.Get($"MissionName.{TextIdentifier}")
|
||||
.Fallback(TextManager.Get(element.GetAttributeString("name", "")))
|
||||
.Fallback(element.GetAttributeString("name", ""));
|
||||
Description =
|
||||
TextManager.Get($"MissionDescription.{TextIdentifier}")
|
||||
.Fallback(TextManager.Get(element.GetAttributeString("description", "")))
|
||||
.Fallback(element.GetAttributeString("description", ""));
|
||||
|
||||
Reward = element.GetAttributeInt("reward", 1);
|
||||
AllowRetry = element.GetAttributeBool("allowretry", false);
|
||||
IsSideObjective = element.GetAttributeBool("sideobjective", false);
|
||||
@@ -160,10 +167,15 @@ namespace Barotrauma
|
||||
Difficulty = Math.Clamp(difficulty, MinDifficulty, MaxDifficulty);
|
||||
}
|
||||
|
||||
SuccessMessage = TextManager.Get($"MissionSuccess.{TextIdentifier}").Fallback(element.GetAttributeString("successmessage", "Mission completed successfully"));
|
||||
FailureMessage = TextManager.Get($"MissionFailure.{TextIdentifier}").Fallback(
|
||||
TextManager.Get("missionfailed")).Fallback(
|
||||
GameSettings.CurrentConfig.Language == TextManager.DefaultLanguage ? element.GetAttributeString("failuremessage", "") : "");
|
||||
SuccessMessage =
|
||||
TextManager.Get($"MissionSuccess.{TextIdentifier}")
|
||||
.Fallback(TextManager.Get(element.GetAttributeString("successmessage", "")))
|
||||
.Fallback(element.GetAttributeString("successmessage", "Mission completed successfully"));
|
||||
FailureMessage =
|
||||
TextManager.Get($"MissionFailure.{TextIdentifier}")
|
||||
.Fallback(TextManager.Get(element.GetAttributeString("missionfailed", "")))
|
||||
.Fallback(TextManager.Get("missionfailed"))
|
||||
.Fallback(GameSettings.CurrentConfig.Language == TextManager.DefaultLanguage ? element.GetAttributeString("failuremessage", "") : "");
|
||||
|
||||
string sonarLabelTag = element.GetAttributeString("sonarlabel", "");
|
||||
|
||||
@@ -208,8 +220,14 @@ namespace Barotrauma
|
||||
headers.Add(string.Empty);
|
||||
messages.Add(string.Empty);
|
||||
}
|
||||
headers[messageIndex] = TextManager.Get($"MissionHeader{messageIndex}.{TextIdentifier}").Fallback(subElement.GetAttributeString("header", ""));
|
||||
messages[messageIndex] = TextManager.Get($"MissionMessage{messageIndex}.{TextIdentifier}").Fallback(subElement.GetAttributeString("text", ""));
|
||||
headers[messageIndex] =
|
||||
TextManager.Get($"MissionHeader{messageIndex}.{TextIdentifier}")
|
||||
.Fallback(TextManager.Get(subElement.GetAttributeString("header", "")))
|
||||
.Fallback(subElement.GetAttributeString("header", ""));
|
||||
messages[messageIndex] =
|
||||
TextManager.Get($"MissionMessage{messageIndex}.{TextIdentifier}")
|
||||
.Fallback(TextManager.Get(subElement.GetAttributeString("text", "")))
|
||||
.Fallback(subElement.GetAttributeString("text", ""));
|
||||
messageIndex++;
|
||||
break;
|
||||
case "locationtype":
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace Barotrauma
|
||||
|
||||
foreach (Item item in spawnedCharacter.Inventory.AllItems)
|
||||
{
|
||||
if (item?.Prefab.Identifier == "idcard")
|
||||
if (item?.GetComponent<IdCard>() != null)
|
||||
{
|
||||
item.AddTag("id_pirate");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user