Fixed shiftsummary showing info for the wrong quest

This commit is contained in:
Regalis
2016-01-20 00:22:11 +02:00
parent 9405df006a
commit 4dd48d7bf2
6 changed files with 20 additions and 13 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<infotexts> <infotexts>
<progress>[sub] has made its way from [location1] to [location2].</progress> <progress>[sub] has made its way to [location].</progress>
<progress>[sub] has arrived at [location2].</progress> <progress>[sub] has arrived at [location].</progress>
<return>[sub] has returned to [location1].</return> <return>[sub] has returned to [location].</return>
<gameover>The ocean has claimed [sub] and its crew.</gameover> <gameover>The ocean has claimed [sub] and its crew.</gameover>
<CauseOfDeath.Damage>Succumbed to their injuries</CauseOfDeath.Damage> <CauseOfDeath.Damage>Succumbed to their injuries</CauseOfDeath.Damage>
+1 -1
View File
@@ -49,7 +49,7 @@
<MonsterMission <MonsterMission
name="Beast from the Abyss" name="Beast from the Abyss"
description="Seismic readings are indicating that something colossal has emerged from the depths of Europa into the passageway between [location1] and [location2]. All transports through the passageway have been canceled for now and a reward of 10,000 has been promised to those who get rid of whatever is causing the seismic activity." description="Seismic readings are indicating that something colossal has emerged from the depths of Europa into the passageway between [location1] and [location2]. All transports through the passageway have been canceled for now and a reward of 10,000 has been promised to those who get rid of whatever is causing the seismic activity."
commonness="10" commonness="2"
reward="10000" reward="10000"
radarlabel="Target" radarlabel="Target"
successmessage="The End Worm is dead and the passageway is open for transport again." successmessage="The End Worm is dead and the passageway is open for transport again."
+4 -4
View File
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Orders> <Orders>
<Order name="Follow" doingtext="Following" color="0.0,1.0,0.0,1.0"> <Order name="Follow" doingtext="Following" color="1.0,0.5,0.1,1.0">
<Sprite texture="Content/UI/orderSymbols.png" sourcerect="0,0,64,64"/> <Sprite texture="Content/UI/orderSymbols.png" sourcerect="0,0,64,64"/>
</Order> </Order>
<Order name="Wait" doingtext="Waiting" color="1.0,0.5,0.1,1.0"> <Order name="Wait" doingtext="Waiting" color="1.0,0.0,0.0,1.0">
<Sprite texture="Content/UI/orderSymbols.png" sourcerect="128,0,64,64"/> <Sprite texture="Content/UI/orderSymbols.png" sourcerect="128,0,64,64"/>
</Order> </Order>
<Order name="Dismiss" doingtext="Dismissed" color="1.0,1.0,1.0,1.0"> <Order name="Dismissed" doingtext="Dismissed" color="0.0,1.0,0.0,1.0">
<Sprite texture="Content/UI/orderSymbols.png" sourcerect="64,0,64,64"/> <Sprite texture="Content/UI/orderSymbols.png" sourcerect="64,0,64,64"/>
</Order> </Order>
<Order name="Operate Reactor" doingtext="Operating Reactor" targetitemtype="Reactor" options="Power up, Shutdown" color="1.0,1.0,0.0,1.0"> <Order name="Operate Reactor" doingtext="Operating Reactor" targetitemtype="Reactor" options="Power up, Shutdown" color="0.12,0.3,0.5,1.0">
<Sprite texture="Content/UI/orderSymbols.png" sourcerect="192,0,64,64"/> <Sprite texture="Content/UI/orderSymbols.png" sourcerect="192,0,64,64"/>
</Order> </Order>
@@ -16,7 +16,7 @@ namespace Barotrauma
public override Vector2 RadarPosition public override Vector2 RadarPosition
{ {
get { return radarPosition; } get { return monster != null && !monster.IsDead ? radarPosition : Vector2.Zero; }
} }
public MonsterMission(XElement element) public MonsterMission(XElement element)
@@ -20,7 +20,7 @@ namespace Barotrauma
{ {
get get
{ {
return ConvertUnits.ToDisplayUnits(item.SimPosition); return state>0 ? Vector2.Zero : ConvertUnits.ToDisplayUnits(item.SimPosition);
} }
} }
+10 -3
View File
@@ -21,11 +21,13 @@ namespace Barotrauma
private ShiftSummary shiftSummary; private ShiftSummary shiftSummary;
private Mission currentMission;
public Mission Mission public Mission Mission
{ {
get get
{ {
if (gameMode != null) return gameMode.Mission; return currentMission;
return null; return null;
} }
} }
@@ -124,7 +126,11 @@ namespace Barotrauma
GameMain.GameScreen.BackgroundCreatureManager.SpawnSprites(80); GameMain.GameScreen.BackgroundCreatureManager.SpawnSprites(80);
} }
if (Mission!=null) Mission.Start(Level.Loaded); if (gameMode.Mission!=null)
{
currentMission = gameMode.Mission;
Mission.Start(Level.Loaded);
}
shiftSummary = new ShiftSummary(this); shiftSummary = new ShiftSummary(this);
@@ -153,8 +159,9 @@ namespace Barotrauma
var okButton = new GUIButton(new Rectangle(0, 0, 100, 30), "Ok", Alignment.BottomRight, GUI.Style, summaryFrame.children[0]); var okButton = new GUIButton(new Rectangle(0, 0, 100, 30), "Ok", Alignment.BottomRight, GUI.Style, summaryFrame.children[0]);
okButton.OnClicked = (GUIButton button, object obj) => { GUIMessageBox.MessageBoxes.Dequeue(); return true; }; okButton.OnClicked = (GUIButton button, object obj) => { GUIMessageBox.MessageBoxes.Dequeue(); return true; };
TaskManager.EndShift(); TaskManager.EndShift();
currentMission = null;
//gameMode.End(); //gameMode.End();
//return true; //return true;