Skip to content

Commit

Permalink
Merge0725 (Nyanotrasen#289)
Browse files Browse the repository at this point in the history
* Automatic changelog update

* Update ContainerOcclusionTest.cs (#9692)

* Identity fixes (#9701)

* Healing tweaks (#9697)

* Automatic changelog update

* Generic morgue visualizer (#9696)

* Remove IActivate (#9705)

* git mv

* purge IActivate

* File scoped NS

* Update misc.yml (#9691)

* cltohes (#9680)

* Update submodule to 0.28.5.0 (#9708)

* mathaotnont (#9711)

* bagl... (#9710)

* Traitor deathmatch ecs (#9714)

* salty (#9712)

* Machine frame ECS (#9713)

* Entity storage whitelist (#9694)

* Update common color to station announcements (#9670)

* Atlas Update 1.6 (#9709)

* Automatic changelog update

* Update shards.yml (#9644)

* Remove `IInteractUsing` (#9718)

* Automatic changelog update

* Remove `IAfterInteract` (#9715)

* remove gas analyzer iafterinteract

* solution transfer + obsolete

* cuffable

* remove

* dart becomestation comp fix (plus render) (#9497)

* dart becomestation comp fix

* minor fixes and changes to ERT shuttle Dart

* Hospital curtains add (#9707)

* curtainss

* sound_mono

* hotfix_curtains

* Automatic changelog update

* [2 lines] fix blinding (#9690)

* Adds blinding + blindfolds (#8688)

* Adds blinding + blindfolds

* Don't break examining lol

* moment

* fix toggle lights behavior

* move checks around

* Sloth review

* Added a salvage funny

* review

* woops

* Switch circle shader

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

* resolve merge conflict

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

* Automatic changelog update

* Re-implement recoil (#9406)

* Re-implement recoil

Playing around with the values atm

* Update constants

* final tweaks

* Automatic changelog update

* Fix zombie percent in the round end summary (#9682)

* Make controlmob not require sentience (#9479)

* Outer clothing nerf (#9143)

* Reduced backpack to 99 size from 100

* Increase hardsuit and softsuit size

* Adds ClothingOuterBaseLarge

* Parenting

* Changed parent base, reduced duplication

* 101 the people have spoken

* 100 backpack cry

* Changes some things to large base 60

* Updates armour based to large

* Large base slowdown 20%

* Speed boost

* Removed syndie eva box

Duffel exists, no need

* Apparently this is an eva suit

* Fixed formatting

* Syndie duffel boosted to 131

To fit a hardsuit plus mask and gas

* Hardsuits to 121 size

No more bagging

* Made heavy clothing 80

* moves syndie eva box to a duffel

* Automatic changelog update

* Muzzle flash enhancements (#9527)

* Automatic changelog update

* remove 1 taser (#9725)

* Remove some tasers (#9727)

* Packed Station Update (#9722)

* RPG-7, Kardashev rifle and Hristov heavy sniper resprites (#9729)

Co-authored-by: and_a <and_a@DESKTOP-RJENGIR>

* Guard against weird renderer bug (#9720)

* Make disposal pipes use generic visualizer (#9672)

* Automatic changelog update

* Add AMIV disease stages (#9637)

* Add AMIV disease stages

* remove unused import

* move stages to top for readability

* monkey immunity to amiv

* Update to use time instead of index

* Revert "Update to use time instead of index"

This reverts commit 6bc83b0d48c167fe30437fa94272a00ed1633c5d.

* add comments

* rerun test

* Automatic changelog update

* Fix bricked welding component (#9741)

* Automatic changelog update

* Make entity storage lookup range positive (#9735)

* Automatic changelog update

* Add uplink command completions (#9742)

* Remove telekinesis (#9737)

* Add batch cooking (#9359)

* Automatic changelog update

* Prevent content from overriding sprite shader (#9036)

* Fix disappearing decals bug (#9608)

* Automatic changelog update

* Make flash prevent handheld light toggle (#9448)

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

* Bring pills back to 50 units maximum (#9626)

* Adds a nuclear pinpointer to the operative and medic operative duffel fills (#9634)

* Nerf disease outbreak (#9640)

* Automatic changelog update

* Make sure dragdrop doesn't delay by a frame (#9745)

* Vapor tweaks (#9638)

* Magic staves + wands (#9070)

* Automatic changelog update

* Operating table add (#9687)

* Automatic changelog update

* Fix loadbp window perm issue (#9671)

* Steal condition tells you where to steal it from (#9605)

* Automatic changelog update

* Add FTL destinations (#9685)

* Job-specific traitor items (#9601)

* Automatic changelog update

* Proto-kinetic accelerator (#9748)

* Automatic changelog update

* Update submodule to 0.28.5.1 (#9750)

* Reduce radar minimap radius (#9673)

* Ghost role probability (#9752)

* Ghost role probability

* give it to regular ticks/bears too

* Automatic changelog update

* Smooth radar zooming (#9753)

* Automatic changelog update

* Convert familiars to GhostRoleMobSpawner (#9525)

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

* Port honkbots from nyano (#9698)

* Automatic changelog update

* Identity popup fixes (#9743)

* Automatic changelog update

* Bartending Tweaks (#9307)

* Automatic changelog update

* Nuke ops war anounce sound (#9035)

* Altars add (#9678)

* Automatic changelog update

* Updated alarm sound effect (#9756)

* Updated alarm sound

* Added Loop to alarm sound effect

* Automatic changelog update

* Bagel Update 14.3 (#9757)

* Cargo shuttle qol and fixe (#9759)

* Fix emergency shuttle docking (#9758)

Woopsy

* Portable scrubbers (#9417)

* Automatic changelog update

* Add public method to update cargo bank account (again) (#9761)

* quickfix nukie uplinks (#9765)

* Automatic changelog update

* Portable scrubbers on Delta (#9771)

* Automatic changelog update

* Fix mob throwing (#9775)

* Automatic changelog update

* The real movement refactor (#9645)

* The real movement refactor

* ref events

* Jetpack cleanup

* a

* Vehicles partially working

* Balance tweaks

* Restore some shitcode

* AAAAAAAA

* Even more prediction

* ECS compstate trying to fix this

* yml

* vehicles kill me

* Don't lock keys

* a

* Fix problem

* Fix sounds

* shuttle inputs

* Shuttle controls

* space brakes

* Keybinds

* Fix merge

* Handle shutdown

* Fix keys

* Bump friction

* fix buckle offset

* Fix relay and friction

* Fix jetpack turning

* contexts amirite

* Automatic changelog update

* Update submodule to 0.28.6.0 (#9776)

* Fix ghost movement (#9778)

* Fix aghost (#9781)

* Fixes makeshift laser using the wrong type of construction step. (#9811)

It needed to use the "material" step, not the "prototype" step...

* Automatic changelog update

* Nukie planet update (#9784)

* Error entity (#9740)

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

* Automatic changelog update

* Refactor set alert level command (#9794)

* Adds Research, Virology, Glass Maint Airlocks (#9350)

* Automatic changelog update

* Add a log to cut cables. How did this not exist before? (#9780)

* Order permissions panel admins by username (#9782)

* Fix aghost movement (#9823)

* Don't relay incapacitated move inputs (#9822)

* using existing FixedPoint2 for popup message, instead of raw float (#9820)

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

* Make shuttle brakes use thrusters and bandaid shuttle movement (#9826)

* Automatic changelog update

* Make FTL arrive closer (#9828)

* Automatic changelog update

* Fix docking control size (#9833)

* Saltern Update 4.0 (#9838)

* a (#9837)

* make nukies actual antags (#9844)

* Automatic changelog update

* Remove ranged injection/feeding (#9841)

* Automatic changelog update

* Packed In  (#9760)

* Update packedstation.yml

* Update atlas.yml

* packed...,,,

* packed..,,,

* e (#9835)

* allow decals to be removed from placement menu (#9843)

* Port cleanbots from Nyano (#9853)

* Automatic changelog update

* Remove overfed/overhydrated alerts (#9852)

* Automatic changelog update

* Add gravitycomponent support to maps (#9857)

* Add gravitycomponent support to maps

The alert still needs fixing if you want planets.

* move

* Packed Fixe (#9859)

* More Packed Fixe... (#9874)

* packed fixe...

* society....

* Removed lifetime handling from ImmovableRod and added TimedDespawnComponent to the prototype instead (#9870)

* Damage overlay fixes (#9831)

- Fix death overlay showing when returning to body.
- Made the diff non-linear.

* Fix blindfold round cleanup bug (#9821)

* Blindness public api

* fix blinding round cleanup bug

* Automatic changelog update

* Update submodule to 0.29.0.0 (#9881)

* Update submodule to 0.29.1.0 (#9886)

* Announce shuttle direction on proximity (#9885)

* Automatic changelog update

* Add public sex method for those who don't have access to change sex (#9894)

* The nuke must be anchored to arm. (#9898)

* Automatic changelog update

* Perform CentCom-ification (#9876)

* Change "CentComm" to "CentCom"

* Change "Centcomm" to "CentCom", skipping CVar and changelog

* Change "Centcom" to "CentCom", skipping lots of item IDs

* Change "centcomm" to "CentCom", skipping URLs, some var, IDs

* Change "centcom" to "CentCom", skipping IDs and alike

* Automatic changelog update

* botany slight rebalance (#9766)

* Automatic changelog update

* Add under-pressure lockout to air vents (#9824)

* Add under-pressure lockout to vent pumps

* Add examine text showing UPLO

* Automatic changelog update

* Fix content test warnings (#9865)

* Fix content test warnings

* while I'm here

* fix

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

* Stabalize tests (#9901)

* Antag menu (#9900)

* Refactor traitor generation code.

* RandomTraitorAlive no longer crashes when 1 traitor. Also cleaner/faster

* Add Antag menu for admins, add Traitor to the list.

* Add zombie to admin-antag menu

* Pirates, lone op, make traitor consistent with the rest.

* Add name strings

* cleaned usings.

* Cleanup.

Co-authored-by: drakewill <drake@drakewill-crl>
Co-authored-by: moonheart08 <[email protected]>

* Automatic changelog update

* long awaited (#9869)

* Add files via upload (#9893)

* Automatic changelog update

* Gas pipes now need to be unanchored before deconstruction. (#9904)

Cleans up their graphs, they had no spacing at all.

* Automatic changelog update

* Update uplink_catalog.yml (#9917)

* Automatic changelog update

* Allow pAIs to play MIDI again (#9921)

* Automatic changelog update

* Renamed the Bojevic bundle (#9895)

* Small fix

* shuttle winder fix

* Automatic changelog update

* Fix PDA ID light (#9938)

* Fix weightless (#9939)

* Update ZombifyOnDeathSystem.cs (#9919)

* Automatic changelog update

* Remove CanBeAntag for nukeops (#9947)

* Automatic changelog update

* Add cvardef template for Rider (#9948)

* Research Servers now have proper IDs, and can be selected in lathe menu (#9949)

* rd servers now increment properly when added

* remove debug message

* Automatic changelog update

* Adds even more smites and a bunch of tools. (#9825)

* Adds three new smites, headstand, locker stuff, and reptilian species swap.

* Localize all the smites.

* save work

* More smites...

* Final tweaks.

* oops

* !PLEH

* Adds disarm prone and improved hand removal options.

* fix chances.

* take out the trash.

* Add some admin TRICKS instead of more smites.

* oop

* Implements the admin test arena and associated trick.

* Tricks for granting/revoking access.

* e

* mfw

* Implement quick dialogs, for when you don't want to spend 20 minutes writing a simple dialog prompt.

* Forgot the rejuv icon.

* E

* docs

* augh

* Add rename/redescribe buttons.

* Adds objects menu, implements a couple tricks for stations.

* 1984

* Adds a trick for effectively infinite power.

* fixes some icon uggo.

* a

* HALT!

* Pause/unpause buttons.

* Forgor the textures.

* they broke every bone in their body.

* i added more

* more battery actions, touch up battery icon.

* Address reviews.

* Automatic changelog update

* i forgor (#9951)

* Ban single-line if statements. (#9953)

* Ban single-line if statements.

* Make these files more accessible from sln

* Compat for Result Analyzer engine PR (#9966)

* Fix pulling cancelling randomly. (#9982)

* Fix thrusters using generic Burn damage group instead of Heat type (#9972)

Getting high temperature, electric and frostbite burns at once is silly.

* Automatic changelog update

* Various localization fixes (#9860)

* Bagel Update 14.5 (#9988)

* Marathon Update 2.7 (#9989)

* Saltern Update 4.1 (#9990)

* Packed Drink 1984 (#9991)

* Centered shot glass sprite (#9986)

* Automatic changelog update

* Adds the station name to PDAs (#9987)

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

* Automatic changelog update

* change shotgun shell boxes from 6 to 12 (#9540)

* Automatic changelog update

* Shuttle Window fix thingy (#9932)

* guns (#9958)

Co-authored-by: and_a <and_a@DESKTOP-RJENGIR>

* Juggernaut Suit Buff (#9994)

* lmao

* Update hardsuits.yml

* thresholds (#9960)

* Automatic changelog update

* set canCrush and collision check to false (#9957)

* Automatic changelog update

* Prevent Glass duplication in lathes (#9954)

* lathes have been handled ;)

* Update LatheSystem.cs

* Automatic changelog update

* Magboot & Stun visualizers (#9961)

* Allow changing instrument style while playing them (#9946)

* Properly dirty changes when calling "SetInstrumentProgram" method

* Allow using swappable instrument verbs even while playing the instrument.
It's funnier this way

* Automatic changelog update

* Construction graph node test (#9995)

* Construction graph node test

* fix the test

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

* added backpacks to the clothesmate (#10006)

* Automatic changelog update

* Update altar.yml (#10004)

* Automatic changelog update

* Gas tile overlay rejig (#9619)

* Fix a bunch of mover bugs (#9999)

* Fix a bunch of mover bugs

Just regressions from random things

* Fix vehicle movement I guess

* Gas tank internals alerts (#9567)

* Automatic changelog update

* Fixes power wire action electrocution (#8520)

* Don't let someone block if they're too close or if they're in a doorway. (#9890)

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

* Automatic changelog update

* ECS NPCs (#9941)

* ECS

* A

* parity

* Remove dummy update

* abs

* thanks rider

* Per-map parallax support (#9786)

* Per-map parallax support

* Comments for future sloth

* c

* bet

* Fix exception

* VV support

* Fix parallax

* mem

* weightless sounds

* Gravity stuff

* placeholder coz im too lazy to stash don't @ me son

* decent clouds

* sky

* Fast parallax

* Imagine spelling

* Loicense

* perish

* Fix weightless status

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

* Automatic changelog update

* Scrolling menu parallax + less tiling (#9764)

* Scrolling parallax

* unnecessary field

* Load fastspace

* Update submodule to 0.30.0.0 (#10012)

* Clip radar control (#10011)

Forgor to do it. Still need to make the viewport square but at least it won't draw under the display anymore.

* Revert parallax (#10014)

Woops, was using these values for testing scrolling parallax.

* Adds axolotl and snake hood frills for reptilians! (#10013)

* Automatic changelog update

* Fix gravity mispredict (#10017)

* Automatic changelog update

* Fix magboots in space (#10019)

* Automatic changelog update

* Fix cursor popups (#10016)

* Automatic changelog update

* Update submodule to 0.30.0.1 (#10021)

* fix tests

* I swear if this works...

* Engine update?

* Robust update again

* Updaterino?

Co-authored-by: PJBot <[email protected]>
Co-authored-by: Nemanja <[email protected]>
Co-authored-by: Kara <[email protected]>
Co-authored-by: Leon Friedrich <[email protected]>
Co-authored-by: Emisse <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: lapatison <[email protected]>
Co-authored-by: Peptide90 <[email protected]>
Co-authored-by: Deahaka <[email protected]>
Co-authored-by: wrexbe <[email protected]>
Co-authored-by: sBasalto <[email protected]>
Co-authored-by: TaralGit <[email protected]>
Co-authored-by: and_a <and_a@DESKTOP-RJENGIR>
Co-authored-by: themias <[email protected]>
Co-authored-by: Jacob Tong <[email protected]>
Co-authored-by: Myctai <[email protected]>
Co-authored-by: Level10Cybermancer <[email protected]>
Co-authored-by: Kevin Zheng <[email protected]>
Co-authored-by: ZeroDayDaemon <[email protected]>
Co-authored-by: Morber <[email protected]>
Co-authored-by: Kimpes <[email protected]>
Co-authored-by: TimrodDX <[email protected]>
Co-authored-by: Vera Aguilera Puerto <[email protected]>
Co-authored-by: sunbear-dev <[email protected]>
Co-authored-by: tijn <[email protected]>
Co-authored-by: 13spacemen <[email protected]>
Co-authored-by: Moony <[email protected]>
Co-authored-by: Fooberticus Bazly <[email protected]>
Co-authored-by: fooberticus <[email protected]>
Co-authored-by: Andreas Kämper <[email protected]>
Co-authored-by: wrexbe <[email protected]>
Co-authored-by: drakewill-CRL <[email protected]>
Co-authored-by: drakewill <drake@drakewill-crl>
Co-authored-by: OldDanceJacket <[email protected]>
Co-authored-by: Andreas Kämper <[email protected]>
Co-authored-by: Ablankmann <[email protected]>
Co-authored-by: Pieter-Jan Briers <[email protected]>
Co-authored-by: Chris <[email protected]>
Co-authored-by: Rinkashikachi <[email protected]>
Co-authored-by: ike709 <[email protected]>
Co-authored-by: ike709 <[email protected]>
Co-authored-by: Flipp Syder <[email protected]>
Co-authored-by: keronshb <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: T-Stalker <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 534 changed files with 10,847 additions and 85,528 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true
resharper_csharp_place_simple_embedded_statement_on_same_line = never
resharper_csharp_keep_existing_embedded_arrangement = false

# Indentation preferences
#csharp_indent_block_contents = true
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Administration/AdminNameOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Client.Administration.Systems;
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
using Robust.Shared.Enums;
Expand Down
10 changes: 10 additions & 0 deletions Content.Client/Administration/Components/HeadstandComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Content.Shared.Administration.Components;
using Robust.Shared.GameStates;

namespace Content.Client.Administration.Components;

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

}
154 changes: 154 additions & 0 deletions Content.Client/Administration/QuickDialogSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
using System.Linq;
using Content.Client.UserInterface;
using Content.Shared.Administration;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;

namespace Content.Client.Administration;

/// <summary>
/// This handles the client portion of quick dialogs.
/// </summary>
public sealed class QuickDialogSystem : EntitySystem
{
/// <inheritdoc/>
public override void Initialize()
{
SubscribeNetworkEvent<QuickDialogOpenEvent>(OpenDialog);
}

private void OpenDialog(QuickDialogOpenEvent ev)
{
var window = new FancyWindow()
{
Title = ev.Title
};

var entryContainer = new BoxContainer()
{
Orientation = BoxContainer.LayoutOrientation.Vertical,
Margin = new Thickness(8),
};

var promptsDict = new Dictionary<string, LineEdit>();

foreach (var entry in ev.Prompts)
{
var entryBox = new BoxContainer()
{
Orientation = BoxContainer.LayoutOrientation.Horizontal
};

entryBox.AddChild(new Label { Text = entry.Prompt, HorizontalExpand = true, SizeFlagsStretchRatio = 0.5f });
var edit = new LineEdit() { HorizontalExpand = true};
entryBox.AddChild(edit);
switch (entry.Type)
{
case QuickDialogEntryType.Integer:
edit.IsValid += VerifyInt;
edit.PlaceHolder = "Integer..";
break;
case QuickDialogEntryType.Float:
edit.IsValid += VerifyFloat;
edit.PlaceHolder = "Float..";
break;
case QuickDialogEntryType.ShortText:
edit.IsValid += VerifyShortText;
edit.PlaceHolder = "Short text..";
break;
case QuickDialogEntryType.LongText:
edit.IsValid += VerifyLongText;
edit.PlaceHolder = "Long text..";
break;
default:
throw new ArgumentOutOfRangeException();
}
promptsDict.Add(entry.FieldId, edit);
entryContainer.AddChild(entryBox);
}

var buttonsBox = new BoxContainer()
{
Orientation = BoxContainer.LayoutOrientation.Horizontal,
HorizontalAlignment = Control.HAlignment.Center,
};

var alreadyReplied = false;

if ((ev.Buttons & QuickDialogButtonFlag.OkButton) != 0)
{
var okButton = new Button()
{
Text = "Ok",
};

okButton.OnPressed += _ =>
{
RaiseNetworkEvent(new QuickDialogResponseEvent(ev.DialogId,
promptsDict.Select(x => (x.Key, x.Value.Text)).ToDictionary(x => x.Key, x => x.Text),
QuickDialogButtonFlag.OkButton));
alreadyReplied = true;
window.Close();
};

buttonsBox.AddChild(okButton);
}

if ((ev.Buttons & QuickDialogButtonFlag.OkButton) != 0)
{
var cancelButton = new Button()
{
Text = "Cancel",
};

cancelButton.OnPressed += _ =>
{
RaiseNetworkEvent(new QuickDialogResponseEvent(ev.DialogId,
new(),
QuickDialogButtonFlag.CancelButton));
alreadyReplied = true;
window.Close();
};

buttonsBox.AddChild(cancelButton);
}

window.OnClose += () =>
{
if (!alreadyReplied)
{
RaiseNetworkEvent(new QuickDialogResponseEvent(ev.DialogId,
new(),
QuickDialogButtonFlag.CancelButton));
}
};

entryContainer.AddChild(buttonsBox);

window.ContentsContainer.AddChild(entryContainer);

window.MinWidth *= 2; // Just double it.

window.OpenCentered();
}

private bool VerifyInt(string input)
{
return int.TryParse(input, out var _);
}

private bool VerifyFloat(string input)
{
return float.TryParse(input, out var _);
}

private bool VerifyShortText(string input)
{
return input.Length <= 100;
}

private bool VerifyLongText(string input)
{
return input.Length <= 2000;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using Content.Client.Administration.Managers;
using Content.Client.Administration.UI;
using Content.Client.Administration.UI.Tabs.ObjectsTab;
using Content.Client.Administration.UI.Tabs.PlayerTab;
using Content.Client.HUD;
using Content.Client.Verbs;
Expand All @@ -11,13 +11,11 @@
using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects;
using Robust.Shared.Input;
using Robust.Shared.Input.Binding;
using Robust.Shared.IoC;
using Robust.Shared.Network;

namespace Content.Client.Administration
namespace Content.Client.Administration.Systems
{
public sealed partial class AdminSystem
{
Expand Down Expand Up @@ -101,13 +99,18 @@ public void Open()
}

_window.PlayerTabControl.OnEntryPressed += PlayerTabEntryPressed;
_window.ObjectsTabControl.OnEntryPressed += ObjectsTabEntryPressed;
_window.OpenCentered();
}

public void Close()
{
if (_window != null)
{
_window.PlayerTabControl.OnEntryPressed -= PlayerTabEntryPressed;
_window.ObjectsTabControl.OnEntryPressed -= ObjectsTabEntryPressed;
}

_window?.Close();

foreach (var window in _commandWindows)
Expand Down Expand Up @@ -163,5 +166,23 @@ private void PlayerTabEntryPressed(BaseButton.ButtonEventArgs args)

args.Event.Handle();
}

private void ObjectsTabEntryPressed(BaseButton.ButtonEventArgs args)
{
if (args.Button is not ObjectsTabEntry button)
return;

var uid = button.AssocEntity;
var function = args.Event.Function;

if (function == EngineKeyFunctions.UIClick)
_clientConsoleHost.ExecuteCommand($"vv {uid}");
else if (function == ContentKeyFunctions.OpenContextMenu)
_verbSystem.VerbMenu.OpenVerbMenu(uid, true);
else
return;

args.Event.Handle();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Content.Client.Administration.Managers;
using Robust.Client.Graphics;

namespace Content.Client.Administration
namespace Content.Client.Administration.Systems
{
public sealed partial class AdminSystem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Administration;
using Content.Shared.Administration.Events;
using Content.Shared.GameTicking;
using Robust.Shared.GameObjects;
using Robust.Shared.Network;

namespace Content.Client.Administration
namespace Content.Client.Administration.Systems
{
public sealed partial class AdminSystem : EntitySystem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using Content.Shared.Verbs;
using Robust.Client.Console;
using Robust.Client.ViewVariables;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;

namespace Content.Client.Verbs
namespace Content.Client.Administration.Systems
{
/// <summary>
/// Client-side admin verb system. These usually open some sort of UIs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
#nullable enable
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Client.Administration.Managers;
using Content.Client.Administration.UI;
using Content.Client.Administration.UI.CustomControls;
using Content.Client.HUD;
using Content.Shared.Administration;
using JetBrains.Annotations;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.Player;
using Robust.Shared.Localization;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Audio;
using Robust.Shared.IoC;
using Robust.Shared.Network;
using Robust.Shared.Player;

namespace Content.Client.Administration
namespace Content.Client.Administration.Systems
{
[UsedImplicitly]
public sealed class BwoinkSystem : SharedBwoinkSystem
Expand Down
35 changes: 35 additions & 0 deletions Content.Client/Administration/Systems/HeadstandSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Content.Client.Administration.Components;
using Robust.Client.GameObjects;

namespace Content.Client.Administration.Systems;

public sealed class HeadstandSystem : EntitySystem
{
public override void Initialize()
{
SubscribeLocalEvent<HeadstandComponent, ComponentStartup>(OnHeadstandAdded);
SubscribeLocalEvent<HeadstandComponent, ComponentShutdown>(OnHeadstandRemoved);
}

private void OnHeadstandAdded(EntityUid uid, HeadstandComponent component, ComponentStartup args)
{
if (!TryComp<SpriteComponent>(uid, out var sprite))
return;

foreach (var layer in sprite.AllLayers)
{
layer.Rotation += Angle.FromDegrees(180.0f);
}
}

private void OnHeadstandRemoved(EntityUid uid, HeadstandComponent component, ComponentShutdown args)
{
if (!TryComp<SpriteComponent>(uid, out var sprite))
return;

foreach (var layer in sprite.AllLayers)
{
layer.Rotation -= Angle.FromDegrees(180.0f);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Robust.Client.GameObjects;
using Robust.Shared.Utility;

namespace Content.Client.Administration;
namespace Content.Client.Administration.Systems;

public sealed class KillSignSystem : EntitySystem
{
Expand Down
8 changes: 4 additions & 4 deletions Content.Client/Administration/UI/AdminAnnounceWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<DefaultWindow
xmlns="https://spacestation14.io"
Title="{Loc 'admin-announce-title'}"
Title="{Loc admin-announce-title}"
MinWidth="500">
<GridContainer Columns="1">
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
<LineEdit Name="Announcer" Access="Public" PlaceHolder="{Loc 'announcer-placeholder'}" Text="{Loc 'Central Command'}" HorizontalExpand="True" SizeFlagsStretchRatio="2"/>
<LineEdit Name="Announcer" Access="Public" PlaceHolder="{Loc admin-announce-announcer-placeholder}" Text="{Loc admin-announce-announcer-default}" HorizontalExpand="True" SizeFlagsStretchRatio="2"/>
<Control HorizontalExpand="True" SizeFlagsStretchRatio="1" />
<OptionButton Name="AnnounceMethod" Access="Public" HorizontalExpand="True" SizeFlagsStretchRatio="2"/>
</BoxContainer>
<LineEdit Name="Announcement" Access="Public" PlaceHolder="{Loc 'announcement-placeholder'}"/>
<LineEdit Name="Announcement" Access="Public" PlaceHolder="{Loc admin-announce-announcement-placeholder}"/>

<Button Name="AnnounceButton" Access="Public" Disabled="True" Text="{Loc 'Announce'}" HorizontalAlignment="Center"/>
<Button Name="AnnounceButton" Access="Public" Disabled="True" Text="{Loc admin-announce-button}" HorizontalAlignment="Center"/>
</GridContainer>
</DefaultWindow>
4 changes: 2 additions & 2 deletions Content.Client/Administration/UI/AdminAnnounceWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public AdminAnnounceWindow()
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);

AnnounceMethod.AddItem(_localization.GetString("announce-type-station"));
AnnounceMethod.AddItem(_localization.GetString("admin-announce-type-station"));
AnnounceMethod.SetItemMetadata(0, AdminAnnounceType.Station);
AnnounceMethod.AddItem(_localization.GetString("announce-type-server"));
AnnounceMethod.AddItem(_localization.GetString("admin-announce-type-server"));
AnnounceMethod.SetItemMetadata(1, AdminAnnounceType.Server);
AnnounceMethod.OnItemSelected += AnnounceMethodOnOnItemSelected;
Announcement.OnTextChanged += AnnouncementOnOnTextChanged;
Expand Down
Loading

0 comments on commit 0130713

Please sign in to comment.