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:
Aviu00
2024-04-23 22:20:16 +09:00
committed by GitHub
parent d6a25fc39a
commit 9a72a48c4b
13 changed files with 76 additions and 25 deletions

View File

@@ -264,6 +264,17 @@ public sealed partial class StoreSystem
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.
_admin.Add(LogType.StorePurchase, LogImpact.Low,
$"{ToPrettyString(buyer):player} purchased listing \"{ListingLocalisationHelpers.GetLocalisedNameOrEntityName(listing, _prototypeManager)}\" from {ToPrettyString(uid)}");

View File

@@ -4,11 +4,11 @@ namespace Content.Server._White.Other.CritSystem;
public sealed partial class BloodLustComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]
public float SprintModifier = 1.4f;
public float SprintModifier = 1.2f;
[ViewVariables(VVAccess.ReadWrite)]
public float WalkModifier = 1.3f;
public float WalkModifier = 1.2f;
[ViewVariables(VVAccess.ReadWrite)]
public float AttackRateModifier = 1.5f;
public float AttackRateModifier = 1.3f;
}

View File

@@ -95,25 +95,41 @@ public sealed class CritSystem : EntitySystem
return;
var ohio = 0;
var absorbed = 0;
if (component.IsBloodDagger)
{
var bruteGroup = _prototypeManager.Index<DamageGroupPrototype>("Brute");
var burnGroup = _prototypeManager.Index<DamageGroupPrototype>("Burn");
var airlossGroup = _prototypeManager.Index<DamageGroupPrototype>("Airloss");
ohio = _random.Next(1, 21);
if (args.Direction != null) // Heavy attack
ohio = (int) MathF.Round(ohio * 0.7f);
foreach (var target in args.HitEntities)
{
if (!TryComp(target, out BloodstreamComponent? bloodstream))
continue;
var blood = bloodstream.BloodSolution;
if (blood == null)
continue;
var bloodLevel = blood.Value.Comp.Solution.Volume.Int();
if (!_bloodstream.TryModifyBloodLevel(target, -ohio, bloodstream, false))
continue;
_bloodstream.TryModifyBloodLevel(args.User, ohio);
_damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(bruteGroup, -ohio));
_damageableSystem.TryChangeDamage(args.User, new DamageSpecifier(burnGroup, -ohio));
var toHeal = Math.Min(ohio, bloodLevel);
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"),
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)

View File

@@ -6,6 +6,7 @@ using Content.Shared.Movement.Pulling.Systems;
using Content.Shared.Popups;
using Robust.Server.Audio;
using Robust.Server.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Timing;
namespace Content.Server._White.TimeBeacon;
@@ -13,6 +14,7 @@ namespace Content.Server._White.TimeBeacon;
public sealed class TimeBeaconSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly AudioSystem _audio = 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))
return;
if (xform.MapID != entXform.MapID)
// If entity polymorphed or something
if (_mapManager.IsMapPaused(entXform.MapID))
return;
// break pulls before portal enter so we dont break shit

View File

@@ -4,6 +4,7 @@ using Content.Shared.Humanoid;
using Content.Shared.Mobs.Components;
using Content.Shared.Physics;
using Content.Shared.Projectiles;
using Content.Shared.Standing.Systems;
using Content.Shared.Stunnable;
using Content.Shared.Throwing;
using Content.Shared.Weapons.Misc;
@@ -27,9 +28,8 @@ public abstract class SharedTentacleGun : EntitySystem
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly ThrowingSystem _throwingSystem = 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 IRobustRandom _random = default!;
public override void Initialize()
{
@@ -155,10 +155,7 @@ public abstract class SharedTentacleGun : EntitySystem
private bool PullMob(ProjectileEmbedEvent args)
{
var stunTime = _random.Next(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(3));
if (!_stunSystem.TryParalyze(args.Embedded, stunTime, true))
return false;
_standing.TryLieDown(args.Embedded);
_throwingSystem.TryThrow(args.Embedded, Transform(args.Shooter!.Value).Coordinates, 5f);

View File

@@ -11,10 +11,13 @@ public abstract partial class SharedPuddleSystem
[ValidatePrototypeId<ReagentPrototype>]
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)
{
return solution.GetTotalPrototypeQuantity(EvaporationReagents) == solution.Volume;
}
}
}

View File

@@ -176,9 +176,6 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
// Optional component.
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
// 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
@@ -188,6 +185,9 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
RaiseLocalEvent(uid, new DropHandItemsEvent());
}
if (standingState.CurrentState is StandingState.Lying or StandingState.GettingUp)
return true;
var msg = new DownAttemptEvent();
RaiseLocalEvent(uid, msg);

View File

@@ -122,6 +122,9 @@ public partial class ListingData : IEquatable<ListingData>, ICloneable
public int SaleAmount;
public Dictionary<string, FixedPoint2> OldCost = new();
[DataField]
public List<string> Components = new();
// WD END
public bool Equals(ListingData? listing)
@@ -186,6 +189,7 @@ public partial class ListingData : IEquatable<ListingData>, ICloneable
SaleBlacklist = SaleBlacklist,
SaleAmount = SaleAmount,
OldCost = OldCost,
Components = Components,
// WD END
};
}
@@ -196,4 +200,4 @@ public partial class ListingData : IEquatable<ListingData>, ICloneable
/// Defines a set item listing that is available in a store
/// </summary>
[Prototype("listing"), Serializable, NetSerializable, DataDefinition]
public sealed partial class ListingPrototype : ListingData, IPrototype;
public sealed partial class ListingPrototype : ListingData, IPrototype;

View File

@@ -37,6 +37,7 @@ public abstract class SharedStunSystem : EntitySystem
public override void Initialize()
{
SubscribeLocalEvent<KnockedDownComponent, ComponentInit>(OnKnockInit);
SubscribeLocalEvent<KnockedDownComponent, ComponentShutdown>(OnKnockShutdown);
SubscribeLocalEvent<KnockedDownComponent, StandAttemptEvent>(OnStandAttempt);
SubscribeLocalEvent<SlowedDownComponent, ComponentInit>(OnSlowInit);
@@ -106,6 +107,17 @@ public abstract class SharedStunSystem : EntitySystem
_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)
{
if (component.LifeStage <= ComponentLifeStage.Running)

View File

@@ -18,7 +18,7 @@ public sealed class NeuroStabilizationSystem : EntitySystem
private void BeforeStaminaDamage(Entity<NeuroStabilizationComponent> ent, ref BeforeStaminaDamageEvent args)
{
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)

View File

@@ -82,7 +82,8 @@
name: changeling-ability-void-adaptation
description: changeling-ability-void-adaptation-desc
icon: { sprite: /Textures/White/Actions/changeling.rsi, state: organic_suit }
productEvent: !type:VoidAdaptationPurchasedEvent
components:
- VoidAdaptation
cost:
ChangelingPoint: 2
categories:
@@ -215,7 +216,9 @@
name: changeling-ability-eyesight
description: changeling-ability-eyesight-desc
productAction: ActionAugmentedEyesight
productEvent: !type:AugmentedEyesightPurchasedEvent
components:
- FlashImmunity
- EyeProtection
cost:
ChangelingPoint: 2
categories:

View File

@@ -12,7 +12,7 @@
weights:
CaptainIDStealObjective: 1
CMOHyposprayStealObjective: 1
CMOCrewMonitorStealObjective: 1
#CMOCrewMonitorStealObjective: 1
RDHardsuitStealObjective: 1
NukeDiskStealObjective: 1
MagbootsStealObjective: 1

View File

@@ -32,7 +32,7 @@
icon: { sprite: /Textures/Objects/Weapons/Melee/blood_dagger.rsi, state: icon }
productEntity: BloodSuckerDagger
cost:
Telecrystal: 6
Telecrystal: 8
categories:
- UplinkWeaponry
conditions: