2023-02-26 06:14:26 +13:00
|
|
|
using System.Linq;
|
2022-08-07 20:21:56 -03:00
|
|
|
using Content.Server.Administration.Logs;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
using Content.Server.Construction.Components;
|
2023-01-20 16:09:13 +00:00
|
|
|
using Content.Server.Temperature.Components;
|
|
|
|
|
using Content.Server.Temperature.Systems;
|
2024-02-08 18:44:02 +09:00
|
|
|
using Content.Shared._White.Cult.Components;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
using Content.Shared.Construction;
|
2023-08-12 17:39:58 -04:00
|
|
|
using Content.Shared.Construction.Components;
|
2023-06-29 08:35:54 -04:00
|
|
|
using Content.Shared.Construction.EntitySystems;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
using Content.Shared.Construction.Steps;
|
2023-02-24 19:01:25 -05:00
|
|
|
using Content.Shared.DoAfter;
|
2024-02-08 18:44:02 +09:00
|
|
|
using Content.Shared.Ghost;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
using Content.Shared.Interaction;
|
2023-10-01 16:08:02 -05:00
|
|
|
using Content.Shared.Prying.Systems;
|
2023-04-05 12:19:28 +12:00
|
|
|
using Content.Shared.Radio.EntitySystems;
|
2023-09-21 23:04:05 +09:00
|
|
|
using Content.Shared.Stacks;
|
2023-02-24 19:01:25 -05:00
|
|
|
using Content.Shared.Tools.Components;
|
2023-10-05 22:15:03 -05:00
|
|
|
using Content.Shared.Tools.Systems;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
using Robust.Shared.Containers;
|
2023-04-03 13:13:48 +12:00
|
|
|
using Robust.Shared.Map;
|
2023-02-26 06:14:26 +13:00
|
|
|
using Robust.Shared.Utility;
|
2022-09-20 08:01:33 +12:00
|
|
|
#if EXCEPTION_TOLERANCE
|
2023-02-24 19:01:25 -05:00
|
|
|
// ReSharper disable once RedundantUsingDirective
|
2022-09-20 08:01:33 +12:00
|
|
|
using Robust.Shared.Exceptions;
|
|
|
|
|
#endif
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
|
|
|
|
namespace Content.Server.Construction
|
|
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed partial class ConstructionSystem
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
{
|
2022-08-07 20:21:56 -03:00
|
|
|
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
|
2022-09-20 08:01:33 +12:00
|
|
|
#if EXCEPTION_TOLERANCE
|
|
|
|
|
[Dependency] private readonly IRuntimeLog _runtimeLog = default!;
|
|
|
|
|
#endif
|
2022-08-07 20:21:56 -03:00
|
|
|
|
2023-02-26 06:14:26 +13:00
|
|
|
private readonly Queue<EntityUid> _constructionUpdateQueue = new();
|
|
|
|
|
private readonly HashSet<EntityUid> _queuedUpdates = new();
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
2021-11-02 11:24:32 +01:00
|
|
|
private void InitializeInteractions()
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
{
|
2023-04-08 12:54:28 +12:00
|
|
|
SubscribeLocalEvent<ConstructionComponent, ConstructionInteractDoAfterEvent>(EnqueueEvent);
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
|
|
|
|
// Event handling. Add your subscriptions here! Just make sure they're all handled by EnqueueEvent.
|
2023-06-29 08:35:54 -04:00
|
|
|
SubscribeLocalEvent<ConstructionComponent, InteractUsingEvent>(EnqueueEvent,
|
2023-10-05 22:15:03 -05:00
|
|
|
new []{typeof(AnchorableSystem), typeof(PryingSystem), typeof(WeldableSystem)},
|
2023-06-29 08:35:54 -04:00
|
|
|
new []{typeof(EncryptionKeySystem)});
|
2023-01-20 16:09:13 +00:00
|
|
|
SubscribeLocalEvent<ConstructionComponent, OnTemperatureChangeEvent>(EnqueueEvent);
|
2023-08-12 17:39:58 -04:00
|
|
|
SubscribeLocalEvent<ConstructionComponent, PartAssemblyPartInsertedEvent>(EnqueueEvent);
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Takes in an entity with <see cref="ConstructionComponent"/> and an object event, and handles any
|
|
|
|
|
/// possible construction interactions, depending on the construction's state.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>When <see cref="validation"/> is true, this method will simply return whether the interaction
|
|
|
|
|
/// would be handled by the entity or not. It essentially becomes a pure method that modifies nothing.</remarks>
|
|
|
|
|
/// <returns>The result of this interaction with the entity.</returns>
|
2022-11-16 12:10:27 +01:00
|
|
|
private HandleResult HandleEvent(EntityUid uid, object ev, bool validation, ConstructionComponent? construction = null)
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
{
|
|
|
|
|
if (!Resolve(uid, ref construction))
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
|
|
|
|
|
// If the state machine is in an invalid state (not on a valid node) we can't do anything, ever.
|
|
|
|
|
if (GetCurrentNode(uid, construction) is not {} node)
|
|
|
|
|
{
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If we're currently in an edge, we'll let the edge handle or validate the interaction.
|
|
|
|
|
if (GetCurrentEdge(uid, construction) is {} edge)
|
|
|
|
|
{
|
2021-10-28 11:07:25 +02:00
|
|
|
var result = HandleEdge(uid, ev, edge, validation, construction);
|
|
|
|
|
|
|
|
|
|
// Reset edge index to none if this failed...
|
|
|
|
|
if (!validation && result is HandleResult.False && construction.StepIndex == 0)
|
|
|
|
|
construction.EdgeIndex = null;
|
|
|
|
|
|
|
|
|
|
return result;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If we're not on an edge, let the node handle or validate the interaction.
|
|
|
|
|
return HandleNode(uid, ev, node, validation, construction);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Takes in an entity, a <see cref="ConstructionGraphNode"/> and an object event, and handles any
|
|
|
|
|
/// possible construction interactions. This will check the interaction against all possible edges,
|
|
|
|
|
/// and if any of the edges accepts the interaction, we will enter it.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>When <see cref="validation"/> is true, this method will simply return whether the interaction
|
|
|
|
|
/// would be handled by the entity or not. It essentially becomes a pure method that modifies nothing.</remarks>
|
|
|
|
|
/// <returns>The result of this interaction with the entity.</returns>
|
|
|
|
|
private HandleResult HandleNode(EntityUid uid, object ev, ConstructionGraphNode node, bool validation, ConstructionComponent? construction = null)
|
|
|
|
|
{
|
|
|
|
|
if (!Resolve(uid, ref construction))
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
|
2023-09-21 23:04:05 +09:00
|
|
|
if (TryComp(uid, out StackComponent? stack) && stack.Count > 1) // WD
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
// Let's make extra sure this is zero...
|
|
|
|
|
construction.StepIndex = 0;
|
|
|
|
|
|
|
|
|
|
// When we handle a node, we're essentially testing the current event interaction against all of this node's
|
|
|
|
|
// edges' first steps. If any of them accepts the interaction, we stop iterating and enter that edge.
|
|
|
|
|
for (var i = 0; i < node.Edges.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
var edge = node.Edges[i];
|
|
|
|
|
if (HandleEdge(uid, ev, edge, validation, construction) is var result and not HandleResult.False)
|
|
|
|
|
{
|
|
|
|
|
// Only a True result may modify the state.
|
2021-10-28 11:07:25 +02:00
|
|
|
// In the case of DoAfter, it's only allowed to modify the waiting flag and the current edge index.
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
// In the case of validated, it should NEVER modify the state at all.
|
|
|
|
|
if (result is not HandleResult.True)
|
2021-10-28 11:07:25 +02:00
|
|
|
{
|
|
|
|
|
if (result is HandleResult.DoAfter)
|
|
|
|
|
{
|
|
|
|
|
construction.EdgeIndex = i;
|
|
|
|
|
}
|
|
|
|
|
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
return result;
|
2021-10-28 11:07:25 +02:00
|
|
|
}
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
|
|
|
|
// If we're not on the same edge as we were before, that means handling that edge changed the node.
|
|
|
|
|
if (construction.Node != node.Name)
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
// If we're still in the same node, that means we entered the edge and it's still not done.
|
|
|
|
|
construction.EdgeIndex = i;
|
|
|
|
|
UpdatePathfinding(uid, construction);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Takes in an entity, a <see cref="ConstructionGraphEdge"/> and an object event, and handles any
|
|
|
|
|
/// possible construction interactions. This will check the interaction against one of the steps in the edge
|
|
|
|
|
/// depending on the construction's <see cref="ConstructionComponent.StepIndex"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>When <see cref="validation"/> is true, this method will simply return whether the interaction
|
|
|
|
|
/// would be handled by the entity or not. It essentially becomes a pure method that modifies nothing.</remarks>
|
|
|
|
|
/// <returns>The result of this interaction with the entity.</returns>
|
|
|
|
|
private HandleResult HandleEdge(EntityUid uid, object ev, ConstructionGraphEdge edge, bool validation, ConstructionComponent? construction = null)
|
|
|
|
|
{
|
|
|
|
|
if (!Resolve(uid, ref construction))
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
|
|
|
|
|
var step = GetStepFromEdge(edge, construction.StepIndex);
|
|
|
|
|
|
|
|
|
|
if (step == null)
|
|
|
|
|
{
|
[Upstream] Upstream (#109)
* Automatic changelog update
* atlas update (#25071)
* atlas update
* untroll
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
* box update (#25074)
* fland update (#25075)
* marathon update (#25076)
* meta update (#25077)
* Syndicate key grammar fix (#25085)
* Syndicate encryption key grammar fix
An encryption key used by... wait... Who is owner of this chip? > An encryption key used by... wait... Who is the owner of this chip?
* Syndicate key grammar fix
An encryption key used by... wait... Who is owner of this chip? > An encryption key used by... wait... Who is the owner of this chip?
* Fix hybridization seedless probability (#25084)
Fix comparison
Hybrids (different plants being crossed) are supposed to have a high
chance of becoming seedless to balance overpowered plants.
However, a logic error in the comparison gave seedless to plants when
they were from the same seed (not hybrids) rather than the other way
around.
Reported by: @genderGeometries
* Added Tourniquets to stop bleeds (#23198)
* Fixed Error with RobustToolbox Edits. Removed the addition of secbelt tag from assault belt.
* Resprite of the monstrosity
* Resprite of the tourniquet NO LONGER PHALLUS SHAPED
* too bright, now darker and edgier
* Tourniquet resprite
* metajson yay
* Update Skelly Vs The Rev lobby art (#25088)
Someone said the original was a bit low res
and I agreed.
This is a 1440p (from an 8k base image) rendition
of the same scene, with a new dramatic forced
perspective look, and generally cleaner art throughout.
Also now there's two mothroaches.
* Automatic changelog update
* Minor airlock assembly clean up (#25073)
1
* Update README.md (#25067)
* Update README.md
* emo review
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
---------
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
* prevent opening debug menus without perms (#25091)
prevent people without permissions from opening the tile, entityspawn, or decal menus
* Remove battery from crew observation kit, fix description (#25000)
-Remove battery from crew observation kit, fix description
* Laughin' Peas (#25089)
* laughter
* make clownmobs bleed laughter
* laughin syrup and laughter recipe
* add laughin peas
* Automatic changelog update
* QM drip DLC (#24477)
* New Drip for the QM
QM beret and QM formal uniform
* Asd
Asd
* Adds the new clothing to the uniform printer
what it says on the tin
* I always forget to update the copyright RAAAAAH
yup
* EMT Belt Part 2 (#24289)
* add
* fix
* aaaa
* Flipped caps real (#24961)
* Flipped caps real
* oops
* whoops
* flip not fold
* fix formatting
* cargosoft formatting
* Automatic changelog update
* Nerf Beanbags (#24653)
Lowers beanbag damage from 55 stam to 30 stam
* Automatic changelog update
* Fix screenspace popups (#24987)
* Fix screenspace popups
Never got around to it earlier but need to draw it above UI controls.
* Minor null change
* Automatic changelog update
* Fix crew manifest department bugs (#24975)
* Automatic changelog update
* Changed door remote to trigger based on vision occlusion(#25093)
Changed door remote to trigger based on vision occlusion rather than opaque collision targeting check. Ian's butt will no longer absorb your 5G signals.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* GPS In Paramed Locker (#25096)
GPS in paramed locker
* Remove 'travis scott day' from the game (#25106)
* remove travis scott from the game
* KILL TRAVIS EVEN MORE
* Automatic changelog update
* Remove erroneous changelog (#25107)
* fixed fland cargo shuttle not having tiny fans (sorry) (#25095)
* Glass box for antique laser pistol (#25104)
* glassbox
* fix
* Gibbing refactor (Per-part gibbing and giblet throwing!) (#24989)
* Moving Gibbing rework out from medrefactor into it's own PR
* Re-enabled warning for missing gibbable on TryGibEntity
* Implemented better logic for gibbing failover and better logging
* Allowing audio params and drop scattering customization per component. Created UnGibbable organ base types and made brains ungibbable.
Removed delete brain from gibBody function. Artifact crusher does not destroy brains anymore. It only destroyed brains before not other organs which was wierd.
* Update Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Fixing space for multiplication
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Added event raised when attempting to gib contained entities to allow modification of allowed and excluded container ids
* removing audioParams var from component (sound specifier includes it)
* Fixing signature
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Automatic changelog update
* Gibbing contents hotfix (#25114)
Fixing gibbing contents not respecting Include/Exclude container lists. This is currently unused
* Predict two-way levers (#25043)
* Predict two-way levers
Annoys me the rare occasions I touch cargo. Doesn't predict the signal but at least the lever responds immediately.
* space
* a
* Replace Romerol with Ambuzol in chemist guidebook (#25108)
replace romerol with ambuzol
* Fix borgs being able to emag themselves (#24748)
* Fix self emagging borgs
* Add popup on self emag failure.
* Ectoplasm is grindable into Necrosol (#25053)
add
* Automatic changelog update
* Automatic changelog update
* Roundstart Food Service research (#25046)
add
* Automatic changelog update
* Add option for character name colors in chat & move coloration to clientside (#24625)
* Adds option to disable character names in chat/speechbubbles
* Moved the coloring of names to clientside
* Move string functions to SharedChatSystem to avoid duplicate code in SpeechBubble.cs
* Changed to be put under Accessibility section
* Cache CVar
* Automatic changelog update
* Update Credits (#25115)
Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com>
* Replace fixed drink glasses with metamorphic versions (#25134)
* Replaced fixed drink glasses with metamorphic versions
* Fine, no milkshake then
* ambuzol beef (#25119)
* Automatic changelog update
* Shuttle floor resprite (#25127)
* resprites shuttle tiles
* resprites shuttle floor tiles & adds grey/black shuttle tiles
* attributions.yml update
* Adding a period to an object description (#25138)
Added a period to an object description.
Adds a period to silk's description. This is my first and last pull request.
* Door Remote Changelog Entry (#25144)
I'm so dumb.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* Lowered Ion Storm Reoccurence Delay to 20 (#25135)
* Lowered reoccurencedelay to 45
* Lowered Further down to 20
* Re-added shivs to crafting menus (#25094)
Added a recipe for crafting menu
* Automatic changelog update
* Color Tipped Ammo (#25103)
* Tipped .35 ammo
* used layers instead of new sprites
* remove the useless old sprites
* changed the green slightly
* Automatic changelog update
* Add overlay decals for mini tiles and bricks (#24949)
Add minitile and brick decals overlay
* Update Core (#24862)
* add
* Update Resources/Textures/Parallaxes/attributions.yml
* sprite change
* address review
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Buyable Jani Trolley (#25139)
Trolley
* Added display for amount of hits left in stun batons/stun prods. (#25141)
Added display for amount of hits left in stun batons/stunprods.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* autolatheable air tanks (#25130)
* gastankening
* fix price
* Automatic changelog update
* Fix pointing arrow trajectory (#25061)
Initial commit
* make linking logic gates 1000% better (#25041)
* make door status use SendSignal
* LastSignals and logic, add ClearSignal api too
* make everything outputting a logic signal default to false
* refactor ops
* :trollface:
* :trollface:
* protoid for LastSignals
* oop
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
* Buff emergency toolbox fill (#24225)
Resolves issue #23059, for which the submitter wrote:
Emergency toolboxes contain a crowbar, two flashlights (sometimes one), two breath masks, and two chocolate. With the addition of water bottles to survival boxes and emergency nitrogen tanks, I think emergency toolboxes should be updated to include said water bottles and emergency tanks. Would make these just a little bit more useful. It feels weird they don't have oxygen tanks when they have two breath masks, and since water bottles are now commonplace it would be a good idea to put them in a place where emergency food is stored as well.
* Void jetpack resprite (#25150)
add
* Automatic changelog update
* Allow configuring gen_build_info.py through environment variables (#25162)
This makes the life of forks slightly easier by letting you pass an
environment variable instead of having to maintain this file yourself.
* Significantly nerf Deathnettles (#25068)
* Balancing my beloved
Significantly nerfs deathnettles so botanists can't just take down jug's like it's no issue, we have guns, we should be using them
* Additional Balancing Changes.
* Losing my mind
* Automatic changelog update
* Fix spelling errors in mechs.yml (#25168)
* fix showhealthbars perms (#25157)
* Allow inspecting ID's and Health of people behind glass (#25163)
Hops will love me
* Automatic changelog update
* Fix decal error spam (#25172)
* Restore MonoOverlay (#25170)
https://github.com/space-wizards/space-station-14/pull/24949 nuked it.
* Automatic changelog update
* Added "wink" and "tearfully smiles" emotes + more cry emote variations (#25129)
Added wink and tearfully smiles emote + more cries variations
* Automatic changelog update
* Update submodule to 210.0.0 (#25175)
* Update submodule to 210.0.0
* 210.0.1 instead, the previous one was broken
* 210.0.3 instead, the previous one was ALSO broken
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
* The medical beret is real (#25176)
* 1
* 2
* button is real.
* Automatic changelog update
* Fixed Tipped ammo not being Spent (#25167)
Fix Tipped Ammo not being Spent
* Automatic changelog update
* Hoods and some chaplain's hats now hides hair (#25142)
* Hoods now hide hair
* additional
plague hat and witch hat now hide hair
* fixing some tags in hats
* hoods tag fix
* Glassbox shatter resprite (#25136)
* Automatic changelog update
* Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper
Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.
This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.
* Fix a bunch of warnings
* More warning fixes
* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.
* Get rid of some more ISerializationHooks for enums
* And a little more
* Apply suggestions from code review
Co-authored-by: 0x6273 <0x40@keemail.me>
---------
Co-authored-by: 0x6273 <0x40@keemail.me>
* Decrease the chemical cost of regen mesh and sutures and move them to their own file (#24948)
* WHYWEREMEDSINMEALRECIPES
* 20chem
* didiforgettosavethis
* Split slime marking leg gradient (#24928)
* Split slime marking leg gradient
* up markings to 4
* Automatic changelog update
* Require plants to be harvestable before sampling (#24851)
* Add verbs to Open/Close Openable containers, and add optional seals (#24780)
* Implement closing; add open/close verbs
* Add breakable seals
* Allow custom verb names; make condiment bottles closeable
* Remove pointless VV annotations and false defaults
* Split Sealable off into a new component
* Should have a Closed event too
* Oh hey, there are icons I could use
* Ternary operator
* Add support for seal visualizers
* Moved Sealable to Shared, added networking
* Replaced bottle_close1.ogg
* Automatic changelog update
* Shadow anomaly returns (#24629)
* content
* add cat
* ambient
* I FORGOT HEARTS!
* fix ambient
* some fixes
* canCollide: false
* connect to damageable
* pi
* remove fx
* some fixes
* *sad bruh*
* hazed
* Update base_shadow.yml
* Automatic changelog update
* Microwave UX enhancements (#24547)
* Facelift Microwave UI
Includes new background light in UI, Uses predictive input, UI now properly disables buttons when microwave is active
* Microwave now shows Elapsed time
* Fixed bad formatting
* Added new term for "BottomMargin"
* Change yellow color
* Update StyleNano.cs
just spacing fixed
* Cook time countdown now detached from server
Instead of the server constantly sending out messages for the cook countdown, it is now predicted client side using TimeSpan
* Update MicrowaveMenu.xaml
forgot to re-add item space
* Automatic changelog update
* Additional damage visualisers (#24618)
* brute
* add
* Anomaly Synchronizer + Signallers tweaks (#24461)
* content
* nerf
* fix rsi
* Automatic changelog update
* saltern update (#25182)
Co-authored-by: deltanedas <@deltanedas:kde.org>
* Allow players to run saveconfig command. (#25200)
Benign client-side command.
* Revert "Allow configuring gen_build_info.py through environment variables" (#25201)
Revert "Allow configuring gen_build_info.py through environment variables (#2…"
This reverts commit 163e6d2f896ccf9a37be2e17bbbad8b6514ccf4b.
* Fax machines can print from text file (#23262)
* added
* checks tweaking
* fixed what sloth wanted
* fixed?
* dialog diposing fix
* checks tweaking
* more changes
* dispose streamreader
* Update Content.Client/Fax/UI/FaxBoundUi.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Update Content.Server/Fax/FaxSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* fix minor typo
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Automatic changelog update
* Vox names, species prototype cleanup, some cosmetic changes (#24994)
* voxnames
* New generator parameters, names are more readable
* bunch of missing vox stuff
* more names
* sad
* Balanced ChemVend Stock (#25207)
* Balanced ChemVend Stock
ChemVend needs more balanced stock for what actually gets used
* +1 Sugar
* Ranged Holosigns (#25120)
* Changed holo signs to be ranged and used on click rather than Z.
* Updated comments
* Failed attempt at ignoring walls
* Getting rid of unused libraries
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* Minor test fixes (#25174)
Stuff that probably shoulda been wrapped ig but our test runner stinky.
* Add pun to diagnostic hud description (#25209)
Seaborgium is element number 106 and is presumably what lets these glasses "see" "borgs".
* Add events for TemperatureProtection and PressureProtection (#25165)
* Update criminal-records.ftl (#25229)
* Adds always powered variants of colored lights (#25185)
Co-authored-by: Jeff <velcroboy333@hotmail.com>
* Fixes silver bars being whole stacks (#25239)
Co-authored-by: Jeff <velcroboy333@hotmail.com>
* Makes clumsy not delete guns (#25243)
clumsy no longer deletes guns
Co-authored-by: Jessica M <jessica@maybe.sh>
* Predict Injector (syringes), cleanup (#25235)
At least the mode/transfer amount logic. Actual transfer logic needs Bloodstream which I didn't wanna move into shared.
* Updated disabler to have suitStorage tag under slots. (#25238)
* Automatic changelog update
* Updates to Origin (#24908)
Replaced medical's HM console with a CM console, added janitor equipment closet
* Fix spawn priority persistence on reconnect and restart (#25246)
Because of course I would forget one line
* Add French accent beret (#21430)
* Allow thermomachines to exchange with air instead of inlet (#25247)
Add purely atmospheric heat exchange to the gas thermomachine component (in preparation for space heaters).
* Fix: Holosigns can be stored again (#25249)
* Holosigns can be stored again
* TryComp to HasComp
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Death acidifier fix (#25251)
* Automatic changelog update
* Clarify stripping logs (#25190)
* Indicate whether pickpocketing is stealthy in logs, change :user to :actor, and clean up messages.
* Remove ugly whitespace
* Do the thing I should have done but didn't because I didn't want to think
* Fix spacing
* Fix disposals bins not automatically flushing after an object is inserted (#25233)
Fix disposals bins not automatically flushing after an object is inserted.
Because of Spaghetti Code:tm:, AfterInsert() in DisposalUnitSystem still handles insertion itself. Except in all cases except drag/drop insert, the object is already inserted so this check fails and the remaining logic doesn't happen anymore. Fixed now.
* Sec & greysec jumpskirt fix (#25269)
* "resprites" sec & greysec jumpskirts
* adjustments
* Automatic changelog update
* Reduce eshield hp (#25258)
reduce eshield hp
* Automatic changelog update
* Artifact hemoglobin trigger now accepts all sentient blood types (#25240)
* Artifact blood trigger now accepts all sentient blood types
* Update artifact-hints.ftl
* Update engine to v210.1.0 (#25288)
* Made ghost.role_time a server modifiable only cvar (#25292)
Fix
* Nuke fancification (#25297)
Actually use more icon states for deployed/armed/about to explode
Also unlit layer.
Also examine text
* Automatic changelog update
* Change copper blood from ferrous to metallic (#25217)
changed copper blood from ferrous to metallic
* Thindow glass dupe fix (#25304)
smite glass dupe off the face of the planet
eww nasty dupe exploits blehh
* Automatic changelog update
* Kill Seperated Mindshield Icons (#25303)
* Unghettoify mindshield icons
Adds support for layers in status icons, through the StatusIconLayer enum and the new "layer" datafield. Defaults to the Base layer where functionally remains unchanged.
* TG icon for shield
probably better than the shitty one I made in paint
* forgor meta.json
I forgor
* Emo review
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
---------
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
* Automatic changelog update
* MORE SUFFIXES (#25314)
Co-authored-by: Jeff <velcroboy333@hotmail.com>
* Fix spawning glass shard for each glass sheet in stack (#25308)
* fix: SpawnEntitiesBehavior now works with stacks
Fixed the issue of SpawnEntitiesBehavior not executing multiple times on
entities with stack conponent.
Fixes #25287
* fix: reduced dictionary iterations
* Automatic changelog update
* Adds atmospherics access to the fire fighting door remote. Feels like… (#25097)
Adds atmospherics access to the fire fighting door remote. Feels like an oversight for the atmos door remote to not have atmos access.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* Re-organise main menu screen (#25173)
- The dummy control of 2px size has annoyed me for almost 5 years.
- Why is it in the top-right.
- Why is the server address not labelled.
* Allow t-ray to penetrate carpets and puddles (#25276)
* Allow t-ray to penetrate carpets and puddles
* handle edge cases
* Automatic changelog update
* Add sfx for writing on paper (#25257)
* Initial commit
* Moved params to sound
* Removed type tag
* Removed null check
* Forced default
* Automatic changelog update
* New sprites for guidebooks (#25232)
* added books to roles
* First pass
* removed yaml to split pull requests into resprite first, then giving the books to assistants
* new science
* Automatic changelog update
* LockVisualizer (#25224)
* LockVisualizer
* Fix state
* Clean some code
* Make it component, fix tests fail
* Fix for StateUnlocked
Now it is possible to manually set the unlocked state and it will work!
* Optimize LockVisualizer, add check for unlocked state
* No todo I guess
* Solution precision fixes (#25199)
* Add test for two chemistry issues
1. rounding issue with reaction processing when making chloral hydrate
2. reliable assert trip due to the ValidateSolution() heat capacity issue.
* Fix FixedPoint2 arithmetic
Fix internal floating point arithmetic in places where it could be avoided.
Fix incorrect rounding mode used in other places (it should always floor, like regular int arithmetic).
I had to add an explicit epsilon value for float -> FixedPoint2 because something like 1.05 is actually like 1.04999 and that'd cause it to be rounded down to 1.04.
This fixes reaction reagent processing in cases where the reagent inputs can't cleanly divide. Previously, when making 30u chloral hydrate by adding the chlorine in 10u increments you'd end up with 0.04 chlorine left over. This was caused by division in the reaction code rounding up in some cases. Changing division here to always round down fixes it.
* Attempt to fix heat capacity precision assert issues.
Fixes #22126
First, we just increase the tolerance of the assert. It was way too low.
Second, actually put a cap on float drift from one-off _heatCapacity changes.
* Fix float -> FixedPoint2 epsilon for negative number, fix tests.
* Fix DamageableTest
* Oh yeah I need to call CleanReturnAsync
* Automatic changelog update
* WebP lobby images (#25184)
* Allow webp in lobby background files
* Make lobby art webp images
Reduces folder from 10 MB to 2.5 MB without only slight quality loss.
* Update PutLobbyScreensHere.txt
* New lobby art : Blueprint (#25179)
* add
* replace image with webp version
waiting on #25184
* Automatic changelog update
* Diona Nymphs & Splitting (#24630)
* Porting & implementation
* Fix two stupid errors
* Human not humans
* fix audio path
* Fix test fails & update cooldown
* Work on reviews & test fail
* Rework nymph organ system.
* Make the nymph organs nospawn.
* IsDeadIC
* Automatic changelog update
* reform cooldown 10 minutes (#25328)
* Change plant clipping mechanics (#25326)
Make seeds from clipped plants inherit the decreased health from parents.
Also require one growth stage before clipping.
* Automatic changelog update
* Fix nymphs being deleted immediatly after spawning (#25344)
* nymphs now don't get deleted together with the body of the diona
* moved nymph system to server
* Automatic changelog update
* Fix: Grenades don't make trigger sound (#25321)
* Fix: Grenades don't make trigger sound
* transform instead of trycomp transform
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* fixed the specific if statement called when plant age is under 0 (#25346)
* Save round information into replay_final.yml (#23013)
* Save round information into the replay
* Add round end text too
* This is way better
* Get actual job
* oop
* OK THERE
* Fake line endings to make life easier
* I was told this yaml is legal
* I just realised this will make my life easier
* REVIEWS BABY IM A PROGRAMMER MOMMY
* Live pjb reaction
* Live pjb reaction 2
* Reviews 2
* Dont need this
* Please no more have mercy on my soul
* Oh frick
* Adds a massban flag to the admin flags (#25327)
Adds a massban flag to the admin flags used on ss14 to ban large amounts of players rom a .tsv file
Co-authored-by: Geekyhobo <66805063+Ahlytlex@users.noreply.github.com>
* Automatic changelog update
* Fix missing line in nuke exploding sprite (#25351)
I could've sworn I corrected this before committing but guess not ???
* Added Evidence Markers for the Detective! (#25255)
* added evidence markers
* box tweak
* fixed a spelling mistake
* new sprites, tweaked yml too
* Add "tailed" hair (#25216)
* add
* yes
* Clean up scars.yml and add a new chest scar (#25215)
add
* Automatic changelog update
* Add new "OptionsVisualizer" (#25128)
This is a visualizer somewhat similar to the Generic. It allows configuring appearance info based on specific CVars the user has set. This allows YAML to easily configure alternatives for accessibility CVars like reduced motion.
* Suffix spelling mistake on seed vendor (#25352)
spelling error
* Update engine to v210.1.1 (#25354)
Important fixes from the UI PR
* Stop wagging tails on crit (#25323)
* Add Flammable Touch Reaction for liquid tritium
* Stop tail wagging action on crit
* Revert "Add Flammable Touch Reaction for liquid tritium"
This reverts commit 41be57b058a0cdee0cecfc51eb1c4a25631e62f3.
* Automatic changelog update
* EVA suit helmets now have (un)equip sounds (#25349)
add (un)equip sounds to EVA helms
* Automatic changelog update
* Newton Cradle Fix + Addition to Bureaucracy Crate (#25357)
fixes
makes the newton cradle not able to decimate ears while also adding it to the bureaucracy crate and lowering its volume and range a little bit
* Automatic changelog update
* Shadow anomaly respects "reduced motion" (#25355)
Enabling "reduced motion" now makes the smoke effects not animate. This helps some people with vision issues.
* Fixed directional window durability (#25259)
shit
* Very little cleanup (#25364)
* Origin Station Update 18.02.2024 (medbay update) (#25369)
* Update Credits (#25360)
Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com>
* Add bio reactions (#25366)
* added more foodstuff breakdowns
* Calcium doesn't exist; moved phosphorus to protein
* tested reactions- some should be centrifuged
* more testing tweaks
* Automatic changelog update
* Increase printing price for neck clothes (#25375)
* Increase printing price
* Update clothing.yml
* Update Core (#25383)
add
* add icons for drinks in Solar's (#25301)
* add icons for drinks in Solar's
fixed colors of tea
* consistently use capitals for color codes
* don't add extra whitespace
* Automatic changelog update
* Small Nymph Changes (#25363)
* Emote sounds, accent & doorbump
* Oops
* Only non-brains can't talk
* Automatic changelog update
* Bump nixpkgs rev (#25361)
* Bump nixpkgs revision
* Update nix-direnv
* Remove extra nix functionalities
Both nix-direnv and legacy command nix-shell fail. Reverting to
flakes-only commands.
* Pin nixpkgs per suggestion
See https://github.com/space-wizards/space-station-14/pull/25361#discussion_r1494196038
* Revert nix-direnv removal
* Add python3 to shell.nix
* Adds guidebooks to the 4 learner roles (#25388)
added the books
* Automatic changelog update
* Add support for metamorphic fill levels (#25022)
* Added support for fill levels to metamorphic glasses
* Fix warnings and cleanup
* Don't break non-metamorphic fills!
* Vending UI facelift (#25377)
* Convert to fancy window + added footer + add list spacing
* margin add
* Automatic changelog update
* Make metamorphic glasses use last solution's empty sprite (#25322)
Make metamorphic glasses use empty sprite for the last solution they contained.
* Moths can eat plushies (#25382)
* Update toys.yml
* fix
* New sound of eating
* Increased eating time
* New sounds+sorting
* Automatic changelog update
* Make pills colorful and labeled (#25284)
* Make pills colorful and labeled
* Inherit pill sprites from parent
* Add Flammable Touch Reaction for liquid tritium (#25281)
* randomized sexless species now have epicene gender by default (#25282)
Fikss
* Automatic changelog update
* Mechanized treatment improvements (#25356)
Medical module merge
* Hotfix: Set round end information for replays back to null on round start instead of round end (#25394)
* Hotfix
* I dont think i need this now
* Fix action state handling bug (#25395)
* Rejig action state handling
* Fix entity arg
* Fix deserialization
* Automatic changelog update
* Fix admin notes and database time nonsense. (#25280)
God bloody christ. There's like three layers of shit here.
So firstly, apparently we were still using Npgsql.EnableLegacyTimestampBehavior. This means that time values (which are stored UTC in the database) were converted to local time when read out. This meant they were passed around as kind Local to clients (instead of UTC in the case of SQLite). That's easy enough to fix just turn off the flag and fix the couple spots we're passing a local DateTime ez.
Oh but it turns out there's a DIFFERENT problem with SQLite: See SQLite we definitely store the DateTimes as UTC, but when Microsoft.Data.Sqlite reads them it reads them as Kind Unspecified instead of Utc.
Why are these so bad? Because the admin notes system passes DateTime instances from EF Core straight to the rest of the game code. And that means it's a PAIN IN THE ASS to run the necessary conversions to fix the DateTime instances. GOD DAMNIT now I have to make a whole new set of "Record" entities so we avoid leaking the EF Core model entities. WAAAAAAA.
Fixes #19897
* PlayerListControl fixes. (#25248)
* PlayerListControl fixes.
Fix a button being selected by default always, which then can't be selected properly for real. This affected multiple admin UIs.
This broke due to upstream RT changes but ButtonGroup was always kinda busted so whatever. Uses the new IsNoneSetAllowed to implement everything properly.
Also make sure the selected player STAYS selected when filtering the list and stuff.
Also this PlayerInfo record has been changed to only do equality on the User ID because otherwise it'd need to compare each field individually which would be weird.
* Revert changes to ListContainer
This change was made default in the engine, no longer necessary here.
* Automatic changelog update
* Ore crab structural weakness (#25390)
* Attempt to change structural dmg of ore crab
* Made ore crabs susceptible to structural damage
* Automatic changelog update
* Set nav map icon textures to use bilinear filtering (#25411)
This just makes them look slightly better when zoomed.
* Fix PlayerListControl re-raising selection changed when repopulated. (#25412)
Now we just skip duplicate "item pressed" events from the ListContainer.
This caused the ahelp window to unfocus the message box after sending something. Flow is something like this: you send ahelp -> bwoink window refreshes player list due to new bwoink -> repopulated player list -> sent selection change -> repopulates right pane -> line edit gets unfocused.
* Train station (#24927)
* some content
* some next content
* fixes
* remove stained window
* return bot message?
* woah! Full map added!
* map update
* big update
* camera server
* Corvax playtest feedback
* add mail system and 30$ meteor shield
* update
* updatik
* hardwork
* pipip
* update
* remove from mappool
* fixes
* sentipode
* e
* Mindshield outline flashes, (#25409)
* Add animation support to status icons
Animated like any other entity. Change the png to have all frames, add delays in meta.json, and you're good to go.
* Dirty "fix" for the crashing.
Still have no idea why files cannot be read without changing their path in the yaml.
* Sloth review ig
I still have no idea why it wont work with /Textures/ missing as a prefix.
* Automatic changelog update
* Small Artifact Fixes (#25416)
* 20kw artifact fix
* Change that hopefully doesn't completely break storage artifacts without me realising
* Add roundid to replay_final.yml (#25398)
oopsy i forgor
* Resprite & hand position correction of Nettle & Death Nettle (#25421)
Resprite of Nettle & Death Nettle. Corrected R & L hand locations for all orientations of both plants.
* Automatic changelog update
* balance Explosive Technology (#25397)
* update arsenal yml
balance ExplosiveTechnology
* small changes in arsenal research
small changes in arsenal research
* Update arsenal.yml
* Automatic changelog update
* Tiny shove fix. (#25353)
* Remove second shove check.
* Change when popups and sounds are created.
Reduces phantom shoves that feel bad.
* why didn't i think of this i saw it earlier...
* Replaced Is fields with prefix
* remove some dependencies to fix tests???
* Automatic changelog update
* fix: пара фиксов апстрима
* Revert "Nuke fancification (#25297)"
This reverts commit 3a45d519dcc3679375b5239b6f1881cdd1a07344.
# Conflicts:
# Resources/Textures/Objects/Devices/nuke.rsi/meta.json
# Resources/Textures/Objects/Devices/nuke.rsi/nuclearbomb_deployed.png
# Resources/Textures/Objects/Devices/nuke.rsi/nuclearbomb_exploding.png
# Resources/Textures/Objects/Devices/nuke.rsi/nuclearbomb_timing.png
* Revert "Shuttle floor resprite (#25127)"
This reverts commit a93466ac24c7256d4b584ba830c4fa1cda253d5a.
# Conflicts:
# Resources/Textures/Tiles/shuttleblue.png
# Resources/Textures/Tiles/shuttleorange.png
# Resources/Textures/Tiles/shuttlepurple.png
# Resources/Textures/Tiles/shuttlered.png
# Resources/Textures/Tiles/shuttlewhite.png
* Revert "New lobby art : Blueprint (#25179)"
This reverts commit 90d02a590117b54a16b3af848f3b2fe0195724c9.
# Conflicts:
# Resources/Prototypes/lobbyscreens.yml
* Revert "Added Monitor Computer Boards to Observation Kit (#24979)"
This reverts commit c5027b51ecc7387a678e194fd7733a03349be536.
* Revert "Small t-ray scanner resprite (#25047)"
This reverts commit 601da0c3a33279beff818f82913ed2583e48c642.
# Conflicts:
# Resources/Textures/Objects/Tools/t-ray.rsi/tray-off.png
# Resources/Textures/Objects/Tools/t-ray.rsi/tray-on.png
* add: переводы
* fix: фиксы под тесты
---------
Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: Emisse <99158783+Emisse@users.noreply.github.com>
Co-authored-by: Armok <155400926+ARMOKS@users.noreply.github.com>
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
Co-authored-by: PoorMansDreams <150595537+PoorMansDreams@users.noreply.github.com>
Co-authored-by: Hannah Giovanna Dawson <karakkaraz@gmail.com>
Co-authored-by: lapatison <100279397+lapatison@users.noreply.github.com>
Co-authored-by: router <messagebus@vk.com>
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Co-authored-by: Varen <ychwack@hotmail.it>
Co-authored-by: potato1234_x <79580518+potato1234x@users.noreply.github.com>
Co-authored-by: Hanz <41141796+Hanzdegloker@users.noreply.github.com>
Co-authored-by: Ubaser <134914314+UbaserB@users.noreply.github.com>
Co-authored-by: themias <89101928+themias@users.noreply.github.com>
Co-authored-by: Alzore <140123969+Blackern5000@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com>
Co-authored-by: Plykiya <plykiya@protonmail.com>
Co-authored-by: YuNii <benjamin@bhenrich.de>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
Co-authored-by: Mangohydra <156087924+Mangohydra@users.noreply.github.com>
Co-authored-by: Nim <128169402+Nimfar11@users.noreply.github.com>
Co-authored-by: Jezithyr <jezithyr@gmail.com>
Co-authored-by: Fluffiest Floofers <thebluewulf@gmail.com>
Co-authored-by: Jajsha <101492056+Zap527@users.noreply.github.com>
Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
Co-authored-by: Flareguy <78941145+Flareguy@users.noreply.github.com>
Co-authored-by: forgotmyotheraccount <133569389+forgotmyotheraccount@users.noreply.github.com>
Co-authored-by: FungiFellow <151778459+FungiFellow@users.noreply.github.com>
Co-authored-by: Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
Co-authored-by: Ilya246 <57039557+Ilya246@users.noreply.github.com>
Co-authored-by: Krunklehorn <42424291+Krunklehorn@users.noreply.github.com>
Co-authored-by: Alex Nordlund <deep.alexander@gmail.com>
Co-authored-by: EdenTheLiznerd <138748328+EdenTheLiznerd@users.noreply.github.com>
Co-authored-by: deepdarkdepths <155149356+deepdarkdepths@users.noreply.github.com>
Co-authored-by: Genkail <50331122+Genkail@users.noreply.github.com>
Co-authored-by: Vasilis <vasilis@pikachu.systems>
Co-authored-by: James Simonson <jamessimo89@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: icekot8 <93311212+icekot8@users.noreply.github.com>
Co-authored-by: Agoichi <92464780+Agoichi@users.noreply.github.com>
Co-authored-by: KREKS <132602258+xKREKSx@users.noreply.github.com>
Co-authored-by: 0x6273 <0x40@keemail.me>
Co-authored-by: lzk <124214523+lzk228@users.noreply.github.com>
Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
Co-authored-by: Guilherme Ornel <86210200+joshepvodka@users.noreply.github.com>
Co-authored-by: Errant <35878406+Errant-4@users.noreply.github.com>
Co-authored-by: wafehling <wafehling@users.noreply.github.com>
Co-authored-by: Interrobang01 <113810873+Interrobang01@users.noreply.github.com>
Co-authored-by: k3yw <grenadiumdota@gmail.com>
Co-authored-by: Velcroboy <107660393+IamVelcroboy@users.noreply.github.com>
Co-authored-by: Jeff <velcroboy333@hotmail.com>
Co-authored-by: Jessica M <jessica@jessicamaybe.com>
Co-authored-by: Jessica M <jessica@maybe.sh>
Co-authored-by: Zadeon <loldude9000@gmail.com>
Co-authored-by: brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
Co-authored-by: Menshin <Menshin@users.noreply.github.com>
Co-authored-by: nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Co-authored-by: liltenhead <104418166+liltenhead@users.noreply.github.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Co-authored-by: Daxxi3 <158596935+Daxxi3@users.noreply.github.com>
Co-authored-by: MACMAN2003 <macman2003c@gmail.com>
Co-authored-by: Golinth <amh2023@gmail.com>
Co-authored-by: Łukasz Mędrek <lukasz@lukaszm.xyz>
Co-authored-by: PotentiallyTom <67602105+PotentiallyTom@users.noreply.github.com>
Co-authored-by: MilenVolf <63782763+MilenVolf@users.noreply.github.com>
Co-authored-by: LankLTE <135308300+LankLTE@users.noreply.github.com>
Co-authored-by: Flesh <62557990+PolterTzi@users.noreply.github.com>
Co-authored-by: Arendian <137322659+Arendian@users.noreply.github.com>
Co-authored-by: Geekyhobo <66805063+Geekyhobo@users.noreply.github.com>
Co-authored-by: Geekyhobo <66805063+Ahlytlex@users.noreply.github.com>
Co-authored-by: Moomoobeef <62638182+Moomoobeef@users.noreply.github.com>
Co-authored-by: Peptide90 <78795277+Peptide90@users.noreply.github.com>
Co-authored-by: ArchPigeon <bookmaster3@gmail.com>
Co-authored-by: Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
Co-authored-by: Firewatch <54725557+musicmanvr@users.noreply.github.com>
Co-authored-by: Vigers Ray <60344369+VigersRay@users.noreply.github.com>
Co-authored-by: genderGeometries <159584039+genderGeometries@users.noreply.github.com>
Co-authored-by: hiucko <86206040+Hiucko@users.noreply.github.com>
Co-authored-by: Sybil <azurerosegarden@gmail.com>
Co-authored-by: Ioannis Eleftheriou <me@yath.xyz>
Co-authored-by: marboww <152051971+marboww@users.noreply.github.com>
Co-authored-by: veprolet <68151557+veprolet@users.noreply.github.com>
Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
Co-authored-by: Tonydatguy <154929293+Tonydatguy@users.noreply.github.com>
Co-authored-by: Gotimanga <127038462+Gotimanga@users.noreply.github.com>
Co-authored-by: MjrLandWhale <brandonemitch@gmail.com>
Co-authored-by: takemysoult <143123247+takemysoult@users.noreply.github.com>
Co-authored-by: Callmore <22885888+Callmore@users.noreply.github.com>
2024-02-23 23:05:48 +07:00
|
|
|
Log.Warning($"Called {nameof(HandleEdge)} on entity {ToPrettyString(uid)} but the current state is not valid for that!");
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
return HandleResult.False;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// We need to ensure we currently satisfy any and all edge conditions.
|
|
|
|
|
if (!CheckConditions(uid, edge.Conditions))
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
|
2023-04-03 13:13:48 +12:00
|
|
|
var handle = HandleStep(uid, ev, step, validation, out var user, construction);
|
|
|
|
|
if (handle is not HandleResult.True)
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
return handle;
|
|
|
|
|
|
2023-04-03 13:13:48 +12:00
|
|
|
// Handle step should never handle the interaction during validation.
|
|
|
|
|
DebugTools.Assert(!validation);
|
|
|
|
|
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
// We increase the step index, meaning we move to the next step!
|
|
|
|
|
construction.StepIndex++;
|
|
|
|
|
|
|
|
|
|
// Check if the new step index is greater than the amount of steps in the edge...
|
|
|
|
|
if (construction.StepIndex >= edge.Steps.Count)
|
|
|
|
|
{
|
|
|
|
|
// Edge finished!
|
|
|
|
|
PerformActions(uid, user, edge.Completed);
|
2023-04-21 16:01:35 +12:00
|
|
|
|
|
|
|
|
if (construction.Deleted)
|
|
|
|
|
return HandleResult.True;
|
|
|
|
|
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
construction.TargetEdgeIndex = null;
|
|
|
|
|
construction.EdgeIndex = null;
|
|
|
|
|
construction.StepIndex = 0;
|
|
|
|
|
|
|
|
|
|
// We change the node now.
|
|
|
|
|
ChangeNode(uid, user, edge.Target, true, construction);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return HandleResult.True;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Takes in an entity, a <see cref="ConstructionGraphStep"/> and an object event, and handles any possible
|
|
|
|
|
/// construction interaction. Unlike <see cref="HandleInteraction"/>, if this succeeds it will perform the
|
|
|
|
|
/// step's completion actions. Also sets the out parameter to the user's EntityUid.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>When <see cref="validation"/> is true, this method will simply return whether the interaction
|
|
|
|
|
/// would be handled by the entity or not. It essentially becomes a pure method that modifies nothing.</remarks>
|
|
|
|
|
/// <returns>The result of this interaction with the entity.</returns>
|
|
|
|
|
private HandleResult HandleStep(EntityUid uid, object ev, ConstructionGraphStep step, bool validation, out EntityUid? user, ConstructionComponent? construction = null)
|
|
|
|
|
{
|
|
|
|
|
user = null;
|
|
|
|
|
if (!Resolve(uid, ref construction))
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
|
|
|
|
|
// Let HandleInteraction actually handle the event for this step.
|
|
|
|
|
// We can only perform the rest of our logic if it returns true.
|
2023-04-03 13:13:48 +12:00
|
|
|
var handle = HandleInteraction(uid, ev, step, validation, out user, construction);
|
2024-02-08 18:44:02 +09:00
|
|
|
|
|
|
|
|
if (step.CultistOnly && !(HasComp<CultistComponent>(user) || HasComp<GhostComponent>(user))) // WD
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
|
2023-04-03 13:13:48 +12:00
|
|
|
if (handle is not HandleResult.True)
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
return handle;
|
|
|
|
|
|
2023-04-03 13:13:48 +12:00
|
|
|
DebugTools.Assert(!validation);
|
|
|
|
|
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
// Actually perform the step completion actions, since the step was handled correctly.
|
|
|
|
|
PerformActions(uid, user, step.Completed);
|
|
|
|
|
|
|
|
|
|
UpdatePathfinding(uid, construction);
|
|
|
|
|
|
|
|
|
|
return HandleResult.True;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Takes in an entity, a <see cref="ConstructionGraphStep"/> and an object event, and handles any possible
|
|
|
|
|
/// construction interaction. Unlike <see cref="HandleStep"/>, this only handles the interaction itself
|
|
|
|
|
/// and doesn't perform any step completion actions. Also sets the out parameter to the user's EntityUid.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>When <see cref="validation"/> is true, this method will simply return whether the interaction
|
|
|
|
|
/// would be handled by the entity or not. It essentially becomes a pure method that modifies nothing.</remarks>
|
|
|
|
|
/// <returns>The result of this interaction with the entity.</returns>
|
|
|
|
|
private HandleResult HandleInteraction(EntityUid uid, object ev, ConstructionGraphStep step, bool validation, out EntityUid? user, ConstructionComponent? construction = null)
|
|
|
|
|
{
|
|
|
|
|
user = null;
|
|
|
|
|
if (!Resolve(uid, ref construction))
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
|
|
|
|
|
// Whether this event is being re-handled after a DoAfter or not. Check DoAfterState for more info.
|
2023-04-03 13:13:48 +12:00
|
|
|
var doAfterState = DoAfterState.None;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
|
|
|
|
// The DoAfter events can only perform special logic when we're not validating events.
|
2023-04-03 13:13:48 +12:00
|
|
|
if (ev is ConstructionInteractDoAfterEvent interactDoAfter)
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
{
|
2023-04-08 12:54:28 +12:00
|
|
|
if (interactDoAfter.Cancelled)
|
|
|
|
|
return HandleResult.False;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
2023-04-03 13:13:48 +12:00
|
|
|
ev = new InteractUsingEvent(
|
|
|
|
|
interactDoAfter.User,
|
|
|
|
|
interactDoAfter.Used!.Value,
|
|
|
|
|
uid,
|
2023-09-11 09:42:41 +10:00
|
|
|
GetCoordinates(interactDoAfter.ClickLocation));
|
2023-04-03 13:13:48 +12:00
|
|
|
|
|
|
|
|
doAfterState = DoAfterState.Completed;
|
|
|
|
|
}
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
|
|
|
|
// The cases in this switch will handle the interaction and return
|
|
|
|
|
switch (step)
|
|
|
|
|
{
|
|
|
|
|
// --- CONSTRUCTION STEP EVENT HANDLING START ---
|
|
|
|
|
#region Construction Step Event Handling
|
|
|
|
|
// So you want to create your own custom step for construction?
|
|
|
|
|
// You're looking at the right place, then! You should create
|
|
|
|
|
// a new case for your step here, and handle it as you see fit.
|
|
|
|
|
// Make extra sure you handle DoAfter (if applicable) properly!
|
|
|
|
|
// Also make sure your event handler properly handles validation.
|
|
|
|
|
// Note: Please use braces for your new case, it's convenient.
|
|
|
|
|
|
|
|
|
|
case EntityInsertConstructionGraphStep insertStep:
|
|
|
|
|
{
|
|
|
|
|
// EntityInsert steps only work with InteractUsing!
|
|
|
|
|
if (ev is not InteractUsingEvent interactUsing)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
// TODO: Sanity checks.
|
|
|
|
|
|
2023-01-20 10:17:57 -06:00
|
|
|
user = interactUsing.User;
|
|
|
|
|
|
2021-12-05 18:09:01 +01:00
|
|
|
var insert = interactUsing.Used;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
|
|
|
|
// Since many things inherit this step, we delegate the "is this entity valid?" logic to them.
|
|
|
|
|
// While this is very OOP and I find it icky, I must admit that it simplifies the code here a lot.
|
2023-01-19 13:57:18 +11:00
|
|
|
if(!insertStep.EntityValid(insert, EntityManager, _factory))
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
return HandleResult.False;
|
|
|
|
|
|
|
|
|
|
// If we're only testing whether this step would be handled by the given event, then we're done.
|
2023-04-03 13:13:48 +12:00
|
|
|
if (validation)
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
return HandleResult.Validated;
|
|
|
|
|
|
|
|
|
|
// If we still haven't completed this step's DoAfter...
|
|
|
|
|
if (doAfterState == DoAfterState.None && insertStep.DoAfter > 0)
|
|
|
|
|
{
|
2023-09-11 09:42:41 +10:00
|
|
|
var doAfterEv = new ConstructionInteractDoAfterEvent(EntityManager, interactUsing);
|
2023-04-03 13:13:48 +12:00
|
|
|
|
2023-09-11 09:42:41 +10:00
|
|
|
var doAfterEventArgs = new DoAfterArgs(EntityManager, interactUsing.User, step.DoAfter, doAfterEv, uid, uid, interactUsing.Used)
|
2023-02-24 19:01:25 -05:00
|
|
|
{
|
|
|
|
|
BreakOnDamage = false,
|
|
|
|
|
BreakOnTargetMove = true,
|
|
|
|
|
BreakOnUserMove = true,
|
|
|
|
|
NeedHand = true
|
|
|
|
|
};
|
|
|
|
|
|
2023-04-08 12:54:28 +12:00
|
|
|
var started = _doAfterSystem.TryStartDoAfter(doAfterEventArgs);
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
2023-04-03 13:13:48 +12:00
|
|
|
if (!started)
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
|
// Verify that the resulting DoAfter event will be handled by the current construction state.
|
|
|
|
|
// if it can't what is even the point of raising this DoAfter?
|
|
|
|
|
doAfterEv.DoAfter = new(default, doAfterEventArgs, default);
|
|
|
|
|
var result = HandleInteraction(uid, doAfterEv, step, validation: true, out _, construction);
|
|
|
|
|
DebugTools.Assert(result == HandleResult.Validated);
|
|
|
|
|
#endif
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
return HandleResult.DoAfter;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Material steps, which use stacks, are handled specially. Instead of inserting the whole item,
|
|
|
|
|
// we split the stack in two and insert the split stack.
|
|
|
|
|
if (insertStep is MaterialConstructionGraphStep materialInsertStep)
|
|
|
|
|
{
|
2022-03-25 05:00:39 +01:00
|
|
|
if (_stackSystem.Split(insert, materialInsertStep.Amount, Transform(interactUsing.User).Coordinates) is not {} stack)
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
return HandleResult.False;
|
|
|
|
|
|
|
|
|
|
insert = stack;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Container-storage handling.
|
|
|
|
|
if (!string.IsNullOrEmpty(insertStep.Store))
|
|
|
|
|
{
|
|
|
|
|
// In the case we want to store this item in a container on the entity...
|
|
|
|
|
var store = insertStep.Store;
|
|
|
|
|
|
|
|
|
|
// Add this container to the collection of "construction-owned" containers.
|
|
|
|
|
// Containers in that set will be transferred to new entities in the case of a prototype change.
|
|
|
|
|
construction.Containers.Add(store);
|
|
|
|
|
|
|
|
|
|
// The container doesn't necessarily need to exist, so we ensure it.
|
2023-12-27 21:30:03 -08:00
|
|
|
_container.Insert(insert, _container.EnsureContainer<Container>(uid, store));
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// If we don't store the item in a container on the entity, we just delete it right away.
|
2022-03-25 05:00:39 +01:00
|
|
|
Del(insert);
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Step has been handled correctly, so we signal this.
|
|
|
|
|
return HandleResult.True;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case ToolConstructionGraphStep toolInsertStep:
|
|
|
|
|
{
|
|
|
|
|
if (ev is not InteractUsingEvent interactUsing)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
// TODO: Sanity checks.
|
|
|
|
|
|
2021-12-03 15:53:09 +01:00
|
|
|
user = interactUsing.User;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
|
|
|
|
// If we're validating whether this event handles the step...
|
2023-04-03 13:13:48 +12:00
|
|
|
if (validation)
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
{
|
|
|
|
|
// Then we only really need to check whether the tool entity has that quality or not.
|
2021-12-03 15:53:09 +01:00
|
|
|
return _toolSystem.HasQuality(interactUsing.Used, toolInsertStep.Tool)
|
2023-04-03 13:13:48 +12:00
|
|
|
? HandleResult.Validated
|
|
|
|
|
: HandleResult.False;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If we're handling an event after its DoAfter finished...
|
2023-04-03 13:13:48 +12:00
|
|
|
if (doAfterState == DoAfterState.Completed)
|
|
|
|
|
return HandleResult.True;
|
|
|
|
|
|
|
|
|
|
var result = _toolSystem.UseTool(
|
|
|
|
|
interactUsing.Used,
|
|
|
|
|
interactUsing.User,
|
|
|
|
|
uid,
|
|
|
|
|
TimeSpan.FromSeconds(toolInsertStep.DoAfter),
|
|
|
|
|
new [] { toolInsertStep.Tool },
|
2023-09-11 09:42:41 +10:00
|
|
|
new ConstructionInteractDoAfterEvent(EntityManager, interactUsing),
|
2023-06-28 01:46:48 +00:00
|
|
|
out var doAfter);
|
2023-04-03 13:13:48 +12:00
|
|
|
|
2023-04-08 12:54:28 +12:00
|
|
|
return result && doAfter != null ? HandleResult.DoAfter : HandleResult.False;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
|
2023-01-20 16:09:13 +00:00
|
|
|
case TemperatureConstructionGraphStep temperatureChangeStep:
|
|
|
|
|
{
|
2023-04-03 13:13:48 +12:00
|
|
|
if (ev is not OnTemperatureChangeEvent)
|
2023-01-20 16:09:13 +00:00
|
|
|
break;
|
|
|
|
|
|
2024-01-12 03:42:41 -05:00
|
|
|
// Some things, like microwaves, might need to block the temperature construction step from kicking in, or override it entirely.
|
|
|
|
|
var tempEvent = new OnConstructionTemperatureEvent();
|
|
|
|
|
RaiseLocalEvent(uid, tempEvent, true);
|
|
|
|
|
|
|
|
|
|
if (tempEvent.Result is not null)
|
|
|
|
|
return tempEvent.Result.Value;
|
|
|
|
|
|
2023-10-20 21:21:49 +01:00
|
|
|
// prefer using InternalTemperature since that's more accurate for cooking.
|
|
|
|
|
float temp;
|
|
|
|
|
if (TryComp<InternalTemperatureComponent>(uid, out var internalTemp))
|
2023-01-20 16:09:13 +00:00
|
|
|
{
|
2023-10-20 21:21:49 +01:00
|
|
|
temp = internalTemp.Temperature;
|
|
|
|
|
}
|
|
|
|
|
else if (TryComp<TemperatureComponent>(uid, out var tempComp))
|
|
|
|
|
{
|
|
|
|
|
temp = tempComp.CurrentTemperature;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((!temperatureChangeStep.MinTemperature.HasValue || temp >= temperatureChangeStep.MinTemperature.Value) &&
|
|
|
|
|
(!temperatureChangeStep.MaxTemperature.HasValue || temp <= temperatureChangeStep.MaxTemperature.Value))
|
|
|
|
|
{
|
|
|
|
|
return HandleResult.True;
|
2023-01-20 16:09:13 +00:00
|
|
|
}
|
|
|
|
|
|
2023-10-20 21:21:49 +01:00
|
|
|
return HandleResult.False;
|
2023-01-20 16:09:13 +00:00
|
|
|
}
|
|
|
|
|
|
2023-08-12 17:39:58 -04:00
|
|
|
case PartAssemblyConstructionGraphStep partAssemblyStep:
|
|
|
|
|
{
|
|
|
|
|
if (ev is not PartAssemblyPartInsertedEvent)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
if (partAssemblyStep.Condition(uid, EntityManager))
|
|
|
|
|
return HandleResult.True;
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
}
|
|
|
|
|
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
#endregion
|
|
|
|
|
// --- CONSTRUCTION STEP EVENT HANDLING FINISH ---
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
throw new ArgumentOutOfRangeException(nameof(step),
|
|
|
|
|
"You need to code your ConstructionGraphStep behavior by adding a case to the switch.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If the handlers were not able to handle this event, return...
|
|
|
|
|
return HandleResult.False;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-25 05:00:39 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Checks whether a number of <see cref="IGraphCondition"/>s are true for a given entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="uid">The entity to pass to the conditions.</param>
|
|
|
|
|
/// <param name="conditions">The conditions to evaluate.</param>
|
|
|
|
|
/// <remarks>This method is short-circuiting; if a condition evaluates to false, we stop checking the rest of conditions.</remarks>
|
|
|
|
|
/// <returns>Whether all conditions evaluate to true for the given entity.</returns>
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
public bool CheckConditions(EntityUid uid, IEnumerable<IGraphCondition> conditions)
|
|
|
|
|
{
|
|
|
|
|
foreach (var condition in conditions)
|
|
|
|
|
{
|
|
|
|
|
if (!condition.Condition(uid, EntityManager))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-25 05:00:39 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Performs a number of <see cref="IGraphAction"/>s for a given entity, with an optional user entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="uid">The entity to perform the actions on.</param>
|
|
|
|
|
/// <param name="userUid">An optional user entity to pass into the actions.</param>
|
|
|
|
|
/// <param name="actions">The actions to perform.</param>
|
|
|
|
|
/// <remarks>This method checks whether the given target entity exists before performing any actions.
|
|
|
|
|
/// If the entity is deleted by an action, it will short-circuit and stop performing the rest of actions.</remarks>
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
public void PerformActions(EntityUid uid, EntityUid? userUid, IEnumerable<IGraphAction> actions)
|
|
|
|
|
{
|
|
|
|
|
foreach (var action in actions)
|
|
|
|
|
{
|
2022-03-25 05:00:39 +01:00
|
|
|
// If an action deletes the entity, we stop performing the rest of actions.
|
2022-03-05 10:58:30 +01:00
|
|
|
if (!Exists(uid))
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
action.PerformAction(uid, userUid, EntityManager);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-25 05:00:39 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Resets the current construction edge status on an entity.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="uid">The target entity.</param>
|
|
|
|
|
/// <param name="construction">The construction component. If null, it will be resolved on the entity.</param>
|
|
|
|
|
/// <remarks>This method updates the construction pathfinding on the entity automatically.</remarks>
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
public void ResetEdge(EntityUid uid, ConstructionComponent? construction = null)
|
|
|
|
|
{
|
|
|
|
|
if (!Resolve(uid, ref construction))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
construction.TargetEdgeIndex = null;
|
|
|
|
|
construction.EdgeIndex = null;
|
|
|
|
|
construction.StepIndex = 0;
|
|
|
|
|
|
2022-03-25 05:00:39 +01:00
|
|
|
// Update pathfinding to keep it in sync with the current construction status.
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
UpdatePathfinding(uid, construction);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void UpdateInteractions()
|
|
|
|
|
{
|
|
|
|
|
// We iterate all entities waiting for their interactions to be handled.
|
|
|
|
|
// This is much more performant than making an EntityQuery for ConstructionComponent,
|
|
|
|
|
// since, for example, every single wall has a ConstructionComponent....
|
2023-02-26 06:14:26 +13:00
|
|
|
while (_constructionUpdateQueue.TryDequeue(out var uid))
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
{
|
2023-02-26 06:14:26 +13:00
|
|
|
_queuedUpdates.Remove(uid);
|
|
|
|
|
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
// Ensure the entity exists and has a Construction component.
|
2023-02-26 06:14:26 +13:00
|
|
|
if (!TryComp(uid, out ConstructionComponent? construction))
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
continue;
|
|
|
|
|
|
2022-09-19 18:10:10 +12:00
|
|
|
#if EXCEPTION_TOLERANCE
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
#endif
|
2023-02-26 06:14:26 +13:00
|
|
|
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
// Handle all queued interactions!
|
|
|
|
|
while (construction.InteractionQueue.TryDequeue(out var interaction))
|
|
|
|
|
{
|
2023-02-26 06:14:26 +13:00
|
|
|
if (construction.Deleted)
|
|
|
|
|
{
|
[Upstream] Upstream (#109)
* Automatic changelog update
* atlas update (#25071)
* atlas update
* untroll
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
* box update (#25074)
* fland update (#25075)
* marathon update (#25076)
* meta update (#25077)
* Syndicate key grammar fix (#25085)
* Syndicate encryption key grammar fix
An encryption key used by... wait... Who is owner of this chip? > An encryption key used by... wait... Who is the owner of this chip?
* Syndicate key grammar fix
An encryption key used by... wait... Who is owner of this chip? > An encryption key used by... wait... Who is the owner of this chip?
* Fix hybridization seedless probability (#25084)
Fix comparison
Hybrids (different plants being crossed) are supposed to have a high
chance of becoming seedless to balance overpowered plants.
However, a logic error in the comparison gave seedless to plants when
they were from the same seed (not hybrids) rather than the other way
around.
Reported by: @genderGeometries
* Added Tourniquets to stop bleeds (#23198)
* Fixed Error with RobustToolbox Edits. Removed the addition of secbelt tag from assault belt.
* Resprite of the monstrosity
* Resprite of the tourniquet NO LONGER PHALLUS SHAPED
* too bright, now darker and edgier
* Tourniquet resprite
* metajson yay
* Update Skelly Vs The Rev lobby art (#25088)
Someone said the original was a bit low res
and I agreed.
This is a 1440p (from an 8k base image) rendition
of the same scene, with a new dramatic forced
perspective look, and generally cleaner art throughout.
Also now there's two mothroaches.
* Automatic changelog update
* Minor airlock assembly clean up (#25073)
1
* Update README.md (#25067)
* Update README.md
* emo review
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
---------
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
* prevent opening debug menus without perms (#25091)
prevent people without permissions from opening the tile, entityspawn, or decal menus
* Remove battery from crew observation kit, fix description (#25000)
-Remove battery from crew observation kit, fix description
* Laughin' Peas (#25089)
* laughter
* make clownmobs bleed laughter
* laughin syrup and laughter recipe
* add laughin peas
* Automatic changelog update
* QM drip DLC (#24477)
* New Drip for the QM
QM beret and QM formal uniform
* Asd
Asd
* Adds the new clothing to the uniform printer
what it says on the tin
* I always forget to update the copyright RAAAAAH
yup
* EMT Belt Part 2 (#24289)
* add
* fix
* aaaa
* Flipped caps real (#24961)
* Flipped caps real
* oops
* whoops
* flip not fold
* fix formatting
* cargosoft formatting
* Automatic changelog update
* Nerf Beanbags (#24653)
Lowers beanbag damage from 55 stam to 30 stam
* Automatic changelog update
* Fix screenspace popups (#24987)
* Fix screenspace popups
Never got around to it earlier but need to draw it above UI controls.
* Minor null change
* Automatic changelog update
* Fix crew manifest department bugs (#24975)
* Automatic changelog update
* Changed door remote to trigger based on vision occlusion(#25093)
Changed door remote to trigger based on vision occlusion rather than opaque collision targeting check. Ian's butt will no longer absorb your 5G signals.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* GPS In Paramed Locker (#25096)
GPS in paramed locker
* Remove 'travis scott day' from the game (#25106)
* remove travis scott from the game
* KILL TRAVIS EVEN MORE
* Automatic changelog update
* Remove erroneous changelog (#25107)
* fixed fland cargo shuttle not having tiny fans (sorry) (#25095)
* Glass box for antique laser pistol (#25104)
* glassbox
* fix
* Gibbing refactor (Per-part gibbing and giblet throwing!) (#24989)
* Moving Gibbing rework out from medrefactor into it's own PR
* Re-enabled warning for missing gibbable on TryGibEntity
* Implemented better logic for gibbing failover and better logging
* Allowing audio params and drop scattering customization per component. Created UnGibbable organ base types and made brains ungibbable.
Removed delete brain from gibBody function. Artifact crusher does not destroy brains anymore. It only destroyed brains before not other organs which was wierd.
* Update Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Fixing space for multiplication
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Added event raised when attempting to gib contained entities to allow modification of allowed and excluded container ids
* removing audioParams var from component (sound specifier includes it)
* Fixing signature
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Automatic changelog update
* Gibbing contents hotfix (#25114)
Fixing gibbing contents not respecting Include/Exclude container lists. This is currently unused
* Predict two-way levers (#25043)
* Predict two-way levers
Annoys me the rare occasions I touch cargo. Doesn't predict the signal but at least the lever responds immediately.
* space
* a
* Replace Romerol with Ambuzol in chemist guidebook (#25108)
replace romerol with ambuzol
* Fix borgs being able to emag themselves (#24748)
* Fix self emagging borgs
* Add popup on self emag failure.
* Ectoplasm is grindable into Necrosol (#25053)
add
* Automatic changelog update
* Automatic changelog update
* Roundstart Food Service research (#25046)
add
* Automatic changelog update
* Add option for character name colors in chat & move coloration to clientside (#24625)
* Adds option to disable character names in chat/speechbubbles
* Moved the coloring of names to clientside
* Move string functions to SharedChatSystem to avoid duplicate code in SpeechBubble.cs
* Changed to be put under Accessibility section
* Cache CVar
* Automatic changelog update
* Update Credits (#25115)
Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com>
* Replace fixed drink glasses with metamorphic versions (#25134)
* Replaced fixed drink glasses with metamorphic versions
* Fine, no milkshake then
* ambuzol beef (#25119)
* Automatic changelog update
* Shuttle floor resprite (#25127)
* resprites shuttle tiles
* resprites shuttle floor tiles & adds grey/black shuttle tiles
* attributions.yml update
* Adding a period to an object description (#25138)
Added a period to an object description.
Adds a period to silk's description. This is my first and last pull request.
* Door Remote Changelog Entry (#25144)
I'm so dumb.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* Lowered Ion Storm Reoccurence Delay to 20 (#25135)
* Lowered reoccurencedelay to 45
* Lowered Further down to 20
* Re-added shivs to crafting menus (#25094)
Added a recipe for crafting menu
* Automatic changelog update
* Color Tipped Ammo (#25103)
* Tipped .35 ammo
* used layers instead of new sprites
* remove the useless old sprites
* changed the green slightly
* Automatic changelog update
* Add overlay decals for mini tiles and bricks (#24949)
Add minitile and brick decals overlay
* Update Core (#24862)
* add
* Update Resources/Textures/Parallaxes/attributions.yml
* sprite change
* address review
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Buyable Jani Trolley (#25139)
Trolley
* Added display for amount of hits left in stun batons/stun prods. (#25141)
Added display for amount of hits left in stun batons/stunprods.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* autolatheable air tanks (#25130)
* gastankening
* fix price
* Automatic changelog update
* Fix pointing arrow trajectory (#25061)
Initial commit
* make linking logic gates 1000% better (#25041)
* make door status use SendSignal
* LastSignals and logic, add ClearSignal api too
* make everything outputting a logic signal default to false
* refactor ops
* :trollface:
* :trollface:
* protoid for LastSignals
* oop
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
* Buff emergency toolbox fill (#24225)
Resolves issue #23059, for which the submitter wrote:
Emergency toolboxes contain a crowbar, two flashlights (sometimes one), two breath masks, and two chocolate. With the addition of water bottles to survival boxes and emergency nitrogen tanks, I think emergency toolboxes should be updated to include said water bottles and emergency tanks. Would make these just a little bit more useful. It feels weird they don't have oxygen tanks when they have two breath masks, and since water bottles are now commonplace it would be a good idea to put them in a place where emergency food is stored as well.
* Void jetpack resprite (#25150)
add
* Automatic changelog update
* Allow configuring gen_build_info.py through environment variables (#25162)
This makes the life of forks slightly easier by letting you pass an
environment variable instead of having to maintain this file yourself.
* Significantly nerf Deathnettles (#25068)
* Balancing my beloved
Significantly nerfs deathnettles so botanists can't just take down jug's like it's no issue, we have guns, we should be using them
* Additional Balancing Changes.
* Losing my mind
* Automatic changelog update
* Fix spelling errors in mechs.yml (#25168)
* fix showhealthbars perms (#25157)
* Allow inspecting ID's and Health of people behind glass (#25163)
Hops will love me
* Automatic changelog update
* Fix decal error spam (#25172)
* Restore MonoOverlay (#25170)
https://github.com/space-wizards/space-station-14/pull/24949 nuked it.
* Automatic changelog update
* Added "wink" and "tearfully smiles" emotes + more cry emote variations (#25129)
Added wink and tearfully smiles emote + more cries variations
* Automatic changelog update
* Update submodule to 210.0.0 (#25175)
* Update submodule to 210.0.0
* 210.0.1 instead, the previous one was broken
* 210.0.3 instead, the previous one was ALSO broken
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
* The medical beret is real (#25176)
* 1
* 2
* button is real.
* Automatic changelog update
* Fixed Tipped ammo not being Spent (#25167)
Fix Tipped Ammo not being Spent
* Automatic changelog update
* Hoods and some chaplain's hats now hides hair (#25142)
* Hoods now hide hair
* additional
plague hat and witch hat now hide hair
* fixing some tags in hats
* hoods tag fix
* Glassbox shatter resprite (#25136)
* Automatic changelog update
* Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper
Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.
This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.
* Fix a bunch of warnings
* More warning fixes
* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.
* Get rid of some more ISerializationHooks for enums
* And a little more
* Apply suggestions from code review
Co-authored-by: 0x6273 <0x40@keemail.me>
---------
Co-authored-by: 0x6273 <0x40@keemail.me>
* Decrease the chemical cost of regen mesh and sutures and move them to their own file (#24948)
* WHYWEREMEDSINMEALRECIPES
* 20chem
* didiforgettosavethis
* Split slime marking leg gradient (#24928)
* Split slime marking leg gradient
* up markings to 4
* Automatic changelog update
* Require plants to be harvestable before sampling (#24851)
* Add verbs to Open/Close Openable containers, and add optional seals (#24780)
* Implement closing; add open/close verbs
* Add breakable seals
* Allow custom verb names; make condiment bottles closeable
* Remove pointless VV annotations and false defaults
* Split Sealable off into a new component
* Should have a Closed event too
* Oh hey, there are icons I could use
* Ternary operator
* Add support for seal visualizers
* Moved Sealable to Shared, added networking
* Replaced bottle_close1.ogg
* Automatic changelog update
* Shadow anomaly returns (#24629)
* content
* add cat
* ambient
* I FORGOT HEARTS!
* fix ambient
* some fixes
* canCollide: false
* connect to damageable
* pi
* remove fx
* some fixes
* *sad bruh*
* hazed
* Update base_shadow.yml
* Automatic changelog update
* Microwave UX enhancements (#24547)
* Facelift Microwave UI
Includes new background light in UI, Uses predictive input, UI now properly disables buttons when microwave is active
* Microwave now shows Elapsed time
* Fixed bad formatting
* Added new term for "BottomMargin"
* Change yellow color
* Update StyleNano.cs
just spacing fixed
* Cook time countdown now detached from server
Instead of the server constantly sending out messages for the cook countdown, it is now predicted client side using TimeSpan
* Update MicrowaveMenu.xaml
forgot to re-add item space
* Automatic changelog update
* Additional damage visualisers (#24618)
* brute
* add
* Anomaly Synchronizer + Signallers tweaks (#24461)
* content
* nerf
* fix rsi
* Automatic changelog update
* saltern update (#25182)
Co-authored-by: deltanedas <@deltanedas:kde.org>
* Allow players to run saveconfig command. (#25200)
Benign client-side command.
* Revert "Allow configuring gen_build_info.py through environment variables" (#25201)
Revert "Allow configuring gen_build_info.py through environment variables (#2…"
This reverts commit 163e6d2f896ccf9a37be2e17bbbad8b6514ccf4b.
* Fax machines can print from text file (#23262)
* added
* checks tweaking
* fixed what sloth wanted
* fixed?
* dialog diposing fix
* checks tweaking
* more changes
* dispose streamreader
* Update Content.Client/Fax/UI/FaxBoundUi.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Update Content.Server/Fax/FaxSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* fix minor typo
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Automatic changelog update
* Vox names, species prototype cleanup, some cosmetic changes (#24994)
* voxnames
* New generator parameters, names are more readable
* bunch of missing vox stuff
* more names
* sad
* Balanced ChemVend Stock (#25207)
* Balanced ChemVend Stock
ChemVend needs more balanced stock for what actually gets used
* +1 Sugar
* Ranged Holosigns (#25120)
* Changed holo signs to be ranged and used on click rather than Z.
* Updated comments
* Failed attempt at ignoring walls
* Getting rid of unused libraries
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* Minor test fixes (#25174)
Stuff that probably shoulda been wrapped ig but our test runner stinky.
* Add pun to diagnostic hud description (#25209)
Seaborgium is element number 106 and is presumably what lets these glasses "see" "borgs".
* Add events for TemperatureProtection and PressureProtection (#25165)
* Update criminal-records.ftl (#25229)
* Adds always powered variants of colored lights (#25185)
Co-authored-by: Jeff <velcroboy333@hotmail.com>
* Fixes silver bars being whole stacks (#25239)
Co-authored-by: Jeff <velcroboy333@hotmail.com>
* Makes clumsy not delete guns (#25243)
clumsy no longer deletes guns
Co-authored-by: Jessica M <jessica@maybe.sh>
* Predict Injector (syringes), cleanup (#25235)
At least the mode/transfer amount logic. Actual transfer logic needs Bloodstream which I didn't wanna move into shared.
* Updated disabler to have suitStorage tag under slots. (#25238)
* Automatic changelog update
* Updates to Origin (#24908)
Replaced medical's HM console with a CM console, added janitor equipment closet
* Fix spawn priority persistence on reconnect and restart (#25246)
Because of course I would forget one line
* Add French accent beret (#21430)
* Allow thermomachines to exchange with air instead of inlet (#25247)
Add purely atmospheric heat exchange to the gas thermomachine component (in preparation for space heaters).
* Fix: Holosigns can be stored again (#25249)
* Holosigns can be stored again
* TryComp to HasComp
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Death acidifier fix (#25251)
* Automatic changelog update
* Clarify stripping logs (#25190)
* Indicate whether pickpocketing is stealthy in logs, change :user to :actor, and clean up messages.
* Remove ugly whitespace
* Do the thing I should have done but didn't because I didn't want to think
* Fix spacing
* Fix disposals bins not automatically flushing after an object is inserted (#25233)
Fix disposals bins not automatically flushing after an object is inserted.
Because of Spaghetti Code:tm:, AfterInsert() in DisposalUnitSystem still handles insertion itself. Except in all cases except drag/drop insert, the object is already inserted so this check fails and the remaining logic doesn't happen anymore. Fixed now.
* Sec & greysec jumpskirt fix (#25269)
* "resprites" sec & greysec jumpskirts
* adjustments
* Automatic changelog update
* Reduce eshield hp (#25258)
reduce eshield hp
* Automatic changelog update
* Artifact hemoglobin trigger now accepts all sentient blood types (#25240)
* Artifact blood trigger now accepts all sentient blood types
* Update artifact-hints.ftl
* Update engine to v210.1.0 (#25288)
* Made ghost.role_time a server modifiable only cvar (#25292)
Fix
* Nuke fancification (#25297)
Actually use more icon states for deployed/armed/about to explode
Also unlit layer.
Also examine text
* Automatic changelog update
* Change copper blood from ferrous to metallic (#25217)
changed copper blood from ferrous to metallic
* Thindow glass dupe fix (#25304)
smite glass dupe off the face of the planet
eww nasty dupe exploits blehh
* Automatic changelog update
* Kill Seperated Mindshield Icons (#25303)
* Unghettoify mindshield icons
Adds support for layers in status icons, through the StatusIconLayer enum and the new "layer" datafield. Defaults to the Base layer where functionally remains unchanged.
* TG icon for shield
probably better than the shitty one I made in paint
* forgor meta.json
I forgor
* Emo review
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
---------
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
* Automatic changelog update
* MORE SUFFIXES (#25314)
Co-authored-by: Jeff <velcroboy333@hotmail.com>
* Fix spawning glass shard for each glass sheet in stack (#25308)
* fix: SpawnEntitiesBehavior now works with stacks
Fixed the issue of SpawnEntitiesBehavior not executing multiple times on
entities with stack conponent.
Fixes #25287
* fix: reduced dictionary iterations
* Automatic changelog update
* Adds atmospherics access to the fire fighting door remote. Feels like… (#25097)
Adds atmospherics access to the fire fighting door remote. Feels like an oversight for the atmos door remote to not have atmos access.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* Re-organise main menu screen (#25173)
- The dummy control of 2px size has annoyed me for almost 5 years.
- Why is it in the top-right.
- Why is the server address not labelled.
* Allow t-ray to penetrate carpets and puddles (#25276)
* Allow t-ray to penetrate carpets and puddles
* handle edge cases
* Automatic changelog update
* Add sfx for writing on paper (#25257)
* Initial commit
* Moved params to sound
* Removed type tag
* Removed null check
* Forced default
* Automatic changelog update
* New sprites for guidebooks (#25232)
* added books to roles
* First pass
* removed yaml to split pull requests into resprite first, then giving the books to assistants
* new science
* Automatic changelog update
* LockVisualizer (#25224)
* LockVisualizer
* Fix state
* Clean some code
* Make it component, fix tests fail
* Fix for StateUnlocked
Now it is possible to manually set the unlocked state and it will work!
* Optimize LockVisualizer, add check for unlocked state
* No todo I guess
* Solution precision fixes (#25199)
* Add test for two chemistry issues
1. rounding issue with reaction processing when making chloral hydrate
2. reliable assert trip due to the ValidateSolution() heat capacity issue.
* Fix FixedPoint2 arithmetic
Fix internal floating point arithmetic in places where it could be avoided.
Fix incorrect rounding mode used in other places (it should always floor, like regular int arithmetic).
I had to add an explicit epsilon value for float -> FixedPoint2 because something like 1.05 is actually like 1.04999 and that'd cause it to be rounded down to 1.04.
This fixes reaction reagent processing in cases where the reagent inputs can't cleanly divide. Previously, when making 30u chloral hydrate by adding the chlorine in 10u increments you'd end up with 0.04 chlorine left over. This was caused by division in the reaction code rounding up in some cases. Changing division here to always round down fixes it.
* Attempt to fix heat capacity precision assert issues.
Fixes #22126
First, we just increase the tolerance of the assert. It was way too low.
Second, actually put a cap on float drift from one-off _heatCapacity changes.
* Fix float -> FixedPoint2 epsilon for negative number, fix tests.
* Fix DamageableTest
* Oh yeah I need to call CleanReturnAsync
* Automatic changelog update
* WebP lobby images (#25184)
* Allow webp in lobby background files
* Make lobby art webp images
Reduces folder from 10 MB to 2.5 MB without only slight quality loss.
* Update PutLobbyScreensHere.txt
* New lobby art : Blueprint (#25179)
* add
* replace image with webp version
waiting on #25184
* Automatic changelog update
* Diona Nymphs & Splitting (#24630)
* Porting & implementation
* Fix two stupid errors
* Human not humans
* fix audio path
* Fix test fails & update cooldown
* Work on reviews & test fail
* Rework nymph organ system.
* Make the nymph organs nospawn.
* IsDeadIC
* Automatic changelog update
* reform cooldown 10 minutes (#25328)
* Change plant clipping mechanics (#25326)
Make seeds from clipped plants inherit the decreased health from parents.
Also require one growth stage before clipping.
* Automatic changelog update
* Fix nymphs being deleted immediatly after spawning (#25344)
* nymphs now don't get deleted together with the body of the diona
* moved nymph system to server
* Automatic changelog update
* Fix: Grenades don't make trigger sound (#25321)
* Fix: Grenades don't make trigger sound
* transform instead of trycomp transform
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* fixed the specific if statement called when plant age is under 0 (#25346)
* Save round information into replay_final.yml (#23013)
* Save round information into the replay
* Add round end text too
* This is way better
* Get actual job
* oop
* OK THERE
* Fake line endings to make life easier
* I was told this yaml is legal
* I just realised this will make my life easier
* REVIEWS BABY IM A PROGRAMMER MOMMY
* Live pjb reaction
* Live pjb reaction 2
* Reviews 2
* Dont need this
* Please no more have mercy on my soul
* Oh frick
* Adds a massban flag to the admin flags (#25327)
Adds a massban flag to the admin flags used on ss14 to ban large amounts of players rom a .tsv file
Co-authored-by: Geekyhobo <66805063+Ahlytlex@users.noreply.github.com>
* Automatic changelog update
* Fix missing line in nuke exploding sprite (#25351)
I could've sworn I corrected this before committing but guess not ???
* Added Evidence Markers for the Detective! (#25255)
* added evidence markers
* box tweak
* fixed a spelling mistake
* new sprites, tweaked yml too
* Add "tailed" hair (#25216)
* add
* yes
* Clean up scars.yml and add a new chest scar (#25215)
add
* Automatic changelog update
* Add new "OptionsVisualizer" (#25128)
This is a visualizer somewhat similar to the Generic. It allows configuring appearance info based on specific CVars the user has set. This allows YAML to easily configure alternatives for accessibility CVars like reduced motion.
* Suffix spelling mistake on seed vendor (#25352)
spelling error
* Update engine to v210.1.1 (#25354)
Important fixes from the UI PR
* Stop wagging tails on crit (#25323)
* Add Flammable Touch Reaction for liquid tritium
* Stop tail wagging action on crit
* Revert "Add Flammable Touch Reaction for liquid tritium"
This reverts commit 41be57b058a0cdee0cecfc51eb1c4a25631e62f3.
* Automatic changelog update
* EVA suit helmets now have (un)equip sounds (#25349)
add (un)equip sounds to EVA helms
* Automatic changelog update
* Newton Cradle Fix + Addition to Bureaucracy Crate (#25357)
fixes
makes the newton cradle not able to decimate ears while also adding it to the bureaucracy crate and lowering its volume and range a little bit
* Automatic changelog update
* Shadow anomaly respects "reduced motion" (#25355)
Enabling "reduced motion" now makes the smoke effects not animate. This helps some people with vision issues.
* Fixed directional window durability (#25259)
shit
* Very little cleanup (#25364)
* Origin Station Update 18.02.2024 (medbay update) (#25369)
* Update Credits (#25360)
Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com>
* Add bio reactions (#25366)
* added more foodstuff breakdowns
* Calcium doesn't exist; moved phosphorus to protein
* tested reactions- some should be centrifuged
* more testing tweaks
* Automatic changelog update
* Increase printing price for neck clothes (#25375)
* Increase printing price
* Update clothing.yml
* Update Core (#25383)
add
* add icons for drinks in Solar's (#25301)
* add icons for drinks in Solar's
fixed colors of tea
* consistently use capitals for color codes
* don't add extra whitespace
* Automatic changelog update
* Small Nymph Changes (#25363)
* Emote sounds, accent & doorbump
* Oops
* Only non-brains can't talk
* Automatic changelog update
* Bump nixpkgs rev (#25361)
* Bump nixpkgs revision
* Update nix-direnv
* Remove extra nix functionalities
Both nix-direnv and legacy command nix-shell fail. Reverting to
flakes-only commands.
* Pin nixpkgs per suggestion
See https://github.com/space-wizards/space-station-14/pull/25361#discussion_r1494196038
* Revert nix-direnv removal
* Add python3 to shell.nix
* Adds guidebooks to the 4 learner roles (#25388)
added the books
* Automatic changelog update
* Add support for metamorphic fill levels (#25022)
* Added support for fill levels to metamorphic glasses
* Fix warnings and cleanup
* Don't break non-metamorphic fills!
* Vending UI facelift (#25377)
* Convert to fancy window + added footer + add list spacing
* margin add
* Automatic changelog update
* Make metamorphic glasses use last solution's empty sprite (#25322)
Make metamorphic glasses use empty sprite for the last solution they contained.
* Moths can eat plushies (#25382)
* Update toys.yml
* fix
* New sound of eating
* Increased eating time
* New sounds+sorting
* Automatic changelog update
* Make pills colorful and labeled (#25284)
* Make pills colorful and labeled
* Inherit pill sprites from parent
* Add Flammable Touch Reaction for liquid tritium (#25281)
* randomized sexless species now have epicene gender by default (#25282)
Fikss
* Automatic changelog update
* Mechanized treatment improvements (#25356)
Medical module merge
* Hotfix: Set round end information for replays back to null on round start instead of round end (#25394)
* Hotfix
* I dont think i need this now
* Fix action state handling bug (#25395)
* Rejig action state handling
* Fix entity arg
* Fix deserialization
* Automatic changelog update
* Fix admin notes and database time nonsense. (#25280)
God bloody christ. There's like three layers of shit here.
So firstly, apparently we were still using Npgsql.EnableLegacyTimestampBehavior. This means that time values (which are stored UTC in the database) were converted to local time when read out. This meant they were passed around as kind Local to clients (instead of UTC in the case of SQLite). That's easy enough to fix just turn off the flag and fix the couple spots we're passing a local DateTime ez.
Oh but it turns out there's a DIFFERENT problem with SQLite: See SQLite we definitely store the DateTimes as UTC, but when Microsoft.Data.Sqlite reads them it reads them as Kind Unspecified instead of Utc.
Why are these so bad? Because the admin notes system passes DateTime instances from EF Core straight to the rest of the game code. And that means it's a PAIN IN THE ASS to run the necessary conversions to fix the DateTime instances. GOD DAMNIT now I have to make a whole new set of "Record" entities so we avoid leaking the EF Core model entities. WAAAAAAA.
Fixes #19897
* PlayerListControl fixes. (#25248)
* PlayerListControl fixes.
Fix a button being selected by default always, which then can't be selected properly for real. This affected multiple admin UIs.
This broke due to upstream RT changes but ButtonGroup was always kinda busted so whatever. Uses the new IsNoneSetAllowed to implement everything properly.
Also make sure the selected player STAYS selected when filtering the list and stuff.
Also this PlayerInfo record has been changed to only do equality on the User ID because otherwise it'd need to compare each field individually which would be weird.
* Revert changes to ListContainer
This change was made default in the engine, no longer necessary here.
* Automatic changelog update
* Ore crab structural weakness (#25390)
* Attempt to change structural dmg of ore crab
* Made ore crabs susceptible to structural damage
* Automatic changelog update
* Set nav map icon textures to use bilinear filtering (#25411)
This just makes them look slightly better when zoomed.
* Fix PlayerListControl re-raising selection changed when repopulated. (#25412)
Now we just skip duplicate "item pressed" events from the ListContainer.
This caused the ahelp window to unfocus the message box after sending something. Flow is something like this: you send ahelp -> bwoink window refreshes player list due to new bwoink -> repopulated player list -> sent selection change -> repopulates right pane -> line edit gets unfocused.
* Train station (#24927)
* some content
* some next content
* fixes
* remove stained window
* return bot message?
* woah! Full map added!
* map update
* big update
* camera server
* Corvax playtest feedback
* add mail system and 30$ meteor shield
* update
* updatik
* hardwork
* pipip
* update
* remove from mappool
* fixes
* sentipode
* e
* Mindshield outline flashes, (#25409)
* Add animation support to status icons
Animated like any other entity. Change the png to have all frames, add delays in meta.json, and you're good to go.
* Dirty "fix" for the crashing.
Still have no idea why files cannot be read without changing their path in the yaml.
* Sloth review ig
I still have no idea why it wont work with /Textures/ missing as a prefix.
* Automatic changelog update
* Small Artifact Fixes (#25416)
* 20kw artifact fix
* Change that hopefully doesn't completely break storage artifacts without me realising
* Add roundid to replay_final.yml (#25398)
oopsy i forgor
* Resprite & hand position correction of Nettle & Death Nettle (#25421)
Resprite of Nettle & Death Nettle. Corrected R & L hand locations for all orientations of both plants.
* Automatic changelog update
* balance Explosive Technology (#25397)
* update arsenal yml
balance ExplosiveTechnology
* small changes in arsenal research
small changes in arsenal research
* Update arsenal.yml
* Automatic changelog update
* Tiny shove fix. (#25353)
* Remove second shove check.
* Change when popups and sounds are created.
Reduces phantom shoves that feel bad.
* why didn't i think of this i saw it earlier...
* Replaced Is fields with prefix
* remove some dependencies to fix tests???
* Automatic changelog update
* fix: пара фиксов апстрима
* Revert "Nuke fancification (#25297)"
This reverts commit 3a45d519dcc3679375b5239b6f1881cdd1a07344.
# Conflicts:
# Resources/Textures/Objects/Devices/nuke.rsi/meta.json
# Resources/Textures/Objects/Devices/nuke.rsi/nuclearbomb_deployed.png
# Resources/Textures/Objects/Devices/nuke.rsi/nuclearbomb_exploding.png
# Resources/Textures/Objects/Devices/nuke.rsi/nuclearbomb_timing.png
* Revert "Shuttle floor resprite (#25127)"
This reverts commit a93466ac24c7256d4b584ba830c4fa1cda253d5a.
# Conflicts:
# Resources/Textures/Tiles/shuttleblue.png
# Resources/Textures/Tiles/shuttleorange.png
# Resources/Textures/Tiles/shuttlepurple.png
# Resources/Textures/Tiles/shuttlered.png
# Resources/Textures/Tiles/shuttlewhite.png
* Revert "New lobby art : Blueprint (#25179)"
This reverts commit 90d02a590117b54a16b3af848f3b2fe0195724c9.
# Conflicts:
# Resources/Prototypes/lobbyscreens.yml
* Revert "Added Monitor Computer Boards to Observation Kit (#24979)"
This reverts commit c5027b51ecc7387a678e194fd7733a03349be536.
* Revert "Small t-ray scanner resprite (#25047)"
This reverts commit 601da0c3a33279beff818f82913ed2583e48c642.
# Conflicts:
# Resources/Textures/Objects/Tools/t-ray.rsi/tray-off.png
# Resources/Textures/Objects/Tools/t-ray.rsi/tray-on.png
* add: переводы
* fix: фиксы под тесты
---------
Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: Emisse <99158783+Emisse@users.noreply.github.com>
Co-authored-by: Armok <155400926+ARMOKS@users.noreply.github.com>
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
Co-authored-by: PoorMansDreams <150595537+PoorMansDreams@users.noreply.github.com>
Co-authored-by: Hannah Giovanna Dawson <karakkaraz@gmail.com>
Co-authored-by: lapatison <100279397+lapatison@users.noreply.github.com>
Co-authored-by: router <messagebus@vk.com>
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Co-authored-by: Varen <ychwack@hotmail.it>
Co-authored-by: potato1234_x <79580518+potato1234x@users.noreply.github.com>
Co-authored-by: Hanz <41141796+Hanzdegloker@users.noreply.github.com>
Co-authored-by: Ubaser <134914314+UbaserB@users.noreply.github.com>
Co-authored-by: themias <89101928+themias@users.noreply.github.com>
Co-authored-by: Alzore <140123969+Blackern5000@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com>
Co-authored-by: Plykiya <plykiya@protonmail.com>
Co-authored-by: YuNii <benjamin@bhenrich.de>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
Co-authored-by: Mangohydra <156087924+Mangohydra@users.noreply.github.com>
Co-authored-by: Nim <128169402+Nimfar11@users.noreply.github.com>
Co-authored-by: Jezithyr <jezithyr@gmail.com>
Co-authored-by: Fluffiest Floofers <thebluewulf@gmail.com>
Co-authored-by: Jajsha <101492056+Zap527@users.noreply.github.com>
Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
Co-authored-by: Flareguy <78941145+Flareguy@users.noreply.github.com>
Co-authored-by: forgotmyotheraccount <133569389+forgotmyotheraccount@users.noreply.github.com>
Co-authored-by: FungiFellow <151778459+FungiFellow@users.noreply.github.com>
Co-authored-by: Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
Co-authored-by: Ilya246 <57039557+Ilya246@users.noreply.github.com>
Co-authored-by: Krunklehorn <42424291+Krunklehorn@users.noreply.github.com>
Co-authored-by: Alex Nordlund <deep.alexander@gmail.com>
Co-authored-by: EdenTheLiznerd <138748328+EdenTheLiznerd@users.noreply.github.com>
Co-authored-by: deepdarkdepths <155149356+deepdarkdepths@users.noreply.github.com>
Co-authored-by: Genkail <50331122+Genkail@users.noreply.github.com>
Co-authored-by: Vasilis <vasilis@pikachu.systems>
Co-authored-by: James Simonson <jamessimo89@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: icekot8 <93311212+icekot8@users.noreply.github.com>
Co-authored-by: Agoichi <92464780+Agoichi@users.noreply.github.com>
Co-authored-by: KREKS <132602258+xKREKSx@users.noreply.github.com>
Co-authored-by: 0x6273 <0x40@keemail.me>
Co-authored-by: lzk <124214523+lzk228@users.noreply.github.com>
Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
Co-authored-by: Guilherme Ornel <86210200+joshepvodka@users.noreply.github.com>
Co-authored-by: Errant <35878406+Errant-4@users.noreply.github.com>
Co-authored-by: wafehling <wafehling@users.noreply.github.com>
Co-authored-by: Interrobang01 <113810873+Interrobang01@users.noreply.github.com>
Co-authored-by: k3yw <grenadiumdota@gmail.com>
Co-authored-by: Velcroboy <107660393+IamVelcroboy@users.noreply.github.com>
Co-authored-by: Jeff <velcroboy333@hotmail.com>
Co-authored-by: Jessica M <jessica@jessicamaybe.com>
Co-authored-by: Jessica M <jessica@maybe.sh>
Co-authored-by: Zadeon <loldude9000@gmail.com>
Co-authored-by: brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
Co-authored-by: Menshin <Menshin@users.noreply.github.com>
Co-authored-by: nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Co-authored-by: liltenhead <104418166+liltenhead@users.noreply.github.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Co-authored-by: Daxxi3 <158596935+Daxxi3@users.noreply.github.com>
Co-authored-by: MACMAN2003 <macman2003c@gmail.com>
Co-authored-by: Golinth <amh2023@gmail.com>
Co-authored-by: Łukasz Mędrek <lukasz@lukaszm.xyz>
Co-authored-by: PotentiallyTom <67602105+PotentiallyTom@users.noreply.github.com>
Co-authored-by: MilenVolf <63782763+MilenVolf@users.noreply.github.com>
Co-authored-by: LankLTE <135308300+LankLTE@users.noreply.github.com>
Co-authored-by: Flesh <62557990+PolterTzi@users.noreply.github.com>
Co-authored-by: Arendian <137322659+Arendian@users.noreply.github.com>
Co-authored-by: Geekyhobo <66805063+Geekyhobo@users.noreply.github.com>
Co-authored-by: Geekyhobo <66805063+Ahlytlex@users.noreply.github.com>
Co-authored-by: Moomoobeef <62638182+Moomoobeef@users.noreply.github.com>
Co-authored-by: Peptide90 <78795277+Peptide90@users.noreply.github.com>
Co-authored-by: ArchPigeon <bookmaster3@gmail.com>
Co-authored-by: Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
Co-authored-by: Firewatch <54725557+musicmanvr@users.noreply.github.com>
Co-authored-by: Vigers Ray <60344369+VigersRay@users.noreply.github.com>
Co-authored-by: genderGeometries <159584039+genderGeometries@users.noreply.github.com>
Co-authored-by: hiucko <86206040+Hiucko@users.noreply.github.com>
Co-authored-by: Sybil <azurerosegarden@gmail.com>
Co-authored-by: Ioannis Eleftheriou <me@yath.xyz>
Co-authored-by: marboww <152051971+marboww@users.noreply.github.com>
Co-authored-by: veprolet <68151557+veprolet@users.noreply.github.com>
Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
Co-authored-by: Tonydatguy <154929293+Tonydatguy@users.noreply.github.com>
Co-authored-by: Gotimanga <127038462+Gotimanga@users.noreply.github.com>
Co-authored-by: MjrLandWhale <brandonemitch@gmail.com>
Co-authored-by: takemysoult <143123247+takemysoult@users.noreply.github.com>
Co-authored-by: Callmore <22885888+Callmore@users.noreply.github.com>
2024-02-23 23:05:48 +07:00
|
|
|
Log.Error($"Construction component was deleted while still processing interactions." +
|
|
|
|
|
$"Entity {ToPrettyString(uid)}, graph: {construction.Graph}, " +
|
|
|
|
|
$"Next: {interaction.GetType().Name}, " +
|
|
|
|
|
$"Remaining Queue: {string.Join(", ", construction.InteractionQueue.Select(x => x.GetType().Name))}");
|
2023-02-26 06:14:26 +13:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
// We set validation to false because we actually want to perform the interaction here.
|
|
|
|
|
HandleEvent(uid, interaction, false, construction);
|
|
|
|
|
}
|
2022-09-19 18:10:10 +12:00
|
|
|
#if EXCEPTION_TOLERANCE
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
[Upstream] Upstream (#109)
* Automatic changelog update
* atlas update (#25071)
* atlas update
* untroll
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
* box update (#25074)
* fland update (#25075)
* marathon update (#25076)
* meta update (#25077)
* Syndicate key grammar fix (#25085)
* Syndicate encryption key grammar fix
An encryption key used by... wait... Who is owner of this chip? > An encryption key used by... wait... Who is the owner of this chip?
* Syndicate key grammar fix
An encryption key used by... wait... Who is owner of this chip? > An encryption key used by... wait... Who is the owner of this chip?
* Fix hybridization seedless probability (#25084)
Fix comparison
Hybrids (different plants being crossed) are supposed to have a high
chance of becoming seedless to balance overpowered plants.
However, a logic error in the comparison gave seedless to plants when
they were from the same seed (not hybrids) rather than the other way
around.
Reported by: @genderGeometries
* Added Tourniquets to stop bleeds (#23198)
* Fixed Error with RobustToolbox Edits. Removed the addition of secbelt tag from assault belt.
* Resprite of the monstrosity
* Resprite of the tourniquet NO LONGER PHALLUS SHAPED
* too bright, now darker and edgier
* Tourniquet resprite
* metajson yay
* Update Skelly Vs The Rev lobby art (#25088)
Someone said the original was a bit low res
and I agreed.
This is a 1440p (from an 8k base image) rendition
of the same scene, with a new dramatic forced
perspective look, and generally cleaner art throughout.
Also now there's two mothroaches.
* Automatic changelog update
* Minor airlock assembly clean up (#25073)
1
* Update README.md (#25067)
* Update README.md
* emo review
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
---------
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
* prevent opening debug menus without perms (#25091)
prevent people without permissions from opening the tile, entityspawn, or decal menus
* Remove battery from crew observation kit, fix description (#25000)
-Remove battery from crew observation kit, fix description
* Laughin' Peas (#25089)
* laughter
* make clownmobs bleed laughter
* laughin syrup and laughter recipe
* add laughin peas
* Automatic changelog update
* QM drip DLC (#24477)
* New Drip for the QM
QM beret and QM formal uniform
* Asd
Asd
* Adds the new clothing to the uniform printer
what it says on the tin
* I always forget to update the copyright RAAAAAH
yup
* EMT Belt Part 2 (#24289)
* add
* fix
* aaaa
* Flipped caps real (#24961)
* Flipped caps real
* oops
* whoops
* flip not fold
* fix formatting
* cargosoft formatting
* Automatic changelog update
* Nerf Beanbags (#24653)
Lowers beanbag damage from 55 stam to 30 stam
* Automatic changelog update
* Fix screenspace popups (#24987)
* Fix screenspace popups
Never got around to it earlier but need to draw it above UI controls.
* Minor null change
* Automatic changelog update
* Fix crew manifest department bugs (#24975)
* Automatic changelog update
* Changed door remote to trigger based on vision occlusion(#25093)
Changed door remote to trigger based on vision occlusion rather than opaque collision targeting check. Ian's butt will no longer absorb your 5G signals.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* GPS In Paramed Locker (#25096)
GPS in paramed locker
* Remove 'travis scott day' from the game (#25106)
* remove travis scott from the game
* KILL TRAVIS EVEN MORE
* Automatic changelog update
* Remove erroneous changelog (#25107)
* fixed fland cargo shuttle not having tiny fans (sorry) (#25095)
* Glass box for antique laser pistol (#25104)
* glassbox
* fix
* Gibbing refactor (Per-part gibbing and giblet throwing!) (#24989)
* Moving Gibbing rework out from medrefactor into it's own PR
* Re-enabled warning for missing gibbable on TryGibEntity
* Implemented better logic for gibbing failover and better logging
* Allowing audio params and drop scattering customization per component. Created UnGibbable organ base types and made brains ungibbable.
Removed delete brain from gibBody function. Artifact crusher does not destroy brains anymore. It only destroyed brains before not other organs which was wierd.
* Update Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Fixing space for multiplication
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Added event raised when attempting to gib contained entities to allow modification of allowed and excluded container ids
* removing audioParams var from component (sound specifier includes it)
* Fixing signature
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Automatic changelog update
* Gibbing contents hotfix (#25114)
Fixing gibbing contents not respecting Include/Exclude container lists. This is currently unused
* Predict two-way levers (#25043)
* Predict two-way levers
Annoys me the rare occasions I touch cargo. Doesn't predict the signal but at least the lever responds immediately.
* space
* a
* Replace Romerol with Ambuzol in chemist guidebook (#25108)
replace romerol with ambuzol
* Fix borgs being able to emag themselves (#24748)
* Fix self emagging borgs
* Add popup on self emag failure.
* Ectoplasm is grindable into Necrosol (#25053)
add
* Automatic changelog update
* Automatic changelog update
* Roundstart Food Service research (#25046)
add
* Automatic changelog update
* Add option for character name colors in chat & move coloration to clientside (#24625)
* Adds option to disable character names in chat/speechbubbles
* Moved the coloring of names to clientside
* Move string functions to SharedChatSystem to avoid duplicate code in SpeechBubble.cs
* Changed to be put under Accessibility section
* Cache CVar
* Automatic changelog update
* Update Credits (#25115)
Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com>
* Replace fixed drink glasses with metamorphic versions (#25134)
* Replaced fixed drink glasses with metamorphic versions
* Fine, no milkshake then
* ambuzol beef (#25119)
* Automatic changelog update
* Shuttle floor resprite (#25127)
* resprites shuttle tiles
* resprites shuttle floor tiles & adds grey/black shuttle tiles
* attributions.yml update
* Adding a period to an object description (#25138)
Added a period to an object description.
Adds a period to silk's description. This is my first and last pull request.
* Door Remote Changelog Entry (#25144)
I'm so dumb.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* Lowered Ion Storm Reoccurence Delay to 20 (#25135)
* Lowered reoccurencedelay to 45
* Lowered Further down to 20
* Re-added shivs to crafting menus (#25094)
Added a recipe for crafting menu
* Automatic changelog update
* Color Tipped Ammo (#25103)
* Tipped .35 ammo
* used layers instead of new sprites
* remove the useless old sprites
* changed the green slightly
* Automatic changelog update
* Add overlay decals for mini tiles and bricks (#24949)
Add minitile and brick decals overlay
* Update Core (#24862)
* add
* Update Resources/Textures/Parallaxes/attributions.yml
* sprite change
* address review
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Buyable Jani Trolley (#25139)
Trolley
* Added display for amount of hits left in stun batons/stun prods. (#25141)
Added display for amount of hits left in stun batons/stunprods.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* autolatheable air tanks (#25130)
* gastankening
* fix price
* Automatic changelog update
* Fix pointing arrow trajectory (#25061)
Initial commit
* make linking logic gates 1000% better (#25041)
* make door status use SendSignal
* LastSignals and logic, add ClearSignal api too
* make everything outputting a logic signal default to false
* refactor ops
* :trollface:
* :trollface:
* protoid for LastSignals
* oop
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
* Buff emergency toolbox fill (#24225)
Resolves issue #23059, for which the submitter wrote:
Emergency toolboxes contain a crowbar, two flashlights (sometimes one), two breath masks, and two chocolate. With the addition of water bottles to survival boxes and emergency nitrogen tanks, I think emergency toolboxes should be updated to include said water bottles and emergency tanks. Would make these just a little bit more useful. It feels weird they don't have oxygen tanks when they have two breath masks, and since water bottles are now commonplace it would be a good idea to put them in a place where emergency food is stored as well.
* Void jetpack resprite (#25150)
add
* Automatic changelog update
* Allow configuring gen_build_info.py through environment variables (#25162)
This makes the life of forks slightly easier by letting you pass an
environment variable instead of having to maintain this file yourself.
* Significantly nerf Deathnettles (#25068)
* Balancing my beloved
Significantly nerfs deathnettles so botanists can't just take down jug's like it's no issue, we have guns, we should be using them
* Additional Balancing Changes.
* Losing my mind
* Automatic changelog update
* Fix spelling errors in mechs.yml (#25168)
* fix showhealthbars perms (#25157)
* Allow inspecting ID's and Health of people behind glass (#25163)
Hops will love me
* Automatic changelog update
* Fix decal error spam (#25172)
* Restore MonoOverlay (#25170)
https://github.com/space-wizards/space-station-14/pull/24949 nuked it.
* Automatic changelog update
* Added "wink" and "tearfully smiles" emotes + more cry emote variations (#25129)
Added wink and tearfully smiles emote + more cries variations
* Automatic changelog update
* Update submodule to 210.0.0 (#25175)
* Update submodule to 210.0.0
* 210.0.1 instead, the previous one was broken
* 210.0.3 instead, the previous one was ALSO broken
---------
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
* The medical beret is real (#25176)
* 1
* 2
* button is real.
* Automatic changelog update
* Fixed Tipped ammo not being Spent (#25167)
Fix Tipped Ammo not being Spent
* Automatic changelog update
* Hoods and some chaplain's hats now hides hair (#25142)
* Hoods now hide hair
* additional
plague hat and witch hat now hide hair
* fixing some tags in hats
* hoods tag fix
* Glassbox shatter resprite (#25136)
* Automatic changelog update
* Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper
Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.
This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.
* Fix a bunch of warnings
* More warning fixes
* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.
* Get rid of some more ISerializationHooks for enums
* And a little more
* Apply suggestions from code review
Co-authored-by: 0x6273 <0x40@keemail.me>
---------
Co-authored-by: 0x6273 <0x40@keemail.me>
* Decrease the chemical cost of regen mesh and sutures and move them to their own file (#24948)
* WHYWEREMEDSINMEALRECIPES
* 20chem
* didiforgettosavethis
* Split slime marking leg gradient (#24928)
* Split slime marking leg gradient
* up markings to 4
* Automatic changelog update
* Require plants to be harvestable before sampling (#24851)
* Add verbs to Open/Close Openable containers, and add optional seals (#24780)
* Implement closing; add open/close verbs
* Add breakable seals
* Allow custom verb names; make condiment bottles closeable
* Remove pointless VV annotations and false defaults
* Split Sealable off into a new component
* Should have a Closed event too
* Oh hey, there are icons I could use
* Ternary operator
* Add support for seal visualizers
* Moved Sealable to Shared, added networking
* Replaced bottle_close1.ogg
* Automatic changelog update
* Shadow anomaly returns (#24629)
* content
* add cat
* ambient
* I FORGOT HEARTS!
* fix ambient
* some fixes
* canCollide: false
* connect to damageable
* pi
* remove fx
* some fixes
* *sad bruh*
* hazed
* Update base_shadow.yml
* Automatic changelog update
* Microwave UX enhancements (#24547)
* Facelift Microwave UI
Includes new background light in UI, Uses predictive input, UI now properly disables buttons when microwave is active
* Microwave now shows Elapsed time
* Fixed bad formatting
* Added new term for "BottomMargin"
* Change yellow color
* Update StyleNano.cs
just spacing fixed
* Cook time countdown now detached from server
Instead of the server constantly sending out messages for the cook countdown, it is now predicted client side using TimeSpan
* Update MicrowaveMenu.xaml
forgot to re-add item space
* Automatic changelog update
* Additional damage visualisers (#24618)
* brute
* add
* Anomaly Synchronizer + Signallers tweaks (#24461)
* content
* nerf
* fix rsi
* Automatic changelog update
* saltern update (#25182)
Co-authored-by: deltanedas <@deltanedas:kde.org>
* Allow players to run saveconfig command. (#25200)
Benign client-side command.
* Revert "Allow configuring gen_build_info.py through environment variables" (#25201)
Revert "Allow configuring gen_build_info.py through environment variables (#2…"
This reverts commit 163e6d2f896ccf9a37be2e17bbbad8b6514ccf4b.
* Fax machines can print from text file (#23262)
* added
* checks tweaking
* fixed what sloth wanted
* fixed?
* dialog diposing fix
* checks tweaking
* more changes
* dispose streamreader
* Update Content.Client/Fax/UI/FaxBoundUi.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Update Content.Server/Fax/FaxSystem.cs
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* fix minor typo
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Automatic changelog update
* Vox names, species prototype cleanup, some cosmetic changes (#24994)
* voxnames
* New generator parameters, names are more readable
* bunch of missing vox stuff
* more names
* sad
* Balanced ChemVend Stock (#25207)
* Balanced ChemVend Stock
ChemVend needs more balanced stock for what actually gets used
* +1 Sugar
* Ranged Holosigns (#25120)
* Changed holo signs to be ranged and used on click rather than Z.
* Updated comments
* Failed attempt at ignoring walls
* Getting rid of unused libraries
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* Minor test fixes (#25174)
Stuff that probably shoulda been wrapped ig but our test runner stinky.
* Add pun to diagnostic hud description (#25209)
Seaborgium is element number 106 and is presumably what lets these glasses "see" "borgs".
* Add events for TemperatureProtection and PressureProtection (#25165)
* Update criminal-records.ftl (#25229)
* Adds always powered variants of colored lights (#25185)
Co-authored-by: Jeff <velcroboy333@hotmail.com>
* Fixes silver bars being whole stacks (#25239)
Co-authored-by: Jeff <velcroboy333@hotmail.com>
* Makes clumsy not delete guns (#25243)
clumsy no longer deletes guns
Co-authored-by: Jessica M <jessica@maybe.sh>
* Predict Injector (syringes), cleanup (#25235)
At least the mode/transfer amount logic. Actual transfer logic needs Bloodstream which I didn't wanna move into shared.
* Updated disabler to have suitStorage tag under slots. (#25238)
* Automatic changelog update
* Updates to Origin (#24908)
Replaced medical's HM console with a CM console, added janitor equipment closet
* Fix spawn priority persistence on reconnect and restart (#25246)
Because of course I would forget one line
* Add French accent beret (#21430)
* Allow thermomachines to exchange with air instead of inlet (#25247)
Add purely atmospheric heat exchange to the gas thermomachine component (in preparation for space heaters).
* Fix: Holosigns can be stored again (#25249)
* Holosigns can be stored again
* TryComp to HasComp
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Death acidifier fix (#25251)
* Automatic changelog update
* Clarify stripping logs (#25190)
* Indicate whether pickpocketing is stealthy in logs, change :user to :actor, and clean up messages.
* Remove ugly whitespace
* Do the thing I should have done but didn't because I didn't want to think
* Fix spacing
* Fix disposals bins not automatically flushing after an object is inserted (#25233)
Fix disposals bins not automatically flushing after an object is inserted.
Because of Spaghetti Code:tm:, AfterInsert() in DisposalUnitSystem still handles insertion itself. Except in all cases except drag/drop insert, the object is already inserted so this check fails and the remaining logic doesn't happen anymore. Fixed now.
* Sec & greysec jumpskirt fix (#25269)
* "resprites" sec & greysec jumpskirts
* adjustments
* Automatic changelog update
* Reduce eshield hp (#25258)
reduce eshield hp
* Automatic changelog update
* Artifact hemoglobin trigger now accepts all sentient blood types (#25240)
* Artifact blood trigger now accepts all sentient blood types
* Update artifact-hints.ftl
* Update engine to v210.1.0 (#25288)
* Made ghost.role_time a server modifiable only cvar (#25292)
Fix
* Nuke fancification (#25297)
Actually use more icon states for deployed/armed/about to explode
Also unlit layer.
Also examine text
* Automatic changelog update
* Change copper blood from ferrous to metallic (#25217)
changed copper blood from ferrous to metallic
* Thindow glass dupe fix (#25304)
smite glass dupe off the face of the planet
eww nasty dupe exploits blehh
* Automatic changelog update
* Kill Seperated Mindshield Icons (#25303)
* Unghettoify mindshield icons
Adds support for layers in status icons, through the StatusIconLayer enum and the new "layer" datafield. Defaults to the Base layer where functionally remains unchanged.
* TG icon for shield
probably better than the shitty one I made in paint
* forgor meta.json
I forgor
* Emo review
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
---------
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
* Automatic changelog update
* MORE SUFFIXES (#25314)
Co-authored-by: Jeff <velcroboy333@hotmail.com>
* Fix spawning glass shard for each glass sheet in stack (#25308)
* fix: SpawnEntitiesBehavior now works with stacks
Fixed the issue of SpawnEntitiesBehavior not executing multiple times on
entities with stack conponent.
Fixes #25287
* fix: reduced dictionary iterations
* Automatic changelog update
* Adds atmospherics access to the fire fighting door remote. Feels like… (#25097)
Adds atmospherics access to the fire fighting door remote. Feels like an oversight for the atmos door remote to not have atmos access.
Co-authored-by: Plykiya <plykiya@protonmail.com>
* Automatic changelog update
* Re-organise main menu screen (#25173)
- The dummy control of 2px size has annoyed me for almost 5 years.
- Why is it in the top-right.
- Why is the server address not labelled.
* Allow t-ray to penetrate carpets and puddles (#25276)
* Allow t-ray to penetrate carpets and puddles
* handle edge cases
* Automatic changelog update
* Add sfx for writing on paper (#25257)
* Initial commit
* Moved params to sound
* Removed type tag
* Removed null check
* Forced default
* Automatic changelog update
* New sprites for guidebooks (#25232)
* added books to roles
* First pass
* removed yaml to split pull requests into resprite first, then giving the books to assistants
* new science
* Automatic changelog update
* LockVisualizer (#25224)
* LockVisualizer
* Fix state
* Clean some code
* Make it component, fix tests fail
* Fix for StateUnlocked
Now it is possible to manually set the unlocked state and it will work!
* Optimize LockVisualizer, add check for unlocked state
* No todo I guess
* Solution precision fixes (#25199)
* Add test for two chemistry issues
1. rounding issue with reaction processing when making chloral hydrate
2. reliable assert trip due to the ValidateSolution() heat capacity issue.
* Fix FixedPoint2 arithmetic
Fix internal floating point arithmetic in places where it could be avoided.
Fix incorrect rounding mode used in other places (it should always floor, like regular int arithmetic).
I had to add an explicit epsilon value for float -> FixedPoint2 because something like 1.05 is actually like 1.04999 and that'd cause it to be rounded down to 1.04.
This fixes reaction reagent processing in cases where the reagent inputs can't cleanly divide. Previously, when making 30u chloral hydrate by adding the chlorine in 10u increments you'd end up with 0.04 chlorine left over. This was caused by division in the reaction code rounding up in some cases. Changing division here to always round down fixes it.
* Attempt to fix heat capacity precision assert issues.
Fixes #22126
First, we just increase the tolerance of the assert. It was way too low.
Second, actually put a cap on float drift from one-off _heatCapacity changes.
* Fix float -> FixedPoint2 epsilon for negative number, fix tests.
* Fix DamageableTest
* Oh yeah I need to call CleanReturnAsync
* Automatic changelog update
* WebP lobby images (#25184)
* Allow webp in lobby background files
* Make lobby art webp images
Reduces folder from 10 MB to 2.5 MB without only slight quality loss.
* Update PutLobbyScreensHere.txt
* New lobby art : Blueprint (#25179)
* add
* replace image with webp version
waiting on #25184
* Automatic changelog update
* Diona Nymphs & Splitting (#24630)
* Porting & implementation
* Fix two stupid errors
* Human not humans
* fix audio path
* Fix test fails & update cooldown
* Work on reviews & test fail
* Rework nymph organ system.
* Make the nymph organs nospawn.
* IsDeadIC
* Automatic changelog update
* reform cooldown 10 minutes (#25328)
* Change plant clipping mechanics (#25326)
Make seeds from clipped plants inherit the decreased health from parents.
Also require one growth stage before clipping.
* Automatic changelog update
* Fix nymphs being deleted immediatly after spawning (#25344)
* nymphs now don't get deleted together with the body of the diona
* moved nymph system to server
* Automatic changelog update
* Fix: Grenades don't make trigger sound (#25321)
* Fix: Grenades don't make trigger sound
* transform instead of trycomp transform
---------
Co-authored-by: Plykiya <plykiya@protonmail.com>
* fixed the specific if statement called when plant age is under 0 (#25346)
* Save round information into replay_final.yml (#23013)
* Save round information into the replay
* Add round end text too
* This is way better
* Get actual job
* oop
* OK THERE
* Fake line endings to make life easier
* I was told this yaml is legal
* I just realised this will make my life easier
* REVIEWS BABY IM A PROGRAMMER MOMMY
* Live pjb reaction
* Live pjb reaction 2
* Reviews 2
* Dont need this
* Please no more have mercy on my soul
* Oh frick
* Adds a massban flag to the admin flags (#25327)
Adds a massban flag to the admin flags used on ss14 to ban large amounts of players rom a .tsv file
Co-authored-by: Geekyhobo <66805063+Ahlytlex@users.noreply.github.com>
* Automatic changelog update
* Fix missing line in nuke exploding sprite (#25351)
I could've sworn I corrected this before committing but guess not ???
* Added Evidence Markers for the Detective! (#25255)
* added evidence markers
* box tweak
* fixed a spelling mistake
* new sprites, tweaked yml too
* Add "tailed" hair (#25216)
* add
* yes
* Clean up scars.yml and add a new chest scar (#25215)
add
* Automatic changelog update
* Add new "OptionsVisualizer" (#25128)
This is a visualizer somewhat similar to the Generic. It allows configuring appearance info based on specific CVars the user has set. This allows YAML to easily configure alternatives for accessibility CVars like reduced motion.
* Suffix spelling mistake on seed vendor (#25352)
spelling error
* Update engine to v210.1.1 (#25354)
Important fixes from the UI PR
* Stop wagging tails on crit (#25323)
* Add Flammable Touch Reaction for liquid tritium
* Stop tail wagging action on crit
* Revert "Add Flammable Touch Reaction for liquid tritium"
This reverts commit 41be57b058a0cdee0cecfc51eb1c4a25631e62f3.
* Automatic changelog update
* EVA suit helmets now have (un)equip sounds (#25349)
add (un)equip sounds to EVA helms
* Automatic changelog update
* Newton Cradle Fix + Addition to Bureaucracy Crate (#25357)
fixes
makes the newton cradle not able to decimate ears while also adding it to the bureaucracy crate and lowering its volume and range a little bit
* Automatic changelog update
* Shadow anomaly respects "reduced motion" (#25355)
Enabling "reduced motion" now makes the smoke effects not animate. This helps some people with vision issues.
* Fixed directional window durability (#25259)
shit
* Very little cleanup (#25364)
* Origin Station Update 18.02.2024 (medbay update) (#25369)
* Update Credits (#25360)
Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com>
* Add bio reactions (#25366)
* added more foodstuff breakdowns
* Calcium doesn't exist; moved phosphorus to protein
* tested reactions- some should be centrifuged
* more testing tweaks
* Automatic changelog update
* Increase printing price for neck clothes (#25375)
* Increase printing price
* Update clothing.yml
* Update Core (#25383)
add
* add icons for drinks in Solar's (#25301)
* add icons for drinks in Solar's
fixed colors of tea
* consistently use capitals for color codes
* don't add extra whitespace
* Automatic changelog update
* Small Nymph Changes (#25363)
* Emote sounds, accent & doorbump
* Oops
* Only non-brains can't talk
* Automatic changelog update
* Bump nixpkgs rev (#25361)
* Bump nixpkgs revision
* Update nix-direnv
* Remove extra nix functionalities
Both nix-direnv and legacy command nix-shell fail. Reverting to
flakes-only commands.
* Pin nixpkgs per suggestion
See https://github.com/space-wizards/space-station-14/pull/25361#discussion_r1494196038
* Revert nix-direnv removal
* Add python3 to shell.nix
* Adds guidebooks to the 4 learner roles (#25388)
added the books
* Automatic changelog update
* Add support for metamorphic fill levels (#25022)
* Added support for fill levels to metamorphic glasses
* Fix warnings and cleanup
* Don't break non-metamorphic fills!
* Vending UI facelift (#25377)
* Convert to fancy window + added footer + add list spacing
* margin add
* Automatic changelog update
* Make metamorphic glasses use last solution's empty sprite (#25322)
Make metamorphic glasses use empty sprite for the last solution they contained.
* Moths can eat plushies (#25382)
* Update toys.yml
* fix
* New sound of eating
* Increased eating time
* New sounds+sorting
* Automatic changelog update
* Make pills colorful and labeled (#25284)
* Make pills colorful and labeled
* Inherit pill sprites from parent
* Add Flammable Touch Reaction for liquid tritium (#25281)
* randomized sexless species now have epicene gender by default (#25282)
Fikss
* Automatic changelog update
* Mechanized treatment improvements (#25356)
Medical module merge
* Hotfix: Set round end information for replays back to null on round start instead of round end (#25394)
* Hotfix
* I dont think i need this now
* Fix action state handling bug (#25395)
* Rejig action state handling
* Fix entity arg
* Fix deserialization
* Automatic changelog update
* Fix admin notes and database time nonsense. (#25280)
God bloody christ. There's like three layers of shit here.
So firstly, apparently we were still using Npgsql.EnableLegacyTimestampBehavior. This means that time values (which are stored UTC in the database) were converted to local time when read out. This meant they were passed around as kind Local to clients (instead of UTC in the case of SQLite). That's easy enough to fix just turn off the flag and fix the couple spots we're passing a local DateTime ez.
Oh but it turns out there's a DIFFERENT problem with SQLite: See SQLite we definitely store the DateTimes as UTC, but when Microsoft.Data.Sqlite reads them it reads them as Kind Unspecified instead of Utc.
Why are these so bad? Because the admin notes system passes DateTime instances from EF Core straight to the rest of the game code. And that means it's a PAIN IN THE ASS to run the necessary conversions to fix the DateTime instances. GOD DAMNIT now I have to make a whole new set of "Record" entities so we avoid leaking the EF Core model entities. WAAAAAAA.
Fixes #19897
* PlayerListControl fixes. (#25248)
* PlayerListControl fixes.
Fix a button being selected by default always, which then can't be selected properly for real. This affected multiple admin UIs.
This broke due to upstream RT changes but ButtonGroup was always kinda busted so whatever. Uses the new IsNoneSetAllowed to implement everything properly.
Also make sure the selected player STAYS selected when filtering the list and stuff.
Also this PlayerInfo record has been changed to only do equality on the User ID because otherwise it'd need to compare each field individually which would be weird.
* Revert changes to ListContainer
This change was made default in the engine, no longer necessary here.
* Automatic changelog update
* Ore crab structural weakness (#25390)
* Attempt to change structural dmg of ore crab
* Made ore crabs susceptible to structural damage
* Automatic changelog update
* Set nav map icon textures to use bilinear filtering (#25411)
This just makes them look slightly better when zoomed.
* Fix PlayerListControl re-raising selection changed when repopulated. (#25412)
Now we just skip duplicate "item pressed" events from the ListContainer.
This caused the ahelp window to unfocus the message box after sending something. Flow is something like this: you send ahelp -> bwoink window refreshes player list due to new bwoink -> repopulated player list -> sent selection change -> repopulates right pane -> line edit gets unfocused.
* Train station (#24927)
* some content
* some next content
* fixes
* remove stained window
* return bot message?
* woah! Full map added!
* map update
* big update
* camera server
* Corvax playtest feedback
* add mail system and 30$ meteor shield
* update
* updatik
* hardwork
* pipip
* update
* remove from mappool
* fixes
* sentipode
* e
* Mindshield outline flashes, (#25409)
* Add animation support to status icons
Animated like any other entity. Change the png to have all frames, add delays in meta.json, and you're good to go.
* Dirty "fix" for the crashing.
Still have no idea why files cannot be read without changing their path in the yaml.
* Sloth review ig
I still have no idea why it wont work with /Textures/ missing as a prefix.
* Automatic changelog update
* Small Artifact Fixes (#25416)
* 20kw artifact fix
* Change that hopefully doesn't completely break storage artifacts without me realising
* Add roundid to replay_final.yml (#25398)
oopsy i forgor
* Resprite & hand position correction of Nettle & Death Nettle (#25421)
Resprite of Nettle & Death Nettle. Corrected R & L hand locations for all orientations of both plants.
* Automatic changelog update
* balance Explosive Technology (#25397)
* update arsenal yml
balance ExplosiveTechnology
* small changes in arsenal research
small changes in arsenal research
* Update arsenal.yml
* Automatic changelog update
* Tiny shove fix. (#25353)
* Remove second shove check.
* Change when popups and sounds are created.
Reduces phantom shoves that feel bad.
* why didn't i think of this i saw it earlier...
* Replaced Is fields with prefix
* remove some dependencies to fix tests???
* Automatic changelog update
* fix: пара фиксов апстрима
* Revert "Nuke fancification (#25297)"
This reverts commit 3a45d519dcc3679375b5239b6f1881cdd1a07344.
# Conflicts:
# Resources/Textures/Objects/Devices/nuke.rsi/meta.json
# Resources/Textures/Objects/Devices/nuke.rsi/nuclearbomb_deployed.png
# Resources/Textures/Objects/Devices/nuke.rsi/nuclearbomb_exploding.png
# Resources/Textures/Objects/Devices/nuke.rsi/nuclearbomb_timing.png
* Revert "Shuttle floor resprite (#25127)"
This reverts commit a93466ac24c7256d4b584ba830c4fa1cda253d5a.
# Conflicts:
# Resources/Textures/Tiles/shuttleblue.png
# Resources/Textures/Tiles/shuttleorange.png
# Resources/Textures/Tiles/shuttlepurple.png
# Resources/Textures/Tiles/shuttlered.png
# Resources/Textures/Tiles/shuttlewhite.png
* Revert "New lobby art : Blueprint (#25179)"
This reverts commit 90d02a590117b54a16b3af848f3b2fe0195724c9.
# Conflicts:
# Resources/Prototypes/lobbyscreens.yml
* Revert "Added Monitor Computer Boards to Observation Kit (#24979)"
This reverts commit c5027b51ecc7387a678e194fd7733a03349be536.
* Revert "Small t-ray scanner resprite (#25047)"
This reverts commit 601da0c3a33279beff818f82913ed2583e48c642.
# Conflicts:
# Resources/Textures/Objects/Tools/t-ray.rsi/tray-off.png
# Resources/Textures/Objects/Tools/t-ray.rsi/tray-on.png
* add: переводы
* fix: фиксы под тесты
---------
Co-authored-by: PJBot <pieterjan.briers+bot@gmail.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: Emisse <99158783+Emisse@users.noreply.github.com>
Co-authored-by: Armok <155400926+ARMOKS@users.noreply.github.com>
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
Co-authored-by: PoorMansDreams <150595537+PoorMansDreams@users.noreply.github.com>
Co-authored-by: Hannah Giovanna Dawson <karakkaraz@gmail.com>
Co-authored-by: lapatison <100279397+lapatison@users.noreply.github.com>
Co-authored-by: router <messagebus@vk.com>
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Co-authored-by: Varen <ychwack@hotmail.it>
Co-authored-by: potato1234_x <79580518+potato1234x@users.noreply.github.com>
Co-authored-by: Hanz <41141796+Hanzdegloker@users.noreply.github.com>
Co-authored-by: Ubaser <134914314+UbaserB@users.noreply.github.com>
Co-authored-by: themias <89101928+themias@users.noreply.github.com>
Co-authored-by: Alzore <140123969+Blackern5000@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com>
Co-authored-by: Plykiya <plykiya@protonmail.com>
Co-authored-by: YuNii <benjamin@bhenrich.de>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
Co-authored-by: Mangohydra <156087924+Mangohydra@users.noreply.github.com>
Co-authored-by: Nim <128169402+Nimfar11@users.noreply.github.com>
Co-authored-by: Jezithyr <jezithyr@gmail.com>
Co-authored-by: Fluffiest Floofers <thebluewulf@gmail.com>
Co-authored-by: Jajsha <101492056+Zap527@users.noreply.github.com>
Co-authored-by: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
Co-authored-by: Flareguy <78941145+Flareguy@users.noreply.github.com>
Co-authored-by: forgotmyotheraccount <133569389+forgotmyotheraccount@users.noreply.github.com>
Co-authored-by: FungiFellow <151778459+FungiFellow@users.noreply.github.com>
Co-authored-by: Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
Co-authored-by: Ilya246 <57039557+Ilya246@users.noreply.github.com>
Co-authored-by: Krunklehorn <42424291+Krunklehorn@users.noreply.github.com>
Co-authored-by: Alex Nordlund <deep.alexander@gmail.com>
Co-authored-by: EdenTheLiznerd <138748328+EdenTheLiznerd@users.noreply.github.com>
Co-authored-by: deepdarkdepths <155149356+deepdarkdepths@users.noreply.github.com>
Co-authored-by: Genkail <50331122+Genkail@users.noreply.github.com>
Co-authored-by: Vasilis <vasilis@pikachu.systems>
Co-authored-by: James Simonson <jamessimo89@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: icekot8 <93311212+icekot8@users.noreply.github.com>
Co-authored-by: Agoichi <92464780+Agoichi@users.noreply.github.com>
Co-authored-by: KREKS <132602258+xKREKSx@users.noreply.github.com>
Co-authored-by: 0x6273 <0x40@keemail.me>
Co-authored-by: lzk <124214523+lzk228@users.noreply.github.com>
Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
Co-authored-by: Guilherme Ornel <86210200+joshepvodka@users.noreply.github.com>
Co-authored-by: Errant <35878406+Errant-4@users.noreply.github.com>
Co-authored-by: wafehling <wafehling@users.noreply.github.com>
Co-authored-by: Interrobang01 <113810873+Interrobang01@users.noreply.github.com>
Co-authored-by: k3yw <grenadiumdota@gmail.com>
Co-authored-by: Velcroboy <107660393+IamVelcroboy@users.noreply.github.com>
Co-authored-by: Jeff <velcroboy333@hotmail.com>
Co-authored-by: Jessica M <jessica@jessicamaybe.com>
Co-authored-by: Jessica M <jessica@maybe.sh>
Co-authored-by: Zadeon <loldude9000@gmail.com>
Co-authored-by: brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
Co-authored-by: Menshin <Menshin@users.noreply.github.com>
Co-authored-by: nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Co-authored-by: liltenhead <104418166+liltenhead@users.noreply.github.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Co-authored-by: Daxxi3 <158596935+Daxxi3@users.noreply.github.com>
Co-authored-by: MACMAN2003 <macman2003c@gmail.com>
Co-authored-by: Golinth <amh2023@gmail.com>
Co-authored-by: Łukasz Mędrek <lukasz@lukaszm.xyz>
Co-authored-by: PotentiallyTom <67602105+PotentiallyTom@users.noreply.github.com>
Co-authored-by: MilenVolf <63782763+MilenVolf@users.noreply.github.com>
Co-authored-by: LankLTE <135308300+LankLTE@users.noreply.github.com>
Co-authored-by: Flesh <62557990+PolterTzi@users.noreply.github.com>
Co-authored-by: Arendian <137322659+Arendian@users.noreply.github.com>
Co-authored-by: Geekyhobo <66805063+Geekyhobo@users.noreply.github.com>
Co-authored-by: Geekyhobo <66805063+Ahlytlex@users.noreply.github.com>
Co-authored-by: Moomoobeef <62638182+Moomoobeef@users.noreply.github.com>
Co-authored-by: Peptide90 <78795277+Peptide90@users.noreply.github.com>
Co-authored-by: ArchPigeon <bookmaster3@gmail.com>
Co-authored-by: Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
Co-authored-by: Firewatch <54725557+musicmanvr@users.noreply.github.com>
Co-authored-by: Vigers Ray <60344369+VigersRay@users.noreply.github.com>
Co-authored-by: genderGeometries <159584039+genderGeometries@users.noreply.github.com>
Co-authored-by: hiucko <86206040+Hiucko@users.noreply.github.com>
Co-authored-by: Sybil <azurerosegarden@gmail.com>
Co-authored-by: Ioannis Eleftheriou <me@yath.xyz>
Co-authored-by: marboww <152051971+marboww@users.noreply.github.com>
Co-authored-by: veprolet <68151557+veprolet@users.noreply.github.com>
Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
Co-authored-by: Tonydatguy <154929293+Tonydatguy@users.noreply.github.com>
Co-authored-by: Gotimanga <127038462+Gotimanga@users.noreply.github.com>
Co-authored-by: MjrLandWhale <brandonemitch@gmail.com>
Co-authored-by: takemysoult <143123247+takemysoult@users.noreply.github.com>
Co-authored-by: Callmore <22885888+Callmore@users.noreply.github.com>
2024-02-23 23:05:48 +07:00
|
|
|
Log.Error($"Caught exception while processing construction queue. Entity {ToPrettyString(uid)}, graph: {construction.Graph}");
|
2022-09-20 08:01:33 +12:00
|
|
|
_runtimeLog.LogException(e, $"{nameof(ConstructionSystem)}.{nameof(UpdateInteractions)}");
|
2022-09-19 18:10:10 +12:00
|
|
|
Del(uid);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-26 06:14:26 +13:00
|
|
|
DebugTools.Assert(_queuedUpdates.Count == 0);
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region Event Handlers
|
|
|
|
|
|
2022-03-25 05:00:39 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Queues a directed event to be handled by construction on the next update tick.
|
|
|
|
|
/// Used as a handler for any events that construction can listen to. <seealso cref="InitializeInteractions"/>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="uid">The entity the event is directed to.</param>
|
|
|
|
|
/// <param name="construction">The construction component to queue the event on.</param>
|
|
|
|
|
/// <param name="args">The directed event to be queued.</param>
|
|
|
|
|
/// <remarks>Events inheriting <see cref="HandledEntityEventArgs"/> are treated specially by this method.
|
|
|
|
|
/// They will only be queued if they can be validated against the current construction state,
|
|
|
|
|
/// in which case they will also be set as handled.</remarks>
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
private void EnqueueEvent(EntityUid uid, ConstructionComponent construction, object args)
|
|
|
|
|
{
|
2023-04-03 13:13:48 +12:00
|
|
|
// For handled events, we will check if the event leads to a valid construction interaction.
|
|
|
|
|
// If it does, we mark the event as handled and then enqueue it as normal.
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
if (args is HandledEntityEventArgs handled)
|
|
|
|
|
{
|
|
|
|
|
// If they're already handled, we do nothing.
|
|
|
|
|
if (handled.Handled)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
// Otherwise, let's check if this event could be handled by the construction's current state.
|
|
|
|
|
if (HandleEvent(uid, args, true, construction) != HandleResult.Validated)
|
|
|
|
|
return; // Not validated, so we don't even enqueue this event.
|
|
|
|
|
|
|
|
|
|
handled.Handled = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Enqueue this event so it'll be handled in the next tick.
|
|
|
|
|
// This prevents some issues that could occur from entity deletion, component deletion, etc in a handler.
|
|
|
|
|
construction.InteractionQueue.Enqueue(args);
|
|
|
|
|
|
|
|
|
|
// Add this entity to the queue so it'll be updated next tick.
|
2023-02-26 06:14:26 +13:00
|
|
|
if (_queuedUpdates.Add(uid))
|
|
|
|
|
_constructionUpdateQueue.Enqueue(uid);
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Internal Enum Definitions
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Specifies the DoAfter status for a construction step event handler.
|
|
|
|
|
/// </summary>
|
|
|
|
|
private enum DoAfterState : byte
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If None, this is the first time we're seeing this event and we might want to call a DoAfter
|
|
|
|
|
/// if the step needs it.
|
|
|
|
|
/// </summary>
|
|
|
|
|
None,
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If Completed, this is the second (and last) time we're seeing this event, and
|
|
|
|
|
/// the doAfter that was called the first time successfully completed. Handle completion logic now.
|
|
|
|
|
/// </summary>
|
2023-04-03 13:13:48 +12:00
|
|
|
Completed
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
2024-01-12 03:42:41 -05:00
|
|
|
}
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
2024-01-12 03:42:41 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Specifies the result after attempting to handle a specific step with an event.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public enum HandleResult : byte
|
|
|
|
|
{
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
/// <summary>
|
2024-01-12 03:42:41 -05:00
|
|
|
/// The interaction wasn't handled or validated.
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
/// </summary>
|
2024-01-12 03:42:41 -05:00
|
|
|
False,
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
2024-01-12 03:42:41 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The interaction would be handled successfully. Nothing was modified.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Validated,
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
2024-01-12 03:42:41 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The interaction was handled successfully.
|
|
|
|
|
/// </summary>
|
|
|
|
|
True,
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
2024-01-12 03:42:41 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The interaction is waiting on a DoAfter now.
|
|
|
|
|
/// This means the interaction started the DoAfter.
|
|
|
|
|
/// </summary>
|
|
|
|
|
DoAfter,
|
|
|
|
|
}
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
|
2024-01-12 03:42:41 -05:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public sealed class OnConstructionTemperatureEvent : HandledEntityEventArgs
|
|
|
|
|
{
|
|
|
|
|
public HandleResult? Result;
|
ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
- The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
- This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
- This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
- This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857
Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! :eyes:
2021-10-26 16:38:03 +02:00
|
|
|
}
|
|
|
|
|
}
|