Fixes mostly (#292)
* - fix: Fix animals standing. * - fix: Stuff drop from hands on stun or death even if lying. * - tweak: Tentacle gun no longer stuns. * - fix: Space cleaner now evaporates. * - remove: No crew monitor objective. * - fix: Fix time beacon. * - tweak: Revert neuro implant buff. * - tweak: Nerf dagger. * - fix: Fix void adaptation not working.
This commit is contained in:
@@ -264,6 +264,17 @@ public sealed partial class StoreSystem
|
|||||||
RaiseLocalEvent(buyer, listing.ProductEvent);
|
RaiseLocalEvent(buyer, listing.ProductEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WD START
|
||||||
|
foreach (var name in listing.Components)
|
||||||
|
{
|
||||||
|
if (EntityManager.HasComponent(buyer, EntityManager.ComponentFactory.GetRegistration(name).Type))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var newComp = (Component) EntityManager.ComponentFactory.GetComponent(name);
|
||||||
|
EntityManager.AddComponent(buyer, newComp);
|
||||||
|
}
|
||||||
|
// WD END
|
||||||
|
|
||||||
//log dat shit.
|
//log dat shit.
|
||||||
_admin.Add(LogType.StorePurchase, LogImpact.Low,
|
_admin.Add(LogType.StorePurchase, LogImpact.Low,
|
||||||
$"{ToPrettyString(buyer):player} purchased listing \"{ListingLocalisationHelpers.GetLocalisedNameOrEntityName(listing, _prototypeManager)}\" from {ToPrettyString(uid)}");
|
$"{ToPrettyString(buyer):player} purchased listing \"{ListingLocalisationHelpers.GetLocalisedNameOrEntityName(listing, _prototypeManager)}\" from {ToPrettyString(uid)}");
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ namespace Content.Server._White.Other.CritSystem;
|
|||||||
public sealed partial class BloodLustComponent : Component
|
public sealed partial class BloodLustComponent : Component
|
||||||
{
|
{
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public float SprintModifier = 1.4f;
|
public float SprintModifier = 1.2f;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public float WalkModifier = 1.3f;
|
public float WalkModifier = 1.2f;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public float AttackRateModifier = 1.5f;
|
public float AttackRateModifier = 1.3f;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,25 +95,41 @@ public sealed class CritSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var ohio = 0;
|
var ohio = 0;
|
||||||
|
var absorbed = 0;
|
||||||
|
|
||||||
if (component.IsBloodDagger)
|
if (component.IsBloodDagger)
|
||||||
{
|
{
|
||||||
var bruteGroup = _prototypeManager.Index<DamageGroupPrototype>("Brute");
|
var bruteGroup = _prototypeManager.Index<DamageGroupPrototype>("Brute");
|
||||||
var burnGroup = _prototypeManager.Index<DamageGroupPrototype>("Burn");
|
var burnGroup = _prototypeManager.Index<DamageGroupPrototype>("Burn");
|
||||||
|
var airlossGroup = _prototypeManager.Index<DamageGroupPrototype>("Airloss");
|
||||||
|
|
||||||
ohio = _random.Next(1, 21);
|
ohio = _random.Next(1, 21);
|
||||||
|
|
||||||
|
if (args.Direction != null) // Heavy attack
|
||||||
|
ohio = (int) MathF.Round(ohio * 0.7f);
|
||||||
|
|
||||||
foreach (var target in args.HitEntities)
|
foreach (var target in args.HitEntities)
|
||||||
{
|
{
|
||||||
if (!TryComp(target, out BloodstreamComponent? bloodstream))
|
if (!TryComp(target, out BloodstreamComponent? bloodstream))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
var blood = bloodstream.BloodSolution;
|
||||||
|
|
||||||
|
if (blood == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var bloodLevel = blood.Value.Comp.Solution.Volume.Int();
|
||||||
|
|
||||||
if (!_bloodstream.TryModifyBloodLevel(target, -ohio, bloodstream, false))
|
if (!_bloodstream.TryModifyBloodLevel(target, -ohio, bloodstream, false))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_bloodstream.TryModifyBloodLevel(args.User, ohio);
|
var toHeal = Math.Min(ohio, bloodLevel);
|
||||||
_damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(bruteGroup, -ohio));
|
|
||||||
_damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(burnGroup, -ohio));
|
absorbed += toHeal;
|
||||||
|
_bloodstream.TryModifyBloodLevel(args.User, toHeal);
|
||||||
|
_damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(bruteGroup, -toHeal));
|
||||||
|
_damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(burnGroup, -toHeal));
|
||||||
|
_damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(airlossGroup, -toHeal));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +138,9 @@ public sealed class CritSystem : EntitySystem
|
|||||||
args.BonusDamage = new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>("Slash"),
|
args.BonusDamage = new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>("Slash"),
|
||||||
damage - args.BaseDamage.GetTotal());
|
damage - args.BaseDamage.GetTotal());
|
||||||
|
|
||||||
_popup.PopupEntity($"Crit! {damage}", args.User, args.User, PopupType.MediumCaution);
|
var extra = component.IsBloodDagger ? $" Высосано крови: {absorbed}" : "";
|
||||||
|
|
||||||
|
_popup.PopupEntity($"Crit! {damage}" + extra, args.User, args.User, PopupType.MediumCaution);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsCriticalHit(CritComponent component)
|
private bool IsCriticalHit(CritComponent component)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Content.Shared.Movement.Pulling.Systems;
|
|||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Robust.Server.Audio;
|
using Robust.Server.Audio;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server._White.TimeBeacon;
|
namespace Content.Server._White.TimeBeacon;
|
||||||
@@ -13,6 +14,7 @@ namespace Content.Server._White.TimeBeacon;
|
|||||||
public sealed class TimeBeaconSystem : EntitySystem
|
public sealed class TimeBeaconSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IGameTiming _timing = default!;
|
[Dependency] private readonly IGameTiming _timing = default!;
|
||||||
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||||
[Dependency] private readonly PopupSystem _popup = default!;
|
[Dependency] private readonly PopupSystem _popup = default!;
|
||||||
[Dependency] private readonly AudioSystem _audio = default!;
|
[Dependency] private readonly AudioSystem _audio = default!;
|
||||||
[Dependency] private readonly TransformSystem _transform = default!;
|
[Dependency] private readonly TransformSystem _transform = default!;
|
||||||
@@ -42,7 +44,8 @@ public sealed class TimeBeaconSystem : EntitySystem
|
|||||||
if (!TryComp(ent, out TransformComponent? xform) || !TryComp(entity, out TransformComponent? entXform))
|
if (!TryComp(ent, out TransformComponent? xform) || !TryComp(entity, out TransformComponent? entXform))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (xform.MapID != entXform.MapID)
|
// If entity polymorphed or something
|
||||||
|
if (_mapManager.IsMapPaused(entXform.MapID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// break pulls before portal enter so we dont break shit
|
// break pulls before portal enter so we dont break shit
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Content.Shared.Humanoid;
|
|||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Content.Shared.Projectiles;
|
using Content.Shared.Projectiles;
|
||||||
|
using Content.Shared.Standing.Systems;
|
||||||
using Content.Shared.Stunnable;
|
using Content.Shared.Stunnable;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
using Content.Shared.Weapons.Misc;
|
using Content.Shared.Weapons.Misc;
|
||||||
@@ -27,9 +28,8 @@ public abstract class SharedTentacleGun : EntitySystem
|
|||||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||||
[Dependency] private readonly ThrowingSystem _throwingSystem = default!;
|
[Dependency] private readonly ThrowingSystem _throwingSystem = default!;
|
||||||
[Dependency] private readonly ITimerManager _timerManager = default!;
|
[Dependency] private readonly ITimerManager _timerManager = default!;
|
||||||
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
|
[Dependency] private readonly SharedStandingStateSystem _standing = default!;
|
||||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -155,10 +155,7 @@ public abstract class SharedTentacleGun : EntitySystem
|
|||||||
|
|
||||||
private bool PullMob(ProjectileEmbedEvent args)
|
private bool PullMob(ProjectileEmbedEvent args)
|
||||||
{
|
{
|
||||||
var stunTime = _random.Next(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(3));
|
_standing.TryLieDown(args.Embedded);
|
||||||
|
|
||||||
if (!_stunSystem.TryParalyze(args.Embedded, stunTime, true))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
_throwingSystem.TryThrow(args.Embedded, Transform(args.Shooter!.Value).Coordinates, 5f);
|
_throwingSystem.TryThrow(args.Embedded, Transform(args.Shooter!.Value).Coordinates, 5f);
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,13 @@ public abstract partial class SharedPuddleSystem
|
|||||||
[ValidatePrototypeId<ReagentPrototype>]
|
[ValidatePrototypeId<ReagentPrototype>]
|
||||||
private const string HolyWater = "Holywater";
|
private const string HolyWater = "Holywater";
|
||||||
|
|
||||||
public static readonly string[] EvaporationReagents = { Water, HolyWater };
|
[ValidatePrototypeId<ReagentPrototype>]
|
||||||
|
private const string SpaceCleaner = "SpaceCleaner";
|
||||||
|
|
||||||
|
public static readonly string[] EvaporationReagents = { Water, HolyWater, SpaceCleaner };
|
||||||
|
|
||||||
public bool CanFullyEvaporate(Solution solution)
|
public bool CanFullyEvaporate(Solution solution)
|
||||||
{
|
{
|
||||||
return solution.GetTotalPrototypeQuantity(EvaporationReagents) == solution.Volume;
|
return solution.GetTotalPrototypeQuantity(EvaporationReagents) == solution.Volume;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,9 +176,6 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
|
|||||||
// Optional component.
|
// Optional component.
|
||||||
Resolve(uid, ref appearance, ref hands, false);
|
Resolve(uid, ref appearance, ref hands, false);
|
||||||
|
|
||||||
if (standingState.CurrentState is StandingState.Lying or StandingState.GettingUp)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// This is just to avoid most callers doing this manually saving boilerplate
|
// This is just to avoid most callers doing this manually saving boilerplate
|
||||||
// 99% of the time you'll want to drop items but in some scenarios (e.g. buckling) you don't want to.
|
// 99% of the time you'll want to drop items but in some scenarios (e.g. buckling) you don't want to.
|
||||||
// We do this BEFORE downing because something like buckle may be blocking downing but we want to drop hand items anyway
|
// We do this BEFORE downing because something like buckle may be blocking downing but we want to drop hand items anyway
|
||||||
@@ -188,6 +185,9 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
|
|||||||
RaiseLocalEvent(uid, new DropHandItemsEvent());
|
RaiseLocalEvent(uid, new DropHandItemsEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (standingState.CurrentState is StandingState.Lying or StandingState.GettingUp)
|
||||||
|
return true;
|
||||||
|
|
||||||
var msg = new DownAttemptEvent();
|
var msg = new DownAttemptEvent();
|
||||||
RaiseLocalEvent(uid, msg);
|
RaiseLocalEvent(uid, msg);
|
||||||
|
|
||||||
|
|||||||
@@ -122,6 +122,9 @@ public partial class ListingData : IEquatable<ListingData>, ICloneable
|
|||||||
public int SaleAmount;
|
public int SaleAmount;
|
||||||
|
|
||||||
public Dictionary<string, FixedPoint2> OldCost = new();
|
public Dictionary<string, FixedPoint2> OldCost = new();
|
||||||
|
|
||||||
|
[DataField]
|
||||||
|
public List<string> Components = new();
|
||||||
// WD END
|
// WD END
|
||||||
|
|
||||||
public bool Equals(ListingData? listing)
|
public bool Equals(ListingData? listing)
|
||||||
@@ -186,6 +189,7 @@ public partial class ListingData : IEquatable<ListingData>, ICloneable
|
|||||||
SaleBlacklist = SaleBlacklist,
|
SaleBlacklist = SaleBlacklist,
|
||||||
SaleAmount = SaleAmount,
|
SaleAmount = SaleAmount,
|
||||||
OldCost = OldCost,
|
OldCost = OldCost,
|
||||||
|
Components = Components,
|
||||||
// WD END
|
// WD END
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -196,4 +200,4 @@ public partial class ListingData : IEquatable<ListingData>, ICloneable
|
|||||||
/// Defines a set item listing that is available in a store
|
/// Defines a set item listing that is available in a store
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Prototype("listing"), Serializable, NetSerializable, DataDefinition]
|
[Prototype("listing"), Serializable, NetSerializable, DataDefinition]
|
||||||
public sealed partial class ListingPrototype : ListingData, IPrototype;
|
public sealed partial class ListingPrototype : ListingData, IPrototype;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ public abstract class SharedStunSystem : EntitySystem
|
|||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
SubscribeLocalEvent<KnockedDownComponent, ComponentInit>(OnKnockInit);
|
SubscribeLocalEvent<KnockedDownComponent, ComponentInit>(OnKnockInit);
|
||||||
|
SubscribeLocalEvent<KnockedDownComponent, ComponentShutdown>(OnKnockShutdown);
|
||||||
SubscribeLocalEvent<KnockedDownComponent, StandAttemptEvent>(OnStandAttempt);
|
SubscribeLocalEvent<KnockedDownComponent, StandAttemptEvent>(OnStandAttempt);
|
||||||
|
|
||||||
SubscribeLocalEvent<SlowedDownComponent, ComponentInit>(OnSlowInit);
|
SubscribeLocalEvent<SlowedDownComponent, ComponentInit>(OnSlowInit);
|
||||||
@@ -106,6 +107,17 @@ public abstract class SharedStunSystem : EntitySystem
|
|||||||
_standingState.Down(uid);
|
_standingState.Down(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnKnockShutdown(EntityUid uid, KnockedDownComponent component, ComponentShutdown args)
|
||||||
|
{
|
||||||
|
// WD EDIT START
|
||||||
|
// Don't stand up if we can lie down via keybind
|
||||||
|
if (!TryComp(uid, out StandingStateComponent? standing) || standing.CanLieDown)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_standingState.Stand(uid, standing);
|
||||||
|
// WD EDIT END
|
||||||
|
}
|
||||||
|
|
||||||
private void OnStandAttempt(EntityUid uid, KnockedDownComponent component, StandAttemptEvent args)
|
private void OnStandAttempt(EntityUid uid, KnockedDownComponent component, StandAttemptEvent args)
|
||||||
{
|
{
|
||||||
if (component.LifeStage <= ComponentLifeStage.Running)
|
if (component.LifeStage <= ComponentLifeStage.Running)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public sealed class NeuroStabilizationSystem : EntitySystem
|
|||||||
private void BeforeStaminaDamage(Entity<NeuroStabilizationComponent> ent, ref BeforeStaminaDamageEvent args)
|
private void BeforeStaminaDamage(Entity<NeuroStabilizationComponent> ent, ref BeforeStaminaDamageEvent args)
|
||||||
{
|
{
|
||||||
args.Cancelled = true;
|
args.Cancelled = true;
|
||||||
Electrocute(ent, (int) MathF.Round(args.Value * 2f / 4f));
|
Electrocute(ent, (int) MathF.Round(args.Value * 2f / 3f));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Electrocute(EntityUid uid, int damage, StatusEffectsComponent? status = null)
|
public void Electrocute(EntityUid uid, int damage, StatusEffectsComponent? status = null)
|
||||||
|
|||||||
@@ -82,7 +82,8 @@
|
|||||||
name: changeling-ability-void-adaptation
|
name: changeling-ability-void-adaptation
|
||||||
description: changeling-ability-void-adaptation-desc
|
description: changeling-ability-void-adaptation-desc
|
||||||
icon: { sprite: /Textures/White/Actions/changeling.rsi, state: organic_suit }
|
icon: { sprite: /Textures/White/Actions/changeling.rsi, state: organic_suit }
|
||||||
productEvent: !type:VoidAdaptationPurchasedEvent
|
components:
|
||||||
|
- VoidAdaptation
|
||||||
cost:
|
cost:
|
||||||
ChangelingPoint: 2
|
ChangelingPoint: 2
|
||||||
categories:
|
categories:
|
||||||
@@ -215,7 +216,9 @@
|
|||||||
name: changeling-ability-eyesight
|
name: changeling-ability-eyesight
|
||||||
description: changeling-ability-eyesight-desc
|
description: changeling-ability-eyesight-desc
|
||||||
productAction: ActionAugmentedEyesight
|
productAction: ActionAugmentedEyesight
|
||||||
productEvent: !type:AugmentedEyesightPurchasedEvent
|
components:
|
||||||
|
- FlashImmunity
|
||||||
|
- EyeProtection
|
||||||
cost:
|
cost:
|
||||||
ChangelingPoint: 2
|
ChangelingPoint: 2
|
||||||
categories:
|
categories:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
weights:
|
weights:
|
||||||
CaptainIDStealObjective: 1
|
CaptainIDStealObjective: 1
|
||||||
CMOHyposprayStealObjective: 1
|
CMOHyposprayStealObjective: 1
|
||||||
CMOCrewMonitorStealObjective: 1
|
#CMOCrewMonitorStealObjective: 1
|
||||||
RDHardsuitStealObjective: 1
|
RDHardsuitStealObjective: 1
|
||||||
NukeDiskStealObjective: 1
|
NukeDiskStealObjective: 1
|
||||||
MagbootsStealObjective: 1
|
MagbootsStealObjective: 1
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
icon: { sprite: /Textures/Objects/Weapons/Melee/blood_dagger.rsi, state: icon }
|
icon: { sprite: /Textures/Objects/Weapons/Melee/blood_dagger.rsi, state: icon }
|
||||||
productEntity: BloodSuckerDagger
|
productEntity: BloodSuckerDagger
|
||||||
cost:
|
cost:
|
||||||
Telecrystal: 6
|
Telecrystal: 8
|
||||||
categories:
|
categories:
|
||||||
- UplinkWeaponry
|
- UplinkWeaponry
|
||||||
conditions:
|
conditions:
|
||||||
|
|||||||
Reference in New Issue
Block a user