Merge remote-tracking branch 'upstream/master' into weapon_anims
# Conflicts: # Resources/Prototypes/MeleeWeaponAnimations/default.yml
This commit is contained in:
@@ -54,8 +54,9 @@ namespace Content.Client.Commands
|
||||
}
|
||||
|
||||
return !anyAction;
|
||||
#endif
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,8 +55,9 @@ namespace Content.Client.Commands
|
||||
}
|
||||
|
||||
return !anyAction;
|
||||
#endif
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
24
Content.Client/Commands/ToggleOutlineCommand.cs
Normal file
24
Content.Client/Commands/ToggleOutlineCommand.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Robust.Client.Interfaces.Console;
|
||||
using Robust.Shared.Interfaces.Configuration;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Client.Commands
|
||||
{
|
||||
public class ToggleOutlineCommand : IConsoleCommand
|
||||
{
|
||||
public string Command => "toggleoutline";
|
||||
|
||||
public string Description => "Toggles outline drawing on entities.";
|
||||
|
||||
public string Help => "";
|
||||
|
||||
public bool Execute(IDebugConsole console, params string[] args)
|
||||
{
|
||||
var _configurationManager = IoCManager.Resolve<IConfigurationManager>();
|
||||
var old = _configurationManager.GetCVar<bool>("outline.enabled");
|
||||
_configurationManager.SetCVar("outline.enabled", !old);
|
||||
console.AddLine($"Draw outlines set to: {_configurationManager.GetCVar<bool>("outline.enabled")}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ using Robust.Client.Interfaces.Input;
|
||||
using Robust.Client.Interfaces.State;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Shared.ContentPack;
|
||||
using Robust.Shared.Interfaces.Configuration;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -41,6 +42,7 @@ namespace Content.Client
|
||||
[Dependency] private readonly IEscapeMenuOwner _escapeMenuOwner;
|
||||
[Dependency] private readonly IGameController _gameController;
|
||||
[Dependency] private readonly IStateManager _stateManager;
|
||||
[Dependency] private readonly IConfigurationManager _configurationManager;
|
||||
#pragma warning restore 649
|
||||
|
||||
public override void Init()
|
||||
@@ -223,6 +225,8 @@ namespace Content.Client
|
||||
{
|
||||
IoCManager.Resolve<IMapManager>().CreateNewMapEntity(MapId.Nullspace);
|
||||
};
|
||||
|
||||
_configurationManager.RegisterCVar("outline.enabled", true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -249,7 +253,10 @@ namespace Content.Client
|
||||
/// </summary>
|
||||
public static void DetachPlayerFromEntity(EntityDetachedEventArgs eventArgs)
|
||||
{
|
||||
eventArgs.OldEntity.RemoveComponent<CharacterInterface>();
|
||||
if (!eventArgs.OldEntity.Deleted)
|
||||
{
|
||||
eventArgs.OldEntity.RemoveComponent<CharacterInterface>();
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostInit()
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Client.Animations;
|
||||
using Content.Client.UserInterface.Stylesheets;
|
||||
using Content.Client.Utility;
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Weapons.Ranged;
|
||||
using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels;
|
||||
using Robust.Client.Animations;
|
||||
using Robust.Client.Graphics;
|
||||
@@ -112,10 +113,10 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
|
||||
|
||||
switch (message)
|
||||
{
|
||||
/*
|
||||
case BmwComponentAutoEjectedMessage _:
|
||||
|
||||
case MagazineAutoEjectMessage _:
|
||||
_statusControl?.PlayAlarmAnimation();
|
||||
return;*/
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,10 +79,9 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
}
|
||||
}
|
||||
|
||||
if (ev.LastPosition.HasValue)
|
||||
// Entity is no longer valid, update around the last position it was at.
|
||||
if (ev.LastPosition.HasValue && _mapManager.TryGetGrid(ev.LastPosition.Value.grid, out var grid))
|
||||
{
|
||||
// Entity is no longer valid, update around the last position it was at.
|
||||
var grid = _mapManager.GetGrid(ev.LastPosition.Value.grid);
|
||||
var pos = ev.LastPosition.Value.pos;
|
||||
|
||||
AddValidEntities(grid.GetSnapGridCell(pos + new MapIndices(1, 0), ev.Offset));
|
||||
|
||||
@@ -60,7 +60,11 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
|
||||
private void HandleDirtyEvent(SubFloorHideDirtyEvent ev)
|
||||
{
|
||||
var grid = _mapManager.GetGrid(ev.Sender.Transform.GridID);
|
||||
if (!_mapManager.TryGetGrid(ev.Sender.Transform.GridID, out var grid))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var indices = grid.WorldToTile(ev.Sender.Transform.WorldPosition);
|
||||
UpdateTile(grid, indices);
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace Content.Client.GameTicking
|
||||
StartTime = message.StartTime;
|
||||
IsGameStarted = message.IsRoundStarted;
|
||||
AreWeReady = message.YouAreReady;
|
||||
Paused = message.Paused;
|
||||
|
||||
LobbyStatusUpdated?.Invoke();
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ using Robust.Client.Interfaces.UserInterface;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Input;
|
||||
using Robust.Shared.Interfaces.Configuration;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.Interfaces.Timing;
|
||||
@@ -36,6 +37,8 @@ namespace Content.Client.State
|
||||
[Dependency] private readonly IGameTiming _timing;
|
||||
[Dependency] private readonly IMapManager _mapManager;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager;
|
||||
|
||||
[Dependency] private readonly IConfigurationManager _configurationManager;
|
||||
#pragma warning restore 649
|
||||
|
||||
private IEntity _lastHoveredEntity;
|
||||
@@ -72,6 +75,15 @@ namespace Content.Client.State
|
||||
}
|
||||
|
||||
InteractionOutlineComponent outline;
|
||||
if(!_configurationManager.GetCVar<bool>("outline.enabled"))
|
||||
{
|
||||
if(entityToClick != null && entityToClick.TryGetComponent(out outline))
|
||||
{
|
||||
outline.OnMouseLeave(); //Prevent outline remains from persisting post command.
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (entityToClick == _lastHoveredEntity)
|
||||
{
|
||||
if (entityToClick != null && entityToClick.TryGetComponent(out outline))
|
||||
|
||||
Reference in New Issue
Block a user