mirror of
https://gitgud.io/Stardust3D/rjw-patch-autopsy.git
synced 2024-08-15 00:43:41 +00:00
tmp
This commit is contained in:
parent
eeb61f1faa
commit
34522848ea
10 changed files with 135 additions and 126 deletions
|
@ -54,20 +54,20 @@ namespace RJW_patch_Autopsy
|
|||
//rjwArtificialThings.Count(), rjwNaturalDiffs.Count(), rjwArtificialThings.Count(), rjwArtificialDiffs.Count()));
|
||||
|
||||
//Simulate success chance scaled with skill etc.
|
||||
rjwNaturalThings.ToList().ForEach(t =>
|
||||
rjwNaturalThings.ForEach(t =>
|
||||
{
|
||||
if (Rand.Chance(Math.Min(skillChance, recipeInfo.NaturalChance))) results.Add(t);
|
||||
});
|
||||
rjwArtificialThings.ToList().ForEach(t =>
|
||||
rjwArtificialThings.ForEach(t =>
|
||||
{
|
||||
if (Rand.Chance(Math.Min(skillChance, recipeInfo.BionicChance))) results.Add(t);
|
||||
});
|
||||
|
||||
//Remove all parts that were tried to harves from the corpse
|
||||
rjwNaturalDiffs.ToList().ForEach(d => corpse.InnerPawn.health.RemoveHediff(d));
|
||||
rjwArtificialDiffs.ToList().ForEach(d => corpse.InnerPawn.health.RemoveHediff(d));
|
||||
//Remove all parts that were tried to harvest from the corpse
|
||||
rjwNaturalDiffs.ForEach(d => corpse.InnerPawn.health.RemoveHediff(d));
|
||||
rjwArtificialDiffs.ForEach(d => corpse.InnerPawn.health.RemoveHediff(d));
|
||||
|
||||
if (results.Count() > recipeInfo.PartNumber)
|
||||
if (results.Count > recipeInfo.PartNumber)
|
||||
{
|
||||
var random = new Random();
|
||||
__result = results.OrderBy(i => random.Next()).Take(recipeInfo.PartNumber);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue