mirror of
				https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
				synced 2024-08-15 00:43:45 +00:00 
			
		
		
		
	mod options should save on game exit + anim tweaks
This commit is contained in:
		
							parent
							
								
									31dd3719a1
								
							
						
					
					
						commit
						02de084521
					
				
					 5 changed files with 16 additions and 7 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -465,7 +465,6 @@
 | 
			
		|||
        <defNames>
 | 
			
		||||
          <li>Human</li>
 | 
			
		||||
        </defNames>
 | 
			
		||||
        <initiator>true</initiator>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li>
 | 
			
		||||
        <defNames>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -158,6 +158,7 @@ namespace Rimworld_Animations {
 | 
			
		|||
            if (animTicks < anim.animationTimeTicks) {
 | 
			
		||||
                tickStage();
 | 
			
		||||
            } else {
 | 
			
		||||
 | 
			
		||||
                isAnimating = false;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -175,6 +176,10 @@ namespace Rimworld_Animations {
 | 
			
		|||
                clipPercent = 0;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if(curStage >= anim.animationStages.Count && animTicks < anim.animationTimeTicks && pawn.jobs.curDriver is JobDriver_SexBaseInitiator) {
 | 
			
		||||
                pawn.jobs.curDriver.ReadyForNextToil();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            tickClip();
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,6 +8,7 @@ using System.Text;
 | 
			
		|||
using System.Threading.Tasks;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using Verse;
 | 
			
		||||
using AlienRace;
 | 
			
		||||
 | 
			
		||||
namespace Rimworld_Animations {
 | 
			
		||||
    [StaticConstructorOnStartup]
 | 
			
		||||
| 
						 | 
				
			
			@ -41,17 +42,17 @@ namespace Rimworld_Animations {
 | 
			
		|||
		public static bool Prefix_AnimateHeadAddons(bool portrait, Vector3 vector, Pawn pawn, Quaternion quat, Rot4 rotation, bool invisible) {
 | 
			
		||||
 | 
			
		||||
			if (portrait || pawn.TryGetComp<CompBodyAnimator>() == null || !pawn.TryGetComp<CompBodyAnimator>().isAnimating) return true;
 | 
			
		||||
			if (!(pawn.def is AlienRace.ThingDef_AlienRace alienProps) || invisible) return false;
 | 
			
		||||
			if (!(pawn.def is ThingDef_AlienRace alienProps) || invisible) return false;
 | 
			
		||||
 | 
			
		||||
			List<AlienRace.AlienPartGenerator.BodyAddon> addons = alienProps.alienRace.generalSettings.alienPartGenerator.bodyAddons;
 | 
			
		||||
			AlienRace.AlienPartGenerator.AlienComp alienComp = pawn.GetComp<AlienRace.AlienPartGenerator.AlienComp>();
 | 
			
		||||
			List<AlienPartGenerator.BodyAddon> addons = alienProps.alienRace.generalSettings.alienPartGenerator.bodyAddons;
 | 
			
		||||
			AlienPartGenerator.AlienComp alienComp = pawn.GetComp<AlienPartGenerator.AlienComp>();
 | 
			
		||||
			CompBodyAnimator pawnAnimator = pawn.TryGetComp<CompBodyAnimator>();
 | 
			
		||||
 | 
			
		||||
			for (int i = 0; i < addons.Count; i++) {
 | 
			
		||||
				AlienRace.AlienPartGenerator.BodyAddon ba = addons[index: i];
 | 
			
		||||
				AlienPartGenerator.BodyAddon ba = addons[index: i];
 | 
			
		||||
				if (!ba.CanDrawAddon(pawn: pawn)) continue;
 | 
			
		||||
 | 
			
		||||
				AlienRace.AlienPartGenerator.RotationOffset offset;
 | 
			
		||||
				AlienPartGenerator.RotationOffset offset;
 | 
			
		||||
				if (ba.drawnInBed) {
 | 
			
		||||
 | 
			
		||||
					offset = pawnAnimator.headFacing == Rot4.South ?
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,13 +13,16 @@ namespace Rimworld_Animations {
 | 
			
		|||
        public static float shiverIntensity = 2f;
 | 
			
		||||
 | 
			
		||||
        public override void ExposeData() {
 | 
			
		||||
 | 
			
		||||
            base.ExposeData();
 | 
			
		||||
 | 
			
		||||
            Scribe_Values.Look(ref orgasmQuiver, "orgasmQuiver");
 | 
			
		||||
            Scribe_Values.Look(ref rapeShiver, "rapeShiver");
 | 
			
		||||
            Scribe_Values.Look(ref hearts, "heartsOnLovin");
 | 
			
		||||
            Scribe_Values.Look(ref soundOverride, "rjwAnimSoundOverride", true);
 | 
			
		||||
            Scribe_Values.Look(ref shiverIntensity, "shiverIntensity", 2f);
 | 
			
		||||
 | 
			
		||||
            base.ExposeData();
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -27,6 +30,7 @@ namespace Rimworld_Animations {
 | 
			
		|||
    public class RJW_Animations : Mod {
 | 
			
		||||
 | 
			
		||||
        public RJW_Animations(ModContentPack content) : base(content) {
 | 
			
		||||
            GetSettings<AnimationSettings>();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void DoSettingsWindowContents(Rect inRect) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue