mirror of
				https://github.com/amevarashi/RJW-Sexperience.git
				synced 2024-08-14 23:54:08 +00:00 
			
		
		
		
	Prisoners use buckets to clean themselves
This commit is contained in:
		
							parent
							
								
									cfee907258
								
							
						
					
					
						commit
						9e21992d9b
					
				
					 2 changed files with 46 additions and 0 deletions
				
			
		| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="utf-8" ?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<Defs>
 | 
				
			||||||
 | 
					    <ThinkTreeDef>
 | 
				
			||||||
 | 
					        <defName>CleanSelfWithBucket</defName>
 | 
				
			||||||
 | 
					        <insertTag>Humanlike_PostDuty</insertTag>
 | 
				
			||||||
 | 
					        <insertPriority>100</insertPriority>
 | 
				
			||||||
 | 
					        <thinkRoot Class="ThinkNode_Priority">
 | 
				
			||||||
 | 
					            <subNodes>
 | 
				
			||||||
 | 
					                <li Class="ThinkNode_ConditionalPrisoner">
 | 
				
			||||||
 | 
					                    <leaveJoinableLordIfIssuesJob>true</leaveJoinableLordIfIssuesJob>
 | 
				
			||||||
 | 
					                    <subNodes>
 | 
				
			||||||
 | 
					                        <li Class="RJWSexperienceCum.JobGiver_CleanSelfWithBucket"/>
 | 
				
			||||||
 | 
					                    </subNodes>
 | 
				
			||||||
 | 
					                </li>
 | 
				
			||||||
 | 
					            </subNodes>
 | 
				
			||||||
 | 
					        </thinkRoot>
 | 
				
			||||||
 | 
					    </ThinkTreeDef>
 | 
				
			||||||
 | 
					</Defs>
 | 
				
			||||||
							
								
								
									
										27
									
								
								Source/RJWSexperienceCum/JobGiver_CleanSelfWithBucket.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								Source/RJWSexperienceCum/JobGiver_CleanSelfWithBucket.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,27 @@
 | 
				
			||||||
 | 
					using RJWSexperience;
 | 
				
			||||||
 | 
					using Verse;
 | 
				
			||||||
 | 
					using Verse.AI;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace RJWSexperienceCum
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class JobGiver_CleanSelfWithBucket : ThinkNode_JobGiver
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        protected override Job TryGiveJob(Pawn pawn)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
					            if (HediffDefOf.Hediff_CumController == null || !pawn.health.hediffSet.HasHediff(HediffDefOf.Hediff_CumController))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                // Nothing to clean
 | 
				
			||||||
 | 
					                return null;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								Building_CumBucket bucket = pawn.FindClosestBucket();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (bucket == null)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									return null;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return JobMaker.MakeJob(JobDefOf.CleanSelfwithBucket, pawn, bucket);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue