mirror of
https://gitgud.io/AbstractConcept/rimworld-animations-patch.git
synced 2024-08-15 00:43:27 +00:00
v 2.0.0
This commit is contained in:
parent
fcf187c7dd
commit
38ec4f86c1
68 changed files with 846 additions and 1934 deletions
|
@ -32,6 +32,7 @@ namespace Rimworld_Animations_Patch
|
|||
Scribe_Values.Look(ref cellPosition, "cellPosition", default);
|
||||
}
|
||||
|
||||
// Used to find a place to have clothes thrown onto the floor
|
||||
public void GenerateFloorPosition(IntVec3 apparelCell, Vector2 apparelOffset = default)
|
||||
{
|
||||
Pawn pawn = apparel.Wearer;
|
||||
|
|
|
@ -16,12 +16,13 @@ namespace Rimworld_Animations_Patch
|
|||
public Graphic handGraphic = null;
|
||||
|
||||
public List<BodyPartRecord> hands = new List<BodyPartRecord>();
|
||||
public float sizeOfPenis = 0f;
|
||||
public float sizeOfBreasts = 0f;
|
||||
|
||||
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 int lastExclaimationTick = -1;
|
||||
private int exclaimationCoolDown = 90;
|
||||
|
||||
public BodyAddonData GetBodyAddonData(AlienPartGenerator.BodyAddon bodyAddon, bool isPortrait)
|
||||
{
|
||||
|
@ -62,25 +63,22 @@ namespace Rimworld_Animations_Patch
|
|||
{ kvp.Value?.UpdateVisibility(); }
|
||||
}
|
||||
|
||||
public void UpdateHands()
|
||||
public void UpdateBodyPartCountAndSize()
|
||||
{
|
||||
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"));
|
||||
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);
|
||||
sizeOfBreasts = hediffBreasts != null ? hediffBreasts.Severity : 0f;
|
||||
}
|
||||
|
||||
public int GetNumberOfHands()
|
||||
{
|
||||
if (hands.NullOrEmpty()) return 0;
|
||||
if (hands.Any() == false) return 0;
|
||||
|
||||
return hands.Count;
|
||||
}
|
||||
|
||||
public void TryToExclaim()
|
||||
{
|
||||
if (Find.TickManager.TicksGame > exclaimationCoolDown + lastExclaimationTick)
|
||||
{
|
||||
lastExclaimationTick = Find.TickManager.TicksGame;
|
||||
FleckMaker.ThrowMetaIcon(pawn.Position, pawn.Map, FleckDefOf.IncapIcon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue