Merge remote-tracking branch 'upstream/stable' into ed-30-04-2025-upstream-sync
# Conflicts: # Content.Client/Parallax/ParallaxControl.cs # Content.Client/UserInterface/Systems/Storage/Controls/ItemGridPiece.cs # Content.IntegrationTests/Tests/PostMapInitTest.cs # Content.Server/Chat/Managers/ChatManager.cs # Content.Server/Fluids/EntitySystems/PuddleSystem.Evaporation.cs # Content.Server/Labels/Label/LabelSystem.cs # Content.Shared/Actions/SharedActionsSystem.cs # Content.Shared/Fluids/Components/EvaporationComponent.cs # Content.Shared/Labels/EntitySystems/SharedLabelSystem.cs # README.md # Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml # Resources/Prototypes/Maps/Pools/deathmatch.yml # Resources/Prototypes/Maps/arenas.yml
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Content.Shared.EntityEffects;
|
||||
|
||||
namespace Content.Server.EntityEffects.Effects;
|
||||
|
||||
public sealed partial class ActivateArtifact : EntityEffect
|
||||
{
|
||||
public override void Effect(EntityEffectBaseArgs args)
|
||||
{
|
||||
var artifact = args.EntityManager.EntitySysManager.GetEntitySystem<ArtifactSystem>();
|
||||
artifact.TryActivateArtifact(args.TargetEntity, logMissing: false);
|
||||
}
|
||||
|
||||
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
|
||||
Loc.GetString("reagent-effect-guidebook-activate-artifact", ("chance", Probability));
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public sealed partial class AreaReactionEffect : EntityEffect
|
||||
smoke.StartSmoke(ent, splitSolution, _duration, spreadAmount);
|
||||
|
||||
var audio = reagentArgs.EntityManager.System<SharedAudioSystem>();
|
||||
audio.PlayPvs(_sound, reagentArgs.TargetEntity, AudioHelpers.WithVariation(0.125f));
|
||||
audio.PlayPvs(_sound, reagentArgs.TargetEntity, AudioParams.Default.WithVariation(0.25f));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
47
Content.Server/EntityEffects/Effects/ArtifactUnlock.cs
Normal file
47
Content.Server/EntityEffects/Effects/ArtifactUnlock.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Xenoarchaeology.Artifact;
|
||||
using Content.Shared.EntityEffects;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Xenoarchaeology.Artifact.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.EntityEffects.Effects;
|
||||
|
||||
/// <summary>
|
||||
/// Sets an artifact into the unlocking state and marks the artifexium effect as true.
|
||||
/// This is a very specific behavior intended for a specific chem.
|
||||
/// </summary>
|
||||
[UsedImplicitly]
|
||||
public sealed partial class ArtifactUnlock : EntityEffect
|
||||
{
|
||||
public override void Effect(EntityEffectBaseArgs args)
|
||||
{
|
||||
var entMan = args.EntityManager;
|
||||
var xenoArtifactSys = entMan.System<XenoArtifactSystem>();
|
||||
var popupSys = entMan.System<PopupSystem>();
|
||||
|
||||
if (!entMan.TryGetComponent<XenoArtifactComponent>(args.TargetEntity, out var xenoArtifact))
|
||||
return;
|
||||
|
||||
if (!entMan.TryGetComponent<XenoArtifactUnlockingComponent>(args.TargetEntity, out var unlocking))
|
||||
{
|
||||
xenoArtifactSys.TriggerXenoArtifact((args.TargetEntity, xenoArtifact), null, force: true);
|
||||
unlocking = entMan.EnsureComponent<XenoArtifactUnlockingComponent>(args.TargetEntity);
|
||||
}
|
||||
else if (!unlocking.ArtifexiumApplied)
|
||||
{
|
||||
popupSys.PopupEntity(Loc.GetString("artifact-activation-artifexium"), args.TargetEntity, PopupType.Medium);
|
||||
}
|
||||
|
||||
if (unlocking.ArtifexiumApplied)
|
||||
return;
|
||||
|
||||
xenoArtifactSys.SetArtifexiumApplied((args.TargetEntity, unlocking), true);
|
||||
}
|
||||
|
||||
protected override string ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
|
||||
{
|
||||
return Loc.GetString("reagent-effect-guidebook-artifact-unlock", ("chance", Probability));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.EntityEffects;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -20,17 +19,17 @@ namespace Content.Server.EntityEffects.Effects
|
||||
|
||||
public override void Effect(EntityEffectBaseArgs args)
|
||||
{
|
||||
if (!args.EntityManager.TryGetComponent(args.TargetEntity, out FlammableComponent? flammable)) return;
|
||||
var ev = new ExtinguishEvent
|
||||
{
|
||||
FireStacksAdjustment = FireStacksAdjustment,
|
||||
};
|
||||
|
||||
var flammableSystem = args.EntityManager.System<FlammableSystem>();
|
||||
flammableSystem.Extinguish(args.TargetEntity, flammable);
|
||||
if (args is EntityEffectReagentArgs reagentArgs)
|
||||
{
|
||||
flammableSystem.AdjustFireStacks(reagentArgs.TargetEntity, FireStacksAdjustment * (float) reagentArgs.Quantity, flammable);
|
||||
} else
|
||||
{
|
||||
flammableSystem.AdjustFireStacks(args.TargetEntity, FireStacksAdjustment, flammable);
|
||||
ev.FireStacksAdjustment *= (float)reagentArgs.Quantity;
|
||||
}
|
||||
|
||||
args.EntityManager.EventBus.RaiseLocalEvent(args.TargetEntity, ref ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,18 +61,19 @@ public sealed partial class MovespeedModifier : EntityEffect
|
||||
statusLifetime *= reagentArgs.Scale.Float();
|
||||
}
|
||||
|
||||
IncreaseTimer(status, statusLifetime);
|
||||
IncreaseTimer(status, statusLifetime, args.EntityManager, args.TargetEntity);
|
||||
|
||||
if (modified)
|
||||
args.EntityManager.System<MovementSpeedModifierSystem>().RefreshMovementSpeedModifiers(args.TargetEntity);
|
||||
}
|
||||
public void IncreaseTimer(MovespeedModifierMetabolismComponent status, float time)
|
||||
private void IncreaseTimer(MovespeedModifierMetabolismComponent status, float time, IEntityManager entityManager, EntityUid uid)
|
||||
{
|
||||
var gameTiming = IoCManager.Resolve<IGameTiming>();
|
||||
|
||||
var offsetTime = Math.Max(status.ModifierTimer.TotalSeconds, gameTiming.CurTime.TotalSeconds);
|
||||
|
||||
status.ModifierTimer = TimeSpan.FromSeconds(offsetTime + time);
|
||||
status.Dirty();
|
||||
|
||||
entityManager.Dirty(uid, status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ public sealed partial class PlantCryoxadone : EntityEffect
|
||||
else
|
||||
deviation = (int) (seed.Maturation / seed.GrowthStages);
|
||||
plantHolderComp.Age -= deviation;
|
||||
plantHolderComp.LastProduce = plantHolderComp.Age;
|
||||
plantHolderComp.SkipAging++;
|
||||
plantHolderComp.ForceUpdate = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user