Merge branch 'master' into 'master'

Fix compatibility with VRE - Androids

See merge request Ed86/rjw-whoring!7
This commit is contained in:
FireSplitter 2024-03-17 19:11:20 +00:00
commit 1bb57cc215
4 changed files with 20 additions and 4 deletions

View file

@ -110,7 +110,7 @@ namespace rjwwhoring
{ {
//Rand.PopState(); //Rand.PopState();
//Rand.PushState(RJW_Multiplayer.PredictableSeed()); //Rand.PushState(RJW_Multiplayer.PredictableSeed());
if (xxx.isSingleOrPartnerNotHere(client) || xxx.is_lecher(client) || Rand.Value < 0.9f) if (xxx.IsSingleOrPartnersNotHere(client) || xxx.is_lecher(client) || Rand.Value < 0.9f)
{ {
if (client != LovePartnerRelationUtility.ExistingLovePartner(whore)) if (client != LovePartnerRelationUtility.ExistingLovePartner(whore))
{ //Exception for prisoners to account for PrisonerWhoreSexualEmergencyTree, which allows prisoners to try to hook up with anyone who's around (mostly other prisoners or warden) { //Exception for prisoners to account for PrisonerWhoreSexualEmergencyTree, which allows prisoners to try to hook up with anyone who's around (mostly other prisoners or warden)

View file

@ -287,7 +287,11 @@ namespace rjwwhoring
} }
public static bool IsAllowedForWhoringOwner(this Building_Bed bed) public static bool IsAllowedForWhoringOwner(this Building_Bed bed)
{ {
if (!bed.def.building.bed_humanlike || bed.Faction != Faction.OfPlayerSilentFail || bed.Medical || bed.def.defName.Contains("Guest")) if (!bed.def.building.bed_humanlike ||
bed.Faction != Faction.OfPlayerSilentFail ||
bed.Medical ||
bed.def.defName.Contains("Guest") ||
bed.def.defName.Contains("Android") )
{ {
return false; return false;
} }
@ -322,7 +326,13 @@ namespace rjwwhoring
{ {
if (WhoringBase.DataStore.GetBedData(bed).allowedForWhoringAll) if (WhoringBase.DataStore.GetBedData(bed).allowedForWhoringAll)
{ {
if (!bed.def.building.bed_humanlike || bed.Faction != Faction.OfPlayerSilentFail || bed.Medical || bed.ForPrisoners || bed.def.defName.Contains("Guest") || bed.GetRoom()?.IsPrisonCell == true) if (!bed.def.building.bed_humanlike ||
bed.Faction != Faction.OfPlayerSilentFail ||
bed.Medical ||
bed.ForPrisoners ||
bed.def.defName.Contains("Guest") ||
bed.def.defName.Contains("Android") ||
bed.GetRoom()?.IsPrisonCell == true)
{ {
return false; return false;
} }

View file

@ -52,7 +52,13 @@ namespace rjwwhoring
private static IEnumerable<Gizmo> Process(Building_Bed __instance, IEnumerable<Gizmo> __result) private static IEnumerable<Gizmo> Process(Building_Bed __instance, IEnumerable<Gizmo> __result)
{ {
var isPrisonCell = __instance.GetRoom()?.IsPrisonCell == true; var isPrisonCell = __instance.GetRoom()?.IsPrisonCell == true;
if (!__instance.ForPrisoners && !__instance.Medical && __instance.def.building.bed_humanlike && __instance.Faction == Faction.OfPlayerSilentFail && !__instance.def.defName.Contains("Guest") && !isPrisonCell) if (!__instance.ForPrisoners &&
!__instance.Medical &&
__instance.def.building.bed_humanlike &&
__instance.Faction == Faction.OfPlayerSilentFail &&
!__instance.def.defName.Contains("Guest") &&
!__instance.def.defName.Contains("Android") &&
!isPrisonCell)
{ {
yield return yield return