Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Engine to v228.0.0 #444

Merged
merged 5 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected async Task<EntityUid> SpawnEntity(EntitySpecifier spec, EntityCoordina
{
await Server.WaitPost(() =>
{
uid = SEntMan.SpawnEntity(stackProto.Spawn, coords);
uid = SEntMan.SpawnAtPosition(stackProto.Spawn, coords);
Stack.SetCount(uid, spec.Quantity);
});
return uid;
Expand All @@ -114,13 +114,13 @@ await Server.WaitPost(() =>
return await SpawnEntity((stack.StackTypeId, spec.Quantity), coords);

Assert.That(spec.Quantity, Is.EqualTo(1), "SpawnEntity only supports returning a singular entity");
await Server.WaitPost(() => uid = SEntMan.SpawnEntity(spec.Prototype, coords));
await Server.WaitPost(() => uid = SEntMan.SpawnAtPosition(spec.Prototype, coords));
return uid;
}

/// <summary>
/// Convert an entity-uid to a matching entity specifier. Useful when doing entity lookups & checking that the
/// right quantity of entities/materials werre produced. Returns null if passed an entity with a null prototype.
/// right quantity of entities/materials were produced. Returns null if passed an entity with a null prototype.
/// </summary>
protected EntitySpecifier? ToEntitySpecifier(EntityUid uid)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected async Task SpawnTarget(string prototype)
Target = NetEntity.Invalid;
await Server.WaitPost(() =>
{
Target = SEntMan.GetNetEntity(SEntMan.SpawnEntity(prototype, SEntMan.GetCoordinates(TargetCoords)));
Target = SEntMan.GetNetEntity(SEntMan.SpawnAtPosition(prototype, SEntMan.GetCoordinates(TargetCoords)));
});

await RunTicks(5);
Expand Down
17 changes: 17 additions & 0 deletions Content.Server/FloofStation/HideoutGeneratorComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Robust.Shared.Map;


namespace Content.Server.FloofStation;


[RegisterComponent]
public sealed partial class HideoutGeneratorComponent : Component
{

/// <summary>
/// Maps we've generated.
/// </summary>
[DataField]
public List<MapId> Generated = new();

}
23 changes: 19 additions & 4 deletions Content.Server/FloofStation/TheDarkSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ public sealed class TheDarkSystem : EntitySystem
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<RoundStartingEvent>(SetupTheDark);
SubscribeLocalEvent<HideoutGeneratorComponent, MapInitEvent>(SetupTheDark);
SubscribeLocalEvent<HideoutGeneratorComponent, ComponentShutdown>(DestroyTheDark);
}

private void SetupTheDark(RoundStartingEvent ev)
private void SetupTheDark(EntityUid uid, HideoutGeneratorComponent component, MapInitEvent args)
{
Logger.Debug(uid.ToString());
var mapId = _mapManager.CreateMap();
_mapManager.AddUninitializedMap(mapId);

Expand All @@ -30,7 +31,21 @@ private void SetupTheDark(RoundStartingEvent ev)
{
EnsureComp<PreventPilotComponent>(id);
}

component.Generated.Add(mapId);
_mapManager.DoMapInitialize(mapId);
}

private void DestroyTheDark(EntityUid uid, HideoutGeneratorComponent component, ComponentShutdown args)
{

foreach (var mapId in component.Generated)
{
if (!_mapManager.MapExists(mapId))
continue;

_mapManager.DeleteMap(mapId);
}


}
}
7 changes: 7 additions & 0 deletions Resources/Prototypes/Entities/Stations/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,10 @@
abstract: true
components:
- type: StationEventEligible # For when someone makes this more granular in the future.

# Floof
- type: entity
id: BaseStationTheDark
abstract: true
components:
- type: HideoutGenerator
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Stations/nanotrasen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- BaseStationNanotrasen
- BaseRandomStation
- BaseStationMail # Nyano component, required for station mail to function
- BaseStationTheDark # Floof
noSpawn: true
components:
- type: Transform
Expand Down
2 changes: 1 addition & 1 deletion RobustToolbox
Submodule RobustToolbox updated 85 files
+1 −1 Directory.Packages.props
+1 −1 MSBuild/Robust.Engine.Version.props
+27 −0 RELEASE-NOTES.md
+91 −0 Robust.Analyzers.Tests/DataDefinitionAnalyzerTest.cs
+71 −0 Robust.Analyzers.Tests/PreferNonGenericVariantForTest.cs
+1 −0 Robust.Analyzers.Tests/Robust.Analyzers.Tests.csproj
+52 −1 Robust.Analyzers/DataDefinitionAnalyzer.cs
+47 −1 Robust.Analyzers/DataDefinitionFixer.cs
+65 −0 Robust.Analyzers/PreferNonGenericVariantForAnalyzer.cs
+7 −0 Robust.Analyzers/Robust.Analyzers.csproj
+1 −1 Robust.Client/Audio/AudioManager.Public.cs
+31 −4 Robust.Client/Audio/AudioManager.cs
+1 −1 Robust.Client/Audio/AudioOverlay.cs
+11 −17 Robust.Client/Audio/Sources/BufferedAudioSource.cs
+14 −13 Robust.Client/Console/Commands/Debug.cs
+12 −1 Robust.Client/Console/Commands/DumpMetadataMembersCommand.cs
+5 −2 Robust.Client/Console/Commands/GridChunkBBCommand.cs
+1 −1 Robust.Client/Console/Commands/UITestCommand.cs
+8 −4 Robust.Client/Debugging/DebugDrawingSystem.cs
+27 −15 Robust.Client/Debugging/DebugPhysicsSystem.cs
+0 −10 Robust.Client/GameObjects/ClientEntityManager.cs
+12 −4 Robust.Client/GameObjects/EntitySystems/GridChunkBoundsDebugSystem.cs
+1 −1 Robust.Client/GameObjects/EntitySystems/InputSystem.cs
+5 −0 Robust.Client/GameObjects/EntitySystems/SpriteSystem.cs
+2 −1 Robust.Client/GameObjects/EntitySystems/VelocityDebugSystem.cs
+0 −4 Robust.Client/GameObjects/IClientEntityManagerInternal.cs
+2 −2 Robust.Client/Placement/Modes/AlignSnapgridCenter.cs
+1 −2 Robust.Client/UserInterface/Controllers/Implementations/EntitySpawningUIController.cs
+2 −7 Robust.Client/UserInterface/Controls/EntityPrototypeView.cs
+8 −2 Robust.Client/UserInterface/Controls/OptionButton.cs
+12 −0 Robust.Client/UserInterface/Controls/RichTextLabel.cs
+3 −4 Robust.Client/UserInterface/CustomControls/EntitySpawnButton.cs
+2 −2 Robust.Client/UserInterface/CustomControls/EntitySpawnWindow.xaml.cs
+109 −14 Robust.Client/ViewVariables/Editors/VVPropEditorEnum.cs
+1 −1 Robust.Client/ViewVariables/Editors/VVPropEditorIPrototype.cs
+2 −0 Robust.Roslyn.Shared/Diagnostics.cs
+4 −0 Robust.Server/GameObjects/Components/VisibilityComponent.cs
+2 −0 Robust.Server/ServerIoC.cs
+2 −4 Robust.Server/Upload/GamePrototypeLoadManager.cs
+2 −3 Robust.Server/Upload/NetworkResourceManager.cs
+28 −0 Robust.Server/Upload/UploadedContentManager.cs
+1 −6 Robust.Shared.Maths/Color.cs
+18 −0 Robust.Shared/Analyzers/PreferNonGenericVariantForAttribute.cs
+3 −1 Robust.Shared/CPUJob/JobQueues/Job.cs
+11 −1 Robust.Shared/CVars.cs
+3 −4 Robust.Shared/ComponentTrees/ComponentTreeSystem.cs
+28 −29 Robust.Shared/Console/Commands/MapCommands.cs
+1 −1 Robust.Shared/Console/Commands/TeleportCommands.cs
+1 −1 Robust.Shared/Console/IConsoleShell.cs
+3 −1 Robust.Shared/Containers/SharedContainerSystem.cs
+1 −1 Robust.Shared/ContentPack/AssemblyTypeChecker.Parsing.cs
+138 −3 Robust.Shared/ContentPack/Sandbox.yml
+31 −4 Robust.Shared/ContentPack/WritableDirProvider.cs
+10 −6 Robust.Shared/GameObjects/Components/Transform/TransformComponent.cs
+15 −0 Robust.Shared/GameObjects/EntityManager.cs
+8 −0 Robust.Shared/GameObjects/EntitySystem.Proxy.cs
+2 −5 Robust.Shared/GameObjects/EntitySystem.cs
+5 −0 Robust.Shared/GameObjects/IEntityManager.cs
+15 −14 Robust.Shared/GameObjects/Systems/SharedTransformSystem.Component.cs
+5 −4 Robust.Shared/Map/CoordinatesExtensions.cs
+4 −4 Robust.Shared/Map/EntityCoordinates.cs
+1 −1 Robust.Shared/Network/HappyEyeballsHttp.cs
+4 −6 Robust.Shared/Network/NetEncryption.cs
+2 −2 Robust.Shared/Physics/Controllers/Gravity2DController.cs
+28 −0 Robust.Shared/Physics/Events/MassChangedEvent.cs
+14 −5 Robust.Shared/Physics/Systems/SharedPhysicsSystem.Components.cs
+1 −1 Robust.Shared/Physics/Systems/SharedPhysicsSystem.Island.cs
+12 −6 Robust.Shared/Player/Filter.cs
+1 −1 Robust.Shared/Serialization/TypeSerializers/Implementations/FormattedMessageSerializer.cs
+11 −1 Robust.Shared/Toolshed/Commands/Entities/NearbyCommand.cs
+7 −4 Robust.Shared/Toolshed/Commands/Misc/BuildInfoCommand.cs
+1 −1 Robust.Shared/Toolshed/Errors/NotForServerConsoleError.cs
+1 −1 Robust.Shared/Toolshed/Errors/SessionHasNoEntityError.cs
+1 −1 Robust.Shared/Toolshed/IInvocationContext.cs
+1 −1 Robust.Shared/Toolshed/Syntax/ParserContext.cs
+1 −1 Robust.Shared/Toolshed/Syntax/ValueRef.cs
+57 −6 Robust.Shared/Toolshed/ToolshedCommand.Help.cs
+18 −1 Robust.Shared/Toolshed/ToolshedCommand.cs
+1 −1 Robust.Shared/Toolshed/TypeParsers/StringTypeParser.cs
+1 −2 Robust.Shared/Upload/NetworkResourceUploadMessage.cs
+26 −22 Robust.Shared/Utility/ZStd.cs
+1 −1 Robust.Shared/ViewVariables/ViewVariablesManager.TypeHandlers.cs
+6 −2 Robust.Shared/ViewVariables/ViewVariablesTypeHandler.cs
+15 −2 Robust.UnitTesting/RobustUnitTest.cs
+6 −6 Robust.UnitTesting/Shared/Maths/Color_Test.cs
Loading