v1.7.7.0 (Winter Update 2024)
This commit is contained in:
+18
-11
@@ -36,7 +36,8 @@ namespace Barotrauma
|
||||
{
|
||||
return
|
||||
lastActiveAction != null &&
|
||||
lastActiveAction.ParentEvent != ParentEvent &&
|
||||
!lastActiveAction.ParentEvent.IsFinished &&
|
||||
lastActiveAction.ParentEvent != ParentEvent &&
|
||||
Timing.TotalTime < lastActiveAction.lastActiveTime + duration;
|
||||
}
|
||||
|
||||
@@ -101,6 +102,7 @@ namespace Barotrauma
|
||||
conversationList.BarScroll = (prevSize - conversationList.Content.Rect.Height) / (conversationList.TotalSize - conversationList.Content.Rect.Height);
|
||||
conversationList.ScrollToEnd(duration: 0.5f);
|
||||
lastMessageBox.SetBackgroundIcon(eventSprite);
|
||||
MarkMessageBoxAsLastAction(lastMessageBox);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -123,16 +125,7 @@ namespace Barotrauma
|
||||
messageBox.AutoClose = false;
|
||||
GUIStyle.Apply(messageBox.InnerFrame, "DialogBox");
|
||||
|
||||
if (actionInstance != null)
|
||||
{
|
||||
lastActiveAction = actionInstance;
|
||||
actionInstance.lastActiveTime = Timing.TotalTime;
|
||||
actionInstance.dialogBox = messageBox;
|
||||
}
|
||||
else
|
||||
{
|
||||
messageBox.UserData = new Pair<string, UInt16>("ConversationAction", actionId.Value);
|
||||
}
|
||||
MarkMessageBoxAsLastAction(messageBox);
|
||||
|
||||
int padding = GUI.IntScale(16);
|
||||
|
||||
@@ -155,6 +148,20 @@ namespace Barotrauma
|
||||
};
|
||||
shadow.SetAsFirstChild();
|
||||
|
||||
void MarkMessageBoxAsLastAction(GUIMessageBox messageBox)
|
||||
{
|
||||
if (actionInstance != null)
|
||||
{
|
||||
lastActiveAction = actionInstance;
|
||||
actionInstance.lastActiveTime = Timing.TotalTime;
|
||||
actionInstance.dialogBox = messageBox;
|
||||
}
|
||||
else
|
||||
{
|
||||
messageBox.UserData = new Pair<string, UInt16>("ConversationAction", actionId.Value);
|
||||
}
|
||||
}
|
||||
|
||||
static void RecalculateLastMessage(GUIListBox conversationList, bool append)
|
||||
{
|
||||
if (conversationList.Content.Children.LastOrDefault() is GUILayoutGroup lastElement)
|
||||
|
||||
@@ -48,6 +48,7 @@ partial class EventLog
|
||||
textContent,
|
||||
difficultyIconCount,
|
||||
icon, GUIStyle.Red,
|
||||
difficultyTooltipText: null,
|
||||
out GUIImage missionIcon);
|
||||
|
||||
if (traitorResults != null &&
|
||||
|
||||
@@ -61,6 +61,16 @@ namespace Barotrauma
|
||||
return RichString.Rich(TextManager.GetWithVariable("missionreward", "[reward]", "‖color:gui.orange‖" + rewardText + "‖end‖"));
|
||||
}
|
||||
|
||||
public RichString GetDifficultyToolTipText()
|
||||
{
|
||||
// 2 skulls give +10% XP, 3 skulls +20% XP and 4 skulls give +30% XP.
|
||||
float xpBonusMultiplier = CalculateDifficultyXPMultiplier();
|
||||
float xpBonusPercentage = (xpBonusMultiplier - 1f) * 100f;
|
||||
int bonusRounded = (int)Math.Round(xpBonusPercentage);
|
||||
LocalizedString tooltipText = TextManager.GetWithVariable(tag: "missiondifficultyxpbonustooltip", varName: "[bonus]", value: bonusRounded.ToString());
|
||||
return RichString.Rich(tooltipText);
|
||||
}
|
||||
|
||||
public RichString GetReputationRewardText()
|
||||
{
|
||||
List<LocalizedString> reputationRewardTexts = new List<LocalizedString>();
|
||||
|
||||
@@ -49,7 +49,8 @@ namespace Barotrauma
|
||||
{
|
||||
return hudIconColor ?? IconColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
public Color ProgressBarColor { get; private set; }
|
||||
|
||||
private Sprite hudIcon;
|
||||
private Color? hudIconColor;
|
||||
@@ -90,6 +91,7 @@ namespace Barotrauma
|
||||
}
|
||||
this.portraits = portraits.ToImmutableArray();
|
||||
overrideMusicOnState = overrideMusic.ToImmutableDictionary();
|
||||
ProgressBarColor = element.GetAttributeColor(nameof(ProgressBarColor), GUIStyle.Blue);
|
||||
}
|
||||
|
||||
public Identifier GetOverrideMusicType(int state)
|
||||
|
||||
@@ -7,20 +7,7 @@ namespace Barotrauma
|
||||
{
|
||||
partial class ScanMission : Mission
|
||||
{
|
||||
public override IEnumerable<Entity> HudIconTargets
|
||||
{
|
||||
get
|
||||
{
|
||||
if (State == 0)
|
||||
{
|
||||
return scanTargets.Where(kvp => !kvp.Value).Select(kvp => kvp.Key);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Enumerable.Empty<Entity>();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override IEnumerable<Entity> HudIconTargets => scanTargets.Where(kvp => !kvp.Value).Select(kvp => kvp.Key);
|
||||
|
||||
public override bool DisplayAsCompleted => false;
|
||||
public override bool DisplayAsFailed => false;
|
||||
@@ -62,7 +49,7 @@ namespace Barotrauma
|
||||
ushort id = msg.ReadUInt16();
|
||||
bool scanned = msg.ReadBoolean();
|
||||
Entity entity = Entity.FindEntityByID(id);
|
||||
if (!(entity is WayPoint wayPoint))
|
||||
if (entity is not WayPoint wayPoint)
|
||||
{
|
||||
string errorMsg = $"Failed to find a waypoint in ScanMission.ClientReadScanTargetStatus. Entity {id} was {(entity?.ToString() ?? null)}";
|
||||
DebugConsole.ThrowError(errorMsg);
|
||||
|
||||
Reference in New Issue
Block a user