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

Update 11/25/2024 #112

Merged
merged 41 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
dfb12e5
Start of Lore Documents
VMSolidus Nov 30, 2024
2a8bf58
Finally Done
VMSolidus Dec 1, 2024
9ef8252
Update Credits (#1300)
github-actions[bot] Dec 1, 2024
386fd77
Merge branch 'master' into Lore-Documentation
sleepyyapril Dec 1, 2024
a535d98
Loadouts Lore Documentation (#1298)
sleepyyapril Dec 1, 2024
8a368bb
Automatic Changelog Update (#1298)
SimpleStation14 Dec 1, 2024
932f9e3
Fashion Update: Earrings & Makeup (#1299)
angelofallars Dec 1, 2024
b05ab8e
Automatic Changelog Update (#1299)
SimpleStation14 Dec 1, 2024
1bab6b8
♂️ Add Male Arachne (#1301)
angelofallars Dec 1, 2024
5476ee0
Automatic Changelog Update (#1301)
SimpleStation14 Dec 1, 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
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
e2ee77d
Atmospheric Alerts Computer Upgrades (#1313)
zelezniciar1 Dec 5, 2024
6c9270d
Automatic Changelog Update (#1313)
SimpleStation14 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
50eb217
Several Small Map Fixes to Europa (#1319)
rbertoche Dec 6, 2024
f4152a5
Automatic Changelog Update (#1319)
SimpleStation14 Dec 6, 2024
06a8cee
Fix Rules (#1321)
VMSolidus Dec 6, 2024
9989c4d
Automatic Changelog Update (#1321)
SimpleStation14 Dec 6, 2024
1170a6d
Merge remote-tracking branch 'EE-Master/master' into Update-11/25/2024
VMSolidus Dec 6, 2024
1b1f629
Return of DS14 Rules
VMSolidus Dec 6, 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
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
8 changes: 4 additions & 4 deletions Content.Client/Lobby/UI/LoadoutPreferenceSelector.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,21 @@ public LoadoutPreferenceSelector(LoadoutPrototype loadout, JobPrototype highJob,

// Manage the info button
void UpdateGuidebook() => GuidebookButton.Visible =
prototypeManager.HasIndex<GuideEntryPrototype>(DefaultLoadoutInfoGuidebook + Loadout.ID);
prototypeManager.HasIndex<GuideEntryPrototype>(loadout.GuideEntry);
UpdateGuidebook();
prototypeManager.PrototypesReloaded += _ => UpdateGuidebook();

GuidebookButton.OnPressed += _ =>
{
if (!prototypeManager.TryIndex<GuideEntryPrototype>(DefaultLoadoutInfoGuidebook, out var guideRoot))
if (!prototypeManager.TryIndex<GuideEntryPrototype>(loadout.GuideEntry, out var guideRoot))
return;

var guidebookController = UserInterfaceManager.GetUIController<GuidebookUIController>();
//TODO: Don't close the guidebook if its already open, just go to the correct page
guidebookController.ToggleGuidebook(
new Dictionary<string, GuideEntry> { { DefaultLoadoutInfoGuidebook, guideRoot } },
new Dictionary<string, GuideEntry> { { loadout.GuideEntry, guideRoot } },
includeChildren: true,
selected: DefaultLoadoutInfoGuidebook + Loadout.ID);
selected: loadout.GuideEntry);
};

// Create a checkbox to get the loadout
Expand Down
Loading
Loading