Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ngines into merge
  • Loading branch information
sleepyyapril authored and sleepyyapril committed Nov 18, 2024
2 parents ef77029 + 5756a0e commit 28c1737
Show file tree
Hide file tree
Showing 180 changed files with 12,724 additions and 5,380 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ await client.WaitAssertion(() =>
Assert.That(clientAlertsUI.AlertContainer.ChildCount, Is.GreaterThanOrEqualTo(1));
var alertControls = clientAlertsUI.AlertContainer.Children.Select(c => (AlertControl) c);
var alertIDs = alertControls.Select(ac => ac.Alert.ID).ToArray();
var expectedIDs = new[] { "HumanHealth", "Debug2" };
var expectedIDs = new[] { "Debug2" };
Assert.That(alertIDs, Is.SupersetOf(expectedIDs));
});

Expand Down
3 changes: 3 additions & 0 deletions Content.Server/LifeDrainer/LifeDrainerSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Server.Abilities.Psionics;
using Content.Server.Carrying;
using Content.Server.NPC.Systems;
using Content.Shared.ActionBlocker;
Expand Down Expand Up @@ -27,6 +28,7 @@ public sealed class LifeDrainerSystem : EntitySystem
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly PsionicAbilitiesSystem _psionicAbilitiesSystem = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -88,6 +90,7 @@ private void OnDrain(Entity<LifeDrainerComponent> ent, ref LifeDrainDoAfterEvent
_audio.PlayPvs(comp.FinishSound, uid);

_damageable.TryChangeDamage(target, comp.Damage, true, origin: uid);
_psionicAbilitiesSystem.MindBreak(target);
}

public bool CanDrain(Entity<LifeDrainerComponent> ent, EntityUid target)
Expand Down
10 changes: 10 additions & 0 deletions Content.Server/Weapons/Melee/MeleeWeaponSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using Robust.Shared.Map;
using Robust.Shared.Player;
using Robust.Shared.Random;
using Robust.Shared.Utility;
using System.Linq;
using System.Numerics;
using Content.Shared.Chat;
Expand Down Expand Up @@ -60,6 +61,15 @@ private void OnMeleeExamineDamage(EntityUid uid, MeleeWeaponComponent component,

if (damageSpec * component.HeavyDamageBaseModifier != damageSpec)
_damageExamine.AddDamageExamine(args.Message, damageSpec * component.HeavyDamageBaseModifier, Loc.GetString("damage-melee-heavy"));

if (component.HeavyStaminaCost != 0)
{
var staminaCostMarkup = FormattedMessage.FromMarkupOrThrow(
Loc.GetString("damage-melee-heavy-stamina-cost",
("type", Loc.GetString("damage-melee-heavy")), ("cost", component.HeavyStaminaCost)));
args.Message.PushNewline();
args.Message.AddMessage(staminaCostMarkup);
}
}

protected override bool ArcRaySuccessful(EntityUid targetUid, Vector2 position, Angle angle, Angle arcWidth, float range, MapId mapId,
Expand Down
17 changes: 16 additions & 1 deletion Content.Shared/Medical/Surgery/SharedSurgerySystem.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.DoAfter;
using Content.Shared.IdentityManagement;
using Content.Shared.Medical.Surgery.Conditions;
using Content.Shared.Medical.Surgery.Effects.Step;
using Content.Shared.Medical.Surgery.Steps;
Expand Down Expand Up @@ -628,7 +629,21 @@ private void OnSurgeryTargetStepChosen(Entity<SurgeryTargetComponent> ent, ref S
BreakOnHandChange = true,
};

_doAfter.TryStartDoAfter(doAfter);
if (_doAfter.TryStartDoAfter(doAfter))
{
var userName = Identity.Entity(user, EntityManager);
var targetName = Identity.Entity(ent.Owner, EntityManager);

var locName = $"surgery-popup-procedure-{args.Surgery}-step-{args.Step}";
var locResult = Loc.GetString(locName,
("user", userName), ("target", targetName), ("part", part));

if (locResult == locName)
locResult = Loc.GetString($"surgery-popup-step-{args.Step}",
("user", userName), ("target", targetName), ("part", part));

_popup.PopupEntity(locResult, user);
}
}

private (Entity<SurgeryComponent> Surgery, int Step)? GetNextStep(EntityUid body, EntityUid part, Entity<SurgeryComponent?> surgery, List<EntityUid> requirements)
Expand Down
15 changes: 11 additions & 4 deletions Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,17 @@ private bool DoHeavyAttack(EntityUid user, HeavyAttackEvent ev, EntityUid meleeU
if (targetMap.MapId != userXform.MapID)
return false;

if (TryComp<StaminaComponent>(user, out var stamina))
{
if (stamina.CritThreshold - stamina.StaminaDamage <= component.HeavyStaminaCost)
{
PopupSystem.PopupClient(Loc.GetString("melee-heavy-no-stamina"), meleeUid, user);
return false;
}

_stamina.TakeStaminaDamage(user, component.HeavyStaminaCost, stamina, visual: false);
}

var userPos = TransformSystem.GetWorldPosition(userXform);
var direction = targetMap.Position - userPos;
var distance = Math.Min(component.Range * component.HeavyRangeModifier, direction.Length());
Expand Down Expand Up @@ -670,10 +681,6 @@ private bool DoHeavyAttack(EntityUid user, HeavyAttackEvent ev, EntityUid meleeU
DoDamageEffect(targets, user, Transform(targets[0]));
}

if (TryComp<StaminaComponent>(user, out var stamina))
_stamina.TakeStaminaDamage(user, component.HeavyStaminaCost, stamina);


return true;
}

Expand Down
55 changes: 55 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7975,3 +7975,58 @@ Entries:
id: 6527
time: '2024-11-18T04:29:14.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1247
- author: Skubman
changes:
- type: Add
message: >-
Surgery step descriptions (like making an incision, removing/attaching
limbs and organs) are now shown as popups to everyone in range upon the
start of the step. This makes it clear which surgical procedure is being
done and to which body part. No more stealthy brain-stealing in front of
everyone!
id: 6528
time: '2024-11-18T15:15:56.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1241
- author: Skubman
changes:
- type: Add
message: >-
The stamina cost of an object's power attack can now be revealed by
examining its damage values.
- type: Tweak
message: >-
Power attacks can't be done if your stamina is too low, so you can't
accidentally stamcrit yourself with power attacks anymore.
- type: Tweak
message: Power attacks now cost stamina even without hitting anything.
- type: Tweak
message: >-
Prevent power attacks from showing a blue visual effect on the character
who attacked due to stamina damage.
id: 6529
time: '2024-11-18T15:19:10.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1238
- author: VMSolidus
changes:
- type: Add
message: >-
Glimmer Wisps now completely obliterate their victim's Personhood,
inflicting the Mindbroken condition on them.
id: 6530
time: '2024-11-18T22:07:31.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1248
- author: VMSolidus
changes:
- type: Fix
message: >-
Reorganized Loadouts so that all Jobs now have their own job specific
tabs. The code for them has been thoroughly reorganized too, such that
figuring out which jobs are missing crap is way easier to do.
- type: Add
message: >-
Captain's Personal Weapon loadout category. Currently only contains a
choice between the antique laser pistol, or a pulse pistol. Whichever
choice is made will be used as a target for a traitor objective.
id: 6531
time: '2024-11-18T22:08:35.0000000+00:00'
url: https://github.com/Simple-Station/Einstein-Engines/pull/1230
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/damage/damage-examine.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ damage-throw = throw
damage-examine = It does the following damage:
damage-examine-type = It does the following [color=cyan]{$type}[/color] damage:
damage-value = - [color=red]{$amount}[/color] units of [color=yellow]{$type}[/color].
damage-melee-heavy-stamina-cost = A [color=cyan]{$type}[/color] costs [color=orange]{$cost}[/color] [color=yellow]Stamina[/color].
72 changes: 62 additions & 10 deletions Resources/Locale/en-US/loadouts/categories.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,81 @@ loadout-category-Eyes = Eyes
loadout-category-Hands = Hands
loadout-category-Head = Head
loadout-category-Items = Items
# Jobs
loadout-category-Jobs = Jobs
loadout-category-JobsAUncategorized = Uncategorized
loadout-category-JobsCargo = Logistics
# Command
loadout-category-JobsCommand = Command
loadout-category-JobsCommandAUncategorized = Uncategorized
loadout-category-JobsCommandAUncategorized = All Command
loadout-category-JobsCommandCaptain = Captain
loadout-category-JobsCommandCE = Chief Engineer
loadout-category-JobsCommandCMO = Chief Medical Officer
loadout-category-JobsCommandHOP = Head of Personnel
loadout-category-JobsCommandHOS = Head of Security
loadout-category-JobsCommandQM = Logistics Officer
loadout-category-JobsCommandRD = Mystagogue
loadout-category-JobsCommandHeadOfPersonnel = Head of Personnel
# Engineering
loadout-category-JobsEngineering = Engineering
loadout-category-JobsEngineeringAAUncategorized = All Engineers
loadout-category-JobsEngineeringAtmosphericTechnician = Atmospheric Technician
loadout-category-JobsEngineeringChiefEngineer = Chief Engineer
loadout-category-JobsEngineeringSeniorEngineer = Senior Engineer
loadout-category-JobsEngineeringStationEngineer = Station Engineer
loadout-category-JobsEngineeringTechnicalAssistant = Technical Assistant
# Epistemics
loadout-category-JobsEpistemics = Epistemics
loadout-category-JobsEpistemicsAAUncategorized = All Epistemiologists
loadout-category-JobsEpistemicsAcolyte = Acolyte
loadout-category-JobsEpistemicsCataloger = Cataloger
loadout-category-JobsEpistemicsChaplain = Chaplain
loadout-category-JobsEpistemicsGolemancer = Golemancer
loadout-category-JobsEpistemicsMystagogue = Mystagogue
loadout-category-JobsEpistemicsMystic = Mystic
loadout-category-JobsEpistemicsNoviciate = Noviciate
loadout-category-JobsEpistemicsPsionicMantis = Psionic Mantis
# Logistics
loadout-category-JobsLogistics = Logistics
loadout-category-JobsLogisticsAUncategorized = All Logistics
loadout-category-JobsLogisticsCargoTechnician = Cargo Technician
loadout-category-JobsLogisticsCourier = Courier
loadout-category-JobsLogisticsLogisticsOfficer = Logistics Officer
loadout-category-JobsLogisticsSalvageSpecialist = Salvage Specialist
# Medical
loadout-category-JobsMedical = Medical
loadout-category-JobsScience = Epistemics
loadout-category-JobsMedicalAUncategorized = All Medical
loadout-category-JobsMedicalChemist = Chemist
loadout-category-JobsMedicalChiefMedicalOfficer = Chief Medical Officer
loadout-category-JobsMedicalMedicalDoctor = Medical Doctor
loadout-category-JobsMedicalMedicalIntern = Medical Intern
loadout-category-JobsMedicalParamedic = Paramedic
loadout-category-JobsMedicalPsychologist = Psychologist
loadout-category-JobsMedicalSeniorPhysician = Senior Physician
# Security
loadout-category-JobsSecurity = Security
loadout-category-JobsSecurityAUncategorized = All Security
loadout-category-JobsSecurityCadet = Cadet
loadout-category-JobsSecurityCorpsman = Corpsman
loadout-category-JobsSecurityDetective = Detective
loadout-category-JobsSecurityHeadOfSecurity = Head of Security
loadout-category-JobsSecuritySecurityOfficer = Security Officer
loadout-category-JobsSecuritySeniorOfficer = Senior Officer
loadout-category-JobsSecurityWarden = Warden
# Service
loadout-category-JobsService = Service
loadout-category-JobsServiceUncategorized = Uncategorized
loadout-category-JobsServiceAUncategorized = All Service
loadout-category-JobsServiceBartender = Bartender
loadout-category-JobsServiceBotanist = Botanist
loadout-category-JobsServiceChef = Chef
loadout-category-JobsServiceClown = Clown
loadout-category-JobsServiceJanitor = Janitor
loadout-category-JobsServiceLawyer = Lawyer
loadout-category-JobsServiceMime = Mime
loadout-category-JobsServiceMusician = Musician
loadout-category-JobsServiceReporter = Reporter
loadout-category-Mask = Mask
loadout-category-Neck = Neck
loadout-category-Outer = Outer
Expand Down
Loading

0 comments on commit 28c1737

Please sign in to comment.