mirror of
https://gitgud.io/AbstractConcept/rimworld-animations-patch.git
synced 2024-08-15 00:43:27 +00:00
v 1.2.1
This commit is contained in:
parent
8e6918ae70
commit
0fcdce6dc1
24 changed files with 122 additions and 226 deletions
|
@ -14,14 +14,21 @@ namespace Rimworld_Animations_Patch
|
|||
public Apparel apparel => base.parent as Apparel;
|
||||
public Vector3 position;
|
||||
public float rotation = 0f;
|
||||
|
||||
public bool isBeingWorn = true;
|
||||
public bool coversChest = false;
|
||||
public bool coversGroin = false;
|
||||
public bool coversBelly = false;
|
||||
public RimNudeDataStatus rimNudeDataStatus = RimNudeDataStatus.NotLoaded;
|
||||
|
||||
private IntVec3 cellPosition;
|
||||
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
|
||||
Scribe_Values.Look(ref position, "position", default);
|
||||
Scribe_Values.Look(ref rotation, "rotation", 0);
|
||||
Scribe_Values.Look(ref cellPosition, "cellPosition", default);
|
||||
}
|
||||
|
||||
|
@ -44,32 +51,5 @@ namespace Rimworld_Animations_Patch
|
|||
position = cellPosition.ToVector3() + offset + new Vector3(0.5f, AltitudeLayer.ItemImportant.AltitudeFor() - Mathf.Clamp(apparel.def.apparel.LastLayer.drawOrder/100000f, 0f, 1f), 0.5f);
|
||||
rotation = 120 * (-1f + 2f * Rand.Value);
|
||||
}
|
||||
|
||||
/*public bool IsBeingWorn()
|
||||
{
|
||||
Pawn pawn = apparel.Wearer;
|
||||
|
||||
if (apparel.def.apparel.wornGraphicPath.NullOrEmpty())
|
||||
{ return true; }
|
||||
|
||||
foreach (ApparelGraphicRecord record in pawn.Drawer.renderer.graphics.apparelGraphics)
|
||||
{
|
||||
if (record.sourceApparel == apparel)
|
||||
{ return true; }
|
||||
}
|
||||
|
||||
return false;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
//var methodInfo = AccessTools.Method(typeof(GenPlace), "TryFindPlaceSpotNear", null, null);
|
||||
//object[] parameters = new object[] { apparel.Wearer.Position, default(Rot4), apparel.Wearer.Map, apparel.Wearer, false, null, null };
|
||||
//object result = methodInfo.Invoke(null, parameters);
|
||||
|
||||
/*bool _result = (bool)result;
|
||||
if (_result)
|
||||
{
|
||||
bestSpot = (IntVec3)parameters[5];
|
||||
DebugMode.Message("Best position: " + bestSpot.ToString());
|
||||
}*/
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue