Unstable 0.17.10.0
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using Barotrauma.Items.Components;
|
||||
using Barotrauma.Items.Components;
|
||||
using Barotrauma.Networking;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Barotrauma.Tutorials
|
||||
{
|
||||
@@ -14,8 +13,6 @@ namespace Barotrauma.Tutorials
|
||||
private float shakeAmount = 20f;
|
||||
|
||||
// Room 2
|
||||
private MotionSensor captain_equipmentObjectiveSensor;
|
||||
private ItemContainer captain_equipmentCabinet;
|
||||
private Door captain_firstDoor;
|
||||
private LightComponent captain_firstDoorLight;
|
||||
|
||||
@@ -29,7 +26,6 @@ namespace Barotrauma.Tutorials
|
||||
// Submarine
|
||||
private MotionSensor captain_enteredSubmarineSensor;
|
||||
private Steering captain_navConsole;
|
||||
private CustomInterface captain_navConsoleCustomInterface;
|
||||
private Sonar captain_sonar;
|
||||
private Item captain_statusMonitor;
|
||||
private Character captain_security;
|
||||
@@ -136,8 +132,6 @@ namespace Barotrauma.Tutorials
|
||||
captain_steerIconColor = steerOrder.Color;
|
||||
|
||||
// Room 2
|
||||
captain_equipmentObjectiveSensor = Item.ItemList.Find(i => i.HasTag("captain_equipmentobjectivesensor")).GetComponent<MotionSensor>();
|
||||
captain_equipmentCabinet = Item.ItemList.Find(i => i.HasTag("captain_equipmentcabinet")).GetComponent<ItemContainer>();
|
||||
captain_firstDoor = Item.ItemList.Find(i => i.HasTag("captain_firstdoor")).GetComponent<Door>();
|
||||
captain_firstDoorLight = Item.ItemList.Find(i => i.HasTag("captain_firstdoorlight")).GetComponent<LightComponent>();
|
||||
|
||||
@@ -148,9 +142,11 @@ namespace Barotrauma.Tutorials
|
||||
captain_medicSpawnPos = Item.ItemList.Find(i => i.HasTag("captain_medicspawnpos")).WorldPosition;
|
||||
tutorial_submarineDoor = Item.ItemList.Find(i => i.HasTag("tutorial_submarinedoor")).GetComponent<Door>();
|
||||
tutorial_submarineDoorLight = Item.ItemList.Find(i => i.HasTag("tutorial_submarinedoorlight")).GetComponent<LightComponent>();
|
||||
var medicInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("medicaldoctor"));
|
||||
var medicInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("medicaldoctor"))
|
||||
{
|
||||
TeamID = CharacterTeamType.Team1
|
||||
};
|
||||
captain_medic = Character.Create(medicInfo, captain_medicSpawnPos, "medicaldoctor");
|
||||
captain_medic.TeamID = CharacterTeamType.Team1;
|
||||
captain_medic.GiveJobItems(null);
|
||||
captain_medic.CanSpeak = captain_medic.AIController.Enabled = false;
|
||||
SetDoorAccess(tutorial_submarineDoor, tutorial_submarineDoorLight, false);
|
||||
@@ -159,7 +155,6 @@ namespace Barotrauma.Tutorials
|
||||
captain_enteredSubmarineSensor = Item.ItemList.Find(i => i.HasTag("captain_enteredsubmarinesensor")).GetComponent<MotionSensor>();
|
||||
tutorial_submarineReactor = Item.ItemList.Find(i => i.HasTag("engineer_submarinereactor")).GetComponent<Reactor>();
|
||||
captain_navConsole = Item.ItemList.Find(i => i.HasTag("command")).GetComponent<Steering>();
|
||||
captain_navConsoleCustomInterface = Item.ItemList.Find(i => i.HasTag("command")).GetComponent<CustomInterface>();
|
||||
captain_sonar = captain_navConsole.Item.GetComponent<Sonar>();
|
||||
captain_statusMonitor = Item.ItemList.Find(i => i.HasTag("captain_statusmonitor"));
|
||||
|
||||
@@ -171,19 +166,25 @@ namespace Barotrauma.Tutorials
|
||||
SetDoorAccess(tutorial_lockedDoor_1, null, false);
|
||||
SetDoorAccess(tutorial_lockedDoor_2, null, false);
|
||||
|
||||
var mechanicInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("mechanic"));
|
||||
var mechanicInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("mechanic"))
|
||||
{
|
||||
TeamID = CharacterTeamType.Team1
|
||||
};
|
||||
captain_mechanic = Character.Create(mechanicInfo, WayPoint.GetRandom(SpawnType.Human, mechanicInfo.Job?.Prefab, Submarine.MainSub).WorldPosition, "mechanic");
|
||||
captain_mechanic.TeamID = CharacterTeamType.Team1;
|
||||
captain_mechanic.GiveJobItems();
|
||||
|
||||
var securityInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("securityofficer"));
|
||||
var securityInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("securityofficer"))
|
||||
{
|
||||
TeamID = CharacterTeamType.Team1
|
||||
};
|
||||
captain_security = Character.Create(securityInfo, WayPoint.GetRandom(SpawnType.Human, securityInfo.Job?.Prefab, Submarine.MainSub).WorldPosition, "securityofficer");
|
||||
captain_security.TeamID = CharacterTeamType.Team1;
|
||||
captain_security.GiveJobItems();
|
||||
|
||||
var engineerInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("engineer"));
|
||||
var engineerInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("engineer"))
|
||||
{
|
||||
TeamID = CharacterTeamType.Team1
|
||||
};
|
||||
captain_engineer = Character.Create(engineerInfo, WayPoint.GetRandom(SpawnType.Human, engineerInfo.Job?.Prefab, Submarine.MainSub).WorldPosition, "engineer");
|
||||
captain_engineer.TeamID = CharacterTeamType.Team1;
|
||||
captain_engineer.GiveJobItems();
|
||||
|
||||
captain_mechanic.CanSpeak = captain_security.CanSpeak = captain_engineer.CanSpeak = false;
|
||||
@@ -252,6 +253,9 @@ namespace Barotrauma.Tutorials
|
||||
yield return new WaitForSeconds(4f, false);
|
||||
TriggerTutorialSegment(3, GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Command));
|
||||
GameMain.GameSession.CrewManager.AddCharacter(captain_engineer);
|
||||
tutorial_submarineReactor.CanBeSelected = true;
|
||||
//recreate autonomous objectives to make sure the engineer didn't abandon the operate reactor objective because it was not selectable
|
||||
(captain_engineer.AIController as HumanAIController).ObjectiveManager.CreateAutonomousObjectives();
|
||||
do
|
||||
{
|
||||
yield return null;
|
||||
@@ -261,7 +265,6 @@ namespace Barotrauma.Tutorials
|
||||
}
|
||||
while (!HasOrder(captain_engineer, "operatereactor", "powerup"));
|
||||
RemoveCompletedObjective(3);
|
||||
tutorial_submarineReactor.CanBeSelected = true;
|
||||
do { yield return null; } while (!tutorial_submarineReactor.IsActive); // Wait until reactor on
|
||||
TriggerTutorialSegment(4);
|
||||
while (ContentRunning) yield return null;
|
||||
|
||||
@@ -4,8 +4,6 @@ using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Barotrauma.Tutorials
|
||||
{
|
||||
@@ -130,24 +128,32 @@ namespace Barotrauma.Tutorials
|
||||
var patientHull2 = WayPoint.WayPointList.Find(wp => wp.IdCardDesc == "airlock").CurrentHull;
|
||||
medBay = WayPoint.WayPointList.Find(wp => wp.IdCardDesc == "medbay").CurrentHull;
|
||||
|
||||
var assistantInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("assistant"));
|
||||
var assistantInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("assistant"))
|
||||
{
|
||||
TeamID = CharacterTeamType.Team1
|
||||
};
|
||||
patient1 = Character.Create(assistantInfo, patientHull1.WorldPosition, "1");
|
||||
patient1.TeamID = CharacterTeamType.Team1;
|
||||
patient1.GiveJobItems(null);
|
||||
patient1.CanSpeak = false;
|
||||
patient1.Params.Health.BurnReduction = 0;
|
||||
patient1.AddDamage(patient1.WorldPosition, new List<Affliction>() { new Affliction(AfflictionPrefab.Burn, 15.0f) }, stun: 0, playSound: false);
|
||||
patient1.AIController.Enabled = false;
|
||||
|
||||
assistantInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("assistant"));
|
||||
assistantInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("assistant"))
|
||||
{
|
||||
TeamID = CharacterTeamType.Team1
|
||||
};
|
||||
patient2 = Character.Create(assistantInfo, patientHull2.WorldPosition, "2");
|
||||
patient2.TeamID = CharacterTeamType.Team1;
|
||||
patient2.GiveJobItems(null);
|
||||
patient2.CanSpeak = false;
|
||||
patient2.AIController.Enabled = false;
|
||||
|
||||
var mechanicInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("engineer"));
|
||||
var mechanicInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("engineer"))
|
||||
{
|
||||
TeamID = CharacterTeamType.Team1
|
||||
};
|
||||
var subPatient1 = Character.Create(mechanicInfo, WayPoint.GetRandom(SpawnType.Human, mechanicInfo.Job?.Prefab, Submarine.MainSub).WorldPosition, "3");
|
||||
subPatient1.TeamID = CharacterTeamType.Team1;
|
||||
subPatient1.Params.Health.BurnReduction = 0;
|
||||
subPatient1.AddDamage(patient1.WorldPosition, new List<Affliction>() { new Affliction(AfflictionPrefab.Burn, 40.0f) }, stun: 0, playSound: false);
|
||||
subPatients.Add(subPatient1);
|
||||
|
||||
@@ -157,9 +163,12 @@ namespace Barotrauma.Tutorials
|
||||
subPatient2.AddDamage(patient1.WorldPosition, new List<Affliction>() { new Affliction(AfflictionPrefab.InternalDamage, 40.0f) }, stun: 0, playSound: false);
|
||||
subPatients.Add(subPatient2);
|
||||
|
||||
var engineerInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("engineer"));
|
||||
var engineerInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobOrJobPrefab: JobPrefab.Get("engineer"))
|
||||
{
|
||||
TeamID = CharacterTeamType.Team1
|
||||
};
|
||||
var subPatient3 = Character.Create(securityInfo, WayPoint.GetRandom(SpawnType.Human, engineerInfo.Job?.Prefab, Submarine.MainSub).WorldPosition, "3");
|
||||
subPatient3.TeamID = CharacterTeamType.Team1;
|
||||
subPatient3.Params.Health.BurnReduction = 0;
|
||||
subPatient3.AddDamage(patient1.WorldPosition, new List<Affliction>() { new Affliction(AfflictionPrefab.Burn, 20.0f) }, stun: 0, playSound: false);
|
||||
subPatients.Add(subPatient3);
|
||||
|
||||
|
||||
@@ -25,20 +25,17 @@ namespace Barotrauma.Tutorials
|
||||
private LightComponent engineer_firstDoorLight;
|
||||
|
||||
// Room 3
|
||||
private MotionSensor engineer_reactorObjectiveSensor;
|
||||
private Powered tutorial_oxygenGenerator;
|
||||
private Reactor engineer_reactor;
|
||||
private Door engineer_secondDoor;
|
||||
private LightComponent engineer_secondDoorLight;
|
||||
|
||||
// Room 4
|
||||
private MotionSensor engineer_repairJunctionBoxObjectiveSensor;
|
||||
private Item engineer_brokenJunctionBox;
|
||||
private Door engineer_thirdDoor;
|
||||
private LightComponent engineer_thirdDoorLight;
|
||||
|
||||
// Room 5
|
||||
private MotionSensor engineer_disconnectedJunctionBoxObjectiveSensor;
|
||||
private PowerTransfer[] engineer_disconnectedJunctionBoxes;
|
||||
private ConnectionPanel[] engineer_disconnectedConnectionPanels;
|
||||
private Item engineer_wire_1;
|
||||
@@ -169,7 +166,6 @@ namespace Barotrauma.Tutorials
|
||||
SetDoorAccess(engineer_firstDoor, engineer_firstDoorLight, false);
|
||||
|
||||
// Room 3
|
||||
engineer_reactorObjectiveSensor = Item.ItemList.Find(i => i.HasTag("engineer_reactorobjectivesensor")).GetComponent<MotionSensor>();
|
||||
tutorial_oxygenGenerator = Item.ItemList.Find(i => i.HasTag("tutorial_oxygengenerator")).GetComponent<OxygenGenerator>();
|
||||
engineer_reactor = Item.ItemList.Find(i => i.HasTag("engineer_reactor")).GetComponent<Reactor>();
|
||||
engineer_reactor.FireDelay = engineer_reactor.MeltdownDelay = float.PositiveInfinity;
|
||||
@@ -183,7 +179,6 @@ namespace Barotrauma.Tutorials
|
||||
SetDoorAccess(engineer_secondDoor, engineer_secondDoorLight, false);
|
||||
|
||||
// Room 4
|
||||
engineer_repairJunctionBoxObjectiveSensor = Item.ItemList.Find(i => i.HasTag("engineer_repairjunctionboxobjectivesensor")).GetComponent<MotionSensor>();
|
||||
engineer_brokenJunctionBox = Item.ItemList.Find(i => i.HasTag("engineer_brokenjunctionbox"));
|
||||
engineer_thirdDoor = Item.ItemList.Find(i => i.HasTag("engineer_thirddoor")).GetComponent<Door>();
|
||||
engineer_thirdDoorLight = Item.ItemList.Find(i => i.HasTag("engineer_thirddoorlight")).GetComponent<LightComponent>();
|
||||
@@ -194,8 +189,6 @@ namespace Barotrauma.Tutorials
|
||||
SetDoorAccess(engineer_thirdDoor, engineer_thirdDoorLight, false);
|
||||
|
||||
// Room 5
|
||||
engineer_disconnectedJunctionBoxObjectiveSensor = Item.ItemList.Find(i => i.HasTag("engineer_disconnectedjunctionboxobjectivesensor")).GetComponent<MotionSensor>();
|
||||
|
||||
engineer_disconnectedJunctionBoxes = new PowerTransfer[4];
|
||||
engineer_disconnectedConnectionPanels = new ConnectionPanel[4];
|
||||
|
||||
@@ -255,7 +248,7 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
public override IEnumerable<CoroutineStatus> UpdateState()
|
||||
{
|
||||
while (GameMain.Instance.LoadingScreenOpen) yield return null;
|
||||
while (GameMain.Instance.LoadingScreenOpen) { yield return null; }
|
||||
|
||||
// Room 1
|
||||
SoundPlayer.PlayDamageSound("StructureBlunt", 10, Character.Controlled.WorldPosition);
|
||||
@@ -519,10 +512,10 @@ namespace Barotrauma.Tutorials
|
||||
tutorial_oxygenGenerator.PowerConsumption = reactorLoads[i];
|
||||
while (timer > 0)
|
||||
{
|
||||
yield return new WaitForSeconds(0.1f, false);
|
||||
if (IsReactorPoweredUp(engineer_reactor))
|
||||
yield return CoroutineStatus.Running;
|
||||
if (CoroutineManager.DeltaTime > 0.0f && IsReactorPoweredUp(engineer_reactor))
|
||||
{
|
||||
timer -= 0.1f;
|
||||
timer -= CoroutineManager.DeltaTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user