v1.7.7.0 (Winter Update 2024)
This commit is contained in:
@@ -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