diff --git a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs index 5644f19f32..bd8a7d3ee7 100644 --- a/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs +++ b/Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs @@ -90,8 +90,8 @@ namespace Content.Client.HealthAnalyzer.UI // Begin Offbrand Tooltips _brainHealthTooltip.Update(msg); _bloodPressureTooltip.Update(msg); - _bloodOxygenationTooltip.Update(msg, (target.Value, damageable)); - _heartRateTooltip.Update(msg, (target.Value, damageable)); + _bloodOxygenationTooltip.Update(msg, (target.Value, damageable, _entityManager.GetComponentOrNull(target))); + _heartRateTooltip.Update(msg, (target.Value, damageable, _entityManager.GetComponentOrNull(target))); _bloodFlowTooltip.Update(msg); _heartHealthTooltip.Update(msg); _temperatureTooltip.Update(msg, (target.Value, _entityManager.GetComponentOrNull(target))); diff --git a/Content.Client/HealthAnalyzer/UI/Tooltips/BloodOxygenationTooltip.xaml.cs b/Content.Client/HealthAnalyzer/UI/Tooltips/BloodOxygenationTooltip.xaml.cs index 58584484c6..a76ccc9b45 100644 --- a/Content.Client/HealthAnalyzer/UI/Tooltips/BloodOxygenationTooltip.xaml.cs +++ b/Content.Client/HealthAnalyzer/UI/Tooltips/BloodOxygenationTooltip.xaml.cs @@ -1,3 +1,4 @@ +using Content.Shared._Offbrand.Wounds; using Content.Shared.Damage; using Content.Shared.FixedPoint; using Content.Shared.MedicalScanner; @@ -16,13 +17,16 @@ public sealed partial class BloodOxygenationTooltip : PanelContainer RobustXamlLoader.Load(this); } - public void Update(HealthAnalyzerScannedUserMessage msg, Entity ent) + public void Update(HealthAnalyzerScannedUserMessage msg, Entity ent) { if (msg.WoundableData is not { } woundable) return; + if (ent.Comp2?.AsphyxiationDamage is not { } damageType) + return; + var asphyxiation = FixedPoint2.Zero; - ent.Comp.Damage.DamageDict.TryGetValue("Asphyxiation", out asphyxiation); + ent.Comp1.Damage.DamageDict.TryGetValue(damageType, out asphyxiation); var (systolic, diastolic) = woundable.BloodPressure; Label.Text = Loc.GetString("health-analyzer-blood-saturation-tooltip", ("rating", woundable.BloodOxygenationRating), ("systolic", systolic), ("diastolic", diastolic), ("asphyxiation", asphyxiation)); diff --git a/Content.Client/HealthAnalyzer/UI/Tooltips/HeartRateTooltip.xaml.cs b/Content.Client/HealthAnalyzer/UI/Tooltips/HeartRateTooltip.xaml.cs index 88520910bd..334557f628 100644 --- a/Content.Client/HealthAnalyzer/UI/Tooltips/HeartRateTooltip.xaml.cs +++ b/Content.Client/HealthAnalyzer/UI/Tooltips/HeartRateTooltip.xaml.cs @@ -1,3 +1,4 @@ +using Content.Shared._Offbrand.Wounds; using Content.Shared.Damage; using Content.Shared.FixedPoint; using Content.Shared.MedicalScanner; @@ -16,13 +17,16 @@ public sealed partial class HeartRateTooltip : PanelContainer RobustXamlLoader.Load(this); } - public void Update(HealthAnalyzerScannedUserMessage msg, Entity ent) + public void Update(HealthAnalyzerScannedUserMessage msg, Entity ent) { if (msg.WoundableData is not { } woundable) return; + if (ent.Comp2?.AsphyxiationDamage is not { } damageType) + return; + var asphyxiation = FixedPoint2.Zero; - ent.Comp.Damage.DamageDict.TryGetValue("Asphyxiation", out asphyxiation); + ent.Comp1.Damage.DamageDict.TryGetValue(damageType, out asphyxiation); Label.Text = Loc.GetString("health-analyzer-heart-rate-tooltip", ("asphyxiation", asphyxiation)); } diff --git a/Content.Client/UserInterface/Systems/DamageOverlays/DamageOverlayUiController.cs b/Content.Client/UserInterface/Systems/DamageOverlays/DamageOverlayUiController.cs index b3340fde89..1ea661386a 100644 --- a/Content.Client/UserInterface/Systems/DamageOverlays/DamageOverlayUiController.cs +++ b/Content.Client/UserInterface/Systems/DamageOverlays/DamageOverlayUiController.cs @@ -34,7 +34,7 @@ public sealed class DamageOverlayUiController : UIController SubscribeLocalEvent(OnPlayerDetached); SubscribeLocalEvent(OnMobStateChanged); SubscribeLocalEvent(OnThresholdCheck); - SubscribeLocalEvent(OnPotentiallyUpdateDamageOverlay); // Offbrand + SubscribeLocalEvent(OnPotentiallyUpdateDamageOverlay); // Offbrand } private void OnPlayerAttach(LocalPlayerAttachedEvent args) @@ -86,7 +86,7 @@ public sealed class DamageOverlayUiController : UIController TryUpdateWoundableOverlays(entity); } - private void OnPotentiallyUpdateDamageOverlay(ref PotentiallyUpdateDamageOverlay args) + private void OnPotentiallyUpdateDamageOverlay(ref bPotentiallyUpdateDamageOverlayEventb args) { if (args.Target != _playerManager.LocalEntity) return; diff --git a/Content.Client/_Offbrand/Surgery/SurgeryGuideBoundUserInterface.cs b/Content.Client/_Offbrand/Surgery/SurgeryGuideBoundUserInterface.cs index 48fcee0a27..7a44d5865a 100644 --- a/Content.Client/_Offbrand/Surgery/SurgeryGuideBoundUserInterface.cs +++ b/Content.Client/_Offbrand/Surgery/SurgeryGuideBoundUserInterface.cs @@ -17,9 +17,14 @@ public sealed class SurgeryGuideBoundUserInterface : BoundUserInterface { base.Open(); + if (!EntMan.TryGetComponent(Owner, out var comp)) + return; + _menu = this.CreateWindow(); + _menu.Category = comp.Category; _menu.OnSurgerySelected += OnSurgerySelected; _menu.OnCleanUp += OnCleanUp; + _menu.Populate(); } private void OnSurgerySelected(ProtoId surgery) diff --git a/Content.Client/_Offbrand/Surgery/SurgeryGuideMenu.xaml.cs b/Content.Client/_Offbrand/Surgery/SurgeryGuideMenu.xaml.cs index 976ddb4e36..031960c9ec 100644 --- a/Content.Client/_Offbrand/Surgery/SurgeryGuideMenu.xaml.cs +++ b/Content.Client/_Offbrand/Surgery/SurgeryGuideMenu.xaml.cs @@ -26,6 +26,7 @@ public sealed partial class SurgeryGuideMenu : FancyWindow public event Action? OnCleanUp; private ConstructionPrototype? _selectedSurgery; + public string Category = string.Empty; public SurgeryGuideMenu() { @@ -53,8 +54,6 @@ public sealed partial class SurgeryGuideMenu : FancyWindow PossibleSurgeries.GenerateItem += GenerateButton; PossibleSurgeries.ItemKeyBindDown += OnSelectSurgery; - - Populate(); } protected override void ExitedTree() @@ -129,14 +128,22 @@ public sealed partial class SurgeryGuideMenu : FancyWindow foreach (var proto in _prototypeManager.EnumeratePrototypes()) { - if (proto.Category != "Surgery") + if (proto.Category != Category) continue; listData.Add(new SurgeryListData(proto)); } - listData.Sort(( - a, b) => string.Compare(Loc.GetString(a.Construction.SetName!.Value), Loc.GetString(b.Construction.SetName!.Value), StringComparison.InvariantCulture)); + listData.Sort((a, b) => + { + if (a.Construction.SetName is not { } aName) + throw new InvalidOperationException($"Construction {a.Construction.ID} does not have a name"); + + if (b.Construction.SetName is not { } bName) + throw new InvalidOperationException($"Construction {b.Construction.ID} does not have a name"); + + return string.Compare(Loc.GetString(aName), Loc.GetString(bName), StringComparison.InvariantCulture); + }); PossibleSurgeries.PopulateList(listData); } diff --git a/Content.IntegrationTests/Tests/Construction/ConstructionPrototypeTest.cs b/Content.IntegrationTests/Tests/Construction/ConstructionPrototypeTest.cs index 0579b4a4f3..28cecfe603 100644 --- a/Content.IntegrationTests/Tests/Construction/ConstructionPrototypeTest.cs +++ b/Content.IntegrationTests/Tests/Construction/ConstructionPrototypeTest.cs @@ -138,7 +138,7 @@ namespace Content.IntegrationTests.Tests.Construction foreach (var proto in protoMan.EnumeratePrototypes()) { // Begin Offbrand - if (proto.Type == ConstructionType.Surgery) + if (proto.Type == ConstructionType.NodeToNode) continue; // End Offbrand var start = proto.StartNode; diff --git a/Content.Server/Body/Systems/MetabolizerSystem.cs b/Content.Server/Body/Systems/MetabolizerSystem.cs index 9e3e3f5eef..c6b5c6ad6a 100644 --- a/Content.Server/Body/Systems/MetabolizerSystem.cs +++ b/Content.Server/Body/Systems/MetabolizerSystem.cs @@ -274,7 +274,7 @@ namespace Content.Server.Body.Systems if (ent.Comp1.MetabolizingReagents.Contains(metaboliteReagent)) continue; - if (!_prototypeManager.TryIndex(metaboliteReagent, out var proto) || proto.Metabolisms is not { } metabolisms) + if (!_prototypeManager.Resolve(metaboliteReagent, out var proto) || proto.Metabolisms is not { } metabolisms) continue; if (ent.Comp1.MetabolismGroups is null) diff --git a/Content.Server/Chemistry/EntitySystems/SolutionInjectOnEventSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionInjectOnEventSystem.cs index 4a8046f84c..4b85caed62 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionInjectOnEventSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionInjectOnEventSystem.cs @@ -146,7 +146,7 @@ public sealed class SolutionInjectOnCollideSystem : EntitySystem foreach (var targetBloodstream in targetBloodstreams) { // Begin Offbrand - var beforeInject = new Content.Shared._Offbrand.Chemistry.BeforeInjectOnEventEvent { InjectionAmount = volumePerBloodstream }; + var beforeInject = new Content.Shared._Offbrand.Chemistry.BeforeInjectOnEventEvent(volumePerBloodstream); RaiseLocalEvent(targetBloodstream, ref beforeInject); if (beforeInject.InjectionAmount < 0) continue; diff --git a/Content.Server/Construction/ConstructionSystem.Guided.cs b/Content.Server/Construction/ConstructionSystem.Guided.cs index 04f56b1962..cb6ac94482 100644 --- a/Content.Server/Construction/ConstructionSystem.Guided.cs +++ b/Content.Server/Construction/ConstructionSystem.Guided.cs @@ -88,19 +88,13 @@ namespace Content.Server.Construction args.PushMarkup(Loc.GetString("deconstruction-header-text") + "\n"); } // Begin Offbrand - else if (target.SurgeryName is { } surgery) - { - args.PushMarkup(Loc.GetString( - "construction-component-to-perform-header", - ("name", Loc.GetString(surgery))) + "\n"); - } - // End Offbrand else { args.PushMarkup(Loc.GetString( - "construction-component-to-create-header", - ("targetName", target.Name)) + "\n"); + target.Header, + ("targetName", target.LocalizedName is { } name ? Loc.GetString(name) : target.Name)) + "\n"); } + // End Offbrand } if (component.EdgeIndex == null && GetTargetEdge(uid, component) is {} targetEdge) @@ -175,7 +169,7 @@ namespace Content.Server.Construction { Localization = construction.Type switch { ConstructionType.Structure => "construction-presenter-to-build", - ConstructionType.Surgery => "construction-presenter-to-surgery", + ConstructionType.NodeToNode => "construction-presenter-to-node-to-node", // Offbrand _ => "construction-presenter-to-craft", }, EntryNumber = step, @@ -194,7 +188,7 @@ namespace Content.Server.Construction return null; // First steps are handled specially. - if (step == 1 && construction.Category != "Surgery") // Offbrand + if (step == 1 && construction.Type != ConstructionType.NodeToNode) // Offbrand { foreach (var graphStep in edge.Steps) { diff --git a/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs b/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs index 57805bb3e5..d1cb98f15c 100644 --- a/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs +++ b/Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs @@ -211,13 +211,7 @@ public sealed partial class RevenantSystem //KILL THEMMMM - // Begin Offbrand Removals - // if (!_mobThresholdSystem.TryGetThresholdForState(args.Args.Target.Value, MobState.Dead, out var damage)) - // return; - // End Offbrand Removals - DamageSpecifier dspec = new(); - dspec.DamageDict.Add("Cold", component.HarvestColdDamage); // Offbrand - use a fixed amount of cold - _damage.TryChangeDamage(args.Args.Target, dspec, true, origin: uid); + _damage.TryChangeDamage(args.Args.Target, component.HarvestDamage, true, origin: uid); // Offbrand - use a fixed amount args.Handled = true; } diff --git a/Content.Server/_Offbrand/Surgery/SetNode.cs b/Content.Server/_Offbrand/Surgery/SetNode.cs index 9501cab06b..e28198771d 100644 --- a/Content.Server/_Offbrand/Surgery/SetNode.cs +++ b/Content.Server/_Offbrand/Surgery/SetNode.cs @@ -4,6 +4,9 @@ using Robust.Shared.Prototypes; namespace Content.Server._Offbrand.Surgery; +/// +/// Sets the current node of the construction graph, and clears the pathfinding target if the repeat conditions are not met +/// [DataDefinition] public sealed partial class SetNode : IGraphAction { diff --git a/Content.Server/_Offbrand/Surgery/SurgeryGuideTargetSystem.cs b/Content.Server/_Offbrand/Surgery/SurgeryGuideTargetSystem.cs index b3e89e66ca..0ae7c2c46f 100644 --- a/Content.Server/_Offbrand/Surgery/SurgeryGuideTargetSystem.cs +++ b/Content.Server/_Offbrand/Surgery/SurgeryGuideTargetSystem.cs @@ -12,7 +12,7 @@ public sealed class SurgeryGuideTargetSystem : SharedSurgeryGuideTargetSystem protected override void OnStartSurgery(Entity ent, ref SurgeryGuideStartSurgeryMessage args) { base.OnStartSurgery(ent, ref args); - if (!_prototype.TryIndex(args.Prototype, out var construction)) + if (!_prototype.Resolve(args.Prototype, out var construction)) return; _construction.SetPathfindingTarget(ent, construction.TargetNode); diff --git a/Content.Server/_Offbrand/VariationPass/SupplyNearLatheVarationPassComponent.cs b/Content.Server/_Offbrand/VariationPass/SupplyNearLatheVarationPassComponent.cs index c861e425de..4021d53a8f 100644 --- a/Content.Server/_Offbrand/VariationPass/SupplyNearLatheVarationPassComponent.cs +++ b/Content.Server/_Offbrand/VariationPass/SupplyNearLatheVarationPassComponent.cs @@ -8,9 +8,15 @@ namespace Content.Server._Offbrand.VariationPass; [RegisterComponent] public sealed partial class SupplyNearLatheVariationPassComponent : Component { + /// + /// The prototype of the lathe to look for + /// [DataField(required: true)] public EntProtoId LathePrototype; + /// + /// The entity to spawn on said lathe + /// [DataField(required: true)] public EntProtoId EntityToSpawn; } diff --git a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs index ead15a251a..e108535fda 100644 --- a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs @@ -329,7 +329,7 @@ namespace Content.Shared.Chemistry.Reagent public string? Describe(IPrototypeManager prototype, IEntitySystemManager entSys) { - if (!prototype.TryIndex(StatusEffect, out var effectProtoData)) + if (!prototype.Resolve(StatusEffect, out var effectProtoData)) return null; return Loc.GetString("reagent-guidebook-status-effect", ("effect", effectProtoData.Name ?? string.Empty), diff --git a/Content.Shared/Construction/ConstructionGraphNode.cs b/Content.Shared/Construction/ConstructionGraphNode.cs index 8e8365807c..a8f6a222c6 100644 --- a/Content.Shared/Construction/ConstructionGraphNode.cs +++ b/Content.Shared/Construction/ConstructionGraphNode.cs @@ -33,7 +33,10 @@ namespace Content.Shared.Construction // Begin Offbrand [DataField] - public LocId? SurgeryName; + public LocId? LocalizedName; + + [DataField] + public LocId Header = "construction-component-to-create-header"; // End Offbrand /// diff --git a/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs b/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs index 65c7d92ae7..c57247a732 100644 --- a/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs +++ b/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs @@ -98,5 +98,5 @@ public enum ConstructionType { Structure, Item, - Surgery, // Offbrand + NodeToNode, // Offbrand } diff --git a/Content.Shared/Mobs/Systems/MobThresholdSystem.cs b/Content.Shared/Mobs/Systems/MobThresholdSystem.cs index 7b2e9f9fe5..e6d1e56056 100644 --- a/Content.Shared/Mobs/Systems/MobThresholdSystem.cs +++ b/Content.Shared/Mobs/Systems/MobThresholdSystem.cs @@ -443,7 +443,7 @@ public sealed class MobThresholdSystem : EntitySystem // Begin Offbrand private void MobThresholdMapInit(Entity ent, ref MapInitEvent args) { - var overlayUpdate = new Content.Shared._Offbrand.Wounds.PotentiallyUpdateDamageOverlay(ent); + var overlayUpdate = new Content.Shared._Offbrand.Wounds.bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlayUpdate); } // End Offbrand diff --git a/Content.Shared/Revenant/Components/RevenantComponent.cs b/Content.Shared/Revenant/Components/RevenantComponent.cs index 002b3a99e1..d994f6db4f 100644 --- a/Content.Shared/Revenant/Components/RevenantComponent.cs +++ b/Content.Shared/Revenant/Components/RevenantComponent.cs @@ -221,5 +221,11 @@ public sealed partial class RevenantComponent : Component /// Offbrand - how much cold damage to deal on harvest /// [DataField] - public FixedPoint2 HarvestColdDamage = 200; + public Content.Shared.Damage.DamageSpecifier HarvestDamage = new() + { + DamageDict = new() + { + { "Cold", 200 }, + } + }; } diff --git a/Content.Shared/_Offbrand/Buckle/StatusEffectOnStrapComponent.cs b/Content.Shared/_Offbrand/Buckle/StatusEffectOnStrapComponent.cs index 8c0cbee714..ef7ee61a5c 100644 --- a/Content.Shared/_Offbrand/Buckle/StatusEffectOnStrapComponent.cs +++ b/Content.Shared/_Offbrand/Buckle/StatusEffectOnStrapComponent.cs @@ -3,6 +3,9 @@ using Robust.Shared.Prototypes; namespace Content.Shared._Offbrand.Buckle; +/// +/// Applies a status effect to the strapped entity whilst it is strapped +/// [RegisterComponent, NetworkedComponent] [Access(typeof(StatusEffectOnStrapSystem))] public sealed partial class StatusEffectOnStrapComponent : Component diff --git a/Content.Shared/_Offbrand/Chemistry/BeforeInjectOnEventEvent.cs b/Content.Shared/_Offbrand/Chemistry/BeforeInjectOnEventEvent.cs index 01d68fe0ed..f5aa9549f6 100644 --- a/Content.Shared/_Offbrand/Chemistry/BeforeInjectOnEventEvent.cs +++ b/Content.Shared/_Offbrand/Chemistry/BeforeInjectOnEventEvent.cs @@ -2,8 +2,11 @@ using Content.Shared.FixedPoint; namespace Content.Shared._Offbrand.Chemistry; +/// +/// Event raised before injecting in response to an event, to allow modifying how much is injected +/// [ByRefEvent] -public struct BeforeInjectOnEventEvent +public struct BeforeInjectOnEventEvent(FixedPoint2 injectionAmount) { - public FixedPoint2 InjectionAmount; + public FixedPoint2 InjectionAmount = injectionAmount; } diff --git a/Content.Shared/_Offbrand/EntityEffects/AdjustReagentGaussian.cs b/Content.Shared/_Offbrand/EntityEffects/AdjustReagentGaussian.cs index 94dca3f780..7de38fe6e2 100644 --- a/Content.Shared/_Offbrand/EntityEffects/AdjustReagentGaussian.cs +++ b/Content.Shared/_Offbrand/EntityEffects/AdjustReagentGaussian.cs @@ -1,8 +1,10 @@ using Content.Shared.Chemistry.Reagent; using Content.Shared.EntityEffects; using Content.Shared.FixedPoint; +using Content.Shared.Random.Helpers; using Robust.Shared.Prototypes; using Robust.Shared.Random; +using Robust.Shared.Timing; namespace Content.Shared._Offbrand.EntityEffects; @@ -25,7 +27,11 @@ public sealed partial class AdjustReagentGaussian : EntityEffect if (reagentArgs.Source == null) return; - var rand = IoCManager.Resolve(); + var timing = IoCManager.Resolve(); + + var seed = SharedRandomExtensions.HashCodeCombine(new() { (int)timing.CurTick.Value, args.EntityManager.GetNetEntity(args.TargetEntity).Id }); + var rand = new System.Random(seed); + var amount = rand.NextGaussian(μ, σ); amount *= reagentArgs.Scale.Double(); diff --git a/Content.Shared/_Offbrand/Surgery/SurgeryGuideTargetComponent.cs b/Content.Shared/_Offbrand/Surgery/SurgeryGuideTargetComponent.cs index 59c8210ace..023a64bc64 100644 --- a/Content.Shared/_Offbrand/Surgery/SurgeryGuideTargetComponent.cs +++ b/Content.Shared/_Offbrand/Surgery/SurgeryGuideTargetComponent.cs @@ -5,7 +5,11 @@ using Robust.Shared.Serialization; namespace Content.Shared._Offbrand.Surgery; [RegisterComponent] -public sealed partial class SurgeryGuideTargetComponent : Component; +public sealed partial class SurgeryGuideTargetComponent : Component +{ + [DataField] + public string Category = "Surgery"; +} [Serializable, NetSerializable] public enum SurgeryGuideUiKey : byte diff --git a/Content.Shared/_Offbrand/Wounds/BrainDamageSystem.cs b/Content.Shared/_Offbrand/Wounds/BrainDamageSystem.cs index 94753e7283..12907051fd 100644 --- a/Content.Shared/_Offbrand/Wounds/BrainDamageSystem.cs +++ b/Content.Shared/_Offbrand/Wounds/BrainDamageSystem.cs @@ -42,7 +42,7 @@ public sealed partial class BrainDamageSystem : EntitySystem var notifDamage = new AfterBrainDamageChanged(); RaiseLocalEvent(ent, ref notifDamage); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } @@ -97,7 +97,7 @@ public sealed partial class BrainDamageSystem : EntitySystem var notifDamage = new AfterBrainDamageChanged(); RaiseLocalEvent(ent, ref notifDamage); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } @@ -112,7 +112,7 @@ public sealed partial class BrainDamageSystem : EntitySystem var notif = new AfterBrainDamageChanged(); RaiseLocalEvent(ent, ref notif); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } public void TryChangeBrainOxygenation(Entity ent, FixedPoint2 amount) @@ -126,7 +126,7 @@ public sealed partial class BrainDamageSystem : EntitySystem var notif = new AfterBrainOxygenChanged(); RaiseLocalEvent(ent, ref notif); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } @@ -185,7 +185,7 @@ public sealed partial class BrainDamageSystem : EntitySystem var notif = new AfterBrainDamageChanged(); RaiseLocalEvent(ent, ref notif); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } @@ -215,7 +215,7 @@ public sealed partial class BrainDamageSystem : EntitySystem var notif = new AfterBrainDamageChanged(); RaiseLocalEvent(ent, ref notif); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } diff --git a/Content.Shared/_Offbrand/Wounds/BrainDamageThresholdsSystem.cs b/Content.Shared/_Offbrand/Wounds/BrainDamageThresholdsSystem.cs index 20aef3b13f..4a730064f7 100644 --- a/Content.Shared/_Offbrand/Wounds/BrainDamageThresholdsSystem.cs +++ b/Content.Shared/_Offbrand/Wounds/BrainDamageThresholdsSystem.cs @@ -69,7 +69,7 @@ public sealed partial class BrainDamageThresholdsSystem : EntitySystem ent.Comp.CurrentDamageEffect = damageEffect; Dirty(ent); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } @@ -92,7 +92,7 @@ public sealed partial class BrainDamageThresholdsSystem : EntitySystem ent.Comp.CurrentOxygenEffect = oxygenEffect; Dirty(ent); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } @@ -119,7 +119,7 @@ public sealed partial class BrainDamageThresholdsSystem : EntitySystem { args.State = ThresholdHelpers.Max(ent.Comp.CurrentState, args.State); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } } diff --git a/Content.Shared/_Offbrand/Wounds/HeartSystem.cs b/Content.Shared/_Offbrand/Wounds/HeartSystem.cs index 7eb2a4f9ce..1fa4c92c12 100644 --- a/Content.Shared/_Offbrand/Wounds/HeartSystem.cs +++ b/Content.Shared/_Offbrand/Wounds/HeartSystem.cs @@ -53,7 +53,7 @@ public sealed partial class HeartSystem : EntitySystem var strainChangedEvt = new AfterStrainChangedEvent(); RaiseLocalEvent(ent, ref strainChangedEvt); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } @@ -124,7 +124,7 @@ public sealed partial class HeartSystem : EntitySystem continue; } - var overlays = new PotentiallyUpdateDamageOverlay(uid); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(uid); RaiseLocalEvent(uid, ref overlays, true); } } diff --git a/Content.Shared/_Offbrand/Wounds/PainSystem.cs b/Content.Shared/_Offbrand/Wounds/PainSystem.cs index 6b94255cd9..1f2b4b3e20 100644 --- a/Content.Shared/_Offbrand/Wounds/PainSystem.cs +++ b/Content.Shared/_Offbrand/Wounds/PainSystem.cs @@ -67,7 +67,7 @@ public sealed partial class PainSystem : EntitySystem var evt = new AfterShockChangeEvent(); RaiseLocalEvent(uid, ref evt); - var overlays = new PotentiallyUpdateDamageOverlay(uid); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(uid); RaiseLocalEvent(uid, ref overlays, true); Dirty(uid, pain); @@ -82,7 +82,7 @@ public sealed partial class PainSystem : EntitySystem var evt = new AfterShockChangeEvent(); RaiseLocalEvent(ent, ref evt); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } diff --git a/Content.Shared/_Offbrand/Wounds/ShockThresholdsSystem.cs b/Content.Shared/_Offbrand/Wounds/ShockThresholdsSystem.cs index 6501b494c0..2c7f9a14d4 100644 --- a/Content.Shared/_Offbrand/Wounds/ShockThresholdsSystem.cs +++ b/Content.Shared/_Offbrand/Wounds/ShockThresholdsSystem.cs @@ -76,7 +76,7 @@ public sealed partial class ShockThresholdsSystem : EntitySystem { args.State = ThresholdHelpers.Max(ent.Comp.CurrentMobState, args.State); - var overlays = new PotentiallyUpdateDamageOverlay(ent); + var overlays = new bPotentiallyUpdateDamageOverlayEventb(ent); RaiseLocalEvent(ent, ref overlays, true); } } diff --git a/Content.Shared/_Offbrand/Wounds/WoundableComponent.cs b/Content.Shared/_Offbrand/Wounds/WoundableComponent.cs index 88e1d941ce..88cb12be84 100644 --- a/Content.Shared/_Offbrand/Wounds/WoundableComponent.cs +++ b/Content.Shared/_Offbrand/Wounds/WoundableComponent.cs @@ -21,4 +21,4 @@ public record struct BeforeDamageCommitEvent(DamageSpecifier Damage, bool ForceR /// Raised when the values for a damage overlay may have changed /// [ByRefEvent] -public record struct PotentiallyUpdateDamageOverlay(EntityUid Target); +public record struct bPotentiallyUpdateDamageOverlayEventb(EntityUid Target); diff --git a/Resources/Locale/en-US/_Offbrand/construction.ftl b/Resources/Locale/en-US/_Offbrand/construction.ftl index 20c07e088c..6c1beeeffa 100644 --- a/Resources/Locale/en-US/_Offbrand/construction.ftl +++ b/Resources/Locale/en-US/_Offbrand/construction.ftl @@ -1,4 +1,4 @@ -construction-presenter-to-surgery = To perform this, first you need to: +construction-presenter-to-node-to-node = To perform this, first you need to: construction-examine-status-effect-should-have = The target needs to have { $effect }. construction-examine-status-effect-should-not-have = The target needs to not have { $effect }. @@ -21,4 +21,4 @@ construction-step-heart-damage-range = { $max -> } } -construction-component-to-perform-header = To perform {$name}... +construction-component-to-perform-header = To perform {$targetName}... diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index 80a4c46002..5ba4345b99 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -870,13 +870,15 @@ - !type:TotalDamage max: 100 # Offbrand damage: + # Begin Offbrand Changes groups: - Brute: -0.5 # Offbrand + Brute: -0.3 # Offbrand types: - Poison: -0.5 ##Should be about what it was when it healed the toxin group - Heat: -0.33 - Shock: -0.33 - Cold: -0.33 + Poison: -0.2 ##Should be about what it was when it healed the toxin group + Heat: -0.2 + Shock: -0.2 + Cold: -0.2 + # End Offbrand Changes - type: reagent id: Lipozine diff --git a/Resources/Prototypes/_Offbrand/surgery_constructions.yml b/Resources/Prototypes/_Offbrand/surgery_constructions.yml index e072400e99..3a7488a333 100644 --- a/Resources/Prototypes/_Offbrand/surgery_constructions.yml +++ b/Resources/Prototypes/_Offbrand/surgery_constructions.yml @@ -7,7 +7,7 @@ startNode: Base targetNode: BoneDeathTreatment category: Surgery - objectType: Surgery + objectType: NodeToNode - type: construction hide: true @@ -18,7 +18,7 @@ startNode: Base targetNode: HeartTreatmentSuture category: Surgery - objectType: Surgery + objectType: NodeToNode - type: construction hide: true @@ -29,7 +29,7 @@ startNode: Base targetNode: HeartTreatmentMedicatedSuture category: Surgery - objectType: Surgery + objectType: NodeToNode - type: construction hide: true @@ -40,7 +40,7 @@ startNode: Base targetNode: HuskingTreatment category: Surgery - objectType: Surgery + objectType: NodeToNode - type: construction hide: true @@ -51,7 +51,7 @@ startNode: Base targetNode: WoundFractureTreatment category: Surgery - objectType: Surgery + objectType: NodeToNode - type: construction hide: true @@ -62,7 +62,7 @@ startNode: Base targetNode: WoundArterialTreatment category: Surgery - objectType: Surgery + objectType: NodeToNode - type: construction hide: true @@ -73,7 +73,7 @@ startNode: Base targetNode: CavityManipulationInsert category: Surgery - objectType: Surgery + objectType: NodeToNode - type: construction hide: true @@ -84,4 +84,4 @@ startNode: Base targetNode: CavityManipulationRemoval category: Surgery - objectType: Surgery + objectType: NodeToNode diff --git a/Resources/Prototypes/_Offbrand/surgery_graph.yml b/Resources/Prototypes/_Offbrand/surgery_graph.yml index 1103305003..b095b6cfa3 100644 --- a/Resources/Prototypes/_Offbrand/surgery_graph.yml +++ b/Resources/Prototypes/_Offbrand/surgery_graph.yml @@ -3,7 +3,8 @@ start: Base graph: - node: Base - surgeryName: surgery-cleanup-name + header: construction-component-to-perform-header + localizedName: surgery-cleanup-name edges: - to: OpenIncision steps: @@ -102,13 +103,15 @@ - tool: BoneMending doAfter: 1 - node: WoundFractureTreatment - surgeryName: surgery-wound-fracture-treatment-name + header: construction-component-to-perform-header + localizedName: surgery-wound-fracture-treatment-name actions: - !type:SetNode node: RetractedIncision repeatConditions: *fracture-conditions - node: WoundArterialTreatment - surgeryName: surgery-wound-arterial-treatment-name + header: construction-component-to-perform-header + localizedName: surgery-wound-arterial-treatment-name actions: - !type:SetNode node: RetractedIncision @@ -181,25 +184,29 @@ - tool: BoneMending doAfter: 1 - node: BoneDeathTreatment - surgeryName: surgery-bone-death-treatment-name + header: construction-component-to-perform-header + localizedName: surgery-bone-death-treatment-name actions: - !type:SetNode node: OpenRibCage repeatConditions: *bone-death-conditions - node: HeartTreatmentSuture - surgeryName: surgery-heart-treatment-suture-name + header: construction-component-to-perform-header + localizedName: surgery-heart-treatment-suture-name actions: - !type:SetNode node: OpenRibCage repeatConditions: *heart-damage-conditions - node: HeartTreatmentMedicatedSuture - surgeryName: surgery-heart-treatment-medicated-suture-name + header: construction-component-to-perform-header + localizedName: surgery-heart-treatment-medicated-suture-name actions: - !type:SetNode node: OpenRibCage repeatConditions: *heart-damage-conditions - node: HuskingTreatment - surgeryName: surgery-husking-treatment-name + header: construction-component-to-perform-header + localizedName: surgery-husking-treatment-name actions: - !type:SetNode node: OpenRibCage @@ -243,12 +250,14 @@ - tool: Clamping doAfter: 2 - node: CavityManipulationInsert - surgeryName: surgery-cavity-manipulation-insert-name + header: construction-component-to-perform-header + localizedName: surgery-cavity-manipulation-insert-name actions: - !type:SetNode node: CavityManipulationOpen - node: CavityManipulationRemoval - surgeryName: surgery-cavity-manipulation-removal-name + header: construction-component-to-perform-header + localizedName: surgery-cavity-manipulation-removal-name actions: - !type:SetNode node: CavityManipulationOpen