mirror of
https://gitgud.io/AbstractConcept/rimworld-animations-patch.git
synced 2024-08-15 00:43:27 +00:00
v2.0.0
This commit is contained in:
parent
38ec4f86c1
commit
ae95e34137
35 changed files with 242 additions and 612 deletions
|
@ -22,13 +22,20 @@ namespace Rimworld_Animations_Patch
|
|||
public Dictionary<AlienPartGenerator.BodyAddon, BodyAddonData> bodyAddonData = new Dictionary<AlienPartGenerator.BodyAddon, BodyAddonData>();
|
||||
public Dictionary<AlienPartGenerator.BodyAddon, BodyAddonData> bodyAddonDataPortraits = new Dictionary<AlienPartGenerator.BodyAddon, BodyAddonData>();
|
||||
|
||||
private Pawn pawn;
|
||||
private Pawn pawn { get { return parent as Pawn; } }
|
||||
private bool initialized;
|
||||
|
||||
public override void CompTick()
|
||||
{
|
||||
if (initialized == false)
|
||||
{
|
||||
pawn?.Drawer?.renderer?.graphics?.ResolveAllGraphics();
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
public BodyAddonData GetBodyAddonData(AlienPartGenerator.BodyAddon bodyAddon, bool isPortrait)
|
||||
{
|
||||
if (pawn == null)
|
||||
{ pawn = parent as Pawn; }
|
||||
|
||||
if (pawn == null || (pawn.Map != Find.CurrentMap && pawn.holdingOwner == null) || bodyAddon == null) return null;
|
||||
|
||||
if (isPortrait)
|
||||
|
@ -67,16 +74,16 @@ namespace Rimworld_Animations_Patch
|
|||
{
|
||||
hands = pawn?.health?.hediffSet?.GetNotMissingParts()?.Where(x => x.def.tags.Contains(BodyPartTagDefOf.ManipulationLimbCore))?.ToList();
|
||||
|
||||
Hediff hediffPenis = pawn?.health?.hediffSet?.hediffs?.FirstOrDefault(x => x.def.defName.Contains("penis") == true || x.def.defName.Contains("Penis"));
|
||||
Hediff hediffPenis = pawn?.health?.hediffSet?.hediffs?.FirstOrDefault(x => x.def.defName.Contains("penis", StringComparison.OrdinalIgnoreCase) == true);
|
||||
sizeOfPenis = hediffPenis != null ? hediffPenis.Severity : 0f;
|
||||
|
||||
Hediff hediffBreasts = pawn?.health?.hediffSet?.hediffs?.FirstOrDefault(x => x.def.defName.Contains("breasts") == true || x.def.defName.Contains("Breasts") == true);
|
||||
Hediff hediffBreasts = pawn?.health?.hediffSet?.hediffs?.FirstOrDefault(x => x.def.defName.Contains("breasts", StringComparison.OrdinalIgnoreCase) == true);
|
||||
sizeOfBreasts = hediffBreasts != null ? hediffBreasts.Severity : 0f;
|
||||
}
|
||||
|
||||
public int GetNumberOfHands()
|
||||
{
|
||||
if (hands.Any() == false) return 0;
|
||||
if (hands.NullOrEmpty()) return 0;
|
||||
|
||||
return hands.Count;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue