Unstable v0.19.5.0
This commit is contained in:
@@ -153,7 +153,7 @@ namespace Barotrauma.Items.Components
|
||||
GUI.MouseOn == null && !Inventory.IsMouseOnInventory && !GameMain.Instance.Paused;
|
||||
if (GUI.HideCursor)
|
||||
{
|
||||
crosshairSprite?.Draw(spriteBatch, crosshairPos, Color.White, 0, currentCrossHairScale);
|
||||
crosshairSprite?.Draw(spriteBatch, crosshairPos, ReloadTimer <= 0.0f ? Color.White : Color.White * 0.2f, 0, currentCrossHairScale);
|
||||
crosshairPointerSprite?.Draw(spriteBatch, crosshairPointerPos, 0, currentCrossHairPointerScale);
|
||||
}
|
||||
|
||||
|
||||
@@ -369,6 +369,7 @@ namespace Barotrauma.Items.Components
|
||||
loopingSoundChannel = loopingSound.RoundSound.Sound.Play(
|
||||
new Vector3(position.X, position.Y, 0.0f),
|
||||
0.01f,
|
||||
freqMult: itemSound.RoundSound.GetRandomFrequencyMultiplier(),
|
||||
muffle: SoundPlayer.ShouldMuffleSound(Character.Controlled, position, loopingSound.Range, Character.Controlled?.CurrentHull));
|
||||
loopingSoundChannel.Looping = true;
|
||||
//TODO: tweak
|
||||
|
||||
@@ -1013,6 +1013,19 @@ namespace Barotrauma.Items.Components
|
||||
if (!CheckResourceMarkerVisibility(c.center, transducerCenter)) { continue; }
|
||||
var i = unobtainedMinerals.FirstOrDefault();
|
||||
if (i == null) { continue; }
|
||||
|
||||
bool disrupted = false;
|
||||
foreach ((Vector2 disruptPos, float disruptStrength) in disruptedDirections)
|
||||
{
|
||||
float dot = Vector2.Dot(Vector2.Normalize(c.center - transducerCenter), disruptPos);
|
||||
if (dot > 1.0f - disruptStrength)
|
||||
{
|
||||
disrupted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (disrupted) { continue; }
|
||||
|
||||
DrawMarker(spriteBatch,
|
||||
i.Name, "mineral".ToIdentifier(), "mineralcluster" + i,
|
||||
c.center, transducerCenter,
|
||||
|
||||
@@ -22,6 +22,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private GUILayoutGroup extraButtonContainer;
|
||||
|
||||
private GUIComponent skillTextContainer;
|
||||
|
||||
private readonly List<ParticleEmitter> particleEmitters = new List<ParticleEmitter>();
|
||||
//the corresponding particle emitter is active when the condition is within this range
|
||||
private readonly List<Vector2> particleEmitterConditionRanges = new List<Vector2>();
|
||||
@@ -132,9 +134,10 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedFrame.RectTransform),
|
||||
TextManager.Get("RequiredRepairSkills"), font: GUIStyle.SubHeadingFont);
|
||||
skillTextContainer = paddedFrame;
|
||||
for (int i = 0; i < requiredSkills.Count; i++)
|
||||
{
|
||||
var skillText = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedFrame.RectTransform),
|
||||
var skillText = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), skillTextContainer.RectTransform),
|
||||
" - " + TextManager.AddPunctuation(':', TextManager.Get("SkillName." + requiredSkills[i].Identifier), ((int) Math.Round(requiredSkills[i].Level * SkillRequirementMultiplier)).ToString()),
|
||||
font: GUIStyle.SmallFont)
|
||||
{
|
||||
@@ -359,19 +362,11 @@ namespace Barotrauma.Items.Components
|
||||
extraButtonContainer.Visible = SabotageButton.Visible || TinkerButton.Visible;
|
||||
extraButtonContainer.IgnoreLayoutGroups = !extraButtonContainer.Visible;
|
||||
|
||||
foreach (GUIComponent c in GuiFrame.GetChild(0).Children)
|
||||
foreach (GUIComponent c in skillTextContainer.Children)
|
||||
{
|
||||
if (!(c.UserData is Skill skill)) continue;
|
||||
|
||||
if (c.UserData is not Skill skill) { continue; }
|
||||
GUITextBlock textBlock = (GUITextBlock)c;
|
||||
if (character.GetSkillLevel(skill.Identifier) < (skill.Level * SkillRequirementMultiplier))
|
||||
{
|
||||
textBlock.TextColor = GUIStyle.Red;
|
||||
}
|
||||
else
|
||||
{
|
||||
textBlock.TextColor = Color.White;
|
||||
}
|
||||
textBlock.TextColor = character.GetSkillLevel(skill.Identifier) < (skill.Level * SkillRequirementMultiplier) ? GUIStyle.Red : GUIStyle.TextColorNormal;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user