Compare commits

...

3 Commits

Author SHA1 Message Date
Salacian d8f4441494 Merge branch 'non-selectable-anims' into 'master'
Added a way to make custom animation not selectable

See merge request c0ffeeeeeeee/rimworld-animations!9
2024-03-29 22:38:48 +00:00
Tory 3fb106e8f3 Updated Nyaron patch 2024-03-29 17:23:08 +00:00
Salacian 447c4d61b6 Added a field to the AnimationDef to prevent random selection 2023-02-21 01:25:23 +01:00
3 changed files with 16 additions and 1 deletions

View File

@ -15,6 +15,15 @@
</value>
</match>
</li>
<li Class="PatchOperationConditional">
<xpath>Defs/AlienRace.ThingDef_AlienRace[defName = "Alien_Nyaron"]/alienRace/generalSettings/alienPartGenerator/bodyAddons/li[bodyPartLabel="tail"]</xpath>
<match Class="PatchOperationAdd">
<xpath>/Defs/AlienRace.ThingDef_AlienRace[defName = "Alien_Nyaron"]/alienRace/generalSettings/alienPartGenerator/bodyAddons/li[bodyPartLabel="tail"]</xpath>
<value>
<drawnInBed>false</drawnInBed>
</value>
</match>
</li>
</operations>
</match>
</Operation>

View File

@ -13,6 +13,7 @@ namespace Rimworld_Animations {
public List<Actor> actors;
public int animationTimeTicks = 0; //do not set manually
public bool sounds = false;
public bool randomlySelectable = true;
public List<rjw.xxx.rjwSextype> sexTypes = null;
public List<String> interactionDefTypes = null;
public List<string> tags = new List<string>();

View File

@ -34,7 +34,12 @@ namespace Rimworld_Animations {
List<Pawn> localParticipants = new List<Pawn>(participants);
IEnumerable<AnimationDef> options = DefDatabase<AnimationDef>.AllDefs.Where((AnimationDef x) => {
if (!x.randomlySelectable)
{
if (AnimationSettings.debugMode)
Log.Message(x.defName.ToStringSafe() + " not selected -- isn't randomly selectable");
return false;
}
if (x.actors.Count != localParticipants.Count) {
if (AnimationSettings.debugMode)