Skip to content

Commit

Permalink
Ok can't do it between species
Browse files Browse the repository at this point in the history
That requires something way more complex
  • Loading branch information
TheGrimbeeper committed Dec 25, 2024
1 parent f3974aa commit 873c949
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,4 @@ public sealed partial class ScrambleDNAArtifactComponent : Component
/// </summary>
[DataField("count"), ViewVariables(VVAccess.ReadWrite)]
public int Count = 1;

/// <summary>
/// Force scrambling to respect initial species
/// </summary>
[DataField("withinSpecies"), ViewVariables(VVAccess.ReadWrite)]
public bool WithinSpecies = true;

/// <summary>
/// if WithinSpecies is false, what species cannot be rolled
/// </summary>
[DataField("excludedSpecies"), ViewVariables(VVAccess.ReadWrite)]
public HashSet<string>? ExcludedSpecies = null;


}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private void ScrambleTargetDNA(EntityUid target, ScrambleDNAArtifactComponent co
{
if (TryComp<HumanoidAppearanceComponent>(target, out var humanoid))
{
var newProfile = (component.WithinSpecies ? HumanoidCharacterProfile.RandomWithSpecies(humanoid.Species) : HumanoidCharacterProfile.Random(component.ExcludedSpecies));
var newProfile = (HumanoidCharacterProfile.RandomWithSpecies(humanoid.Species));
_humanoidAppearance.LoadProfile(target, newProfile, humanoid);
_metaData.SetEntityName(target, newProfile.Name);
if (TryComp<DnaComponent>(target, out var dna))
Expand Down
1 change: 0 additions & 1 deletion Resources/Prototypes/XenoArch/Effects/normal_effects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,6 @@
components:
- type: ScrambleDNAArtifact
range: 4
withinSpecies: true
count: 1

- type: artifactEffect
Expand Down

0 comments on commit 873c949

Please sign in to comment.