diff --git a/Content.Server/Humanoid/Components/RandomHumanoidAppearanceComponent.cs b/Content.Server/Humanoid/Components/RandomHumanoidAppearanceComponent.cs
index 5efea024f4..3c46359073 100644
--- a/Content.Server/Humanoid/Components/RandomHumanoidAppearanceComponent.cs
+++ b/Content.Server/Humanoid/Components/RandomHumanoidAppearanceComponent.cs
@@ -1,5 +1,6 @@
using Content.Shared.Humanoid.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
+using Content.Shared.Humanoid.Markings; // Sunrise-Edit
namespace Content.Server.CharacterAppearance.Components;
@@ -7,8 +8,29 @@ namespace Content.Server.CharacterAppearance.Components;
public sealed partial class RandomHumanoidAppearanceComponent : Component
{
[DataField("randomizeName")] public bool RandomizeName = true;
+
///
/// After randomizing, sets the hair style to this, if possible
///
[DataField] public string? Hair = null;
-}
+
+ // Sunrise-Start
+ ///
+ /// Настраивает цвет кожи в HEX формате. Учитывайте что только бежевые и темные цвета могут подойти человекоподобным. Советую подбирать цвет прям в игре.
+ ///
+ [DataField]
+ public Color? SkinColor = null;
+
+ ///
+ /// Настраивает цвет волос в HEX формате
+ ///
+ [DataField]
+ public Color? HairColor = null;
+
+ ///
+ /// Настраивает цвет бороды в HEX формате
+ ///
+ [DataField]
+ public Color? FacialHairColor = null;
+ // Sunrise-End
+}
\ No newline at end of file
diff --git a/Content.Server/Humanoid/Systems/RandomHumanoidAppearanceSystem.cs b/Content.Server/Humanoid/Systems/RandomHumanoidAppearanceSystem.cs
index 2822fb69e1..1fbd02b00c 100644
--- a/Content.Server/Humanoid/Systems/RandomHumanoidAppearanceSystem.cs
+++ b/Content.Server/Humanoid/Systems/RandomHumanoidAppearanceSystem.cs
@@ -1,6 +1,7 @@
using Content.Server.CharacterAppearance.Components;
using Content.Shared.Humanoid;
using Content.Shared.Preferences;
+using Content.Shared.Humanoid.Markings; // Sunrise-Edit
namespace Content.Server.Humanoid.Systems;
@@ -33,5 +34,38 @@ public sealed class RandomHumanoidAppearanceSystem : EntitySystem
if (component.RandomizeName)
_metaData.SetEntityName(uid, profile.Name);
+
+ // Sunrise-Start
+ if (TryComp(uid, out var humanoidAppearance))
+ {
+ if (component.SkinColor != null)
+ _humanoid.SetSkinColor(uid, component.SkinColor.Value, humanoid: humanoidAppearance);
+
+ if (component.HairColor != null)
+ SetMarkingColor(uid, MarkingCategories.Hair, component.HairColor.Value, humanoidAppearance);
+
+ if (component.FacialHairColor != null) // Да, цвет бороды, йоу.
+ SetMarkingColor(uid, MarkingCategories.FacialHair, component.FacialHairColor.Value, humanoidAppearance);
+ }
+ // Sunrise-End
}
-}
+
+ // Sunrise-Start
+ private void SetMarkingColor(EntityUid uid, MarkingCategories category, Color color,
+ HumanoidAppearanceComponent humanoid)
+ {
+ if (!humanoid.MarkingSet.Markings.TryGetValue(category, out var markings))
+ return;
+
+ foreach (var marking in markings)
+ {
+ for (var i = 0; i < marking.MarkingColors.Count; i++)
+ {
+ marking.SetColor(i, color);
+ }
+ }
+
+ Dirty(uid, humanoid);
+ }
+ // Sunrise-End
+}
\ No newline at end of file
diff --git a/Content.Server/Polymorph/Systems/PolymorphSystem.cs b/Content.Server/Polymorph/Systems/PolymorphSystem.cs
index e305109ad5..0f94f70f67 100644
--- a/Content.Server/Polymorph/Systems/PolymorphSystem.cs
+++ b/Content.Server/Polymorph/Systems/PolymorphSystem.cs
@@ -22,6 +22,10 @@ using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
+// Sunrise-Start
+using Content.Shared.EntityEffects;
+using Content.Shared.Mind.Components;
+// Sunrise-End
namespace Content.Server.Polymorph.Systems;
@@ -183,6 +187,14 @@ public sealed partial class PolymorphSystem : EntitySystem
///
public EntityUid? PolymorphEntity(EntityUid uid, PolymorphConfiguration configuration)
{
+ // Sunrise-Start
+ if (configuration.BlockIfHasMind
+ && TryComp(uid, out var mindContainer)
+ && mindContainer.HasMind)
+ {
+ return null;
+ }
+ // Sunrise-End
// if it's already morphed, don't allow it again with this condition active.
if (!configuration.AllowRepeatedMorphs && HasComp(uid))
return null;
diff --git a/Content.Shared/Polymorph/PolymorphPrototype.cs b/Content.Shared/Polymorph/PolymorphPrototype.cs
index 07901b1857..812d016f51 100644
--- a/Content.Shared/Polymorph/PolymorphPrototype.cs
+++ b/Content.Shared/Polymorph/PolymorphPrototype.cs
@@ -140,6 +140,14 @@ public sealed partial record PolymorphConfiguration
///
[DataField]
public LocId? ExitPolymorphPopup = "polymorph-revert-popup-generic";
+
+ // Sunrise-Start
+ ///
+ /// Если true, полиморф будет заблокирован для сущностей с MindContainerComponent.HasMind
+ ///
+ [DataField(serverOnly: false)]
+ public bool BlockIfHasMind = false;
+ // Sunrise-End
}
public enum PolymorphInventoryChange : byte
diff --git a/Resources/Prototypes/_Sunrise/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/_Sunrise/Entities/Mobs/NPCs/animals.yml
index f21b2abd15..c56d88d59b 100644
--- a/Resources/Prototypes/_Sunrise/Entities/Mobs/NPCs/animals.yml
+++ b/Resources/Prototypes/_Sunrise/Entities/Mobs/NPCs/animals.yml
@@ -21,16 +21,16 @@
group: InferiorVulpkanin
- type: LizardAccent
- type: ReplacementAccent
- accent: kobold
+ accent: dog
- type: Speech
- speechSounds: Lizard
- speechVerb: Reptilian
- allowedEmotes: ['Thump']
+ speechSounds: Vulpkanin
+ speechVerb: Vulpkanin
+ allowedEmotes: ['Growl', 'Bark', 'Howl', 'Whines']
- type: Vocal
sounds:
- Male: MaleReptilian
- Female: FemaleReptilian
- Unsexed: MaleReptilian
+ Male: MaleVulpkanin
+ Female: FemaleVulpkanin
+ Unsexed: MaleVulpkanin
- type: BodyEmotes
soundsId: ReptilianBodyEmotes
- type: TypingIndicator
diff --git a/Resources/Prototypes/_Sunrise/Entities/Mobs/Player/felinid.yml b/Resources/Prototypes/_Sunrise/Entities/Mobs/Player/felinid.yml
index f1fbc9e22f..ca691ed719 100644
--- a/Resources/Prototypes/_Sunrise/Entities/Mobs/Player/felinid.yml
+++ b/Resources/Prototypes/_Sunrise/Entities/Mobs/Player/felinid.yml
@@ -12,6 +12,10 @@
components:
- type: RandomHumanoidAppearance
randomizeName: false
+ hair: HumanHairBigafro
+ skinColor: "#331500FF"
+ hairColor: "#331500FF"
+ facialHairColor: "#331500FF" #На случай если вдруг появится борода.
- type: NpcFactionMember
factions:
- Syndicate
diff --git a/Resources/Prototypes/_Sunrise/Entities/Mobs/Player/randomization-race.yml b/Resources/Prototypes/_Sunrise/Entities/Mobs/Player/randomization-race.yml
new file mode 100644
index 0000000000..58d94d41f6
--- /dev/null
+++ b/Resources/Prototypes/_Sunrise/Entities/Mobs/Player/randomization-race.yml
@@ -0,0 +1,73 @@
+- type: entity
+ parent: MobHuman
+ id: MobHumanRandomization
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: RandomHumanoidAppearance
+ randomizeName: false
+ skinColor: "#E5BDA0FF"
+
+- type: entity
+ parent: MobReptilian
+ id: MobReptilianRandomization
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: RandomHumanoidAppearance
+ randomizeName: false
+
+- type: entity
+ parent: MobTajaran
+ id: MobTajaranRandomization
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: RandomHumanoidAppearance
+ randomizeName: false
+
+- type: entity
+ parent: MobSlimePerson
+ id: MobSlimePersonRandomization
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: RandomHumanoidAppearance
+ randomizeName: false
+
+- type: entity
+ parent: MobMoth
+ id: MobMothRandomization
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: RandomHumanoidAppearance
+ randomizeName: false
+
+- type: entity
+ parent: MobSwine
+ id: MobSwineRandomization
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: RandomHumanoidAppearance
+ randomizeName: false
+
+- type: entity
+ parent: MobVox
+ id: MobVoxRandomization
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: RandomHumanoidAppearance
+ randomizeName: false
+
+- type: entity
+ parent: MobVulpkanin
+ id: MobVulpkaninRandomization
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: RandomHumanoidAppearance
+ randomizeName: false
+
+- type: entity
+ parent: MobFelinid
+ id: MobFelinidRandomization
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: RandomHumanoidAppearance
+ randomizeName: false
+ skinColor: "#E5BDA0FF"
\ No newline at end of file
diff --git a/Resources/Prototypes/_Sunrise/Entities/Objects/Specific/rehydrateable.yml b/Resources/Prototypes/_Sunrise/Entities/Objects/Specific/rehydrateable.yml
index 320aa4695f..719226b6f0 100644
--- a/Resources/Prototypes/_Sunrise/Entities/Objects/Specific/rehydrateable.yml
+++ b/Resources/Prototypes/_Sunrise/Entities/Objects/Specific/rehydrateable.yml
@@ -41,4 +41,4 @@
components:
- type: Rehydratable
possibleSpawns:
- - MobFelinid
\ No newline at end of file
+ - MobFelinidRandomization
\ No newline at end of file
diff --git a/Resources/Prototypes/_Sunrise/Polymorphs/polymorph.yml b/Resources/Prototypes/_Sunrise/Polymorphs/polymorph.yml
index 4aa9a5a287..121bcce02d 100644
--- a/Resources/Prototypes/_Sunrise/Polymorphs/polymorph.yml
+++ b/Resources/Prototypes/_Sunrise/Polymorphs/polymorph.yml
@@ -11,81 +11,89 @@
- type: polymorph
id: PermanentlyHuman
configuration:
- entity: MobHuman
+ entity: MobHumanRandomization
forced: true
transferName: true
inventory: Transfer
revertOnCrit: false
revertOnDeath: false
+ blockIfHasMind: true
- type: polymorph
id: PermanentlyReptilian
configuration:
- entity: MobReptilian
+ entity: MobReptilianRandomization
forced: true
transferName: true
inventory: Transfer
revertOnCrit: false
revertOnDeath: false
+ blockIfHasMind: true
- type: polymorph
id: PermanentlyTajaran
configuration:
- entity: MobTajaran
+ entity: MobTajaranRandomization
forced: true
transferName: true
inventory: Transfer
revertOnCrit: false
revertOnDeath: false
allowRepeatedMorphs: true
+ blockIfHasMind: true
- type: polymorph
id: PermanentlySlime
configuration:
- entity: MobSlimePerson
+ entity: MobSlimePersonRandomization
forced: true
transferName: true
revertOnCrit: false
revertOnDeath: false
+ blockIfHasMind: true
- type: polymorph
id: PermanentlyMoth
configuration:
- entity: MobMoth
+ entity: MobMothRandomization
forced: true
transferName: true
inventory: Transfer
revertOnCrit: false
revertOnDeath: false
+ blockIfHasMind: true
- type: polymorph
id: PermanentlySwine
configuration:
- entity: MobSwine
+ entity: MobSwineRandomization
forced: true
transferName: true
inventory: Transfer
revertOnCrit: false
revertOnDeath: false
+ blockIfHasMind: true
- type: polymorph
id: PermanentlyVox
configuration:
- entity: MobVox
+ entity: MobVoxRandomization
forced: true
transferName: true
revertOnCrit: false
revertOnDeath: false
+ blockIfHasMind: true
- type: polymorph
id: PermanentlyVulpkanin
configuration:
- entity: MobVulpkanin
+ entity: MobVulpkaninRandomization
forced: true
- transferName: true
+ transferName: true
inventory: Transfer
revertOnCrit: false
revertOnDeath: false
+ blockIfHasMind: true
# TODO: Генетика
#- type: polymorph
diff --git a/Resources/Prototypes/_Sunrise/Reagents/medicine.yml b/Resources/Prototypes/_Sunrise/Reagents/medicine.yml
index 75f36469b2..e69de29bb2 100644
--- a/Resources/Prototypes/_Sunrise/Reagents/medicine.yml
+++ b/Resources/Prototypes/_Sunrise/Reagents/medicine.yml
@@ -1,67 +0,0 @@
-- type: reagent
- id: Darvinium
- name: reagent-name-darvinium
- group: Medicine
- desc: reagent-desc-darvinium
- physicalDesc: reagent-physical-desc-glowing
- color: "#59b23a"
- metabolisms:
- Medicine:
- metabolismRate: 250
- effects:
- - !type:Polymorph
- prototype: PermanentlyHuman
- conditions:
- - !type:OrganType
- type: Primate
- - !type:ReagentThreshold
- min: 5
- - !type:Polymorph
- prototype: PermanentlyReptilian
- conditions:
- - !type:OrganType
- type: Kobold
- - !type:ReagentThreshold
- min: 5
- - !type:Polymorph
- prototype: PermanentlyTajaran
- conditions:
- - !type:OrganType
- type: Felinid
- - !type:ReagentThreshold
- min: 5
- - !type:Polymorph
- prototype: PermanentlySlime
- conditions:
- - !type:OrganType
- type: WildSlime
- - !type:ReagentThreshold
- min: 5
- - !type:Polymorph
- prototype: PermanentlyMoth
- conditions:
- - !type:OrganType
- type: Mothroach
- - !type:ReagentThreshold
- min: 5
- - !type:Polymorph
- prototype: PermanentlySwine
- conditions:
- - !type:OrganType
- type: Pig
- - !type:ReagentThreshold
- min: 5
- - !type:Polymorph
- prototype: PermanentlyVox
- conditions:
- - !type:OrganType
- type: Chiken
- - !type:ReagentThreshold
- min: 5
- - !type:Polymorph
- prototype: PermanentlyVulpkanin
- conditions:
- - !type:OrganType
- type: InferiorVulpkanin
- - !type:ReagentThreshold
- min: 5
\ No newline at end of file
diff --git a/Resources/Prototypes/_Sunrise/Reagents/special.yml b/Resources/Prototypes/_Sunrise/Reagents/special.yml
new file mode 100644
index 0000000000..f4ccbbc6c0
--- /dev/null
+++ b/Resources/Prototypes/_Sunrise/Reagents/special.yml
@@ -0,0 +1,67 @@
+- type: reagent
+ id: Darvinium
+ name: reagent-name-darvinium
+ group: Special
+ desc: reagent-desc-darvinium
+ physicalDesc: reagent-physical-desc-glowing
+ color: "#59b23a"
+ metabolisms:
+ Medicine:
+ metabolismRate: 250
+ effects:
+ - !type:Polymorph
+ prototype: PermanentlyHuman
+ conditions:
+ - !type:OrganType
+ type: Primate
+ - !type:ReagentThreshold
+ min: 5
+ - !type:Polymorph
+ prototype: PermanentlyReptilian
+ conditions:
+ - !type:OrganType
+ type: Kobold
+ - !type:ReagentThreshold
+ min: 5
+ - !type:Polymorph
+ prototype: PermanentlyTajaran
+ conditions:
+ - !type:OrganType
+ type: Felinid
+ - !type:ReagentThreshold
+ min: 5
+ - !type:Polymorph
+ prototype: PermanentlySlime
+ conditions:
+ - !type:OrganType
+ type: WildSlime
+ - !type:ReagentThreshold
+ min: 5
+ - !type:Polymorph
+ prototype: PermanentlyMoth
+ conditions:
+ - !type:OrganType
+ type: Mothroach
+ - !type:ReagentThreshold
+ min: 5
+ - !type:Polymorph
+ prototype: PermanentlySwine
+ conditions:
+ - !type:OrganType
+ type: Pig
+ - !type:ReagentThreshold
+ min: 5
+ - !type:Polymorph
+ prototype: PermanentlyVox
+ conditions:
+ - !type:OrganType
+ type: Chiken
+ - !type:ReagentThreshold
+ min: 5
+ - !type:Polymorph
+ prototype: PermanentlyVulpkanin
+ conditions:
+ - !type:OrganType
+ type: InferiorVulpkanin
+ - !type:ReagentThreshold
+ min: 5
\ No newline at end of file
diff --git a/Resources/Textures/_Sunrise/Mobs/Animals/inferior_vulpkanin.rsi/inferior_vulpkanin.png b/Resources/Textures/_Sunrise/Mobs/Animals/inferior_vulpkanin.rsi/inferior_vulpkanin.png
index a198b4cbb1..bc396fff3c 100644
Binary files a/Resources/Textures/_Sunrise/Mobs/Animals/inferior_vulpkanin.rsi/inferior_vulpkanin.png and b/Resources/Textures/_Sunrise/Mobs/Animals/inferior_vulpkanin.rsi/inferior_vulpkanin.png differ