Unstable 0.17.0.0
This commit is contained in:
@@ -78,7 +78,7 @@ namespace Barotrauma
|
||||
base.Deselect();
|
||||
|
||||
#if CLIENT
|
||||
GameMain.Config.SaveNewPlayerConfig();
|
||||
GameSettings.SaveCurrentConfig();
|
||||
GameMain.SoundManager.SetCategoryMuffle("default", false);
|
||||
GUI.ClearMessages();
|
||||
#endif
|
||||
@@ -116,37 +116,6 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if LINUX
|
||||
// disgusting
|
||||
if (PlayerInput.KeyDown(Keys.RightShift) && Character.Controlled is { CharacterHealth: { } health } && PlayerInput.MouseSpeed != Vector2.Zero)
|
||||
{
|
||||
AfflictionPrefab radiationPrefab = AfflictionPrefab.RadiationSickness;
|
||||
float afflictionAmount = (PlayerInput.MousePosition.X / GameMain.GraphicsWidth) * radiationPrefab.MaxStrength;
|
||||
Affliction affliction = health.GetAffliction(radiationPrefab.Identifier, true);
|
||||
|
||||
if (affliction == null)
|
||||
{
|
||||
health.ApplyAffliction(null, new Affliction(radiationPrefab, Math.Abs(afflictionAmount)));
|
||||
}
|
||||
else
|
||||
{
|
||||
float diff = affliction.Strength - afflictionAmount;
|
||||
|
||||
if (!MathUtils.NearlyEqual(diff, 0))
|
||||
{
|
||||
if (diff > 0)
|
||||
{
|
||||
health.ReduceAffliction(null, radiationPrefab.Identifier, Math.Abs(diff));
|
||||
}
|
||||
else if (diff < 0)
|
||||
{
|
||||
health.ApplyAffliction(null, new Affliction(radiationPrefab, Math.Abs(diff)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CLIENT
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
namespace Barotrauma
|
||||
{
|
||||
partial class Screen
|
||||
abstract partial class Screen
|
||||
{
|
||||
private static Screen selected;
|
||||
|
||||
public static Screen Selected
|
||||
{
|
||||
get { return selected; }
|
||||
}
|
||||
public static Screen Selected { get; private set; }
|
||||
|
||||
public static void SelectNull()
|
||||
{
|
||||
selected = null;
|
||||
Selected = null;
|
||||
}
|
||||
|
||||
public virtual void Deselect()
|
||||
@@ -20,9 +15,9 @@
|
||||
|
||||
public virtual void Select()
|
||||
{
|
||||
if (selected != null && selected != this)
|
||||
if (Selected != null && Selected != this)
|
||||
{
|
||||
selected.Deselect();
|
||||
Selected.Deselect();
|
||||
#if CLIENT
|
||||
GUIContextMenu.CurrentContextMenu = null;
|
||||
GUI.ClearCursorWait();
|
||||
@@ -41,14 +36,17 @@
|
||||
}
|
||||
#endif
|
||||
}
|
||||
selected = this;
|
||||
|
||||
#if CLIENT
|
||||
GUI.SettingsMenuOpen = false;
|
||||
#endif
|
||||
Selected = this;
|
||||
}
|
||||
|
||||
public virtual Camera Cam
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public virtual Camera Cam => null;
|
||||
|
||||
public virtual bool IsEditor => false;
|
||||
|
||||
public virtual void Update(double deltaTime)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user