mirror of
				https://github.com/vegapnk/RJW-Genes.git
				synced 2024-08-15 00:23:31 +00:00 
			
		
		
		
	Changed Living Cumbucket behaviour
This commit is contained in:
		
							parent
							
								
									4ef1c95f1f
								
							
						
					
					
						commit
						c2f355f954
					
				
					 4 changed files with 32 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -97,15 +97,32 @@ namespace RJW_Genes
 | 
			
		|||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            //TODO: Fine-Tune the amount and how things calm down. 
 | 
			
		||||
            // Case 1: "Normal Severity", just puke out a bit of cum here and there. 
 | 
			
		||||
            if (hediff.Severity <= 10)
 | 
			
		||||
            {
 | 
			
		||||
                Thing cum = ThingMaker.MakeThing(cumDef);
 | 
			
		||||
                cum.Position = cell;
 | 
			
		||||
                int stacks = Math.Max(1, (int)(hediff.Severity * 1.5));
 | 
			
		||||
                stacks = Math.Min(stacks, 75); // 75 is the default max stacksize ...
 | 
			
		||||
                cum.stackCount = stacks;
 | 
			
		||||
                cum.SpawnSetup(map, false);
 | 
			
		||||
                hediff.Severity -= (stacks / 50);
 | 
			
		||||
            } else
 | 
			
		||||
            // Case 2: Reserviour mode, put out a lot of cum at once but less often. 
 | 
			
		||||
            {
 | 
			
		||||
                int stacks = Math.Max(1, (int)(hediff.Severity * 1.5));
 | 
			
		||||
 | 
			
		||||
            Thing cum = ThingMaker.MakeThing(cumDef);
 | 
			
		||||
            cum.Position = cell;
 | 
			
		||||
            int stacks = Math.Max(1, (int)(hediff.Severity * 1.5));
 | 
			
		||||
            stacks = Math.Min(stacks, 75); // 75 is the default max stacksize ...
 | 
			
		||||
            cum.stackCount = stacks;
 | 
			
		||||
            cum.SpawnSetup(map, false);
 | 
			
		||||
            hediff.Severity -= (stacks / 50);
 | 
			
		||||
                while (stacks > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    Thing cum = ThingMaker.MakeThing(cumDef);
 | 
			
		||||
                    cum.Position = cell;
 | 
			
		||||
                    var curStacks = Math.Min(stacks, 75); // 75 is the default max stacksize ...
 | 
			
		||||
                    cum.stackCount = stacks;
 | 
			
		||||
                    cum.SpawnSetup(map, false);
 | 
			
		||||
                    hediff.Severity -= (curStacks / 50);
 | 
			
		||||
                    stacks -= curStacks;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private int ticksLeft;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue