(a08a47a7f) Readded: Interval based reporting after entering the sub
This commit is contained in:
@@ -379,15 +379,23 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
double subEnterTime = Timing.TotalTime;
|
||||
|
||||
for (int i = 0; i < subPatients.Count; i++)
|
||||
{
|
||||
doctor.AddActiveObjectiveEntity(subPatients[i], doctor_firstAidIcon, doctor_firstAidIconColor);
|
||||
}
|
||||
bool[] patientCalledHelp = new bool[] { false, false, false };
|
||||
|
||||
while (subPatients.Any(p => p.Vitality < p.MaxVitality * 0.9f && !p.IsDead))
|
||||
{
|
||||
for (int i = 0; i < subPatients.Count; i++)
|
||||
{
|
||||
//make patients call for help to make sure the player finds them
|
||||
//(within 1 minute intervals of entering the sub)
|
||||
if (!patientCalledHelp[i] && Timing.TotalTime > subEnterTime + 60 * (i + 1))
|
||||
{
|
||||
doctor.AddActiveObjectiveEntity(subPatients[i], doctor_firstAidIcon, doctor_firstAidIconColor);
|
||||
newOrder = new Order(Order.PrefabList.Find(o => o.AITag == "requestfirstaid"), subPatients[i].CurrentHull, null, orderGiver: subPatients[i]);
|
||||
string message = newOrder.GetChatMessage("", subPatients[i].CurrentHull?.DisplayName, givingOrderToSelf: false);
|
||||
GameMain.GameSession.CrewManager.AddSinglePlayerChatMessage(subPatients[i].Name, message, ChatMessageType.Order, null);
|
||||
patientCalledHelp[i] = true;
|
||||
}
|
||||
|
||||
if (subPatients[i].ExternalHighlight && subPatients[i].Vitality >= subPatients[i].MaxVitality * 0.9f)
|
||||
{
|
||||
doctor.RemoveActiveObjectiveEntity(subPatients[i]);
|
||||
|
||||
@@ -218,6 +218,22 @@ namespace Barotrauma
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool RefreshJoinButtonState(GUIComponent component, object obj)
|
||||
{
|
||||
if (obj == null || waitingForRefresh) { return false; }
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(clientNameBox.Text) && !string.IsNullOrWhiteSpace(ipBox.Text))
|
||||
{
|
||||
joinButton.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
joinButton.Enabled = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool SelectServer(GUIComponent component, object obj)
|
||||
{
|
||||
if (obj == null || waitingForRefresh) { return false; }
|
||||
|
||||
Reference in New Issue
Block a user