Skip to content

Commit

Permalink
Merge pull request #917 from Roudenn/upstream-sync
Browse files Browse the repository at this point in the history
* Applying Fix from #32764 to staging

* Fix random test fail in DeleteAllThenGhost (#32753)

It's simple. We kill the heisentest

* Fix random test fail in DeleteAllThenGhost (#32753)

It's simple. We kill the heisentest

* Fix some rounds failing to end due to mind roles (#32792) (#32793)

* Fix some rounds failing to end due to mind roles

Fixes #32791

This is caused by ShowRoundEndScoreboard running into a bug trying to display antags: some player is showing up as antag with MindIsAntagonist(), but has no antag roles listed in MindGetAllRoleInfo().

This was caused by one of the roles of the player having the Antag boolean set, but having no AntagPrototype set.

The responsible mind role appeared to be MindRoleSubvertedSilicon which is missing a set for the SubvertedSilicon antag prototype.

I also added resilience to the round-end code to make it so that an exception showing the scoreboard (and sending the Discord message) would not cause the round end logic to completely abort from an exception.

I am planning to add an integration test to cover this bug (no prototype in mind roles), but I'll leave that for not-the-immediate-hotfix.

* At least one maintainer approved this tiny PR without reading it, not naming names.

* HOTFIX: Fix tech anomaly nexttimer (#32805) (#32807)

Fix tech anomaly nexttimer (#32805)

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

* HOTFIX spider clan charges can be armed again (#32866)

* fix ninja bomb component check

* remove TryGetRole

* HOTFIX Plushies no longer delete items when recycled (#32882)

Fix: Plushies no longer delete items when recycled (#32838)

fix

Co-authored-by: beck-thompson <[email protected]>

* HOTFIX (stable) submodule update  (#32900)

Update submodule

This fixes an important memory leak.

* Hotfix server config changes for playercap and Levi bunker (#32925)

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

* Applying Fix from #32764 to staging

* Fix Bug With Uppercase Radio Keys (#32997)

* Fix loneop spawnrate by reverting it to not use the shuttle event system. (#32942)

Fix loneop spawnrate by reverting it to not use the custom shuttle event system.

* Fix playtime formatting (#32974)

* Fixes tailthump breaking positional audio by making it mono (#33092)

* Hotfix add debug info to traitor activation (#33119)

* Add debug messages to traitor activation

* more debug

* HOTFIX latejoin traitor activations (#33180)

* dark green jumpsuit recolor, casual green jumpsuits added (#31710)

* green

* fix material arbitrage

* lighter

* Automatic changelog update

* printer hitbox

* Label workflow - stable (#33220)

* Label workflow - staging (#33221)

* [Maps] Astra fix (#2753)

* Automatic changelog update

* remove HyperLink (#2749)

* Automatic changelog update

* Add a Walking alert (#32954)

* Initial commit

* Review feedback changes

* ProtoId

* TempCommit

* First attempt to have client alerts

* Review changes

* The Jumpsuit Re-Detailening (#33096)

* jumpsuit detailening

* jumpskirt stuff

* meta.json

* update meta.json

* meta.json fix fix

* meta.json fix fix fix

* Intellicards now have a doAfter. (#33198)

* init

* cleanup

* Oops! Forgot something

* addressing changes

* guh

* guh 2.0

* some cleanup

* all bless the intellicard

* Yippee

* small locale thing

* changes + small bugfix

---------

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

* Automatic changelog update

* [Maps] Maus Tweak (#2756)

* Automatic changelog update

* [Maps] Tushkan update #2 (#2757)

* Automatic changelog update

* Update Credits (#33237)

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

* Removed bola stam damage (#32989)

* tweak: weather command tooltip (#33130)

clear weather tip

* Automatic changelog update

* [Maps] Brigmedic spawner (#2759)

* Automatic changelog update

* Goliath rebalance (#31492)

Update asteroid.yml

* Omega Station: Fix Air Alarm in CMO office (#33216)

move air alarm and link devices

* [Maps] Astra Update (#2760)

* Automatic changelog update

* Фикс законов боргов. (#2754)

* Automatic changelog update

* Resprite some captain clothing (#2740)

* Automatic changelog update

* Fix vape use without check if doafter cancelled (#33245)

vape small fix

* HOTFIX: Fix Security Shell Gun being uncraftable. (#33247)

* Sec Shell Gun Craftability Hotfix

* Capital Fix

* New lobby art (#2762)

* Automatic changelog update

* Make the Flare Gun & Security Shell Gun be unbolted by default. (#33248)

* Automatic changelog update

* Remove roundStart: false for Anivia voice prototype (#2764)

* Zombies able to see infection.

* BUGFIX: Fix APEs being able to be turned on without power (#32493)

Add a check to see the APC is powered before turning the emitter on.

* Automatic changelog update

* improve BiomeDunGen (#33113)

* improve BiomeDunGen

* forgot lol

* Update DungeonJob.PostGenBiome.cs

* Update DungeonJob.PostGenBiome.cs

* Make Droppers Respect Closed/Sealed Containers (#33011)

* Make droppers respect closed/sealed

* Combine nested

* Optimize conditions a bit

* Automatic changelog update

* Update cargo_vending.yml

---------

Co-authored-by: Jezithyr <[email protected]>
Co-authored-by: Errant <[email protected]>
Co-authored-by: Pieter-Jan Briers <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: beck-thompson <[email protected]>
Co-authored-by: nikthechampiongr <[email protected]>
Co-authored-by: slarticodefast <[email protected]>
Co-authored-by: Vasilis The Pikachu <[email protected]>
Co-authored-by: Thomas <[email protected]>
Co-authored-by: BramvanZijp <[email protected]>
Co-authored-by: Stalen <[email protected]>
Co-authored-by: deathride58 <[email protected]>
Co-authored-by: Boaz1111 <[email protected]>
Co-authored-by: PJBot <[email protected]>
Co-authored-by: spaghetti <[email protected]>
Co-authored-by: lastPechkin <[email protected]>
Co-authored-by: IanComradeBot <[email protected]>
Co-authored-by: Kill_Me_I_Noobs <[email protected]>
Co-authored-by: SlamBamActionman <[email protected]>
Co-authored-by: Flareguy <[email protected]>
Co-authored-by: ScarKy0 <[email protected]>
Co-authored-by: Meguneri <[email protected]>
Co-authored-by: Ko4ergaPunk <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Armok <[email protected]>
Co-authored-by: IProduceWidgets <[email protected]>
Co-authored-by: Shaddap1 <[email protected]>
Co-authored-by: scrivoy <[email protected]>
Co-authored-by: Zekins <[email protected]>
Co-authored-by: leonidussaks <[email protected]>
Co-authored-by: NotSoDamn <[email protected]>
Co-authored-by: BramvanZijp <[email protected]>
Co-authored-by: Halches <[email protected]>
Co-authored-by: Andrew Montagne <[email protected]>
Co-authored-by: Ed <[email protected]>
Co-authored-by: Preston Smith <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 135 changed files with 65,510 additions and 54,145 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/labeler-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Labels: Branch stable"

on:
pull_request_target:
types:
- opened
branches:
- 'stable'

jobs:
add_label:
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: "Branch: stable"
16 changes: 16 additions & 0 deletions .github/workflows/labeler-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Labels: Branch staging"

on:
pull_request_target:
types:
- opened
branches:
- 'staging'

jobs:
add_label:
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: "Branch: staging"
15 changes: 10 additions & 5 deletions Content.Client/Alerts/ClientAlertsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.Alert;
using JetBrains.Annotations;
using Robust.Client.Player;
using Robust.Shared.GameStates;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;

Expand All @@ -24,8 +25,7 @@ public override void Initialize()

SubscribeLocalEvent<AlertsComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<AlertsComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

SubscribeLocalEvent<AlertsComponent, AfterAutoHandleStateEvent>(ClientAlertsHandleState);
SubscribeLocalEvent<AlertsComponent, ComponentHandleState>(OnHandleState);
}
protected override void LoadPrototypes()
{
Expand All @@ -47,17 +47,22 @@ public IReadOnlyDictionary<AlertKey, AlertState>? ActiveAlerts
}
}

protected override void AfterShowAlert(Entity<AlertsComponent> alerts)
private void OnHandleState(Entity<AlertsComponent> alerts, ref ComponentHandleState args)
{
if (args.Current is not AlertComponentState cast)
return;

alerts.Comp.Alerts = cast.Alerts;

UpdateHud(alerts);
}

protected override void AfterClearAlert(Entity<AlertsComponent> alerts)
protected override void AfterShowAlert(Entity<AlertsComponent> alerts)
{
UpdateHud(alerts);
}

private void ClientAlertsHandleState(Entity<AlertsComponent> alerts, ref AfterAutoHandleStateEvent args)
protected override void AfterClearAlert(Entity<AlertsComponent> alerts)
{
UpdateHud(alerts);
}
Expand Down
21 changes: 0 additions & 21 deletions Content.Client/Corvax/HyperLink/HyperLinkSystem.cs

This file was deleted.

16 changes: 16 additions & 0 deletions Content.Client/Physics/Controllers/MoverController.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using Content.Shared.Alert;
using Content.Shared.CCVar;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Systems;
using Robust.Client.GameObjects;
using Robust.Client.Physics;
using Robust.Client.Player;
using Robust.Shared.Configuration;
using Robust.Shared.Physics.Components;
using Robust.Shared.Player;
using Robust.Shared.Timing;
Expand All @@ -14,6 +17,8 @@ public sealed class MoverController : SharedMoverController
{
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly AlertsSystem _alerts = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -135,4 +140,15 @@ protected override bool CanSound()
{
return _timing is { IsFirstTimePredicted: true, InSimulation: true };
}

public override void SetSprinting(Entity<InputMoverComponent> entity, ushort subTick, bool walking)
{
// Logger.Info($"[{_gameTiming.CurTick}/{subTick}] Sprint: {enabled}");
base.SetSprinting(entity, subTick, walking);

if (walking && _cfg.GetCVar(CCVars.ToggleWalk))
_alerts.ShowAlert(entity, WalkingAlert, showCooldown: false, autoRemove: false);
else
_alerts.ClearAlert(entity, WalkingAlert);
}
}
12 changes: 12 additions & 0 deletions Content.Server/Alert/ServerAlertsSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
using Content.Shared.Alert;
using Robust.Shared.GameStates;

namespace Content.Server.Alert;

internal sealed class ServerAlertsSystem : AlertsSystem
{
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<AlertsComponent, ComponentGetState>(OnGetState);
}

private void OnGetState(Entity<AlertsComponent> alerts, ref ComponentGetState args)
{
args.State = new AlertComponentState(alerts.Comp.Alerts);
}
}
9 changes: 6 additions & 3 deletions Content.Server/Chemistry/EntitySystems/InjectorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
using Content.Shared.Interaction;
using Content.Shared.Mobs.Components;
using Content.Shared.Stacks;
using Content.Shared.Nutrition.EntitySystems;

namespace Content.Server.Chemistry.EntitySystems;

public sealed class InjectorSystem : SharedInjectorSystem
{
[Dependency] private readonly BloodstreamSystem _blood = default!;
[Dependency] private readonly ReactiveSystem _reactiveSystem = default!;
[Dependency] private readonly OpenableSystem _openable = default!;

public override void Initialize()
{
Expand All @@ -31,13 +33,14 @@ public override void Initialize()

private bool TryUseInjector(Entity<InjectorComponent> injector, EntityUid target, EntityUid user)
{
var isOpenOrIgnored = injector.Comp.IgnoreClosed || !_openable.IsClosed(target);
// Handle injecting/drawing for solutions
if (injector.Comp.ToggleState == InjectorToggleMode.Inject)
{
if (SolutionContainers.TryGetInjectableSolution(target, out var injectableSolution, out _))
if (isOpenOrIgnored && SolutionContainers.TryGetInjectableSolution(target, out var injectableSolution, out _))
return TryInject(injector, target, injectableSolution.Value, user, false);

if (SolutionContainers.TryGetRefillableSolution(target, out var refillableSolution, out _))
if (isOpenOrIgnored && SolutionContainers.TryGetRefillableSolution(target, out var refillableSolution, out _))
return TryInject(injector, target, refillableSolution.Value, user, true);

if (TryComp<BloodstreamComponent>(target, out var bloodstream))
Expand All @@ -58,7 +61,7 @@ private bool TryUseInjector(Entity<InjectorComponent> injector, EntityUid target
}

// Draw from an object (food, beaker, etc)
if (SolutionContainers.TryGetDrawableSolution(target, out var drawableSolution, out _))
if (isOpenOrIgnored && SolutionContainers.TryGetDrawableSolution(target, out var drawableSolution, out _))
return TryDraw(injector, target, drawableSolution.Value, user);

Popup.PopupEntity(Loc.GetString("injector-component-cannot-draw-message",
Expand Down
11 changes: 0 additions & 11 deletions Content.Server/Corvax/HyperLink/HyperLinkComponent.cs

This file was deleted.

30 changes: 0 additions & 30 deletions Content.Server/Corvax/HyperLink/HyperLinkSystem.cs

This file was deleted.

3 changes: 1 addition & 2 deletions Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ private void OnVapeInteraction(Entity<VapeComponent> entity, ref AfterInteractEv

private void OnVapeDoAfter(Entity<VapeComponent> entity, ref VapeDoAfterEvent args)
{
if (args.Handled
|| args.Args.Target == null)
if (args.Cancelled || args.Handled || args.Args.Target == null)
return;

var environment = _atmos.GetContainingMixture(args.Args.Target.Value, true, true);
Expand Down
25 changes: 16 additions & 9 deletions Content.Server/Procedural/DungeonJob/DungeonJob.PostGenBiome.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Threading.Tasks;
using Content.Server.Parallax;
using Content.Shared.Maps;
using Content.Shared.Parallax.Biomes;
using Content.Shared.Procedural;
using Content.Shared.Procedural.PostGeneration;
Expand All @@ -15,35 +16,43 @@ public sealed partial class DungeonJob
/// </summary>
private async Task PostGen(BiomeDunGen dunGen, DungeonData data, Dungeon dungeon, HashSet<Vector2i> reservedTiles, Random random)
{
if (_entManager.TryGetComponent(_gridUid, out BiomeComponent? biomeComp))
if (!_prototype.TryIndex(dunGen.BiomeTemplate, out var indexedBiome))
return;

biomeComp = _entManager.AddComponent<BiomeComponent>(_gridUid);
var biomeSystem = _entManager.System<BiomeSystem>();
biomeSystem.SetTemplate(_gridUid, biomeComp, _prototype.Index(dunGen.BiomeTemplate));

var seed = random.Next();
var xformQuery = _entManager.GetEntityQuery<TransformComponent>();

foreach (var node in dungeon.RoomTiles)
var tiles = _maps.GetAllTilesEnumerator(_gridUid, _grid);
while (tiles.MoveNext(out var tileRef))
{
var node = tileRef.Value.GridIndices;

if (reservedTiles.Contains(node))
continue;

if (dunGen.TileMask is not null)
{
if (!dunGen.TileMask.Contains(((ContentTileDefinition) _tileDefManager[tileRef.Value.Tile.TypeId]).ID))
continue;
}

// Need to set per-tile to override data.
if (biomeSystem.TryGetTile(node, biomeComp.Layers, seed, _grid, out var tile))
if (biomeSystem.TryGetTile(node, indexedBiome.Layers, seed, _grid, out var tile))
{
_maps.SetTile(_gridUid, _grid, node, tile.Value);
}

if (biomeSystem.TryGetDecals(node, biomeComp.Layers, seed, _grid, out var decals))
if (biomeSystem.TryGetDecals(node, indexedBiome.Layers, seed, _grid, out var decals))
{
foreach (var decal in decals)
{
_decals.TryAddDecal(decal.ID, new EntityCoordinates(_gridUid, decal.Position), out _);
}
}

if (biomeSystem.TryGetEntity(node, biomeComp, _grid, out var entityProto))
if (tile is not null && biomeSystem.TryGetEntity(node, indexedBiome.Layers, tile.Value, seed, _grid, out var entityProto))
{
var ent = _entManager.SpawnEntity(entityProto, new EntityCoordinates(_gridUid, node + _grid.TileSizeHalfVector));
var xform = xformQuery.Get(ent);
Expand All @@ -61,7 +70,5 @@ private async Task PostGen(BiomeDunGen dunGen, DungeonData data, Dungeon dungeon
if (!ValidateResume())
return;
}

biomeComp.Enabled = false;
}
}
20 changes: 18 additions & 2 deletions Content.Server/Silicons/StationAi/StationAiSystem.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using System.Linq;
using Content.Server.Chat.Managers;
using Content.Server.Chat.Systems;
using Content.Shared.Chat;
using Content.Shared.Mind;
using Content.Shared.Roles;
using Content.Shared.Silicons.StationAi;
using Content.Shared.StationAi;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Audio;
using Robust.Shared.Map.Components;
using Robust.Shared.Player;

Expand All @@ -14,6 +15,8 @@ public sealed class StationAiSystem : SharedStationAiSystem
{
[Dependency] private readonly IChatManager _chats = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly SharedMindSystem _mind = default!;
[Dependency] private readonly SharedRoleSystem _roles = default!;

private readonly HashSet<Entity<StationAiCoreComponent>> _ais = new();

Expand Down Expand Up @@ -43,6 +46,19 @@ public override bool SetWhitelistEnabled(Entity<StationAiWhitelistComponent> ent
return true;
}

public override void AnnounceIntellicardUsage(EntityUid uid, SoundSpecifier? cue = null)
{
if (!TryComp<ActorComponent>(uid, out var actor))
return;

var msg = Loc.GetString("ai-consciousness-download-warning");
var wrappedMessage = Loc.GetString("chat-manager-server-wrap-message", ("message", msg));
_chats.ChatMessageToOne(ChatChannel.Server, msg, wrappedMessage, default, false, actor.PlayerSession.Channel, colorOverride: Color.Red);

if (cue != null && _mind.TryGetMind(uid, out var mindId, out _))
_roles.MindPlaySound(mindId, cue);
}

private void AnnounceSnip(EntityUid entity)
{
var xform = Transform(entity);
Expand Down
3 changes: 2 additions & 1 deletion Content.Server/Singularity/EntitySystems/EmitterSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ public void SwitchOn(EntityUid uid, EmitterComponent component)
if (TryComp<ApcPowerReceiverComponent>(uid, out var apcReceiver))
{
apcReceiver.Load = component.PowerUseActive;
PowerOn(uid, component);
if (apcReceiver.Powered)
PowerOn(uid, component);
}
// Do not directly PowerOn().
// OnReceivedPowerChanged will get fired due to DrawRate change which will turn it on.
Expand Down
4 changes: 3 additions & 1 deletion Content.Server/Weather/WeatherSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Robust.Shared.Console;
using Robust.Shared.GameStates;
using Robust.Shared.Map;
using System.Linq;

namespace Content.Server.Weather;

Expand Down Expand Up @@ -85,6 +86,7 @@ private CompletionResult WeatherCompletion(IConsoleShell shell, string[] args)
return CompletionResult.FromHintOptions(CompletionHelper.MapIds(EntityManager), "Map Id");

var a = CompletionHelper.PrototypeIDs<WeatherPrototype>(true, ProtoMan);
return CompletionResult.FromHintOptions(a, Loc.GetString("cmd-weather-hint"));
var b = a.Concat(new[] { new CompletionOption("null", Loc.GetString("cmd-weather-null")) });
return CompletionResult.FromHintOptions(b, Loc.GetString("cmd-weather-hint"));
}
}
Loading

0 comments on commit d318b2e

Please sign in to comment.