mirror of
				https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
				synced 2024-08-15 00:43:45 +00:00 
			
		
		
		
	switched to tryparse to prevent errors, shrunk range of offset
This commit is contained in:
		
							parent
							
								
									12ca00fae6
								
							
						
					
					
						commit
						cc2626b20f
					
				
					 2 changed files with 6 additions and 4 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -57,13 +57,15 @@ namespace Rimworld_Animations {
 | 
				
			||||||
                        listingStandard.Label("Warning--You generally don't want to change human offsets, only alien offsets");
 | 
					                        listingStandard.Label("Warning--You generally don't want to change human offsets, only alien offsets");
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    offsetX = float.Parse(listingStandard.TextEntryLabeled("X Offset: ", offsetX.ToString()));
 | 
					                    bool mirrored = curPawn.TryGetComp<CompBodyAnimator>().Mirror;
 | 
				
			||||||
                    offsetX = listingStandard.Slider(offsetX, -3, 3);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    offsetZ = float.Parse(listingStandard.TextEntryLabeled("X Offset: ", offsetZ.ToString()));
 | 
					                    float.TryParse(listingStandard.TextEntryLabeled("X Offset: ", offsetX.ToString()), out offsetX);
 | 
				
			||||||
 | 
					                    offsetX = listingStandard.Slider(offsetX, -3 * (mirrored ? -1 : 1), 3 * (mirrored ? -1 : 1));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    float.TryParse(listingStandard.TextEntryLabeled("X Offset: ", offsetZ.ToString()), out offsetZ);
 | 
				
			||||||
                    offsetZ = listingStandard.Slider(offsetZ, -3, 3);
 | 
					                    offsetZ = listingStandard.Slider(offsetZ, -3, 3);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    rotation = float.Parse(listingStandard.TextEntryLabeled("X Offset: ", rotation.ToString()));
 | 
					                    float.TryParse(listingStandard.TextEntryLabeled("X Offset: ", rotation.ToString()), out rotation);
 | 
				
			||||||
                    rotation = listingStandard.Slider(rotation, -180, 180);
 | 
					                    rotation = listingStandard.Slider(rotation, -180, 180);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if(listingStandard.ButtonText("Reset All")) {
 | 
					                    if(listingStandard.ButtonText("Reset All")) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue