(a00338777) v0.9.2.1

This commit is contained in:
Joonas Rikkonen
2019-08-26 19:58:19 +03:00
parent 0f63da27b2
commit 80698b58b0
311 changed files with 11763 additions and 4507 deletions
@@ -36,6 +36,8 @@ namespace Barotrauma
private List<ScriptedEventSet> selectedEventSets;
private EventManagerSettings settings;
private readonly bool isClient;
public float CurrentIntensity
{
@@ -51,13 +53,15 @@ namespace Barotrauma
{
events = new List<ScriptedEvent>();
selectedEventSets = new List<ScriptedEventSet>();
isClient = GameMain.NetworkMember != null && GameMain.NetworkMember.IsClient;
}
public bool Enabled = true;
public void StartRound(Level level)
{
if (GameMain.NetworkMember != null && GameMain.NetworkMember.IsClient) return;
if (isClient) { return; }
var suitableSettings = EventManagerSettings.List.FindAll(s =>
level.Difficulty >= s.MinLevelDifficulty &&
@@ -193,13 +197,13 @@ namespace Barotrauma
public void Update(float deltaTime)
{
if (!Enabled) return;
if (!Enabled) { return; }
//clients only calculate the intensity but don't create any events
//(the intensity is used for controlling the background music)
CalculateCurrentIntensity(deltaTime);
if (GameMain.NetworkMember != null && GameMain.NetworkMember.IsClient) return;
if (isClient) { return; }
roundDuration += deltaTime;
@@ -32,7 +32,7 @@ namespace Barotrauma
private set { failureMessage = value; }
}
private string description;
protected string description;
public virtual string Description
{
get { return description; }
@@ -155,6 +155,13 @@ namespace Barotrauma
return false;
}
protected void ShowMessage(int index)
{
ShowMessageProjSpecific(index);
}
partial void ShowMessageProjSpecific(int index);
/// <summary>
/// End the mission and give a reward if it was completed successfully
/// </summary>
@@ -5,7 +5,7 @@ using System.Xml.Linq;
namespace Barotrauma
{
enum MissionType
public enum MissionType
{
Random,
None,
@@ -28,6 +28,9 @@ namespace Barotrauma
{
monsterFile = prefab.ConfigElement.GetAttributeString("monsterfile", "");
monsterCount = prefab.ConfigElement.GetAttributeInt("monstercount", 1);
description = description.Replace("[monster]",
TextManager.Get("character." + System.IO.Path.GetFileNameWithoutExtension(monsterFile)));
}
public override void Start(Level level)
@@ -66,9 +69,9 @@ namespace Barotrauma
if (activeMonsters.Any()) { return; }
#if CLIENT
ShowMessage(state);
#endif
state = 1;
break;
}
@@ -94,16 +94,15 @@ namespace Barotrauma
if (item.ParentInventory != null) item.body.FarseerBody.IsKinematic = false;
if (item.CurrentHull?.Submarine == null) return;
#if CLIENT
ShowMessage(state);
#endif
state = 1;
break;
case 1:
if (!Submarine.MainSub.AtEndPosition && !Submarine.MainSub.AtStartPosition) return;
#if CLIENT
ShowMessage(state);
#endif
state = 2;
break;
}