mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	First working Cum Spawning
This commit is contained in:
		
							parent
							
								
									d1129fece2
								
							
						
					
					
						commit
						13630e6e7c
					
				
					 1 changed files with 14 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -85,7 +85,20 @@ namespace RJW_Genes
 | 
			
		|||
 | 
			
		||||
        private void SpawnCum(Pawn pawn, IntVec3 cell, Map map)
 | 
			
		||||
        {
 | 
			
		||||
            ModLog.Warning($"This will be spawning cum for {pawn} at {cell}");
 | 
			
		||||
            ThingDef cumDef = DefDatabase<ThingDef>.GetNamed("GatheredCum", true);
 | 
			
		||||
 | 
			
		||||
            Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.rjw_genes_filled_living_cumbucket);
 | 
			
		||||
            if (hediff == null)
 | 
			
		||||
            {
 | 
			
		||||
                ModLog.Warning($"{pawn} has the JobDriver_ProcessCumbucket but does not have the Hediff for filled cumbucket.");
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Thing cum = ThingMaker.MakeThing(cumDef);
 | 
			
		||||
            cum.Position = cell;
 | 
			
		||||
            int stacks = Math.Max(1, (int)(hediff.Severity * 3));
 | 
			
		||||
            cum.stackCount = stacks;
 | 
			
		||||
            cum.SpawnSetup(map, false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private int ticksLeft;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue