Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request new-frontiers-14#1346 from new-frontiers-14/may24-…
Browse files Browse the repository at this point in the history
…upstream-merge

* Fix sprite for coder socks (#27553)

* add noSpawn: true to tippy (#27538)

* Update Patrons.yml (#27560)

* Make female reptilians use female cry sound instead of male (#27563)

* Add explosion.can_create_vacuum cvar (#27548)

* Simplified and consistent honkbot & jonkbot recipes (#27535)

simplified honkbot & jonkbot recipes

* Fix Loadout Editor not closing when Character Editor is closed. (#27539)

Remove duplicate UpdateRoleRequirements call screwing up update ordering

* Automatic changelog update

* Add correct lawyer bags to loadouts (#27573)

* add lawyerbackpack to locale

* lawyer backpack group

* Add bags

* add loadout group

* Be less lazy and spot formatting problems

* add ghostnado button to warp menu (#27556)

* add ghostnado button to warp menu

* translator ops

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>

* Make insert telecrystal message only show to player (#27585)

Restrict message to player and fix grammar

Co-authored-by: Plykiya <[email protected]>

* Fix antag verb incorrectly giving role to admin player instead of target (#27584)

Fix antag verb giving role to admin player instead of target

* Automatic changelog update

* Gildlager empty bottle fix (#27581)

* rename goldschlager bottle

* migration

* fix rsi

* Automatic changelog update

* Fix pinpointer errors for missing sprite layer (#27582)

* Enforce inequality between different species (#27586)

Fix missing species check in humanoid equality operation

* Grilles now take Structural Damage (#27596)

damageContainer: Inorganic -> StructuralInorganic

* Add DoorBumpOpener to BaseMobAdultSlimes (#27591)

* Automatic changelog update

* Make immovable rod announce at the end of the event (#27587)

* Automatic changelog update

* Optimise navmaps significantly (#27528)

* Optimise navmaps significantly

- Reduce the delta state size significantly.
- Remove AirtightChangedEvent because this will spam them out constantly.

* weh

* review

---------

Co-authored-by: ElectroJr <[email protected]>

* Automatic changelog update

* Update submodule to 221.2.0 (#27603)

* Fix effects (#27533)

* Fix effects

- Fix muzzle flash rotations.
- Fix effects so they update every frame.
- Fix effects tanking client performance.

* Fix merge artifact

* Automatic changelog update

* Replace NavMap dictionaries with int[] (#27602)

* Replace NavMap dictionaries with int[]

* Remove badly named const

* Remove unnecessary offset

* Prioritize airlocks

* Fix Gas Analyzers not opening (#27610)

* Automatic changelog update

* Track Admin Game Time (#24945)

* AdminTime tracked

* Attempts to fix PR issues.

* Admin afk logic update

* Automatic changelog update

* Make UseDelay SetLength do EnsureComp (#27601)

Make UseDelay.SetLength do EnsureComp

* Disarm throws item in random direction (#27589)

* Disarm throws item in random direction

* Slightly increased offset

* Return the return

---------

Co-authored-by: Plykiya <[email protected]>

* emote wheel fixes (#27545)

* cheese

* Update disease_emotes.yml

* Automatic changelog update

* added a bunch more fox noises (#27578)

* fuck it we ball

* added recommended copyright information

* revised copyright license

* revised copyright license x2

* finalized the fops

# reduced the number of audio clips
# adjusted the volume of all fox sounds to be consistent with each other

* added new sounds to the overall fox parent mob because we forgot oopsie

* Automatic changelog update

* Improve CMO's lab coat (#27551)

This Aims at balancing the viability of the CMO's lab coat compared to his other available options, those being his winter coat (which is just a straight up upgrade) and his hardsuit.

and also its suppose to level him with RD since RD's lab coat has special rad protection

Co-authored-by: Michael <[email protected]>

* Automatic changelog update

* Remove airtight flaps from the construction menu (#27619)

They are meant to be mapping only items.

* Automatic changelog update

* Wine and beer bottles can be inserted into booze dispenser (#27626)

Fixes tags on wine and beer bottles

* Automatic changelog update

* small SpawnItemsOnUse cleanup (#27625)

* small SpawnItemsOnUse cleanup

* that one was not needed

* make ducky slippers waddle (#27628)

Co-authored-by: deltanedas <@deltanedas:kde.org>

* Fix SpawnItemsOnUse not playing sound (#27621)

Made SpamItemsOnUse play sound at entity coordinates instead of parenting

* Automatic changelog update

* Fix UI interaction priority (#27631)

* Automatic changelog update

* Increase Blast Grenade Recipe Cost and Add Research Requirement (#27580)

* Adjust blast grenade recipe

* Move blast grenades into tier 2 research

* Move blast grenades to dynamic recipes for secfab and autolathe

---------

Co-authored-by: Plykiya <[email protected]>

* Automatic changelog update

* Add EntityWhitelistSystem (#27632)

* Add EntityWhitelistSystem

* Sandbox fix

* update test

* Add syndicate sleeper agents random event (#27501)

* Intercept rule (#10)

* add

* b

* add this back lol

* fix test fails (alert levels dont have prototypes)

* tweaks

* Automatic changelog update

* Space Ninjas auto-toggle internals after spawning (#25083)

* fix engine version

* actually fix engine version

* Automatically activated breathing masks

* weh

* who needed that component anyway

* check if internals are already running

* Update Content.Server/Atmos/Components/BreathToolComponent.cs

Co-authored-by: metalgearsloth <[email protected]>

* Update Content.Server/Body/Systems/InternalsSystem.cs

Co-authored-by: metalgearsloth <[email protected]>

* prediction

* record struct event

* remove delayed activation, instead ensure that masks spawn last

* leftover

* engine version

* re-implement

---------

Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* Fixes the grammar for the captain's supervisor (#27638)

Fixes the grammar on the captain's supervisor

* Red bool update (#27597)

* the meat and potatoes

yuh yuh yuh

* what the hell is a copyright?

am I right?

* Automatic changelog update

* Allow EMP implants to be used while stunned or cuffed. (#27644)

Update types.yml

* Automatic changelog update

* Revert "Make immovable rod announce at the end of the event" and "Rod event has a proper annoucement" (#27645)

* Revert "Make immovable rod announce at the end of the event (#27587)"

This reverts commit efceaa8.

* Update immovable-rod.ftl

* Geras bug fixes (#27308)

* Geras bug fixes

* oops

* its as shrimple as that

toggled transferName in the polymorph yml instead of using the system to manually change it

* its as shrimple as that (2.0)

fixed reviews for zombies having a dummy action, instead - properly implemented removal of action

* its as shrimple as that (3.0)

fixed tests by removing nameidentifier from slime (its already inherited, anyway)

* Automatic changelog update

* Ninja's pinpointer tracks the research server (#27552)

Change the tracked component on the ninja's pinpointer from BecomesStation to Research Server

* Automatic changelog update

* Fix some gamerules' round summary not working (#27654)

Update GameRuleSystem.cs

* Automatic changelog update

* Change return to continue in gamerulesystem (#27656)

Update GameRuleSystem.cs

* Rename Lizard urist (#27652)

* Added Train station into map rotation (#27534)

* Update default.yml

* more sec

* Automatic changelog update

* Pathological Liar (#27618)

* content

* upgrade

* n't

* ye ya

* Update speech-liar.ftl

* Mith replacement ideas

* fix

* more!

* Revert "more!"

This reverts commit 6d10bdf694985c525a2b451ed39380f975059b44.

* Update Content.Server/Speech/Components/ReplacementAccentComponent.cs

---------

Co-authored-by: Kara <[email protected]>

* Vox customization fixes & updating (#27663)

vox customization

* Automatic changelog update

* npc can no longer attack you through a locker (#27677)

* Automatic changelog update

* Security belts can now hold more items commonly carried by secoffs/HoS (#27674)

holobarrier

* Automatic changelog update

* Floodlights now have medium powercells instead of small (#27672)

mediumcellfloodlight

* Automatic changelog update

* More descriptions for the beakers in the status panel (#27669)

Bottles

Descriptions for status panel

* Update Credits (#27681)

Co-authored-by: PJBot <[email protected]>

* Revert "npc can no longer attack you through a locker" (#27680)

Revert "npc can no longer attack you through a locker (#27677)"

This reverts commit 83b486b.

* Scattershot antag fixes (#27429)

* scattershot antag fixes

* this too?

* dawg fuck this code

* ok so we kinda need this?

* Rename ChemCleanBoodstream.cs (#27691)

* Add default whistle + whistles reorganize (#27676)

* Add default whistle + whistle reorganize

* aaa

* fux?

* fiiiiix???

* Revert "fiiiiix???"

This reverts commit 15353465d58db615185afa8c549e1819099c1a5b.

* Apply suggestions from code review

Co-authored-by: Tayrtahn <[email protected]>

---------

Co-authored-by: Tayrtahn <[email protected]>

* Automatic changelog update

* Use dotnet run for the run batch files instead of directly calling the exe (#27698)

* Use dotnet run for the run batch files instead of directly calling the exe

* FUCK

* Emergency Tank + Plasma Can visible on suit storage slot (#27598)

* Suitstorage Sprites + Plasma tank slots

* Fix some extra brackets

* Cache regex instances in most cases (#27699)

Using static Regex functions that take in a pattern is bad because the pattern constantly needs to be re-parsed. With space-wizards/RobustToolbox#5107, the engine has an analyzer to warn for this practice now.

This commit brings most of content up to snuff already, though some of the tricker code I left for somebody else.

* Update submodule to 222.0.0 (#27700)

* Remove useless line in runclient (#27701)

I forgor

* welding masks on utility belts (#27694)

* Automatic changelog update

* Add solution temperature to chemical analysis goggles (#27693)

yes

* Automatic changelog update

* Expeditions audio tweaks (#27524)

- Now uses a SoundCollection.
- Now properly handles going between maps (audio rework mucho wow).
- GetAudioLength used so it can properly countdown ANY song (wow audio rework wow wow).

* Added new icons for the emote wheel (#27541)

* Added new icons for the emote wheel

* Corrected weh path

* Changed whistle to better match other vocal emotes. Modified honk icon to match dimensions of box. Corrected chirp and chitter emote icons.

* Cleaned up edges of icons

* Added attributions.yml to emotes folder

* Automatic changelog update

* Fix AlertControl throwing an error if the sprite view entity is deleted multiple times (#27690)

* Fix AlertControl throwing an error if disposed multiple times

* Replace default check with deleted check

* Fix tests (#27711)

* Fix tests

* Fix test fail

* Apply same fix to other tests

* New Salvage song: Deadline (#27707)

Deadline

* fix(ui): Fix shuttle control radius marking text vertical spacing (#27695)

* Automatic changelog update

* Dock device link port (#27646)

* Add dock device link port

* SpawnAndDeleteAllEntitiesInTheSameSpot moment

* The fuck is TryStopNukeOpsFromConstantlyFailing??

Do we have a new test that can randomly fail?

* Automatic changelog update

* Update submodule to 222.1.0 (#27714)

* Fix UIs and various dependencies

* changelog and yeeting killer tomatoes

* delete killer seeds

* ui yml rewrites

* telecomms changes

* yml updates

* more UI fixes

* gamerule changes

* no holy

* YAML cleanup 1 - CPR Boxes & Mobs

* Update RespiratorComponent.cs

* Pen & Others

* Events, barber spawners and lathe

* Cleanup

* cleanup

* modifier_sets issues

* more cleanup

* cleanup

* cleanup

* jobs cleanup

* yaml

* database fix

* Job list cleanup

* Security Guard

* loadouts bank accounts integration

* loadout bank integration UI fixes

* hide unwanted job categories

* jumpsuits base files and general organization

* belts necks pdas

* linter

* Cleanup

* Liquidated

* Jobs Edits Part 1

* Cleanup

* bags gloves shoes

* eyes and hats

* linter

* name fixing

* fix

* security cleanup naming

* coats

* tools face and fun

* Fix preference loading bugs (#27742)

First bug: if an error occured during pref loading code, it would fail. If the person then readied up, it would likely cause the round to fail to start.

Why could they ready up? The code only checks that the prefs finished loading, not that they finished loading *successfully*. Whoops.

Anyways, now people get kicked if their prefs fail to load. And I improved the error handling.

Second bug: if a user disconnected while their prefs were loading, it would cause an exception. This exception would go unobserved on lobby servers or raise through gameticker on non-lobby servers.

This happened even on a live server once and then triggered the first bug, but idk how.

Fixed this by properly plumbing through cancellation into the preferences loading code. The stuff is now cancelled properly.

Third bug: if somebody has a loadout item with a playtime requirement active, load-time sanitization of player prefs could run into a race condition because the sanitization can happen *before* play time was loaded.

Fixed by moving pref sanitizations to a later stage in the load process.

(cherry picked from commit 7a38b22)

* Fix preferences sent to client not being sanitized (#27789)

Fucking whoops

In #27742 I made it so sanitization of character profiles was moved to be *after* database load. Except that means I moved it to be after the copy of all character profiles got sent to the client.

Move the sending to *also* be in that second load stage, and rename it. Fixes the issue.

(cherry picked from commit 9efe4dc)

* trinkets and contractor shenanigans

* contractor

* tryfix

* Revert "fix cargo teleporter (#27255)"

This reverts commit 1bfc63c

* fixes

* vulp stop translater spawn for now

* refresh prefs async

* fix clarpy id

* Create nfsd_loadout_groups.txt

* Silent down the cargo computer

* pilot

* pilot loadouts

* more pilot

* pilot

* security guard clean up before adding rest

to make it same format

* Update role_loadouts.yml

* more

* merc 1

* fix order

* merc 2

* ftl job names

* sheriff

* sheriff+

* sheriff quick fix

* sprite be fucked

* bailiff

* SR loadouts

* sergeant

* fix folder name

* Fix folder name

* Fix Folder Name

* Fix Folder Name

* file locations Nfsd fix

* fix

* deputy

* fix

* emote wheel fixes

* fix

* Update bags.yml

* cadet

* Update cadet_loadout_groups.yml

* fix handedness

* cargo and vending pass

* fix fills

* more yeetus

* Update messenger.yml

* Emotional Support

* Update npc.yml

* Update role_loadouts.yml

* Update astrovend.yml

* Update heads.yml

* Update industrial.yml

* Update gloves.yml

* Update gloves.yml

* Detective

* pda

* fix

* brig

* map updates and linter fix

* cargo cleanup

* home stretch

* stc mail valet

* cleanup

* brigymedic

* brigmedic

* fix names

* Update face.yml

* cleanups

* cleanup 2

* cleanup 3

* Frontier events pass

* cleanup 4

* Update senior_officer_loadout_groups.yml

* Tippy Clippy

* tips

* shoes

* new-frontiers-14#1356

Fix new-frontiers-14#1356

* fix legs and hands order

* bus music

* DeltaV Jukebox additions

* DeltaV Jukebox  (new-frontiers-14#1130)

Adds the first DeltaV Jukebox addition.

* Title tracks and a few others

* Tracks & attributions

added mono conversion remark to all entries in the attributions file, added three other tracks

* Update attributions.yml

* Apply suggestions from code review

Co-authored-by: Danger Revolution! <[email protected]>
Signed-off-by: Colin-Tel <[email protected]>

---------

Signed-off-by: Colin-Tel <[email protected]>
Co-authored-by: Danger Revolution! <[email protected]>
Co-authored-by: Azzy <[email protected]>

---------

Signed-off-by: Colin-Tel <[email protected]>
Co-authored-by: Psychpsyo <[email protected]>
Co-authored-by: lzk <[email protected]>
Co-authored-by: DrSmugleaf <[email protected]>
Co-authored-by: no <[email protected]>
Co-authored-by: K-Dynamic <[email protected]>
Co-authored-by: Ciac32 <[email protected]>
Co-authored-by: PJBot <[email protected]>
Co-authored-by: Verm <[email protected]>
Co-authored-by: deltanedas <[email protected]>
Co-authored-by: Plykiya <[email protected]>
Co-authored-by: Plykiya <[email protected]>
Co-authored-by: NotSoDana <[email protected]>
Co-authored-by: ShadowCommander <[email protected]>
Co-authored-by: FungiFellow <[email protected]>
Co-authored-by: Simon <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: ElectroJr <[email protected]>
Co-authored-by: Leon Friedrich <[email protected]>
Co-authored-by: Repo <[email protected]>
Co-authored-by: Tayrtahn <[email protected]>
Co-authored-by: Mr. 27 <[email protected]>
Co-authored-by: nao fujiwara <[email protected]>
Co-authored-by: Michael <[email protected]>
Co-authored-by: Michael <[email protected]>
Co-authored-by: Vasilis <[email protected]>
Co-authored-by: Lamrr <[email protected]>
Co-authored-by: slarticodefast <[email protected]>
Co-authored-by: Errant <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: Hanz <[email protected]>
Co-authored-by: Jay <[email protected]>
Co-authored-by: Ed <[email protected]>
Co-authored-by: Just-a-Unity-Dev <[email protected]>
Co-authored-by: nikthechampiongr <[email protected]>
Co-authored-by: Kara <[email protected]>
Co-authored-by: Flareguy <[email protected]>
Co-authored-by: Tyzemol <[email protected]>
Co-authored-by: Alzore <[email protected]>
Co-authored-by: Pok <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nemanja <[email protected]>
Co-authored-by: RumiTiger <[email protected]>
Co-authored-by: Pieter-Jan Briers <[email protected]>
Co-authored-by: Killerqu00 <[email protected]>
Co-authored-by: Ty Ashley <[email protected]>
Co-authored-by: T-Stalker <[email protected]>
Co-authored-by: exincore <[email protected]>
Co-authored-by: 0x6273 <[email protected]>
Co-authored-by: Dvir <[email protected]>
Co-authored-by: Colin-Tel <[email protected]>
Co-authored-by: Danger Revolution! <[email protected]>
Co-authored-by: Azzy <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 2,590 changed files with 249,325 additions and 49,458 deletions.
3 changes: 1 addition & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ indent_style = space
tab_width = 4

# New line preferences
end_of_line = crlf:suggestion
#end_of_line = crlf
insert_final_newline = true
trim_trailing_whitespace = true

Expand Down Expand Up @@ -104,7 +104,6 @@ csharp_preferred_modifier_order = public, private, protected, internal, new, abs

# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:silent
csharp_style_namespace_declarations = file_scoped:suggestion

#### C# Formatting Rules ####

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/conflict-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Check Merge Conflicts

on:
push:
branches:
- master
pull_request_target:
types:
- opened
- synchronize
- reopened
- ready_for_review

jobs:
Label:
if: github.actor != 'PJBot'
if: ( github.event.pull_request.draft == false ) && ( github.actor != 'PJBot' )
runs-on: ubuntu-latest
steps:
- name: Check for Merge Conflicts
uses: ike709/actions-label-merge-conflict@9eefdd17e10566023c46d2dc6dc04fcb8ec76142
uses: eps1lon/actions-label-merge-conflict@v3.0.0
with:
dirtyLabel: "Merge Conflict"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
4 changes: 2 additions & 2 deletions Content.Benchmarks/MapLoadBenchmark.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand Down Expand Up @@ -46,7 +46,7 @@ public async Task Cleanup()
PoolManager.Shutdown();
}

public static readonly string[] MapsSource = { "Empty", "Box", "Bagel", "Dev", "CentComm", "Atlas", "Core", "TestTeg", "Saltern", "Packed", "Omega", "Cluster", "Reach", "Origin", "Meta", "Marathon", "Europa", "MeteorArena", "Fland", "Barratry" };
public static readonly string[] MapsSource = { "Empty", "Box", "Bagel", "Dev", "CentComm", "Atlas", "Core", "TestTeg", "Saltern", "Packed", "Omega", "Cluster", "Reach", "Origin", "Meta", "Marathon", "Europa", "MeteorArena", "Fland", "Barratry", "Oasis" };

[ParamsSource(nameof(MapsSource))]
public string Map;
Expand Down
2 changes: 1 addition & 1 deletion Content.Benchmarks/SpawnEquipDeleteBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ await _pair.Server.WaitPost(() =>
for (var i = 0; i < N; i++)
{
_entity = server.EntMan.SpawnAttachedTo(Mob, _coords);
_spawnSys.EquipStartingGear(_entity, _gear, null);
_spawnSys.EquipStartingGear(_entity, _gear);
server.EntMan.DeleteEntity(_entity);
}
});
Expand Down
4 changes: 1 addition & 3 deletions Content.Client/Access/IdCardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Content.Client.Access;

public sealed class IdCardSystem : SharedIdCardSystem
{
}
public sealed class IdCardSystem : SharedIdCardSystem;
6 changes: 3 additions & 3 deletions Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ private void OnJobChanged(string newJob)
SendMessage(new AgentIDCardJobChangedMessage(newJob));
}

public void OnJobIconChanged(string newJobIcon)
public void OnJobIconChanged(string newJobIconId)
{
SendMessage(new AgentIDCardJobIconChangedMessage(newJobIcon));
SendMessage(new AgentIDCardJobIconChangedMessage(newJobIconId));
}

/// <summary>
Expand All @@ -57,7 +57,7 @@ protected override void UpdateState(BoundUserInterfaceState state)

_window.SetCurrentName(cast.CurrentName);
_window.SetCurrentJob(cast.CurrentJob);
_window.SetAllowedIcons(cast.Icons);
_window.SetAllowedIcons(cast.Icons, cast.CurrentJobIconId);
}

protected override void Dispose(bool disposing)
Expand Down
6 changes: 5 additions & 1 deletion Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public AgentIDCardWindow(AgentIDCardBoundUserInterface bui)
JobLineEdit.OnFocusExit += e => OnJobChanged?.Invoke(e.Text);
}

public void SetAllowedIcons(HashSet<string> icons)
public void SetAllowedIcons(HashSet<string> icons, string currentJobIconId)
{
IconGrid.DisposeAllChildren();

Expand Down Expand Up @@ -79,6 +79,10 @@ public void SetAllowedIcons(HashSet<string> icons)
jobIconButton.AddChild(jobIconTexture);
jobIconButton.OnPressed += _ => _bui.OnJobIconChanged(jobIcon.ID);
IconGrid.AddChild(jobIconButton);

if (jobIconId.Equals(currentJobIconId))
jobIconButton.Pressed = true;

i++;
}
}
Expand Down
5 changes: 5 additions & 0 deletions Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public IdCardConsoleWindow(IdCardConsoleBoundUserInterface owner, IPrototypeMana

foreach (var job in jobs)
{
if (job.HideConsoleVisibility) // Frontier
{
continue;
}

if (!job.OverrideConsoleVisibility.GetValueOrDefault(job.SetPreference))
{
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Content.Client.Administration.Components;

[RegisterComponent, NetworkedComponent]
[RegisterComponent]
public sealed partial class HeadstandComponent : SharedHeadstandComponent
{

Expand Down
5 changes: 2 additions & 3 deletions Content.Client/Administration/Components/KillSignComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@

namespace Content.Client.Administration.Components;

[NetworkedComponent, RegisterComponent]
public sealed partial class KillSignComponent : SharedKillSignComponent
{ }
[RegisterComponent]
public sealed partial class KillSignComponent : SharedKillSignComponent;
7 changes: 5 additions & 2 deletions Content.Client/Administration/Managers/ClientAdminManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,15 @@ void IPostInjectInit.PostInject()

public AdminData? GetAdminData(EntityUid uid, bool includeDeAdmin = false)
{
return uid == _player.LocalEntity ? _adminData : null;
if (uid == _player.LocalEntity && (_adminData?.Active ?? includeDeAdmin))
return _adminData;

return null;
}

public AdminData? GetAdminData(ICommonSession session, bool includeDeAdmin = false)
{
if (_player.LocalUser == session.UserId)
if (_player.LocalUser == session.UserId && (_adminData?.Active ?? includeDeAdmin))
return _adminData;

return null;
Expand Down
23 changes: 23 additions & 0 deletions Content.Client/Administration/Systems/AdminVerbSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using Content.Shared.Administration;
using Content.Shared.Administration.Managers;
using Content.Shared.Mind.Components;
using Content.Shared.Verbs;
using Robust.Client.Console;
using Robust.Shared.Utility;
Expand All @@ -11,10 +14,12 @@ sealed class AdminVerbSystem : EntitySystem
{
[Dependency] private readonly IClientConGroupController _clientConGroupController = default!;
[Dependency] private readonly IClientConsoleHost _clientConsoleHost = default!;
[Dependency] private readonly ISharedAdminManager _admin = default!;

public override void Initialize()
{
SubscribeLocalEvent<GetVerbsEvent<Verb>>(AddAdminVerbs);

}

private void AddAdminVerbs(GetVerbsEvent<Verb> args)
Expand All @@ -33,6 +38,24 @@ private void AddAdminVerbs(GetVerbsEvent<Verb> args)
};
args.Verbs.Add(verb);
}

if (!_admin.IsAdmin(args.User))
return;

if (_admin.HasAdminFlag(args.User, AdminFlags.Admin))
args.ExtraCategories.Add(VerbCategory.Admin);

if (_admin.HasAdminFlag(args.User, AdminFlags.Fun) && HasComp<MindContainerComponent>(args.Target))
args.ExtraCategories.Add(VerbCategory.Antag);

if (_admin.HasAdminFlag(args.User, AdminFlags.Debug))
args.ExtraCategories.Add(VerbCategory.Debug);

if (_admin.HasAdminFlag(args.User, AdminFlags.Fun))
args.ExtraCategories.Add(VerbCategory.Smite);

if (_admin.HasAdminFlag(args.User, AdminFlags.Admin))
args.ExtraCategories.Add(VerbCategory.Tricks);
}
}
}
73 changes: 73 additions & 0 deletions Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Net.Sockets;
using Content.Client.Administration.UI.CustomControls;
using Content.Shared.Administration;
using Content.Shared.CCVar;
using Content.Shared.Database;
using Content.Shared.Roles;
using Robust.Client.AutoGenerated;
Expand All @@ -11,6 +12,7 @@
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
Expand All @@ -32,8 +34,11 @@ public sealed partial class BanPanel : DefaultWindow
// This is less efficient than just holding a reference to the root control and enumerating children, but you
// have to know how the controls are nested, which makes the code more complicated.
private readonly List<CheckBox> _roleCheckboxes = new();
private readonly ISawmill _banpanelSawmill;

[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly ILogManager _logManager = default!;

private enum TabNumbers
{
Expand Down Expand Up @@ -65,6 +70,7 @@ public BanPanel()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
_banpanelSawmill = _logManager.GetSawmill("admin.banpanel");
PlayerList.OnSelectionChanged += OnPlayerSelectionChanged;
PlayerNameLine.OnFocusExit += _ => OnPlayerNameChanged();
PlayerCheckbox.OnPressed += _ =>
Expand Down Expand Up @@ -104,6 +110,11 @@ public BanPanel()
};
SubmitButton.OnPressed += SubmitButtonOnOnPressed;

IpCheckbox.Pressed = _cfg.GetCVar(CCVars.ServerBanIpBanDefault);
HwidCheckbox.Pressed = _cfg.GetCVar(CCVars.ServerBanHwidBanDefault);
LastConnCheckbox.Pressed = _cfg.GetCVar(CCVars.ServerBanUseLastDetails);
EraseCheckbox.Pressed = _cfg.GetCVar(CCVars.ServerBanErasePlayer);

SeverityOption.AddItem(Loc.GetString("admin-note-editor-severity-none"), (int) NoteSeverity.None);
SeverityOption.AddItem(Loc.GetString("admin-note-editor-severity-low"), (int) NoteSeverity.Minor);
SeverityOption.AddItem(Loc.GetString("admin-note-editor-severity-medium"), (int) NoteSeverity.Medium);
Expand Down Expand Up @@ -175,6 +186,39 @@ private void CreateRoleGroup(string roleName, IEnumerable<string> roleList, Colo
c.Pressed = args.Pressed;
}
}

if (args.Pressed)
{
if (!Enum.TryParse(_cfg.GetCVar(CCVars.DepartmentBanDefaultSeverity), true, out NoteSeverity newSeverity))
{
_banpanelSawmill
.Warning("Departmental role ban severity could not be parsed from config!");
return;
}
SeverityOption.SelectId((int) newSeverity);
}
else
{
foreach (var childContainer in RolesContainer.Children)
{
if (childContainer is Container)
{
foreach (var child in childContainer.Children)
{
if (child is CheckBox { Pressed: true })
return;
}
}
}

if (!Enum.TryParse(_cfg.GetCVar(CCVars.RoleBanDefaultSeverity), true, out NoteSeverity newSeverity))
{
_banpanelSawmill
.Warning("Role ban severity could not be parsed from config!");
return;
}
SeverityOption.SelectId((int) newSeverity);
}
};
outerContainer.AddChild(innerContainer);
foreach (var role in roleList)
Expand Down Expand Up @@ -353,6 +397,35 @@ private void OnTypeChanged()
{
TypeOption.ModulateSelfOverride = null;
Tabs.SetTabVisible((int) TabNumbers.Roles, TypeOption.SelectedId == (int) Types.Role);
NoteSeverity? newSeverity = null;
switch (TypeOption.SelectedId)
{
case (int)Types.Server:
if (Enum.TryParse(_cfg.GetCVar(CCVars.ServerBanDefaultSeverity), true, out NoteSeverity serverSeverity))
newSeverity = serverSeverity;
else
{
_banpanelSawmill
.Warning("Server ban severity could not be parsed from config!");
}

break;
case (int) Types.Role:

if (Enum.TryParse(_cfg.GetCVar(CCVars.RoleBanDefaultSeverity), true, out NoteSeverity roleSeverity))
{
newSeverity = roleSeverity;
}
else
{
_banpanelSawmill
.Warning("Role ban severity could not be parsed from config!");
}
break;
}

if (newSeverity != null)
SeverityOption.SelectId((int) newSeverity.Value);
}

private void UpdateSubmitEnabled()
Expand Down
17 changes: 17 additions & 0 deletions Content.Client/Animations/TrackUserComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Numerics;

namespace Content.Client.Animations;

/// <summary>
/// Entities with this component tracks the user's world position every frame.
/// </summary>
[RegisterComponent]
public sealed partial class TrackUserComponent : Component
{
public EntityUid? User;

/// <summary>
/// Offset in the direction of the entity's rotation.
/// </summary>
public Vector2 Offset = Vector2.Zero;
}
20 changes: 20 additions & 0 deletions Content.Client/Atmos/UI/GasAnalyzerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,26 @@ private void GenerateGasDisplay(GasMixEntry gasMix, Control parent)
parent.AddChild(panel);
panel.AddChild(dataContainer);

// Volume label
var volBox = new BoxContainer { Orientation = BoxContainer.LayoutOrientation.Horizontal };

volBox.AddChild(new Label
{
Text = Loc.GetString("gas-analyzer-window-volume-text")
});
volBox.AddChild(new Control
{
MinSize = new Vector2(10, 0),
HorizontalExpand = true
});
volBox.AddChild(new Label
{
Text = Loc.GetString("gas-analyzer-window-volume-val-text", ("volume", $"{gasMix.Volume:0.##}")),
Align = Label.AlignMode.Right,
HorizontalExpand = true
});
dataContainer.AddChild(volBox);

// Pressure label
var presBox = new BoxContainer { Orientation = BoxContainer.LayoutOrientation.Horizontal };

Expand Down
Loading

0 comments on commit 2daf279

Please sign in to comment.