Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: DEATHB4DEFEAT <[email protected]>
Signed-off-by: VMSolidus <[email protected]>
  • Loading branch information
VMSolidus and DEATHB4DEFEAT committed Sep 21, 2024
1 parent b4f7e56 commit 9ad3f70
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ public sealed class RevivifyPowerSystem : EntitySystem
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly GlimmerSystem _glimmer = default!;


public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<PsionicComponent, PsionicHealOtherPowerActionEvent>(OnPowerUsed);
SubscribeLocalEvent<PsionicComponent, DispelledEvent>(OnDispelled);
SubscribeLocalEvent<PsionicComponent, PsionicHealOtherDoAfterEvent>(OnDoAfter);
}


private void OnPowerUsed(EntityUid uid, PsionicComponent component, PsionicHealOtherPowerActionEvent args)
{
if (component.DoAfter is not null)
Expand Down Expand Up @@ -100,12 +103,14 @@ private void OnDispelled(EntityUid uid, PsionicComponent component, DispelledEve

private void OnDoAfter(EntityUid uid, PsionicComponent component, PsionicHealOtherDoAfterEvent args)
{
// It's entirely possible for the caster to stop being Psionic(due to mindbreaking) mid cast
if (component is null)
return; // It's entirely possible for the caster to stop being Psionic(due to mindbreaking) mid cast.
return;
component.DoAfter = null;

// The target can also cease existing mid-cast
if (args.Target is null)
return; // The target can also cease existing mid-cast.
return;

_rotting.ReduceAccumulator(args.Target.Value, TimeSpan.FromSeconds(args.RotReduction * component.CurrentAmplification));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ public sealed partial class PsionicHealOtherPowerActionEvent : EntityTargetActio
[DataField]
public string PowerName;

/// <summary>
/// Controls whether or not a power fires immediately and with no DoAfter.
/// </summary>
/// Controls whether or not a power fires immediately and with no DoAfter
[DataField]
public bool Immediate;

Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Psionics/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ public PsionicHealOtherDoAfterEvent(TimeSpan startedAt)
}

public override DoAfterEvent Clone() => this;
}
}
8 changes: 2 additions & 6 deletions Content.Shared/Psionics/PsionicComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,11 @@ private set
[DataField]
public List<string>? PsychognomicDescriptors = null;

/// <summary>
/// Used for tracking what spell a Psion is actively casting.
/// </summary>
/// Used for tracking what spell a Psion is actively casting
[DataField]
public DoAfterId? DoAfter;

/// <summary>
/// Popup to play if a Psion attempts to start casting a power while already casting one.
/// </summary>
/// Popup to play if a Psion attempts to start casting a power while already casting one
[DataField]
public string AlreadyCasting = "already-casting";
}
Expand Down
11 changes: 6 additions & 5 deletions Resources/Locale/en-US/psionics/psionic-powers.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,21 @@ action-name-healing-word = Healing Word
action-description-healing-word = Speak the Lesser Secret Of Life, and restore health to another.
healing-word-power-description = Speak the Lesser Secret Of Life, and restore health to another.
healing-word-power-initialization-feedback =
At the beginning of time, a word was spoken that brought life into the Spheres. Though it taxes my mind to know it,
this Secret is known to me now. I need only speak it.
healing-word-power-metapsionic-feedback = {CAPITALIZE($entity)} bears the Lesser Secret Of Life.
At the beginning of time, a word was spoken that brought life into the Spheres.
Though it taxes my mind to know it, this Secret is known to me now.
I need only speak it.
healing-word-power-metapsionic-feedback = {CAPITALIZE($entity)} bears the Lesser Secret of Life.
healing-word-begin = {CAPITALIZE($entity)} mutters a word that brings both joy and pain alike to those who hear it.
# Revivify
action-name-revivify = Breath Of Life
action-name-revivify = Breath of Life
action-description-revivify = Speak the Greater Secret of Life, and restore another to life.
revivify-power-description = Speak the Greater Secret of Life, and restore another to life.
revivify-power-initialization-feedback =
For a moment, my soul journeys across time and space to the beginning of it all, there I hear it.
The Secret of Life in its fullness. I feel my entire existence burning out from within, merely by knowing it.
Power flows through me as a mighty river, begging to be released with a simple spoken word.
revivify-power-metapsionic-feedback = {CAPITALIZE($entity)} bears the Greater Secret Of Life.
revivify-power-metapsionic-feedback = {CAPITALIZE($entity)} bears the Greater Secret of Life.
revivify-word-begin = {CAPITALIZE($entity)} enunciates a word of such divine power, that those who hear it weep from joy.
# Telegnosis
Expand Down
12 changes: 6 additions & 6 deletions Resources/Prototypes/Actions/psionics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@
- Mindbroken
event: !type:PsionicHealOtherPowerActionEvent
healingAmount:
groups: # These all get divided by the number of damage types in the group. So they're all -15.
# Additionally, they're multiplied by the caster's Amplification.
# Which assuming this is the only power they have,
# The multiplier is between 2.9 and 3.9
# These all get divided by the number of damage types in the group. So they're all -15
# Additionally, they're multiplied by the caster's Amplification, which,
# assuming this is the only power they have, the multiplier is between 2.9-3.9
groups:
Genetic: -15
Toxin: -30
Airloss: -60 #Except airloss, which heals 30 per type.
Airloss: -60 # Except airloss, which heals 30 per type
Brute: -45
Burn: -60
rotReduction: 60
Expand All @@ -218,4 +218,4 @@
minGlimmer: 10 # These also get multiplied by caster stats. So,
maxGlimmer: 15 # keeping in mind the ~3.5x multiplier, this spikes glimmer by as much as 60 points.
glimmerObviousSoundThreshold: 50
glimmerObviousPopupThreshold: 100
glimmerObviousPopupThreshold: 100
2 changes: 1 addition & 1 deletion Resources/Prototypes/Psionics/psionics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,5 @@
- ActionRevivify
initializationFeedback: revivify-power-initialization-feedback
metapsionicFeedback: revivify-power-feedback
amplificationModifier: 2.5 # An extremely rare and dangerous power.
amplificationModifier: 2.5 # An extremely rare and dangerous power
powerSlotCost: 2
2 changes: 1 addition & 1 deletion Resources/Prototypes/Roles/Jobs/Civilian/chaplain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
playTimeTracker: JobChaplain
requirements:
- !type:CharacterDepartmentTimeRequirement
department: Epistemics # Chaplain is now one of the station's "Crew Aligned Wizards"
department: Epistemics # Chaplain is now one of the station's "Crew-Aligned Wizards"
min: 14400 # 4 hours
- !type:CharacterLogicOrRequirement
requirements:
Expand Down

0 comments on commit 9ad3f70

Please sign in to comment.