SetOrganColor(ent, ent.Comp.Profile.EyeColor);
else
SetOrganColor(ent, ent.Comp.Profile.SkinColor);
+
+ if (ent.Comp.SexStateOverrides is { } overrides && overrides.TryGetValue(data.Sex, out var state))
+ {
+ ent.Comp.Data.State = state;
+ SetOrganAppearance(ent, ent.Comp.Data);
+ }
}
private void OnMarkingsOrganApplyMarkings(Entity<VisualOrganMarkingsComponent> ent, ref BodyRelayedEvent<ApplyOrganMarkingsEvent> args)
[DataField(required: true), AutoNetworkedField, AlwaysPushInheritance]
public PrototypeLayerData Data;
+ /// <summary>
+ /// When applying a profile, if the sex is present in this dictionary, overrides the state of the data.
+ /// </summary>
+ [DataField]
+ public Dictionary<Sex, string>? SexStateOverrides;
+
[DataField, AutoNetworkedField]
public OrganProfileData Profile = new();
}
group: Human
- type: entity
- parent: [ OrganBaseTorso, OrganHumanExternal ]
+ parent: [ OrganBaseTorsoSexed, OrganBaseTorso, OrganHumanExternal ]
id: OrganHumanTorso
- type: entity
- parent: [ OrganBaseHead, OrganHumanExternal ]
+ parent: [ OrganBaseHeadSexed, OrganBaseHead, OrganHumanExternal ]
id: OrganHumanHead
- type: entity
sprite: Mobs/Species/Moth/parts.rsi
- type: entity
- parent: [ OrganBaseTorso, OrganMothExternal ]
+ parent: [ OrganBaseTorsoSexed, OrganBaseTorso, OrganMothExternal ]
id: OrganMothTorso
- type: entity
group: Reptilian
- type: entity
- parent: [ OrganBaseTorso, OrganReptilianExternal ]
+ parent: [ OrganBaseTorsoSexed, OrganBaseTorso, OrganReptilianExternal ]
id: OrganReptilianTorso
- type: entity
- parent: [ OrganBaseHead, OrganReptilianExternal ]
+ parent: [ OrganBaseHeadSexed, OrganBaseHead, OrganReptilianExternal ]
id: OrganReptilianHead
- type: entity
group: Skeleton
- type: entity
- parent: [ OrganBaseTorso, OrganSkeletonPersonExternal ]
+ parent: [ OrganBaseTorsoSexed, OrganBaseTorso, OrganSkeletonPersonExternal ]
id: OrganSkeletonPersonTorso
- type: entity
group: Slime
- type: entity
- parent: [ OrganBaseTorso, OrganSlimePersonExternal ]
+ parent: [ OrganBaseTorsoSexed, OrganBaseTorso, OrganSlimePersonExternal ]
id: OrganSlimePersonTorso
- type: entity
sprite: Mobs/Species/Vulpkanin/parts.rsi
- type: entity
- parent: [ OrganBaseTorso, OrganVulpkaninExternal ]
+ parent: [ OrganBaseTorsoSexed, OrganBaseTorso, OrganVulpkaninExternal ]
id: OrganVulpkaninTorso
- type: entity
- type: Organ
category: Torso
- type: Sprite
- state: torso_m
+ state: torso
- type: VisualOrgan
layer: enum.HumanoidVisualLayers.Chest
data:
- state: torso_m
+ state: torso
- type: VisualOrganMarkings
markingData:
layers:
- type: Organ
category: Head
- type: Sprite
- state: head_m
+ state: head
- type: VisualOrgan
layer: enum.HumanoidVisualLayers.Head
data:
- state: head_m
+ state: head
- type: VisualOrganMarkings
markingData:
layers:
components:
- type: Sprite
sprite: Mobs/Species/Human/organs.rsi
+
+- type: entity
+ id: OrganBaseHeadSexed
+ abstract: true
+ components:
+ - type: Sprite
+ state: head_m
+ - type: VisualOrgan
+ data:
+ state: head_m
+ sexStateOverrides:
+ Male: head_m
+ Female: head_f
+
+- type: entity
+ id: OrganBaseTorsoSexed
+ abstract: true
+ components:
+ - type: Sprite
+ state: torso_m
+ - type: VisualOrgan
+ data:
+ state: torso_m
+ sexStateOverrides:
+ Male: torso_m
+ Female: torso_f
femaleFirstNames: NamesDionaFirst
lastNames: NamesDionaLast
naming: TheFirstofLast
+ sexes:
+ - Unsexed
"name": "full"
},
{
- "name": "head_f",
- "directions": 4
- },
- {
- "name": "head_m",
+ "name": "head",
"directions": 4
},
{
"directions": 4
},
{
- "name": "torso_f",
- "directions": 4
- },
- {
- "name": "torso_m",
+ "name": "torso",
"directions": 4
},
{
"name": "full"
},
{
- "name": "head_f",
- "directions": 4
- },
- {
- "name": "head_m",
+ "name": "head",
"directions": 4
},
{
"directions": 4
},
{
- "name": "torso_f",
- "directions": 4
- },
- {
- "name": "torso_m",
+ "name": "torso",
"directions": 4
}
]
"name": "full"
},
{
- "name": "head_f",
- "directions": 4
- },
- {
- "name": "head_m",
+ "name": "head",
"directions": 4
},
{
"directions": 4
},
{
- "name": "torso_f",
- "directions": 4
- },
- {
- "name": "torso_m",
+ "name": "torso",
"directions": 4
}
]
"name": "full"
},
{
- "name": "head_f",
- "directions": 4
- },
- {
- "name": "head_m",
+ "name": "head",
"directions": 4
},
{
"name": "full"
},
{
- "name": "head_f",
- "directions": 4
- },
- {
- "name": "head_m",
+ "name": "head",
"directions": 4
},
{
"name": "full"
},
{
- "name": "head_f",
- "directions": 4
- },
- {
- "name": "head_m",
+ "name": "head",
"directions": 4
},
{
"name": "icon"
},
{
- "name": "head_f",
- "directions": 4
- },
- {
- "name": "head_m",
+ "name": "head",
"directions": 4
},
{