mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Check if partner died - but did not work fully
This commit is contained in:
parent
63480fb994
commit
02f57c2316
1 changed files with 13 additions and 11 deletions
|
@ -86,9 +86,8 @@ namespace RJW_Genes
|
||||||
instigator: damager, category: DamageInfo.SourceCategory.ThingOrUnknown,
|
instigator: damager, category: DamageInfo.SourceCategory.ThingOrUnknown,
|
||||||
hitPart: GetRandomOralBodyPartRecord(damaged, allow_for_inner_damage));
|
hitPart: GetRandomOralBodyPartRecord(damaged, allow_for_inner_damage));
|
||||||
|
|
||||||
|
DamageWorker.DamageResult result = DamageWorker.Apply(dInfo, damaged);
|
||||||
var result = DamageWorker.Apply(dInfo, damaged);
|
return CheckIfNeedsToAbortSexDriver(damaged, result);
|
||||||
return result.LastHitPart.IsMissingForPawn(damaged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case xxx.rjwSextype.Vaginal:
|
case xxx.rjwSextype.Vaginal:
|
||||||
|
@ -107,8 +106,8 @@ namespace RJW_Genes
|
||||||
instigator: damager, category: DamageInfo.SourceCategory.ThingOrUnknown,
|
instigator: damager, category: DamageInfo.SourceCategory.ThingOrUnknown,
|
||||||
hitPart: GetRandomGenitalBodyPartRecord(damaged, allow_for_inner_damage));
|
hitPart: GetRandomGenitalBodyPartRecord(damaged, allow_for_inner_damage));
|
||||||
|
|
||||||
var result = DamageWorker.Apply(dInfo, damaged);
|
DamageWorker.DamageResult result = DamageWorker.Apply(dInfo, damaged);
|
||||||
return result.LastHitPart.IsMissingForPawn(damaged);
|
return CheckIfNeedsToAbortSexDriver(damaged, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
case xxx.rjwSextype.Anal:
|
case xxx.rjwSextype.Anal:
|
||||||
|
@ -126,18 +125,21 @@ namespace RJW_Genes
|
||||||
instigator: damager, category: DamageInfo.SourceCategory.ThingOrUnknown,
|
instigator: damager, category: DamageInfo.SourceCategory.ThingOrUnknown,
|
||||||
hitPart: GetRandomAnalBodyPartRecord(damaged, allow_for_inner_damage));
|
hitPart: GetRandomAnalBodyPartRecord(damaged, allow_for_inner_damage));
|
||||||
|
|
||||||
|
DamageWorker.DamageResult result = DamageWorker.Apply(dInfo, damaged);
|
||||||
dInfo.SetApplyAllDamage(false);
|
return CheckIfNeedsToAbortSexDriver(damaged, result);
|
||||||
dInfo.SetAllowDamagePropagation(true);
|
|
||||||
|
|
||||||
var result = DamageWorker.Apply(dInfo, damaged);
|
|
||||||
return result.LastHitPart.IsMissingForPawn(damaged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default: return false;
|
default: return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool CheckIfNeedsToAbortSexDriver(Pawn damaged, DamageWorker.DamageResult result)
|
||||||
|
{
|
||||||
|
bool partner_killed = damaged.Dead;
|
||||||
|
bool part_destroyed = result.LastHitPart.IsMissingForPawn(damaged);
|
||||||
|
return partner_killed || part_destroyed;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks both pawns for their genes,
|
/// Checks both pawns for their genes,
|
||||||
/// and returns the pawn that has the rjw_genes_dangerous_genitalia def.
|
/// and returns the pawn that has the rjw_genes_dangerous_genitalia def.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue