synthflesh nerf (#343)

* synthflesh nerf

* sky-blue carpet

* vaporSystem tweak

* throwSystem tweaks

* Revert "throwSystem tweaks"

This reverts commit a8820ab703ba3008bddeafbe7933ae94e88db3c8.

* Revert "vaporSystem tweak"

This reverts commit da5a7ef1db42033ee115467295882323f9d58ce6.

* prevent double collision rework

* showmanifest command

* client issue
This commit is contained in:
RinKeeper
2024-06-20 22:29:43 +03:00
committed by GitHub
parent cb37ba5714
commit e32403a26c
7 changed files with 71 additions and 3 deletions

View File

@@ -0,0 +1,31 @@
using Content.Client.GameTicking.Managers;
using Content.Shared.Administration;
using Content.Shared.GameTicking;
using Robust.Shared.Console;
using Robust.Shared.Network;
namespace Content.Client.GameTicking.Commands
{
[AnyCommand]
public sealed class ShowManifestCommand : IConsoleCommand
{
[Dependency] private readonly IEntitySystemManager _entitySystem = default!;
public string Command => "showmanifest";
public string Description => "Shows round end summary window";
public string Help => "Usage: showmanifest";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var ticker = _entitySystem.GetEntitySystem<ClientGameTicker>();
var window = ticker._window;
if (!ticker.IsGameStarted && window != null)
{
window.OpenCentered();
return;
}
shell.WriteLine("You can't open manifest right now");
}
}
}

View File

@@ -23,7 +23,7 @@ namespace Content.Client.GameTicking.Managers
/// <summary> /// <summary>
/// The current round-end window. Could be used to support re-opening the window after closing it. /// The current round-end window. Could be used to support re-opening the window after closing it.
/// </summary> /// </summary>
private RoundEndSummaryWindow? _window; public RoundEndSummaryWindow? _window;
[ViewVariables] public bool AreWeReady { get; private set; } [ViewVariables] public bool AreWeReady { get; private set; }
[ViewVariables] public bool IsGameStarted { get; private set; } [ViewVariables] public bool IsGameStarted { get; private set; }

View File

@@ -30,17 +30,26 @@ namespace Content.Server.Chemistry.EntitySystems
[Dependency] private readonly ReactiveSystem _reactive = default!; [Dependency] private readonly ReactiveSystem _reactive = default!;
private const float ReactTime = 0.125f; private const float ReactTime = 0.125f;
private readonly HashSet<(EntityUid, EntityUid)> _processed = new (); // WD edit
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
SubscribeLocalEvent<VaporComponent, StartCollideEvent>(HandleCollide); SubscribeLocalEvent<VaporComponent, StartCollideEvent>(HandleCollide);
SubscribeLocalEvent<VaporComponent, ComponentRemove>(OnDespawn); // WD edit
} }
private void HandleCollide(Entity<VaporComponent> entity, ref StartCollideEvent args) private void HandleCollide(Entity<VaporComponent> entity, ref StartCollideEvent args)
{ {
if (!EntityManager.TryGetComponent(entity.Owner, out SolutionContainerManagerComponent? contents)) return; if (!EntityManager.TryGetComponent(entity.Owner, out SolutionContainerManagerComponent? contents))
return;
// WD edit start
var collisionPair = (entity.Owner, args.OtherEntity);
if (_processed.Contains(collisionPair))
return;
// WD edit end
foreach (var (_, soln) in _solutionContainerSystem.EnumerateSolutions((entity.Owner, contents))) foreach (var (_, soln) in _solutionContainerSystem.EnumerateSolutions((entity.Owner, contents)))
{ {
@@ -48,6 +57,8 @@ namespace Content.Server.Chemistry.EntitySystems
_reactive.DoEntityReaction(args.OtherEntity, solution, ReactionMethod.Touch); _reactive.DoEntityReaction(args.OtherEntity, solution, ReactionMethod.Touch);
} }
_processed.Add(collisionPair); // WD edit
// Check for collision with a impassable object (e.g. wall) and stop // Check for collision with a impassable object (e.g. wall) and stop
if ((args.OtherFixture.CollisionLayer & (int) CollisionGroup.Impassable) != 0 && args.OtherFixture.Hard) if ((args.OtherFixture.CollisionLayer & (int) CollisionGroup.Impassable) != 0 && args.OtherFixture.Hard)
{ {
@@ -55,6 +66,12 @@ namespace Content.Server.Chemistry.EntitySystems
} }
} }
// WD edit
private void OnDespawn(Entity<VaporComponent> entity, ref ComponentRemove args)
{
_processed.RemoveWhere(pair => pair.Item1 == entity.Owner);
}
public void Start(Entity<VaporComponent> vapor, TransformComponent vaporXform, Vector2 dir, float speed, MapCoordinates target, float aliveTime, EntityUid? user = null) public void Start(Entity<VaporComponent> vapor, TransformComponent vaporXform, Vector2 dir, float speed, MapCoordinates target, float aliveTime, EntityUid? user = null)
{ {
vapor.Comp.Active = true; vapor.Comp.Active = true;

View File

@@ -26,6 +26,7 @@ namespace Content.Shared.Throwing
[Dependency] private readonly SharedGravitySystem _gravity = default!; [Dependency] private readonly SharedGravitySystem _gravity = default!;
private const string ThrowingFixture = "throw-fixture"; private const string ThrowingFixture = "throw-fixture";
private readonly HashSet<(EntityUid, EntityUid)> _processed = new (); // WD edit
public override void Initialize() public override void Initialize()
{ {
@@ -66,7 +67,14 @@ namespace Content.Shared.Throwing
if (args.OtherEntity == component.Thrower) if (args.OtherEntity == component.Thrower)
return; return;
// WD edit start
var collisionPair = (uid, args.OtherEntity);
if (_processed.Contains(collisionPair))
return;
// WD edit end
ThrowCollideInteraction(component, args.OurEntity, args.OtherEntity); ThrowCollideInteraction(component, args.OurEntity, args.OtherEntity);
_processed.Add(collisionPair);
} }
private void PreventCollision(EntityUid uid, ThrownItemComponent component, ref PreventCollideEvent args) private void PreventCollision(EntityUid uid, ThrownItemComponent component, ref PreventCollideEvent args)
@@ -113,6 +121,7 @@ namespace Content.Shared.Throwing
EntityManager.EventBus.RaiseLocalEvent(uid, new StopThrowEvent { User = thrownItemComponent.Thrower }, true); EntityManager.EventBus.RaiseLocalEvent(uid, new StopThrowEvent { User = thrownItemComponent.Thrower }, true);
EntityManager.RemoveComponent<ThrownItemComponent>(uid); EntityManager.RemoveComponent<ThrownItemComponent>(uid);
_processed.Clear(); // WD edit
} }
public void LandComponent(EntityUid uid, ThrownItemComponent thrownItem, PhysicsComponent physics, bool playSound) public void LandComponent(EntityUid uid, ThrownItemComponent thrownItem, PhysicsComponent physics, bool playSound)

View File

@@ -1089,6 +1089,7 @@
- CarpetBlack - CarpetBlack
- CarpetPink - CarpetPink
- CarpetBlue - CarpetBlue
- CarpetSBlue
- CarpetGreen - CarpetGreen
- CarpetOrange - CarpetOrange
- CarpetPurple - CarpetPurple

View File

@@ -1248,6 +1248,13 @@
materials: materials:
Cloth: 100 Cloth: 100
- type: latheRecipe
id: CarpetSBlue
result: FloorCarpetItemSkyBlue
completetime: 1
materials:
Cloth: 100
- type: latheRecipe - type: latheRecipe
id: CarpetGreen id: CarpetGreen
result: FloorCarpetItemGreen result: FloorCarpetItemGreen

View File

@@ -577,9 +577,12 @@
- type: reaction - type: reaction
id: Synthflesh id: Synthflesh
minTemp: 370
reactants: reactants:
Blood: Blood:
amount: 1 amount: 2
WeldingFuel:
amount: 2
Carbon: Carbon:
amount: 1 amount: 1
Bicaridine: Bicaridine: