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

upstream merge but real #1893

Merged
merged 138 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
1fde97c
New gauze customization (#30852)
JustArt1m Sep 14, 2024
e43c040
Automatic changelog update
PJBot Sep 14, 2024
955f77d
Automatic changelog update
PJBot Sep 14, 2024
d7bef99
Dev mouse acorgillation (#32040)
TheShuEd Sep 14, 2024
98a040e
add test for lathe recipes having results (#32100)
deltanedas Sep 14, 2024
1508e6d
Allow ghosts to read books (#32151)
eoineoineoin Sep 14, 2024
e737824
Fix some issues with pulling system (#32145)
eoineoineoin Sep 14, 2024
efdb55d
Automatic changelog update
PJBot Sep 14, 2024
808176b
Vox LoneOp loadout fix (#31641)
Errant-4 Sep 14, 2024
f83bfca
Automatic changelog update
PJBot Sep 14, 2024
1f77ec3
Add snakes to vent spawn event (#32070)
Plykiya Sep 14, 2024
6ad0149
Automatic changelog update
PJBot Sep 14, 2024
904b8ea
Moved hardcoded string "PEOPLE" to Loc.GetString() (#32164)
BIGZi0348 Sep 14, 2024
1b7a864
reinforce command intercom (#32169)
lzk228 Sep 14, 2024
e22218d
Automatic changelog update
PJBot Sep 14, 2024
f2fc8c8
clean up clothing lathe recipes (#31520)
deltanedas Sep 14, 2024
fbe9322
Use Transform instead of TryComp<TransformComponent> (#32170)
Winkarst-cpu Sep 14, 2024
8b2b482
Fix animals sprites in critical state (#32175)
de0rix Sep 15, 2024
e12eb47
fix infinite banana bug (#32167)
slarticodefast Sep 15, 2024
9a089a1
Rename fix (#31654)
nikthechampiongr Sep 15, 2024
4968629
Automatic changelog update
PJBot Sep 15, 2024
a4f3186
Automatic changelog update
PJBot Sep 15, 2024
01eb4ac
Make pressure and volume pumps require power (#28995)
Partmedia Sep 15, 2024
425250f
Automatic changelog update
PJBot Sep 15, 2024
dd642a6
Update SharedBuckleSystem to use PopupClient (#31498)
Winkarst-cpu Sep 15, 2024
31e3ef0
Botany Rework Part 1: Mutations (#31163)
drakewill-CRL Sep 15, 2024
7f19d50
Fix build and lint (#32180)
Plykiya Sep 15, 2024
a65484e
prevent using holo inside containers (#32068)
deltanedas Sep 15, 2024
99bb203
Automatic changelog update
PJBot Sep 15, 2024
02dfbd9
localize skeleton accent (#32166)
lzk228 Sep 15, 2024
c1c2670
Automatic changelog update
PJBot Sep 15, 2024
2673b1c
Nerfs meteor penetration force (#32109)
Plykiya Sep 15, 2024
4416130
Automatic changelog update
PJBot Sep 15, 2024
ec22d26
Fix plushie cutlass swing animation (#32157)
lzk228 Sep 15, 2024
92f1945
Rubber chicken toy (#29637)
xprospero Sep 15, 2024
654ada8
Fix sentient produce (#32192)
drakewill-CRL Sep 16, 2024
d298165
Automatic changelog update
PJBot Sep 16, 2024
bc391ee
Add glass morgue airlock (#32163)
lzk228 Sep 16, 2024
e6ff813
Fix examine flickering until you examine something around you (#32205)
DrSmugleaf Sep 16, 2024
8deeae6
Automatic changelog update
PJBot Sep 16, 2024
7cefd9c
Adds the syndicate Booze-O-Mat (Bruise-O-Mat) to nukie planet (#32107)
ArtisticRoomba Sep 16, 2024
779a007
Automatic changelog update
PJBot Sep 16, 2024
26ed0aa
Change the binary translator key's contraband designation to syndicat…
ArtisticRoomba Sep 16, 2024
78646ac
Remove blurry vision examine mispredict (#29633)
EmoGarbage404 Jul 1, 2024
432d0c0
Automatic changelog update
PJBot Sep 16, 2024
b8efe95
Immovable Rod Spawn Addition: Lizard Plushie (#32113)
august-sun Sep 16, 2024
895000d
Lizards now metabolize chocolate (#32147)
MissKay1994 Sep 16, 2024
a987968
Automatic changelog update
PJBot Sep 16, 2024
ffdf6bb
Localization of steal targets (#30153)
chavonadelal Sep 16, 2024
9a769d8
Crayons buffed to 45 uses (#32061)
Kanashi-Panda Sep 17, 2024
1726338
Automatic changelog update
PJBot Sep 17, 2024
dd70143
Anomalous infections (#31876)
TheShuEd Sep 17, 2024
0159baf
Automatic changelog update
PJBot Sep 17, 2024
482caea
fix Tech anomaly loud sounds and superfast flickering (#32245)
TheShuEd Sep 17, 2024
73e89c3
Automatic changelog update
PJBot Sep 17, 2024
3951e2d
Fix plant mutations carrying over to other plants and future rounds (…
drakewill-CRL Sep 17, 2024
f2abebd
Automatic changelog update
PJBot Sep 17, 2024
00877bc
Added a number of new and very nerdy names for the AI (#31951)
Moomoobeef Sep 17, 2024
aac4b83
Automatic changelog update
PJBot Sep 17, 2024
0535e3e
Fix Anomaly infections infinity growing after curing (#32259)
TheShuEd Sep 17, 2024
100e525
Fix borg defib module throwing an exception (#32260)
PJB3005 Sep 18, 2024
1befc65
Easy IconSmooth spriting (#32210)
TheShuEd Sep 18, 2024
e7ac405
Fix AudioSystem nullability checks for engine PR (#32233)
ElectroJr Sep 18, 2024
ba94df3
Use TurfSystem.IsTileBlocked instead of TurfHelpers (#32174)
Winkarst-cpu Sep 18, 2024
adbd28f
Update submodule to 235.0.0 (#32265)
metalgearsloth Sep 18, 2024
bc8c522
New publish workflow for Robust.Cdn (#32222)
PJB3005 Sep 18, 2024
f3a6a99
chmod +x publish_multi_request.py (#32274)
PJB3005 Sep 18, 2024
5d946c5
ghost-role-information-silicon-rules (#32275)
AsnDen Sep 18, 2024
849a96c
Fix guidebook cakebatter recipe (#32276)
Calecute Sep 18, 2024
f3b5be8
Automatic changelog update
PJBot Sep 18, 2024
724456d
Wires ui tooltip localization (#32284)
chavonadelal Sep 18, 2024
418ced1
Localization of the shuttle call sender (#32286)
chavonadelal Sep 18, 2024
6c07f3f
change jamjar glasses description (#32215)
Skarletto Sep 18, 2024
6697641
Fix recycler eating materials (Salvage mains rejoice) (#32144)
beck-thompson Sep 18, 2024
df8a2be
Automatic changelog update
PJBot Sep 18, 2024
e331842
Localization cooldown/remaining string in alerts (#32282)
chavonadelal Sep 18, 2024
3a1d442
add interaction success/failure events (#32216)
deltanedas Sep 18, 2024
3e3984b
make epinephrine adrenaline (#32076)
deltanedas Sep 18, 2024
4386f5e
change cdn to deltav
Sep 22, 2024
9118c5f
Automatic changelog update
PJBot Sep 18, 2024
a8c2444
Add mapping editor (#23427)
DrSmugleaf Aug 4, 2024
0ca9079
Add flip button to mapping state (#30636)
metalgearsloth Sep 19, 2024
9ae32dc
Give prototype refactor (#29697)
ShadowCommander Sep 19, 2024
095fb63
Allow containment field generators to be enabled on mapinit (#31158)
SlamBamActionman Sep 19, 2024
8b535b1
Make fire leave burnt decals on the tiles (#31939)
Winkarst-cpu Sep 19, 2024
d5e7073
Automatic changelog update
PJBot Sep 19, 2024
42c3d3d
Coordinates under IFF Label on Mass Scanners and Shuttle Consoles (#3…
ArchRBX Sep 19, 2024
2387440
Automatic changelog update
PJBot Sep 19, 2024
5968726
Fix TEG acting as infinite energy source on destruction (#29972)
luizwritescode Sep 19, 2024
d343acb
Automatic changelog update
PJBot Sep 19, 2024
bb65810
Clean up solution regen and drain comps (#29777)
IProduceWidgets Sep 19, 2024
d9c4774
Make status effect networking not use `TryAddStatusEffect` (#28766)
ElectroJr Sep 19, 2024
bb1b508
Move PlaceableSurfaceComponent usages to PlaceableSurfaceSystem (#28384)
ShadowCommander Sep 19, 2024
f990671
Padded ItemStatus Text (#29560)
Willhelm53 Sep 19, 2024
00e00d9
Fix Set Outfit command/verb (#29672)
Tayrtahn Sep 19, 2024
f55dcef
adds plasma and uranium arrows (#31241)
Boaz1111 Sep 19, 2024
a319dc8
Automatic changelog update
PJBot Sep 19, 2024
d1438ed
Automatic changelog update
PJBot Sep 19, 2024
0b55418
Crew Monitor filter (#31659)
Errant-4 Sep 19, 2024
fe01ca7
Automatic changelog update
PJBot Sep 19, 2024
9cb164d
make flare recipe roundstart instead of blueprint (#32303)
deltanedas Sep 19, 2024
f0ebad7
Automatic changelog update
PJBot Sep 19, 2024
0705af9
fix conjugate have in cryo locale string (#31993)
lzk228 Sep 19, 2024
239deca
increase thieving beacon range to 2 (#31340)
deltanedas Sep 19, 2024
958fb02
Automatic changelog update
PJBot Sep 19, 2024
4da56f2
Dialog windows now grab the keyboard focus (#31294)
Winkarst-cpu Sep 19, 2024
b189f84
Automatic changelog update
PJBot Sep 19, 2024
980e041
Allows you to buckle transfer person from bed to bed (#32089)
Plykiya Sep 19, 2024
3bea6d3
Automatic changelog update
PJBot Sep 19, 2024
b1b1c00
Automatic changelog update
PJBot Sep 19, 2024
0f2835d
Removes cockroach/mothroach melee damage (#32221)
Plykiya Sep 19, 2024
4d09065
Automatic changelog update
PJBot Sep 19, 2024
d08ab4a
Makes the rat king's cheeseEm order more convenient to use (#32181)
PopGamer45 Sep 19, 2024
698b033
Automatic changelog update
PJBot Sep 19, 2024
00a74b9
Make small clamp use 2% battery instead of recharging 2% battery. (#3…
JIPDawg Sep 20, 2024
d658246
Adds the Head of Greytide stamp (#30189)
ArtisticRoomba Aug 25, 2024
245a56c
Psychologist's Stamp (#31881)
cohanna Sep 20, 2024
5824cd2
remove duplicate psych stamp
Sep 22, 2024
022d6d5
Automatic changelog update
PJBot Sep 20, 2024
112374b
Security Clown Mask is now security restricted. (#32335)
GoldenCan Sep 20, 2024
7121786
Soda water and Vodka recipes (#32252)
saga3152 Sep 20, 2024
321eeb9
Automatic changelog update
PJBot Sep 20, 2024
2448d19
Fix medical PDA/health analyzer long range intel bug (#31879)
goet Sep 21, 2024
632cde4
Automatic changelog update
PJBot Sep 21, 2024
615f125
Added a directory to station maps (#31156)
TGRCdev Sep 21, 2024
3fba7bb
Automatic changelog update
PJBot Sep 21, 2024
53e1894
Add skirt of life in contraband medidrobe (#32214)
lzk228 Sep 21, 2024
ecee19c
Fix a spelling mistake in the DonutVend's advertisments (#32348)
voidnull000 Sep 21, 2024
12f12f9
Flora anomaly seeds (#31987)
TheShuEd Sep 21, 2024
ecd0a4b
Automatic changelog update
PJBot Sep 21, 2024
7f489de
fix cargo order scams, fix internals crate desc (#32350)
Ilya246 Sep 21, 2024
5260d8b
Rat kings can butcher things (#32232)
Plykiya Sep 21, 2024
76d140a
Automatic changelog update
PJBot Sep 21, 2024
4d6af52
:trollface:
Sep 22, 2024
f6480d0
:trollface:
Sep 22, 2024
9689973
remove shock collar objective as it isn't stealing it's using a lathe…
Sep 22, 2024
65134d9
:trollface:
Sep 22, 2024
936172c
g
Sep 22, 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
  •  
  •  
  •  
18 changes: 1 addition & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,10 @@ jobs:
- name: Package client
run: dotnet run --project Content.Packaging client --no-wipe-release

- name: Upload build artifact
id: artifact-upload-step
uses: actions/upload-artifact@v4
with:
name: build
path: release/*.zip
compression-level: 0
retention-days: 0

- name: Publish version
run: Tools/publish_github_artifact.py
run: Tools/publish_multi_request.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
ARTIFACT_ID: ${{ steps.artifact-upload-step.outputs.artifact-id }}
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}

- name: Publish changelog (Discord)
Expand All @@ -68,8 +57,3 @@ jobs:
run: Tools/actions_changelog_rss.py
env:
CHANGELOG_RSS_KEY: ${{ secrets.CHANGELOG_RSS_KEY }}

- uses: geekyeggo/delete-artifact@v5
if: always()
with:
name: build
2 changes: 1 addition & 1 deletion Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public void LoadActionAssignments(string path, bool userData)
continue;

var action = _serialization.Read<BaseActionComponent>(actionNode, notNullableOverride: true);
var actionId = Spawn(null);
var actionId = Spawn();
AddComp(actionId, action);
AddActionDirect(user, actionId);

Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Actions/UI/ActionAlertTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected override void FrameUpdate(FrameEventArgs args)
{
var duration = Cooldown.Value.End - Cooldown.Value.Start;

if (!FormattedMessage.TryFromMarkup($"[color=#a10505]{(int) duration.TotalSeconds} sec cooldown ({(int) timeLeft.TotalSeconds + 1} sec remaining)[/color]", out var markup))
if (!FormattedMessage.TryFromMarkup(Loc.GetString("ui-actionslot-duration", ("duration", (int)duration.TotalSeconds), ("timeLeft", (int)timeLeft.TotalSeconds + 1)), out var markup))
return;

_cooldownLabel.SetMessage(markup);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using System.Linq;
using System.Numerics;
using Content.Client.UserInterface.Controls;
using Content.Shared.Preferences.Loadouts;
using Content.Shared.Roles;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Prototypes;

namespace Content.Client.Administration.UI.SetOutfit
Expand Down Expand Up @@ -65,9 +64,18 @@ private void SearchBarOnOnTextChanged(LineEdit.LineEditEventArgs obj)
PopulateByFilter(SearchBar.Text);
}

private IEnumerable<StartingGearPrototype> GetPrototypes()
{
// Filter out any StartingGearPrototypes that belong to loadouts
var loadouts = _prototypeManager.EnumeratePrototypes<LoadoutPrototype>();
var loadoutGears = loadouts.Select(l => l.StartingGear);
return _prototypeManager.EnumeratePrototypes<StartingGearPrototype>()
.Where(p => !loadoutGears.Contains(p.ID));
}

private void PopulateList()
{
foreach (var gear in _prototypeManager.EnumeratePrototypes<StartingGearPrototype>())
foreach (var gear in GetPrototypes())
{
OutfitList.Add(GetItem(gear, OutfitList));
}
Expand All @@ -76,7 +84,7 @@ private void PopulateList()
private void PopulateByFilter(string filter)
{
OutfitList.Clear();
foreach (var gear in _prototypeManager.EnumeratePrototypes<StartingGearPrototype>())
foreach (var gear in GetPrototypes())
{
if (!string.IsNullOrEmpty(filter) &&
gear.ID.ToLowerInvariant().Contains(filter.Trim().ToLowerInvariant()))
Expand Down
12 changes: 11 additions & 1 deletion Content.Client/Anomaly/AnomalySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ public override void Initialize()
SubscribeLocalEvent<AnomalyComponent, AppearanceChangeEvent>(OnAppearanceChanged);
SubscribeLocalEvent<AnomalyComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<AnomalyComponent, AnimationCompletedEvent>(OnAnimationComplete);
}

SubscribeLocalEvent<AnomalySupercriticalComponent, ComponentShutdown>(OnShutdown);
}
private void OnStartup(EntityUid uid, AnomalyComponent component, ComponentStartup args)
{
_floating.FloatAnimation(uid, component.FloatingOffset, component.AnimationKey, component.AnimationTime);
Expand Down Expand Up @@ -75,4 +76,13 @@ public override void Update(float frameTime)
}
}
}

private void OnShutdown(Entity<AnomalySupercriticalComponent> ent, ref ComponentShutdown args)
{
if (!TryComp<SpriteComponent>(ent, out var sprite))
return;

sprite.Scale = Vector2.One;
sprite.Color = sprite.Color.WithAlpha(1f);
}
}
50 changes: 50 additions & 0 deletions Content.Client/Anomaly/Effects/ClientInnerBodySystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using Content.Shared.Anomaly.Components;
using Content.Shared.Anomaly.Effects;
using Content.Shared.Body.Components;
using Robust.Client.GameObjects;

namespace Content.Client.Anomaly.Effects;

public sealed class ClientInnerBodyAnomalySystem : SharedInnerBodyAnomalySystem
{
public override void Initialize()
{
SubscribeLocalEvent<InnerBodyAnomalyComponent, AfterAutoHandleStateEvent>(OnAfterHandleState);
SubscribeLocalEvent<InnerBodyAnomalyComponent, ComponentShutdown>(OnCompShutdown);
}

private void OnAfterHandleState(Entity<InnerBodyAnomalyComponent> ent, ref AfterAutoHandleStateEvent args)
{
if (!TryComp<SpriteComponent>(ent, out var sprite))
return;

if (ent.Comp.FallbackSprite is null)
return;

if (!sprite.LayerMapTryGet(ent.Comp.LayerMap, out var index))
index = sprite.LayerMapReserveBlank(ent.Comp.LayerMap);

if (TryComp<BodyComponent>(ent, out var body) &&
body.Prototype is not null &&
ent.Comp.SpeciesSprites.TryGetValue(body.Prototype.Value, out var speciesSprite))
{
sprite.LayerSetSprite(index, speciesSprite);
}
else
{
sprite.LayerSetSprite(index, ent.Comp.FallbackSprite);
}

sprite.LayerSetVisible(index, true);
sprite.LayerSetShader(index, "unshaded");
}

private void OnCompShutdown(Entity<InnerBodyAnomalyComponent> ent, ref ComponentShutdown args)
{
if (!TryComp<SpriteComponent>(ent, out var sprite))
return;

var index = sprite.LayerMapGet(ent.Comp.LayerMap);
sprite.LayerSetVisible(index, false);
}
}
3 changes: 3 additions & 0 deletions Content.Client/Audio/AmbientSoundSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ private void ProcessNearbyAmbience(TransformComponent playerXform)
.WithMaxDistance(comp.Range);

var stream = _audio.PlayEntity(comp.Sound, Filter.Local(), uid, false, audioParams);
if (stream == null)
continue;

_playingSounds[sourceEntity] = (stream.Value.Entity, comp.Sound, key);
playingCount++;

Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Audio/ClientGlobalSoundSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private void PlayAdminSound(AdminSoundEvent soundEvent)
if(!_adminAudioEnabled) return;

var stream = _audio.PlayGlobal(soundEvent.Filename, Filter.Local(), false, soundEvent.AudioParams);
_adminAudio.Add(stream.Value.Entity);
_adminAudio.Add(stream?.Entity);
}

private void PlayStationEventMusic(StationEventMusicEvent soundEvent)
Expand All @@ -76,7 +76,7 @@ private void PlayStationEventMusic(StationEventMusicEvent soundEvent)
if(!_eventAudioEnabled || _eventAudio.ContainsKey(soundEvent.Type)) return;

var stream = _audio.PlayGlobal(soundEvent.Filename, Filter.Local(), false, soundEvent.AudioParams);
_eventAudio.Add(soundEvent.Type, stream.Value.Entity);
_eventAudio.Add(soundEvent.Type, stream?.Entity);
}

private void PlayGameSound(GameGlobalSoundEvent soundEvent)
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Audio/ContentAudioSystem.AmbientMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ private void UpdateAmbientMusic()
false,
AudioParams.Default.WithVolume(_musicProto.Sound.Params.Volume + _volumeSlider));

_ambientMusicStream = strim.Value.Entity;
_ambientMusicStream = strim?.Entity;

if (_musicProto.FadeIn)
if (_musicProto.FadeIn && strim != null)
{
FadeIn(_ambientMusicStream, strim.Value.Component, AmbientMusicFadeTime);
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private void PlaySoundtrack(string soundtrackFilename)
false,
_lobbySoundtrackParams.WithVolume(_lobbySoundtrackParams.Volume + SharedAudioSystem.GainToVolume(_configManager.GetCVar(CCVars.LobbyMusicVolume)))
);
if (playResult.Value.Entity == default)
if (playResult == null)
{
_sawmill.Warning(
$"Tried to play lobby soundtrack '{{Filename}}' using {nameof(SharedAudioSystem)}.{nameof(SharedAudioSystem.PlayGlobal)} but it returned default value of EntityUid!",
Expand Down
52 changes: 2 additions & 50 deletions Content.Client/Commands/ActionsCommands.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System.IO;
using Content.Client.Actions;
using Content.Client.Mapping;
using Content.Client.Actions;
using Content.Shared.Administration;
using Robust.Client.UserInterface;
using Robust.Shared.Console;
using YamlDotNet.RepresentationModel;

namespace Content.Client.Commands;

Expand Down Expand Up @@ -50,7 +46,7 @@ public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
LoadActs(); // DeltaV - Load from a file dialogue instead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need this back :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk i think it was breaking mapping

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fwiw, I added it back so I could do some mapping last night w/ no issues. I don't know what will happen if we re-enable the mapping editor though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a pr then, if it breaks map editor again whenever map editor works it can be reverted

shell.WriteLine(Help);
return;
}

Expand All @@ -63,48 +59,4 @@ public override void Execute(IConsoleShell shell, string argStr, string[] args)
shell.WriteError(LocalizationManager.GetString($"cmd-{Command}-error"));
}
}

/// <summary>
/// DeltaV - Load actions from a file stream instead
/// </summary>
private static async void LoadActs()
{
var fileMan = IoCManager.Resolve<IFileDialogManager>();
var actMan = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<ActionsSystem>();

var stream = await fileMan.OpenFile(new FileDialogFilters(new FileDialogFilters.Group("yml")));
if (stream is null)
return;

var reader = new StreamReader(stream);
var yamlStream = new YamlStream();
yamlStream.Load(reader);

actMan.LoadActionAssignments(yamlStream);
reader.Close();
}
}

[AnyCommand]
public sealed class LoadMappingActionsCommand : LocalizedCommands
{
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;

public const string CommandName = "loadmapacts";

public override string Command => CommandName;

public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));

public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
try
{
_entitySystemManager.GetEntitySystem<MappingSystem>().LoadMappingActions();
}
catch
{
shell.WriteError(LocalizationManager.GetString($"cmd-{Command}-error"));
}
}
}
7 changes: 5 additions & 2 deletions Content.Client/Commands/MappingClientSideSetupCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Content.Client.Mapping;
using Content.Client.Markers;
using JetBrains.Annotations;
using Robust.Client.Graphics;
using Robust.Client.State;
using Robust.Shared.Console;

namespace Content.Client.Commands;
Expand All @@ -10,6 +12,7 @@ internal sealed class MappingClientSideSetupCommand : LocalizedCommands
{
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
[Dependency] private readonly ILightManager _lightManager = default!;
[Dependency] private readonly IStateManager _stateManager = default!;

public override string Command => "mappingclientsidesetup";

Expand All @@ -21,8 +24,8 @@ public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
_entitySystemManager.GetEntitySystem<MarkerSystem>().MarkersVisible = true;
_lightManager.Enabled = false;
shell.ExecuteCommand(ShowSubFloorForever.CommandName);
shell.ExecuteCommand(LoadMappingActionsCommand.CommandName);
shell.ExecuteCommand("showsubfloorforever");
_stateManager.RequestStateChange<MappingState>();
}
}
}
Expand Down
38 changes: 36 additions & 2 deletions Content.Client/ContextMenu/UI/ContextMenuUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Threading;
using Content.Client.CombatMode;
using Content.Client.Gameplay;
using Content.Client.Mapping;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controllers;
using Timer = Robust.Shared.Timing.Timer;
Expand All @@ -16,7 +17,7 @@ namespace Content.Client.ContextMenu.UI
/// <remarks>
/// This largely involves setting up timers to open and close sub-menus when hovering over other menu elements.
/// </remarks>
public sealed class ContextMenuUIController : UIController, IOnStateEntered<GameplayState>, IOnStateExited<GameplayState>, IOnSystemChanged<CombatModeSystem>
public sealed class ContextMenuUIController : UIController, IOnStateEntered<GameplayState>, IOnStateExited<GameplayState>, IOnSystemChanged<CombatModeSystem>, IOnStateEntered<MappingState>, IOnStateExited<MappingState>
{
public static readonly TimeSpan HoverDelay = TimeSpan.FromSeconds(0.2);

Expand All @@ -42,18 +43,51 @@ public sealed class ContextMenuUIController : UIController, IOnStateEntered<Game
public Action<ContextMenuElement>? OnSubMenuOpened;
public Action<ContextMenuElement, GUIBoundKeyEventArgs>? OnContextKeyEvent;

private bool _setup;

public void OnStateEntered(GameplayState state)
{
Setup();
}

public void OnStateExited(GameplayState state)
{
Shutdown();
}

public void OnStateEntered(MappingState state)
{
Setup();
}

public void OnStateExited(MappingState state)
{
Shutdown();
}

public void Setup()
{
if (_setup)
return;

_setup = true;

RootMenu = new(this, null);
RootMenu.OnPopupHide += Close;
Menus.Push(RootMenu);
}

public void OnStateExited(GameplayState state)
public void Shutdown()
{
if (!_setup)
return;

_setup = false;

Close();
RootMenu.OnPopupHide -= Close;
RootMenu.Dispose();
RootMenu = default!;
}

/// <summary>
Expand Down
Loading
Loading