forked from Simple-Station/Einstein-Engines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Simple-Station#73 from SS14-Classic/Hotfixes-10/5/…
…2024 Hotfixes 10/5/2024
- Loading branch information
Showing
32 changed files
with
390 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
Content.Server/Body/Events/NaturalBloodRegenerationAttemptEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Content.Shared.FixedPoint; | ||
|
||
namespace Content.Server.Body.Events; | ||
|
||
/// <summary> | ||
/// Raised on a mob when its bloodstream tries to perform natural blood regeneration. | ||
/// </summary> | ||
[ByRefEvent] | ||
public sealed class NaturalBloodRegenerationAttemptEvent : CancellableEntityEventArgs | ||
{ | ||
/// <summary> | ||
/// How much blood the mob will regenerate on this tick. Can be negative. | ||
/// </summary> | ||
public FixedPoint2 Amount; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
using Content.Server.Body.Systems; | ||
using Content.Server.Body.Components; | ||
using Content.Shared.Damage; | ||
using Content.Server.Body.Events; | ||
using Content.Server.Traits.Assorted; | ||
using Content.Shared.FixedPoint; | ||
|
||
namespace Content.Server.Traits.Assorted; | ||
namespace Content.Server.Traits; | ||
|
||
public sealed class BloodDeficiencySystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
SubscribeLocalEvent<BloodDeficiencyComponent, ComponentStartup>(OnStartup); | ||
SubscribeLocalEvent<BloodDeficiencyComponent, NaturalBloodRegenerationAttemptEvent>(OnBloodRegen); | ||
} | ||
|
||
private void OnStartup(EntityUid uid, BloodDeficiencyComponent component, ComponentStartup args) | ||
private void OnBloodRegen(Entity<BloodDeficiencyComponent> ent, ref NaturalBloodRegenerationAttemptEvent args) | ||
{ | ||
if (!TryComp<BloodstreamComponent>(uid, out var bloodstream)) | ||
if (!ent.Comp.Active || !TryComp<BloodstreamComponent>(ent.Owner, out var bloodstream)) | ||
return; | ||
|
||
bloodstream.HasBloodDeficiency = true; | ||
bloodstream.BloodDeficiencyLossPercentage = component.BloodLossPercentage; | ||
args.Amount = FixedPoint2.Min(args.Amount, 0) // If the blood regen amount already was negative, we keep it. | ||
- bloodstream.BloodMaxVolume * ent.Comp.BloodLossPercentage; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
ghost-respawn-time-left = Before the opportunity to return to the round { $time } | ||
{ $time -> | ||
[one] minute | ||
*[other] minutes | ||
} | ||
ghost-respawn-max-players = The function is not available, there should be fewer players on the server { $players }. | ||
ghost-respawn-window-title = Rules for returning to the round | ||
ghost-respawn-window-rules-footer = By using this feature, you [color=#ff7700]agree[/color] [color=#ff0000]not to transfer[/color] the knowledge of your past character to a new one. For violation of the clause specified here, [color=#ff0000]a ban in the amount of 3 days or more follows[/color]. | ||
ghost-respawn-same-character = You cannot enter the round for the same character. Change it in the character settings. | ||
ghost-respawn-time-left = Please wait {$time} {$time -> | ||
[one] minute | ||
*[other] minutes | ||
} before trying to respawn. | ||
ghost-respawn-log-character-almost-same = Player { $player } { $try -> | ||
[true] join | ||
ghost-respawn-max-players = Cannot respawn right now. There should be fewer than {$players} players. | ||
ghost-respawn-window-title = Respawn rules | ||
ghost-respawn-window-rules-footer = By respawning, you [color=#ff7700]agree[/color] [color=#ff0000]not to use any knowledge gained as your previous charactrer[/color]. Violation of this rule may constitute a server ban. Please, read the server rules for more details. | ||
ghost-respawn-same-character = You cannot respawn as the same character. Please select a different one in character preferences. | ||
ghost-respawn-log-character-almost-same = Player {$player} { $try -> | ||
[true] joined | ||
*[false] tried to join | ||
} in the round after the respawn with a similar name. Past name: { $oldName }, current: { $newName }. | ||
ghost-respawn-log-return-to-lobby = { $userName } returned to the lobby. | ||
} the round after respawning with a similar name. Previous name: { $oldName }, current: { $newName }. | ||
ghost-respawn-log-return-to-lobby = { $userName } returned to the lobby. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.