mirror of
https://gitgud.io/BondageProjects/Bondage-College.git
synced 2025-04-25 09:49:15 +00:00
Replace PreferenceArousalAtLeast with explict mode checks
This commit is contained in:
parent
ca4f619072
commit
9b48f5dcac
3 changed files with 12 additions and 22 deletions
BondageClub
|
@ -116,6 +116,14 @@ const ArousalStutter = {
|
|||
* @returns {boolean|null}
|
||||
*/
|
||||
function PreferenceArousalIsInMode(character, modes) {
|
||||
// Special case for the Asylum GGTS rooms
|
||||
if (CurrentModule === "Online" && CurrentScreen === "ChatRoom" && ChatRoomGame === "GGTS" && ChatRoomSpace === "Asylum" && AsylumGGTSGetLevel(character) >= 4) {
|
||||
return (
|
||||
InventoryIsWorn(character, "FuturisticChastityBelt", "ItemPelvis")
|
||||
|| InventoryIsWorn(character, "FuturisticTrainingBelt", "ItemPelvis")
|
||||
|| InventoryIsWorn(character, "FuckMachine", "ItemDevices")
|
||||
);
|
||||
}
|
||||
if (character.ArousalSettings && character.ArousalSettings.Active)
|
||||
return modes.includes(character.ArousalSettings.Active);
|
||||
return false;
|
||||
|
@ -245,24 +253,6 @@ function PreferenceArousalGetVFXFilterSetting(character) {
|
|||
return ArousalVFXFilter.Light;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares the arousal preference level and returns TRUE if that level is met, or an higher level is met
|
||||
* @param {Character} C - The player who performs the sexual activity
|
||||
* @param {string} Level - The name of the level ("Inactive", "NoMeter", "Manual", "Hybrid", "Automatic")
|
||||
* @returns {boolean} - Returns TRUE if the level is met or more
|
||||
*/
|
||||
function PreferenceArousalAtLeast(C, Level) {
|
||||
if ((CurrentModule == "Online") && (CurrentScreen == "ChatRoom") && (ChatRoomGame == "GGTS") && (ChatRoomSpace === "Asylum") && (AsylumGGTSGetLevel(C) >= 4))
|
||||
if (InventoryIsWorn(C, "FuturisticChastityBelt", "ItemPelvis") || InventoryIsWorn(C, "FuturisticTrainingBelt", "ItemPelvis") || InventoryIsWorn(C, "FuckMachine", "ItemDevices"))
|
||||
return true;
|
||||
if ((C.ArousalSettings == null) || (C.ArousalSettings.Active == null)) return false;
|
||||
if (Level === C.ArousalSettings.Active) return true;
|
||||
if (C.ArousalSettings.Active == "Automatic") return true;
|
||||
if ((Level == "Manual") && (C.ArousalSettings.Active == "Hybrid")) return true;
|
||||
if ((Level == "NoMeter") && ((C.ArousalSettings.Active == "Manual") || (C.ArousalSettings.Active == "Hybrid"))) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the effect of a sexual activity on the player
|
||||
* @param {Character} C - The player who performs the sexual activity
|
||||
|
|
|
@ -384,13 +384,13 @@ function AsylumGGTSTaskCanBeDone(C, T) {
|
|||
if ((T.substr(0, 7) == "NewRule") && (C.Game.GGTS.Rule != null) && (C.Game.GGTS.Rule.indexOf(T.substr(7, 100)) >= 0)) return false; // Rule cannot be added if already active
|
||||
if ((T.substr(0, 5) == "Cloth") && !C.CanChangeOwnClothes()) return false; // Cloth tasks cannot be done if cannot change
|
||||
if ((T.substr(0, 4) == "Pose") && !C.CanKneel()) return false; // If cannot kneel, we skip pose change activities
|
||||
if ((T.substr(0, 8) == "Activity") && (!C.CanInteract() || !PreferenceArousalAtLeast(C, "NoMeter"))) return false; // Must allow activities and be able to interact
|
||||
if ((T.substr(0, 8) == "Activity") && (!C.CanInteract() || !PreferenceArousalIsActive(C))) return false; // Must allow activities and be able to interact
|
||||
if ((T == "ActivityNod") && !ActivityCanBeDone(C, "Nod", "ItemHead")) return false; // Must be able to nod to use that activity
|
||||
if (((T == "ActivityKiss") || (T == "ActivityLick") || (T == "ActivityBite")) && !C.CanTalk()) return false; // Kiss, lick & bite require being able to talk
|
||||
if (((T == "ActivityKiss") || (T == "ActivityLick") || (T == "ActivityBite")) && (Player.Effect != null) && (Player.Effect.indexOf("BlockMouth") >= 0)) return false; // Kiss, lick & bite require being able to use mouth
|
||||
if ((T == "ActivityMasturbateHand") && C.IsVulvaChaste()) return false; // Cannot masturbate if chaste
|
||||
if (((T == "ClothHeels") || (T == "ClothSocks") || (T == "ClothBarefoot")) && (InventoryGet(C, "ItemBoots") != null)) return false; // No feet tasks if locked in boots
|
||||
if ((T == "NewRuleNoOrgasm") && !PreferenceArousalAtLeast(C, "Hybrid")) return false; // Orgasm rule are only available on hybrid or auto
|
||||
if ((T == "NewRuleNoOrgasm") && PreferenceArousalIsInMode(C, [ArousalMode.Hybrid, ArousalMode.Automatic])) return false; // Orgasm rule are only available on hybrid or auto
|
||||
if (((T == "ItemRemoveLimb") || (T == "ItemRemoveBody") || (T == "ItemRemoveHead") || (T == "ItemUngag") || (T == "ItemUnchaste")) && (LogValue("Isolated", "Asylum") >= CurrentTime)) return false; // When punishment is active, items doesn't get removed
|
||||
if (((T == "ItemRemoveLimb") || (T == "ItemRemoveBody") || (T == "ItemRemoveHead") || (T == "ItemUngag") || (T == "ItemUnchaste")) && (Math.random() * 6 < AsylumGGTSGetLevel(C))) return false; // The higher the level, the less likely GGTS will release
|
||||
if ((T == "ItemPose") && !InventoryIsWorn(C, "FuturisticCuffs", "ItemArms") && !InventoryIsWorn(C, "FuturisticStraitjacket", "ItemArms") && !InventoryIsWorn(C, "FuturisticAnkleCuffs", "ItemFeet") && !InventoryIsWorn(C, "FuturisticLegCuffs", "ItemLegs")) return false;
|
||||
|
|
|
@ -163,7 +163,7 @@ function TimerProcess(Timestamp) {
|
|||
} else {
|
||||
|
||||
// Depending on the character settings, we progress the arousal meter
|
||||
if (PreferenceArousalAtLeast(Character[C], "Hybrid")) {
|
||||
if (PreferenceArousalIsInMode(Character[C], [ArousalMode.Hybrid, ArousalMode.Automatic])) {
|
||||
|
||||
// Activity impacts the progress slowly over time, if there's an activity running, vibrations are ignored
|
||||
if (arousalTimer != 0) {
|
||||
|
@ -216,7 +216,7 @@ function TimerProcess(Timestamp) {
|
|||
if ((TimerLastArousalDecay + 12000 < CurrentTime) || (TimerLastArousalDecay - 12000 > CurrentTime)) {
|
||||
TimerLastArousalDecay = CurrentTime;
|
||||
for (let C = 0; C < Character.length; C++)
|
||||
if (PreferenceArousalAtLeast(Character[C], "Hybrid") && ActivityGetArousal(Character[C]) > 0 && ActivityGetArousalTimer(Character[C]) == 0) {
|
||||
if (PreferenceArousalIsInMode(Character[C], [ArousalMode.Hybrid, ArousalMode.Automatic]) && ActivityGetArousal(Character[C]) > 0 && ActivityGetArousalTimer(Character[C]) == 0) {
|
||||
|
||||
// If the character is egged, we find the highest intensity factor
|
||||
let Factor = -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue