mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-15 03:31:38 +01:00
# Resolved Conflicts: # .github/workflows/publish.yml # Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs # Content.Server/Administration/Systems/BwoinkSystem.cs # Content.Server/Corvax/StationGoal/StationGoalPaperSystem.cs # Content.Server/DetailExaminable/DetailExaminableystem.cs # Content.Server/GameTicking/GameTicker.Spawning.cs # Content.Server/Ghost/GhostSystem.cs # Content.Server/Light/EntitySystems/PoweredLightSystem.cs # Content.Server/Station/Systems/StationSpawningSystem.cs # Content.Server/Store/Systems/StoreSystem.Listings.cs # Content.Server/Store/Systems/StoreSystem.Ui.cs # Content.Shared.Database/LogType.cs # Content.Shared/Damage/Systems/StaminaSystem.cs # Content.Shared/Eye/VisibilityFlags.cs # Content.Shared/Humanoid/Markings/MarkingCategories.cs # Content.Shared/Humanoid/NamingSystem.cs # Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs # Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs # Directory.Packages.props # Resources/Audio/Lobby/attributions.yml # Resources/Credits/GitHub.txt # Resources/Locale/ru-RU/ghost/roles/ghost-role-component.ftl # Resources/Prototypes/Corvax/Reagents/Consumable/Drink/alcohol.yml # Resources/Prototypes/Corvax/lobbyscreens.yml # Resources/Prototypes/Entities/Mobs/Species/base.yml # Resources/Prototypes/Entities/Mobs/Species/moth.yml # Resources/Prototypes/Entities/Objects/Tools/toolbox.yml # Resources/Prototypes/Entities/Objects/Weapons/Melee/sledgehammer.yml # Resources/Prototypes/Entities/Structures/Shuttles/cannons.yml # Resources/Prototypes/GameRules/events.yml # Resources/Prototypes/Reagents/medicine.yml # Resources/Prototypes/Roles/Jobs/Security/warden.yml # Resources/Prototypes/SoundCollections/lobby.yml # Resources/Prototypes/Species/arachnid.yml # Resources/Prototypes/Species/diona.yml # Resources/Prototypes/Species/moth.yml # Resources/Prototypes/Species/reptilian.yml # Resources/Prototypes/Species/vox.yml # Resources/Prototypes/Voice/speech_emotes.yml # Resources/Prototypes/game_presets.yml # Resources/Prototypes/secret_weights.yml # Resources/Textures/Corvax/LobbyScreens/attributions.yml # Resources/Textures/Interface/Misc/job_icons.rsi/meta.json
141 lines
4.7 KiB
C#
141 lines
4.7 KiB
C#
using Content.Shared.Corvax.TTS;
|
|
using Content.Shared.Humanoid.Markings;
|
|
using Content.Shared.Humanoid.Prototypes;
|
|
using Content.Shared.Inventory;
|
|
using Robust.Shared.Enums;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Shared.Humanoid;
|
|
|
|
[NetworkedComponent, RegisterComponent, AutoGenerateComponentState(true)]
|
|
public sealed partial class HumanoidAppearanceComponent : Component
|
|
{
|
|
public MarkingSet ClientOldMarkings = new();
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public MarkingSet MarkingSet = new();
|
|
|
|
[DataField]
|
|
public Dictionary<HumanoidVisualLayers, HumanoidSpeciesSpriteLayer> BaseLayers = new();
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public HashSet<HumanoidVisualLayers> PermanentlyHidden = new();
|
|
|
|
// Couldn't these be somewhere else?
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public Gender Gender;
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public int Age = 18;
|
|
|
|
// WL-Height-Start
|
|
[DataField("height")]
|
|
[ViewVariables] public int Height = 165;
|
|
// WL-Height-End
|
|
|
|
/// <summary>
|
|
/// Any custom base layers this humanoid might have. See:
|
|
/// limb transplants (potentially), robotic arms, etc.
|
|
/// Stored on the server, this is merged in the client into
|
|
/// all layer settings.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public Dictionary<HumanoidVisualLayers, CustomBaseLayerInfo> CustomBaseLayers = new();
|
|
|
|
/// <summary>
|
|
/// Current species. Dictates things like base body sprites,
|
|
/// base humanoid to spawn, etc.
|
|
/// </summary>
|
|
[DataField(required: true), AutoNetworkedField]
|
|
public ProtoId<SpeciesPrototype> Species { get; set; }
|
|
|
|
// Corvax-TTS-Start
|
|
/// <summary>
|
|
/// Current voice. Used for correct cloning.
|
|
/// </summary>
|
|
[DataField("voice")]
|
|
public ProtoId<TTSVoicePrototype> Voice { get; set; } = SharedHumanoidAppearanceSystem.DefaultVoice;
|
|
// Corvax-TTS-End
|
|
|
|
/// <summary>
|
|
/// The initial profile and base layers to apply to this humanoid.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<HumanoidProfilePrototype>? Initial { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Skin color of this humanoid.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public Color SkinColor { get; set; } = Color.FromHex("#C0967F");
|
|
|
|
/// <summary>
|
|
/// A map of the visual layers currently hidden to the equipment
|
|
/// slots that are currently hiding them. This will affect the base
|
|
/// sprite on this humanoid layer, and any markings that sit above it.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public Dictionary<HumanoidVisualLayers, SlotFlags> HiddenLayers = new();
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public Sex Sex = Sex.Male;
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public Color EyeColor = Color.Brown;
|
|
|
|
/// <summary>
|
|
/// Hair color of this humanoid. Used to avoid looping through all markings
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadOnly)]
|
|
public Color? CachedHairColor;
|
|
|
|
/// <summary>
|
|
/// Facial Hair color of this humanoid. Used to avoid looping through all markings
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadOnly)]
|
|
public Color? CachedFacialHairColor;
|
|
|
|
/// <summary>
|
|
/// Which layers of this humanoid that should be hidden on equipping a corresponding item..
|
|
/// </summary>
|
|
[DataField]
|
|
public HashSet<HumanoidVisualLayers> HideLayersOnEquip = [HumanoidVisualLayers.Hair];
|
|
|
|
/// <summary>
|
|
/// Which markings the humanoid defaults to when nudity is toggled off.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<MarkingPrototype>? UndergarmentTop = new ProtoId<MarkingPrototype>("UndergarmentTopTanktop");
|
|
|
|
[DataField]
|
|
public ProtoId<MarkingPrototype>? UndergarmentBottom = new ProtoId<MarkingPrototype>("UndergarmentBottomBoxers");
|
|
}
|
|
|
|
[DataDefinition]
|
|
[Serializable, NetSerializable]
|
|
public readonly partial struct CustomBaseLayerInfo
|
|
{
|
|
public CustomBaseLayerInfo(string? id, Color? color = null)
|
|
{
|
|
DebugTools.Assert(id == null || IoCManager.Resolve<IPrototypeManager>().HasIndex<HumanoidSpeciesSpriteLayer>(id));
|
|
Id = id;
|
|
Color = color;
|
|
}
|
|
|
|
/// <summary>
|
|
/// ID of this custom base layer. Must be a <see cref="HumanoidSpeciesSpriteLayer"/>.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<HumanoidSpeciesSpriteLayer>? Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// Color of this custom base layer. Null implies skin colour if the corresponding <see cref="HumanoidSpeciesSpriteLayer"/> is set to match skin.
|
|
/// </summary>
|
|
[DataField]
|
|
public Color? Color { get; init; }
|
|
}
|