mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
code readability tweaks
This commit is contained in:
parent
a9ad5d6b15
commit
acfb864629
2 changed files with 2 additions and 14 deletions
Binary file not shown.
|
@ -53,8 +53,8 @@ namespace Rimworld_Animations {
|
|||
if (!ba.CanDrawAddon(pawn: pawn)) continue;
|
||||
|
||||
AlienPartGenerator.RotationOffset offset;
|
||||
if (ba.drawnInBed || ba.alignWithHead) {
|
||||
offset = pawnAnimator.headFacing == Rot4.South ?
|
||||
|
||||
offset = ((ba.drawnInBed || ba.alignWithHead) ? pawnAnimator.headFacing : rotation) == Rot4.South ?
|
||||
ba.offsets.south :
|
||||
pawnAnimator.headFacing == Rot4.North ?
|
||||
ba.offsets.north :
|
||||
|
@ -62,19 +62,7 @@ namespace Rimworld_Animations {
|
|||
ba.offsets.east :
|
||||
ba.offsets.west;
|
||||
|
||||
} else {
|
||||
|
||||
offset = rotation == Rot4.South ?
|
||||
ba.offsets.south :
|
||||
rotation == Rot4.North ?
|
||||
ba.offsets.north :
|
||||
rotation == Rot4.East ?
|
||||
ba.offsets.east :
|
||||
ba.offsets.west;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Vector2 bodyOffset = (portrait ? offset?.portraitBodyTypes ?? offset?.bodyTypes : offset?.bodyTypes)?.FirstOrDefault(predicate: to => to.bodyType == pawn.story.bodyType)
|
||||
?.offset ?? Vector2.zero;
|
||||
|
|
Loading…
Reference in a new issue