Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drafty drafty draft pr #1

Open
wants to merge 82 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
fbb2eec
commit
angelofallars Nov 21, 2024
0dbf489
update 2
angelofallars Nov 21, 2024
b61fc74
feat: update system
angelofallars Nov 21, 2024
073fa90
feat: add throwing to a lot of items
angelofallars Nov 21, 2024
acdf2f9
feat(throwing): move some code to shared
angelofallars Nov 22, 2024
f9b7cfb
feat(throwing): stat change pass
angelofallars Nov 22, 2024
c1c5703
feat: support toggle throwing angle for e-dagger
angelofallars Nov 22, 2024
f12deec
feat(throwing): another stat change pass
angelofallars Nov 22, 2024
9966389
feat(throwing): add item toggle for embeddable projectiles
angelofallars Nov 22, 2024
e6b43fc
feat(throwing): use contest system modifiers for throwing damage
angelofallars Nov 22, 2024
10744f5
feat: make throwing weapons be affected by melee modifier traits
angelofallars Nov 22, 2024
a05688b
feat: add embeddable passive damage
angelofallars Nov 22, 2024
db481f6
feat: start work on embeddable falloff duration
angelofallars Nov 23, 2024
4bf7624
Add Localization for Senior Physician and Senior Engineer (#1302)
zelezniciar1 Dec 1, 2024
9169818
Automatic Changelog Update (#1302)
SimpleStation14 Dec 1, 2024
8573914
Make Cultist Constructs Speak Eldritch (#1303)
angelofallars Dec 2, 2024
114ecde
Automatic Changelog Update (#1303)
SimpleStation14 Dec 2, 2024
7def853
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Dec 3, 2024
9babb62
Merge branch 'throwing-overhaul' into embeddable-damage
angelofallars Dec 3, 2024
155b058
improve null check
angelofallars Dec 3, 2024
2294826
add embed passive damage to most embeddable weapons
angelofallars Dec 3, 2024
fa96ff5
add toggle embed damage
angelofallars Dec 3, 2024
1895f3a
Fix Lobotomy (#1306)
angelofallars Dec 3, 2024
71c6412
Automatic Changelog Update (#1306)
SimpleStation14 Dec 3, 2024
82b2b28
You Can Now Drag People Into Deep Friers (#1279)
Erisfiregamer1 Dec 3, 2024
cbc76ef
Automatic Changelog Update (#1279)
SimpleStation14 Dec 3, 2024
7c0c16e
Emp Flashlight (#5) (#1189)
VMSolidus Dec 4, 2024
7beea89
Automatic Changelog Update (#1189)
SimpleStation14 Dec 4, 2024
831a7b3
Add Europa Map to Rotation (#1152)
Ichaie Dec 4, 2024
b1c3703
Automatic Changelog Update (#1152)
SimpleStation14 Dec 4, 2024
c223259
Update medicine.yml (#1210)
Suraru Dec 4, 2024
1db7028
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Dec 4, 2024
b649c72
make DamageOtherOnHit.Damage not nullable
angelofallars Dec 4, 2024
d1f9ee0
separate itemtoggles for DamageOtherOnHit and EmbedPassiveDamage
angelofallars Dec 4, 2024
2774d08
make deactivated eswords not have throwing angles
angelofallars Dec 4, 2024
5d274da
change surgical tools throwing values
angelofallars Dec 4, 2024
d89d925
improve formatting for DamageOtherOnHitComponent
angelofallars Dec 4, 2024
06fd42f
revert change on FlightComponent.cs
angelofallars Dec 4, 2024
2ad3d01
do many things
angelofallars Dec 5, 2024
e2ee77d
Atmospheric Alerts Computer Upgrades (#1313)
zelezniciar1 Dec 5, 2024
6c9270d
Automatic Changelog Update (#1313)
SimpleStation14 Dec 5, 2024
14b30f5
add examine for embeds
angelofallars Dec 5, 2024
686563a
add examine on embedded items to see embedded body part
angelofallars Dec 5, 2024
978173e
More Bug Fixes (#1311)
sleepyyapril Dec 5, 2024
1b15668
Automatic Changelog Update (#1311)
SimpleStation14 Dec 5, 2024
32e17a6
ChemMaster Sorting (#1310)
sleepyyapril Dec 5, 2024
01a13e3
Automatic Changelog Update (#1310)
SimpleStation14 Dec 5, 2024
d69b516
Port Shipyards (#1314)
VMSolidus Dec 6, 2024
36cd6ca
Automatic Changelog Update (#1314)
SimpleStation14 Dec 6, 2024
1016a08
Port UserActivateInWorldEvent and BypassInteractionChecksComponent (#…
sleepyyapril Dec 6, 2024
54d15c0
Inverts the Check for Material Whitelist in CanChangeMaterialAmount (…
rbertoche Dec 6, 2024
f1b8f96
Build Your Own TEG! (#1316)
zelezniciar1 Dec 6, 2024
3d2cdd7
Automatic Changelog Update (#1316)
SimpleStation14 Dec 6, 2024
fe84017
Merge branch 'master' into throwing-overhaul
angelofallars Dec 6, 2024
50eb217
Several Small Map Fixes to Europa (#1319)
rbertoche Dec 6, 2024
f4152a5
Automatic Changelog Update (#1319)
SimpleStation14 Dec 6, 2024
40d327e
remove moved deactivated fields on EmbedPassiveDamage and DamageOther…
angelofallars Dec 6, 2024
a707ced
fix whacky prediction issue causing client crash on embed damage update
angelofallars Dec 6, 2024
b62ef90
nerf embedded removal
angelofallars Dec 6, 2024
70e9dfc
allow non-cultists to remove embedded cultist weapons
angelofallars Dec 6, 2024
9428b7a
remove misplaced StaminaCost field and rename unrenamed lightAttackMu…
angelofallars Dec 6, 2024
c230721
fix non-cultists throwing cultist weapons
angelofallars Dec 6, 2024
ab23abc
Merge branch 'throwing-overhaul' of github.com:angelofallars/Einstein…
angelofallars Dec 6, 2024
f96efb9
Merge branch 'master' into throwing-overhaul
angelofallars Dec 6, 2024
052d117
be able to distinguish between harmless and harmful embeds
angelofallars Dec 6, 2024
d0a33ea
be able to distinguish between harmless and harmful embeds
angelofallars Dec 6, 2024
dfa4d09
use MapInitEvent for throwing component initialization
angelofallars Dec 6, 2024
4f1baec
prevent embed examine showing up if EmbedOnThrow = false
angelofallars Dec 6, 2024
7513407
Merge branch 'throwing-overhaul' of github.com:angelofallars/Einstein…
angelofallars Dec 6, 2024
06a8cee
Fix Rules (#1321)
VMSolidus Dec 6, 2024
9989c4d
Automatic Changelog Update (#1321)
SimpleStation14 Dec 6, 2024
671c82d
Merge branch 'master' into throwing-overhaul
angelofallars Dec 6, 2024
a1d2b35
style update on a few files
angelofallars Dec 7, 2024
f78c93b
throwing balance changes
angelofallars Dec 7, 2024
7100a7c
buff floor tiles and increase floortile prying speed
angelofallars Dec 7, 2024
8b46638
clarify that embeds with zero damage are harmless in damage examine
angelofallars Dec 7, 2024
8f8f1fa
reduce stamina cost of defib throw
angelofallars Dec 7, 2024
ec650c4
Uplink: Remove Deception Category (#1309)
sleepyyapril Dec 7, 2024
5d64873
Automatic Changelog Update (#1309)
SimpleStation14 Dec 7, 2024
0c60671
[Feat] Bring Back Die Glorious Death, Hijack And Ian's Meat Traitor O…
Remuchi Dec 7, 2024
3ae4370
Automatic Changelog Update (#1323)
SimpleStation14 Dec 7, 2024
c543aa5
Merge branch 'master' into throwing-overhaul
sleepyyapril Dec 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 13 additions & 13 deletions Content.Client/Access/UI/AccessOverriderWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public AccessOverriderWindow(AccessOverriderBoundUserInterface owner, IPrototype
{
if (!prototypeManager.TryIndex(access, out var accessLevel))
{
logMill.Error($"Unable to find accesslevel for {access}");
logMill.Error($"Unable to find access level for {access}");
continue;
}

Expand Down Expand Up @@ -66,11 +66,11 @@ public void UpdateState(AccessOverriderBoundUserInterfaceState state)

if (state.MissingPrivilegesList != null && state.MissingPrivilegesList.Any())
{
List<string> missingPrivileges = new List<string>();
var missingPrivileges = new List<string>();

foreach (string tag in state.MissingPrivilegesList)
{
string privilege = Loc.GetString(_prototypeManager.Index<AccessLevelPrototype>(tag)?.Name ?? "generic-unknown");
var privilege = Loc.GetString(_prototypeManager.Index<AccessLevelPrototype>(tag)?.Name ?? "generic-unknown");
missingPrivileges.Add(privilege);
}

Expand All @@ -83,20 +83,20 @@ public void UpdateState(AccessOverriderBoundUserInterfaceState state)
foreach (var (accessName, button) in _accessButtons)
{
button.Disabled = !interfaceEnabled;
if (interfaceEnabled)
{
button.Pressed = state.TargetAccessReaderIdAccessList?.Contains(accessName) ?? false;
button.Disabled = (!state.AllowedModifyAccessList?.Contains(accessName)) ?? true;
}
if (!interfaceEnabled)
return;

button.Pressed = state.TargetAccessReaderIdAccessList?.Contains<ProtoId<AccessLevelPrototype>>(accessName) ?? false;
button.Disabled = (!state.AllowedModifyAccessList?.Contains<ProtoId<AccessLevelPrototype>>(accessName)) ?? true;
}
}

private void SubmitData()
{
private void SubmitData() =>
_owner.SubmitData(

// Iterate over the buttons dictionary, filter by `Pressed`, only get key from the key/value pair
_accessButtons.Where(x => x.Value.Pressed).Select(x => new ProtoId<AccessLevelPrototype>(x.Key)).ToList());
}
_accessButtons.Where(x => x.Value.Pressed)
.Select(x => new ProtoId<AccessLevelPrototype>(x.Key))
.ToList()
);
}
}
51 changes: 51 additions & 0 deletions Content.Client/Atmos/Consoles/AtmosAlertsComputerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public sealed partial class AtmosAlertsComputerWindow : FancyWindow
{
private readonly IEntityManager _entManager;
private readonly SpriteSystem _spriteSystem;
private readonly SharedNavMapSystem _navMapSystem;

private EntityUid? _owner;
private NetEntity? _trackedEntity;
Expand All @@ -49,6 +50,7 @@ public AtmosAlertsComputerWindow(AtmosAlertsComputerBoundUserInterface userInter
RobustXamlLoader.Load(this);
_entManager = IoCManager.Resolve<IEntityManager>();
_spriteSystem = _entManager.System<SpriteSystem>();
_navMapSystem = _entManager.System<SharedNavMapSystem>();

// Pass the owner to nav map
_owner = owner;
Expand Down Expand Up @@ -181,6 +183,9 @@ public void UpdateUI(EntityCoordinates? consoleCoords, AtmosAlertsComputerEntry[
// Add tracked entities to the nav map
foreach (var device in console.AtmosDevices)
{
if (!device.NetEntity.Valid)
continue;

if (!NavMap.Visible)
continue;

Expand Down Expand Up @@ -272,6 +277,34 @@ public void UpdateUI(EntityCoordinates? consoleCoords, AtmosAlertsComputerEntry[
else
MasterTabContainer.SetTabTitle(0, Loc.GetString("atmos-alerts-window-tab-alerts", ("value", activeAlarmCount)));

// Update sensor regions
NavMap.RegionOverlays.Clear();
var prioritizedRegionOverlays = new Dictionary<NavMapRegionOverlay, int>();

if (_owner != null &&
_entManager.TryGetComponent<TransformComponent>(_owner, out var xform) &&
_entManager.TryGetComponent<NavMapComponent>(xform.GridUid, out var navMap))
{
var regionOverlays = _navMapSystem.GetNavMapRegionOverlays(_owner.Value, navMap, AtmosAlertsComputerUiKey.Key);

foreach (var (regionOwner, regionOverlay) in regionOverlays)
{
var alarmState = GetAlarmState(regionOwner);

if (!TryGetSensorRegionColor(regionOwner, alarmState, out var regionColor))
continue;

regionOverlay.Color = regionColor;

var priority = (_trackedEntity == regionOwner) ? 999 : (int)alarmState;
prioritizedRegionOverlays.Add(regionOverlay, priority);
}

// Sort overlays according to their priority
var sortedOverlays = prioritizedRegionOverlays.OrderBy(x => x.Value).Select(x => x.Key).ToList();
NavMap.RegionOverlays = sortedOverlays;
}

// Auto-scroll re-enable
if (_autoScrollAwaitsUpdate)
{
Expand Down Expand Up @@ -300,6 +333,24 @@ private void AddTrackedEntityToNavMap(AtmosAlertsDeviceNavMapData metaData, Atmo
NavMap.TrackedEntities[metaData.NetEntity] = blip;
}

private bool TryGetSensorRegionColor(NetEntity regionOwner, AtmosAlarmType alarmState, out Color color)
{
color = Color.White;

var blip = GetBlipTexture(alarmState);

if (blip == null)
return false;

// Color the region based on alarm state and entity tracking
color = blip.Value.Item2 * new Color(154, 154, 154);

if (_trackedEntity != null && _trackedEntity != regionOwner)
color *= Color.DimGray;

return true;
}

private void UpdateUIEntry(AtmosAlertsComputerEntry entry, int index, Control table, AtmosAlertsComputerComponent console, AtmosAlertsFocusDeviceData? focusData = null)
{
// Make new UI entry if required
Expand Down
9 changes: 6 additions & 3 deletions Content.Client/Chat/UI/EmotesMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System.Numerics;
using System.Numerics;
using Content.Client.UserInterface.Controls;
using Content.Shared.Chat.Prototypes;
using Content.Shared.Speech;
using Content.Shared.Whitelist;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface.Controls;
Expand All @@ -19,6 +20,7 @@ public sealed partial class EmotesMenu : RadialMenu
[Dependency] private readonly ISharedPlayerManager _playerManager = default!;

private readonly SpriteSystem _spriteSystem;
private readonly EntityWhitelistSystem _whitelistSystem;

public event Action<ProtoId<EmotePrototype>>? OnPlayEmote;

Expand All @@ -28,6 +30,7 @@ public EmotesMenu()
RobustXamlLoader.Load(this);

_spriteSystem = _entManager.System<SpriteSystem>();
_whitelistSystem = _entManager.System<EntityWhitelistSystem>();

var main = FindControl<RadialContainer>("Main");

Expand All @@ -37,8 +40,8 @@ public EmotesMenu()
var player = _playerManager.LocalSession?.AttachedEntity;
if (emote.Category == EmoteCategory.Invalid ||
emote.ChatTriggers.Count == 0 ||
!(player.HasValue && (emote.Whitelist?.IsValid(player.Value, _entManager) ?? true)) ||
(emote.Blacklist?.IsValid(player.Value, _entManager) ?? false))
!(player.HasValue && _whitelistSystem.IsWhitelistPassOrNull(emote.Whitelist, player.Value)) ||
_whitelistSystem.IsBlacklistPass(emote.Blacklist, player.Value))
continue;

if (!emote.Available &&
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private void UpdatePanelInfo(ChemMasterBoundUserInterfaceState state)
};
bufferHBox.AddChild(bufferVol);

foreach (var (reagent, quantity) in state.BufferReagents)
foreach (var (reagent, quantity) in state.BufferReagents.OrderBy(x => x.Reagent.Prototype))
{
// Try to get the prototype for the given reagent. This gives us its name.
_prototypeManager.TryIndex(reagent.Prototype, out ReagentPrototype? proto);
Expand Down
6 changes: 5 additions & 1 deletion Content.Client/Construction/UI/ConstructionMenuPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Client.UserInterface.Systems.MenuBar.Widgets;
using Content.Shared.Construction.Prototypes;
using Content.Shared.Tag;
using Content.Shared.Whitelist;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Placement;
Expand All @@ -23,13 +24,15 @@ namespace Content.Client.Construction.UI
/// </summary>
internal sealed class ConstructionMenuPresenter : IDisposable
{
[Dependency] private readonly EntityManager _entManager = default!;
[Dependency] private readonly IEntitySystemManager _systemManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IPlacementManager _placementManager = default!;
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;

private readonly IConstructionMenuView _constructionView;
private readonly EntityWhitelistSystem _whitelistSystem;

private ConstructionSystem? _constructionSystem;
private ConstructionPrototype? _selected;
Expand Down Expand Up @@ -78,6 +81,7 @@ public ConstructionMenuPresenter()
// This is a lot easier than a factory
IoCManager.InjectDependencies(this);
_constructionView = new ConstructionMenu();
_whitelistSystem = _entManager.System<EntityWhitelistSystem>();

// This is required so that if we load after the system is initialized, we can bind to it immediately
if (_systemManager.TryGetEntitySystem<ConstructionSystem>(out var constructionSystem))
Expand Down Expand Up @@ -157,7 +161,7 @@ private void OnViewPopulateRecipes(object? sender, (string search, string catago

if (_playerManager.LocalSession == null
|| _playerManager.LocalEntity == null
|| (recipe.EntityWhitelist != null && !recipe.EntityWhitelist.IsValid(_playerManager.LocalEntity.Value)))
|| _whitelistSystem.IsWhitelistFail(recipe.EntityWhitelist, _playerManager.LocalEntity.Value))
continue;

if (!string.IsNullOrEmpty(search))
Expand Down
5 changes: 5 additions & 0 deletions Content.Client/Damage/DamageOtherOnHitSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using Content.Shared.Damage.Systems;

namespace Content.Client.Damage;

public sealed class DamageOtherOnHitSystem : SharedDamageOtherOnHitSystem;
2 changes: 1 addition & 1 deletion Content.Client/Guidebook/GuidebookSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private void OnGuidebookControlsTestInteractHand(EntityUid uid, GuidebookControl

public void FakeClientActivateInWorld(EntityUid activated)
{
var activateMsg = new ActivateInWorldEvent(GetGuidebookUser(), activated);
var activateMsg = new ActivateInWorldEvent(GetGuidebookUser(), activated, true);
RaiseLocalEvent(activated, activateMsg);
}

Expand Down
Loading
Loading