Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream Merge #15

Merged
merged 173 commits into from
Dec 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
f95774b
Mass Engine Update (#1220)
sleepyyapril Nov 17, 2024
bf6019f
Pirate Radio Heisentest Fix (#1225)
VMSolidus Nov 17, 2024
2eea0f7
Fix Loadout Subcategories Not Being Found (#1233)
DEATHB4DEFEAT Nov 17, 2024
bea5f13
Hotfix Stamina System (#1245)
sleepyyapril Nov 18, 2024
3f8194a
Automatic Changelog Update (#1245)
SimpleStation14 Nov 18, 2024
ab0fa7c
Day/Night Time Cycle For Maps (#1234)
DocNITE Nov 18, 2024
460f444
Automatic Changelog Update (#1234)
SimpleStation14 Nov 18, 2024
860d7c6
Shitmed Update 1 (#1240)
gluesniffler Nov 18, 2024
eb0121f
Automatic Changelog Update (#1240)
SimpleStation14 Nov 18, 2024
aec89a5
Fix Self-Aware Crashing Client (#1247)
angelofallars Nov 18, 2024
ddee61c
Automatic Changelog Update (#1247)
SimpleStation14 Nov 18, 2024
bb13e39
Shitmed Surgery Popups (#1241)
angelofallars Nov 18, 2024
59d2695
AlertsComponentTest Fix (#1246)
sleepyyapril Nov 18, 2024
4fe41ef
Automatic Changelog Update (#1241)
SimpleStation14 Nov 18, 2024
7090017
Power Attack Stamina Update (#1238)
angelofallars Nov 18, 2024
c0f813b
Automatic Changelog Update (#1238)
SimpleStation14 Nov 18, 2024
114194a
Glimmer Wisps Mindbreak Their Victims (#1248)
VMSolidus Nov 18, 2024
6d6cbdf
Automatic Changelog Update (#1248)
SimpleStation14 Nov 18, 2024
6c21325
The Great Loadout Reorganizing (#1230)
VMSolidus Nov 18, 2024
5756a0e
Automatic Changelog Update (#1230)
SimpleStation14 Nov 18, 2024
049a995
Fix Power Attacks Being Faster Than Left Clicks (#1252)
VMSolidus Nov 20, 2024
8a88bfd
Automatic Changelog Update (#1252)
SimpleStation14 Nov 20, 2024
411cb21
Tweak Wizden Trait Descriptions (#1260)
Mnemotechnician Nov 22, 2024
29d2cb1
More Trait Functions (PushMarkup & AddArmor) (#1253)
VMSolidus Nov 22, 2024
8d54aa2
Automatic Changelog Update (#1260)
SimpleStation14 Nov 22, 2024
0574be4
Feat: Anomaly Scanner Data Copying (#1250)
Mnemotechnician Nov 22, 2024
6fa8d68
Automatic Changelog Update (#1253)
SimpleStation14 Nov 22, 2024
1b57045
Automatic Changelog Update (#1250)
SimpleStation14 Nov 22, 2024
41501bd
Mass Bug Fixing (#1256)
sleepyyapril Nov 22, 2024
9798f53
Automatic Changelog Update (#1256)
SimpleStation14 Nov 22, 2024
992b2e4
Rename "Pierce" Typo to "Piercing" (#1267)
angelofallars Nov 22, 2024
b431d24
Buff Medical Due to Shitmed Changes Cherry-Pick (#1259)
Tmanzxd Nov 22, 2024
02dd8ab
Automatic Changelog Update (#1267)
SimpleStation14 Nov 22, 2024
09d5900
Automatic Changelog Update (#1259)
SimpleStation14 Nov 22, 2024
1500208
The Blood Cult (#1001)
Remuchi Nov 22, 2024
a179e18
Automatic Changelog Update (#1001)
SimpleStation14 Nov 22, 2024
dcc1c38
Engine Update v237.2.0 (#1270)
sleepyyapril Nov 24, 2024
613e793
[QoL] Show Oni Damage Bonus In Damage Examine (#1268)
angelofallars Nov 24, 2024
5fe4b1e
Automatic Changelog Update (#1268)
SimpleStation14 Nov 24, 2024
f046306
Loadouts V4 (#1164)
DEATHB4DEFEAT Nov 25, 2024
57917a7
Automatic Changelog Update (#1164)
SimpleStation14 Nov 25, 2024
1d65d54
[Fix] Added Robust.Xaml to the Project Solution (#1266)
Remuchi Nov 26, 2024
39f4ad8
Update Credits (#1274)
github-actions[bot] Nov 26, 2024
6c2b2a8
Fixes Make Cultist Admin Verb to Act on Target Not Self (#1289)
rbertoche Nov 27, 2024
f133b9b
IPC Instrument Menu Fix (#1287)
sleepyyapril Nov 27, 2024
92a6e09
Automatic Changelog Update (#1287)
SimpleStation14 Nov 27, 2024
b040760
Fix Bug with Opening Storage Containers (#1292)
sleepyyapril Nov 29, 2024
9a40c37
Automatic Changelog Update (#1292)
SimpleStation14 Nov 29, 2024
3272475
Change Target Doll Icon For Ashen Theme (#1282)
DocNITE Nov 29, 2024
d4879f9
Fix Applicable Medication Stack Bug (#1278)
Tmanzxd Nov 29, 2024
8d485e8
Automatic Changelog Update (#1278)
SimpleStation14 Nov 29, 2024
1a97635
Re-Enable Language Color and Font (#1294)
angelofallars Nov 29, 2024
7d802e3
Automatic Changelog Update (#1294)
SimpleStation14 Nov 29, 2024
2eafa0d
Shitmed Update 2 - [Insert Snarky Remark] (#1271)
gluesniffler Nov 30, 2024
b8e75da
Admin Tooling Cherry Picks (#1290)
sleepyyapril Nov 30, 2024
d58d397
Automatic Changelog Update (#1271)
SimpleStation14 Nov 30, 2024
0bd9a9e
More Loadout Equipment (#1281)
VMSolidus Nov 30, 2024
c7f1b4f
Automatic Changelog Update (#1281)
SimpleStation14 Nov 30, 2024
de98c2a
Dynamic Hostname System (#1296)
sleepyyapril Nov 30, 2024
e46a863
Religious Headgear For Character Customization (#1297)
VMSolidus Nov 30, 2024
56be690
Automatic Changelog Update (#1297)
SimpleStation14 Nov 30, 2024
f287188
Don't Require Running in Release to Test Mood (#1257)
DEATHB4DEFEAT Nov 30, 2024
dfb12e5
Start of Lore Documents
VMSolidus Nov 30, 2024
2a8bf58
Finally Done
VMSolidus Dec 1, 2024
9ef8252
Update Credits (#1300)
github-actions[bot] Dec 1, 2024
386fd77
Merge branch 'master' into Lore-Documentation
sleepyyapril Dec 1, 2024
a535d98
Loadouts Lore Documentation (#1298)
sleepyyapril Dec 1, 2024
8a368bb
Automatic Changelog Update (#1298)
SimpleStation14 Dec 1, 2024
932f9e3
Fashion Update: Earrings & Makeup (#1299)
angelofallars Dec 1, 2024
b05ab8e
Automatic Changelog Update (#1299)
SimpleStation14 Dec 1, 2024
1bab6b8
♂️ Add Male Arachne (#1301)
angelofallars Dec 1, 2024
5476ee0
Automatic Changelog Update (#1301)
SimpleStation14 Dec 1, 2024
4bf7624
Add Localization for Senior Physician and Senior Engineer (#1302)
zelezniciar1 Dec 1, 2024
9169818
Automatic Changelog Update (#1302)
SimpleStation14 Dec 1, 2024
8573914
Make Cultist Constructs Speak Eldritch (#1303)
angelofallars Dec 2, 2024
114ecde
Automatic Changelog Update (#1303)
SimpleStation14 Dec 2, 2024
1895f3a
Fix Lobotomy (#1306)
angelofallars Dec 3, 2024
71c6412
Automatic Changelog Update (#1306)
SimpleStation14 Dec 3, 2024
82b2b28
You Can Now Drag People Into Deep Friers (#1279)
Erisfiregamer1 Dec 3, 2024
cbc76ef
Automatic Changelog Update (#1279)
SimpleStation14 Dec 3, 2024
7c0c16e
Emp Flashlight (#5) (#1189)
VMSolidus Dec 4, 2024
7beea89
Automatic Changelog Update (#1189)
SimpleStation14 Dec 4, 2024
831a7b3
Add Europa Map to Rotation (#1152)
Ichaie Dec 4, 2024
b1c3703
Automatic Changelog Update (#1152)
SimpleStation14 Dec 4, 2024
c223259
Update medicine.yml (#1210)
Suraru Dec 4, 2024
e2ee77d
Atmospheric Alerts Computer Upgrades (#1313)
zelezniciar1 Dec 5, 2024
6c9270d
Automatic Changelog Update (#1313)
SimpleStation14 Dec 5, 2024
978173e
More Bug Fixes (#1311)
sleepyyapril Dec 5, 2024
1b15668
Automatic Changelog Update (#1311)
SimpleStation14 Dec 5, 2024
32e17a6
ChemMaster Sorting (#1310)
sleepyyapril Dec 5, 2024
01a13e3
Automatic Changelog Update (#1310)
SimpleStation14 Dec 5, 2024
d69b516
Port Shipyards (#1314)
VMSolidus Dec 6, 2024
36cd6ca
Automatic Changelog Update (#1314)
SimpleStation14 Dec 6, 2024
1016a08
Port UserActivateInWorldEvent and BypassInteractionChecksComponent (#…
sleepyyapril Dec 6, 2024
54d15c0
Inverts the Check for Material Whitelist in CanChangeMaterialAmount (…
rbertoche Dec 6, 2024
f1b8f96
Build Your Own TEG! (#1316)
zelezniciar1 Dec 6, 2024
3d2cdd7
Automatic Changelog Update (#1316)
SimpleStation14 Dec 6, 2024
50eb217
Several Small Map Fixes to Europa (#1319)
rbertoche Dec 6, 2024
f4152a5
Automatic Changelog Update (#1319)
SimpleStation14 Dec 6, 2024
06a8cee
Fix Rules (#1321)
VMSolidus Dec 6, 2024
9989c4d
Automatic Changelog Update (#1321)
SimpleStation14 Dec 6, 2024
ec650c4
Uplink: Remove Deception Category (#1309)
sleepyyapril Dec 7, 2024
5d64873
Automatic Changelog Update (#1309)
SimpleStation14 Dec 7, 2024
0c60671
[Feat] Bring Back Die Glorious Death, Hijack And Ian's Meat Traitor O…
Remuchi Dec 7, 2024
3ae4370
Automatic Changelog Update (#1323)
SimpleStation14 Dec 7, 2024
c40af73
The Throwing Update (#1307)
angelofallars Dec 8, 2024
33f80d6
Automatic Changelog Update (#1307)
SimpleStation14 Dec 8, 2024
8216a6e
Replace Direct Uses of GameTicker Dictionary with `TryGetValue` (#332…
rbertoche Dec 9, 2024
ca7e576
Fix Debug Assert. (#1325)
sleepyyapril Dec 9, 2024
f913393
Fix Melee Weapon Attack Speed (#1330)
dge21 Dec 10, 2024
1592c0e
Automatic Changelog Update (#1330)
SimpleStation14 Dec 10, 2024
34209e6
CVar CharacterRequirement (#1322)
sleepyyapril Dec 10, 2024
49b9c34
Update Credits (#1326)
github-actions[bot] Dec 10, 2024
6b1feac
Back Out "Flash Now Flashes Black Instead of White. (#14642)" (#1331)
stellar-novas Dec 10, 2024
48951ff
Automatic Changelog Update (#1331)
SimpleStation14 Dec 10, 2024
142ff10
Nix housekeeping
stellar-novas Dec 10, 2024
a668d35
Nix Housekeeping (#1332)
DEATHB4DEFEAT Dec 11, 2024
3e93876
Port N14 Mapper Assets (#1315)
VMSolidus Dec 11, 2024
b4e9e44
Automatic Changelog Update (#1315)
SimpleStation14 Dec 11, 2024
0ed26ce
Billions Must Flip (#1318)
sleepyyapril Dec 11, 2024
39d250f
Automatic Changelog Update (#1318)
SimpleStation14 Dec 11, 2024
946b766
Re-Enable Clown/Mime Hardsuit and Clown Snoring (#1324)
angelofallars Dec 11, 2024
48d63ba
Automatic Changelog Update (#1324)
SimpleStation14 Dec 11, 2024
975c673
Blood Cult DLC 1: Make It an Actually Playable Game (Mode) (#1276)
Remuchi Dec 11, 2024
149afb6
Automatic Changelog Update (#1276)
SimpleStation14 Dec 11, 2024
5899f4e
Pistol-Whipping (Guns as Melee Weapons) (#1335)
angelofallars Dec 11, 2024
478e159
Automatic Changelog Update (#1335)
SimpleStation14 Dec 11, 2024
3e3ca59
Fix Interact Verb (#1346)
sleepyyapril Dec 14, 2024
f0e4612
Fix Ripley Hydraulic Clamp (#1344)
Kyoth25f Dec 14, 2024
6dcb367
Automatic Changelog Update (#1344)
SimpleStation14 Dec 14, 2024
c4c3e42
Salvage Magnet UI and Character Switching Height/Width Bug Fix (#1347)
sleepyyapril Dec 14, 2024
8ff7021
Automatic Changelog Update (#1347)
SimpleStation14 Dec 14, 2024
2a7a471
Update Credits (#1350)
github-actions[bot] Dec 15, 2024
3aa430f
Fix Bartender Mosin (#1337)
VMSolidus Dec 15, 2024
acec14d
Trait Purchasable Mentalic Powers (#1343)
VMSolidus Dec 15, 2024
adddc1d
Automatic Changelog Update (#1343)
SimpleStation14 Dec 15, 2024
59a55c9
Pointy Ears For Harpies And Arachne (#1348)
VMSolidus Dec 15, 2024
99d6169
Automatic Changelog Update (#1348)
SimpleStation14 Dec 15, 2024
4509a9d
Port Cosmatic Drift Arrivals (#1340)
VMSolidus Dec 15, 2024
9a1cda8
Automatic Changelog Update (#1340)
SimpleStation14 Dec 15, 2024
80f8348
More Dangerous Mindbreaking (#1249)
VMSolidus Dec 16, 2024
4d87be6
Automatic Changelog Update (#1249)
SimpleStation14 Dec 16, 2024
88edcd0
Redshirt And Brittle Bone Traits (#1352)
VMSolidus Dec 16, 2024
ed0e56a
Automatic Changelog Update (#1352)
SimpleStation14 Dec 16, 2024
f5d45d7
Jackboots Slowdown Mitigation (PORT) (#1342)
BlueHNT Dec 16, 2024
03dc85a
Automatic Changelog Update (#1342)
SimpleStation14 Dec 16, 2024
ec60940
Fix Redshirt & Brittle Bone Traits (#1355)
VMSolidus Dec 16, 2024
577126f
Example Hub Ad List (#1356)
VMSolidus Dec 17, 2024
a06b466
Saltern Update (#1357)
VMSolidus Dec 18, 2024
aab36bf
Automatic Changelog Update (#1357)
SimpleStation14 Dec 18, 2024
bf1b0d0
v237.3.0 (#1354)
sleepyyapril Dec 19, 2024
3c1ed56
Hotfix Saltern (#1359)
VMSolidus Dec 19, 2024
48413d6
Automatic Changelog Update (#1359)
SimpleStation14 Dec 19, 2024
452b911
Loadouts Debloating (Colorable Items) (#1364)
VMSolidus Dec 21, 2024
cd5a6f8
Automatic Changelog Update (#1364)
SimpleStation14 Dec 21, 2024
0674895
More Colorable Items (#1365)
VMSolidus Dec 21, 2024
cc1e52c
Automatic Changelog Update (#1365)
SimpleStation14 Dec 21, 2024
35c95a5
Make the EE Logo Match the Banner (#1361)
DEATHB4DEFEAT Dec 21, 2024
311b86e
Loadout Modular Functions (And Loadout Pets) (#1366)
VMSolidus Dec 22, 2024
18a751d
Automatic Changelog Update (#1366)
SimpleStation14 Dec 22, 2024
6fb1223
Plushies! (#1369)
juniwoofs Dec 22, 2024
5293b92
Automatic Changelog Update (#1369)
SimpleStation14 Dec 22, 2024
2fc1f25
Traits System Anticheat (#1358)
VMSolidus Dec 22, 2024
9d738c8
Automatic Changelog Update (#1358)
SimpleStation14 Dec 22, 2024
7f8d76e
Make Prisoner Not Shitter Role (#1341)
VMSolidus Dec 22, 2024
68cb9ea
Automatic Changelog Update (#1341)
SimpleStation14 Dec 22, 2024
a13d964
Fix Jittering (#1334)
sleepyyapril Dec 22, 2024
bfb32cf
Automatic Changelog Update (#1334)
SimpleStation14 Dec 22, 2024
dff8c69
Basic Soft-Crit Implementation (#1370)
VMSolidus Dec 26, 2024
9430b90
Automatic Changelog Update (#1370)
SimpleStation14 Dec 26, 2024
06b28fb
Another Saltern Update (#1372)
VMSolidus Dec 29, 2024
2500a39
Automatic Changelog Update (#1372)
SimpleStation14 Dec 29, 2024
6af79ea
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
Aidenkrz Dec 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More Trait Functions (PushMarkup & AddArmor) (#1253)
# Description

This PR effectively "Reworks" several of the Bionic Traits through use
of new modular TraitFunctions. These being,

**TraitPushDescription**: Ensures that an entity has the new
ExtendDescriptionComponent, then writes to said component.
ExtendDescriptionComponent serves as a new highly modular "One stop
shop" for any system wanting to add text to the shift-click examine
window. It even accepts arguments for text color, font size, and whether
or not a person must be standing within touching distance to "See" the
provided texts. It accepts arbitrarily any number of descriptions.


**TraitAddArmor**: This takes advantage of a new functionality for the
DamageableSystem, whereby entities are able to have more than one
DamageModifierSet. This allows arbitrarily any number of traits to add
as many modifier sets as desired, without fear of any compatibility
issues. These can be both negative and positive, and as Skubman has
pointed out, this can also be used to create negative traits that make a
character more vulnerable to a given damage type!

Additionally, most of the Bionics Traits have been reworked. CyberEyes
has been split into two modules, one for the base implant, and one for
the Flash Protection. Dermal Armor has been reworked using
TraitAddArmor, so that it no longer replaces your original modifier set,
and instead stacks multiplicatively with whatever your original species
modifier set was. Thus, it can now be taken by any species.

# TODO

<details><summary><h1>Media</h1></summary>
<p>

TraitPushDescription

![image](https://github.com/user-attachments/assets/4661671a-6f20-4cb1-9fad-41c36f7ad79e)

TraitAddArmor

![image](https://github.com/user-attachments/assets/bbc823e1-73bf-471d-b5f6-ef8cdf35c746)

</p>
</details>

# Changelog

:cl:
- add: Five new functions for the Trait System, AddArmor,
PushDescription, ModifyMobThresholds, AddSolutionContainer, and
ModifyStamina.
- tweak: CyberEyes Basic System has been split, now Flash Protection is
a separate module.
- add: Dermal Armor no longer replaces your original species damage
resistances. It now stacks multiplicatively with your original
resistances.
- tweak: Dermal Armor can now be taken by any species, not just Humans.
- add: Dermal Armor, and Bionic Arms can now be revealed by a close
examination. Shift click on someone within touching distance will reveal
if they have these "Obvious" cyberware.

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: Remuchi <72476615+Remuchi@users.noreply.github.com>
VMSolidus and Remuchi authored Nov 22, 2024
commit 29d2cb1ed85ab089d83c702f7405e938a0d9374c
137 changes: 137 additions & 0 deletions Content.Server/Traits/TraitSystem.Functions.cs
Original file line number Diff line number Diff line change
@@ -10,6 +10,14 @@
using Content.Server.Language;
using Content.Shared.Mood;
using Content.Server.NPC.Systems;
using Content.Shared.Traits.Assorted.Components;
using Content.Shared.Damage;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Mobs;
using Content.Shared.Damage.Components;

namespace Content.Server.Traits;

@@ -263,3 +271,132 @@ public override void OnPlayerSpawn(EntityUid uid,
vvm.WritePath(path, value);
}
}

/// Used for writing to an entity's ExtendDescriptionComponent. If one is not present, it will be added!
/// Use this to create traits that add special descriptions for when a character is shift-click examined.
[UsedImplicitly]
public sealed partial class TraitPushDescription : TraitFunction
{
[DataField, AlwaysPushInheritance]
public List<DescriptionExtension> DescriptionExtensions { get; private set; } = new();

public override void OnPlayerSpawn(EntityUid uid,
IComponentFactory factory,
IEntityManager entityManager,
ISerializationManager serializationManager)
{
entityManager.EnsureComponent<ExtendDescriptionComponent>(uid, out var descComp);
foreach (var descExtension in DescriptionExtensions)
descComp.DescriptionList.Add(descExtension);
}
}

[UsedImplicitly]
public sealed partial class TraitAddArmor : TraitFunction
{
/// <summary>
/// The list of prototype ID's of DamageModifierSets to be added to the enumerable damage modifiers of an entity.
/// </summary>
/// <remarks>
/// Dear Maintainer, I'm well aware that validating protoIds is a thing. Unfortunately, this is for a legacy system that doesn't have validated prototypes.
/// And refactoring the entire DamageableSystem is way the hell outside of the scope of the PR adding this function.
/// {FaridaIsCute.png} - Solidus
/// </remarks>
[DataField, AlwaysPushInheritance]
public List<string> DamageModifierSets { get; private set; } = new();

public override void OnPlayerSpawn(EntityUid uid,
IComponentFactory factory,
IEntityManager entityManager,
ISerializationManager serializationManager)
{
entityManager.EnsureComponent<DamageableComponent>(uid, out var damageableComponent);
foreach (var modifierSet in DamageModifierSets)
damageableComponent.DamageModifierSets.Add(modifierSet);
}
}

[UsedImplicitly]
public sealed partial class TraitAddSolutionContainer : TraitFunction
{
[DataField, AlwaysPushInheritance]
public Dictionary<string, SolutionComponent> Solutions { get; private set; } = new();

public override void OnPlayerSpawn(EntityUid uid,
IComponentFactory factory,
IEntityManager entityManager,
ISerializationManager serializationManager)
{
var solutionContainer = entityManager.System<SharedSolutionContainerSystem>();

foreach (var (containerKey, solution) in Solutions)
{
var hasSolution = solutionContainer.EnsureSolution(uid, containerKey, out Solution? newSolution);

if (!hasSolution)
return;

newSolution!.AddSolution(solution.Solution, null);
}
}
}

[UsedImplicitly]
public sealed partial class TraitModifyMobThresholds : TraitFunction
{
[DataField, AlwaysPushInheritance]
public int CritThresholdModifier;

[DataField, AlwaysPushInheritance]
public int DeadThresholdModifier;

public override void OnPlayerSpawn(EntityUid uid,
IComponentFactory factory,
IEntityManager entityManager,
ISerializationManager serializationManager)
{
if (!entityManager.TryGetComponent<MobThresholdsComponent>(uid, out var threshold))
return;

var thresholdSystem = entityManager.System<MobThresholdSystem>();
if (CritThresholdModifier != 0)
{
var critThreshold = thresholdSystem.GetThresholdForState(uid, MobState.Critical, threshold);
if (critThreshold != 0)
thresholdSystem.SetMobStateThreshold(uid, critThreshold + CritThresholdModifier, MobState.Critical);
}

if (DeadThresholdModifier != 0)
{
var deadThreshold = thresholdSystem.GetThresholdForState(uid, MobState.Dead, threshold);
if (deadThreshold != 0)
thresholdSystem.SetMobStateThreshold(uid, deadThreshold + DeadThresholdModifier, MobState.Dead);
}
}
}

[UsedImplicitly]
public sealed partial class TraitModifyStamina : TraitFunction
{
[DataField, AlwaysPushInheritance]
public float StaminaModifier;

[DataField, AlwaysPushInheritance]
public float DecayModifier;

[DataField, AlwaysPushInheritance]
public float CooldownModifier;

public override void OnPlayerSpawn(EntityUid uid,
IComponentFactory factory,
IEntityManager entityManager,
ISerializationManager serializationManager)
{
if (!entityManager.TryGetComponent<StaminaComponent>(uid, out var staminaComponent))
return;

staminaComponent.CritThreshold += StaminaModifier;
staminaComponent.Decay += DecayModifier;
staminaComponent.Cooldown += CooldownModifier;
}
}
6 changes: 6 additions & 0 deletions Content.Shared/Damage/Components/DamageableComponent.cs
Original file line number Diff line number Diff line change
@@ -40,6 +40,12 @@ public sealed partial class DamageableComponent : Component
[DataField("damageModifierSet", customTypeSerializer: typeof(PrototypeIdSerializer<DamageModifierSetPrototype>))]
public string? DamageModifierSetId;

/// <summary>
/// List of all Modifier Sets stored by this entity. The above single format is a deprecated function used only to support legacy yml.
/// </summary>
[DataField]
public List<string> DamageModifierSets = new();

/// <summary>
/// All the damage information is stored in this <see cref="DamageSpecifier"/>.
/// </summary>
7 changes: 7 additions & 0 deletions Content.Shared/Damage/Systems/DamageableSystem.cs
Original file line number Diff line number Diff line change
@@ -162,6 +162,13 @@ public void DamageChanged(EntityUid uid, DamageableComponent component, DamageSp
// TODO: We need to add a check to see if the given armor covers the targeted part (if any) to modify or not.
damage = DamageSpecifier.ApplyModifierSet(damage, modifierSet);
}

// From Solidus: If you are reading this, I owe you a more comprehensive refactor of this entire system.
if (damageable.DamageModifierSets.Count > 0)
foreach (var enumerableModifierSet in damageable.DamageModifierSets)
if (_prototypeManager.TryIndex<DamageModifierSetPrototype>(enumerableModifierSet, out var enumerableModifier))
damage = DamageSpecifier.ApplyModifierSet(damage, enumerableModifier);

var ev = new DamageModifyEvent(damage, origin, targetPart);
RaiseLocalEvent(uid.Value, ev);
damage = ev.Damage;
11 changes: 0 additions & 11 deletions Content.Shared/Traits/Assorted/Components/CyberEyesComponent.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Robust.Shared.Serialization;

namespace Content.Shared.Traits.Assorted.Components;

[Serializable, NetSerializable, DataDefinition]
public sealed partial class DescriptionExtension
{
[DataField]
public string Description = "";

[DataField]
public int FontSize = 12;

[DataField]
public string Color = "#ffffff";

[DataField]
public bool RequireDetailRange = true;
}

[RegisterComponent]
public sealed partial class ExtendDescriptionComponent : Component
{
/// <summary>
/// The list of all descriptions to add to an entity when examined at close range.
/// </summary>
[DataField]
public List<DescriptionExtension> DescriptionList = new();
}
21 changes: 0 additions & 21 deletions Content.Shared/Traits/Assorted/Systems/CyberEyesSystem.cs

This file was deleted.

27 changes: 27 additions & 0 deletions Content.Shared/Traits/Assorted/Systems/ExtendDescriptionSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Content.Shared.Examine;
using Content.Shared.Traits.Assorted.Components;

namespace Content.Shared.Traits.Assorted.Systems;

public sealed class ExtendDescriptionSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ExtendDescriptionComponent, ExaminedEvent>(OnExamined);
}

private void OnExamined(EntityUid uid, ExtendDescriptionComponent component, ExaminedEvent args)
{
if (component.DescriptionList.Count <= 0)
return;

foreach (var desc in component.DescriptionList)
{
if (!args.IsInDetailsRange && desc.RequireDetailRange)
continue;

args.PushMarkup($"[font size ={desc.FontSize}][color={desc.Color}]{Loc.GetString(desc.Description, ("entity", uid))}[/color][/font]");
}
}
}
2 changes: 2 additions & 0 deletions Resources/Locale/en-US/traits/misc.ftl
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
examine-cybereyes-message = {CAPITALIZE(POSS-ADJ($entity))} eyes shine with a faint inner light.
examine-dermal-armor-message = {CAPITALIZE(POSS-ADJ($entity))} skin seems to be made of a sturdy, yet flexible plastic.
examine-bionic-arm-message = {CAPITALIZE(POSS-ADJ($entity))} limbs emit an ever present faint chirp of servomotors.
11 changes: 8 additions & 3 deletions Resources/Locale/en-US/traits/traits.ftl
Original file line number Diff line number Diff line change
@@ -347,7 +347,7 @@ trait-description-AddictionNicotine =
trait-name-AnimalFriend = Animal Friend
trait-description-AnimalFriend =
You have a way with animals. You will never be attacked by animals, unless you attack them first.

trait-name-Liar = Pathological liar
trait-description-Liar = You can hardly bring yourself to tell the truth. Sometimes you lie anyway.

@@ -409,8 +409,13 @@ trait-description-DermalArmor =
trait-name-CyberEyes = Cyber-Eyes Basic System
trait-description-CyberEyes =
One or more of your eyes have been replaced with a highly modular mechanical ocular implant.
Their most basic functionality is to provide amelioration for weaknesses of the wearer's natural eyes,
but additionally these implants provide protection from bright flashes of light.
Their most basic functionality is to provide amelioration for weaknesses of the wearer's natural eyes.
The functionality of these implants can be extended by a variety of commercially available modules.

trait-name-FlareShielding = Cyber-Eyes Flare Shielding
trait-description-FlareShielding =
Your cybereyes have been fitted with a photochromic lense that automatically darkens in response to intense stimuli.
This provides substantial protection from bright flashes of light, such as those from welding arcs.

trait-name-CyberEyesSecurity = Cyber-Eyes SecHud
trait-description-CyberEyesSecurity =
2 changes: 1 addition & 1 deletion Resources/Prototypes/Traits/disabilities.yml
Original file line number Diff line number Diff line change
@@ -245,7 +245,7 @@
- Vulpkanin # This trait functions exactly as-is for the Vulpkanin trait.
- Shadowkin
functions:
- !type:TraitAddComponent
- !type:TraitReplaceComponent
components:
- type: Flashable
eyeDamageChance: 0.3
51 changes: 39 additions & 12 deletions Resources/Prototypes/Traits/physical.yml
Original file line number Diff line number Diff line change
@@ -450,12 +450,18 @@
inverted: true
jobs:
- Prisoner # Bionics should be "Confiscated" from long term prisoners.
- Gladiator
functions:
- !type:TraitAddComponent
components:
- type: Prying
speedModifier: 1
pryPowered: true
- !type:TraitPushDescription
descriptionExtensions:
- description: examine-bionic-arm-message
fontSize: 12
requireDetailRange: true

- type: trait
id: PlateletFactories
@@ -489,25 +495,26 @@
- type: trait
id: DermalArmor
category: Physical
points: -9
points: -6
requirements:
- !type:CharacterJobRequirement
inverted: true
jobs:
- Prisoner # Bionics should be "Confiscated" from long term prisoners.
- !type:CharacterSpeciesRequirement
species:
- Human
functions:
- !type:TraitReplaceComponent
components:
- type: Damageable
damageModifierSet: DermalArmor
- !type:TraitAddArmor
damageModifierSets:
- DermalArmor
- !type:TraitPushDescription
descriptionExtensions:
- description: examine-dermal-armor-message
fontSize: 12
requireDetailRange: true

- type: trait
id: CyberEyes
category: Physical
points: -8
points: -4
requirements:
- !type:CharacterJobRequirement
inverted: true
@@ -520,14 +527,34 @@
- Blindness
- Nearsighted
functions:
- !type:TraitRemoveComponent
- !type:TraitPushDescription
descriptionExtensions:
- description: examine-cybereyes-message
fontSize: 12
requireDetailRange: true
- !type:TraitReplaceComponent
components:
- type: Flashable
- type: Flashable # Effectively, removes any flash-vulnerability species traits.


- type: trait
id: FlareShielding
category: Physical
points: -4
requirements:
- !type:CharacterJobRequirement
inverted: true
jobs:
- Prisoner # Bionics should be "Confiscated" from long term prisoners.
- !type:CharacterTraitRequirement
traits:
- CyberEyes
functions:
- !type:TraitAddComponent
components:
- type: FlashImmunity
- type: EyeProtection
- type: CyberEyes


- type: trait
id: CyberEyesSecurity