diff --git a/commands/chastity.js b/commands/chastity.js index 73f1e2d..4fd93be 100644 --- a/commands/chastity.js +++ b/commands/chastity.js @@ -1,7 +1,7 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js"); const { getChastity, assignChastity, getChastityName } = require("./../functions/vibefunctions.js"); const { calculateTimeout } = require("./../functions/timefunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { getText } = require("./../functions/textfunctions.js"); @@ -90,7 +90,7 @@ module.exports = { if (braorbelt == "chastitybelt") { // They are trying to put on a chastity belt. // Check if the wearer is in an armbinder - if they are, block them. - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, chastityuser.id)) { data.heavy = true; if (getChastity(interaction.user.id)) { // User is in some form of heavy bondage and already has a chastity belt @@ -155,7 +155,7 @@ module.exports = { } else { // They are trying to put on a chastity bra. // Check if the wearer is in an armbinder - if they are, block them. - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, chastityuser.id)) { data.heavy = true; if (getChastityBra(interaction.user.id)) { // User is in some form of heavy bondage and already has a chastity belt diff --git a/commands/collar.js b/commands/collar.js index ae56880..035438f 100644 --- a/commands/collar.js +++ b/commands/collar.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getCollar, assignCollar, collartypes, getCollarName, getBaseCollar, canAccessCollar } = require("./../functions/collarfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent, collarPermModal } = require("./../functions/interactivefunctions.js"); @@ -80,7 +80,7 @@ module.exports = { }, }; - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, interaction.user.id)) { data.heavy = true; if (getCollar(interaction.user.id)) { data.collar = true; @@ -138,7 +138,7 @@ module.exports = { }, }; - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, interaction.user.id)) { data.heavy = true; if (getCollar(interaction.user.id)) { data.collar = true; diff --git a/commands/collarequip.js b/commands/collarequip.js index 93103a2..c5a4e45 100644 --- a/commands/collarequip.js +++ b/commands/collarequip.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js"); -const { getHeavy, assignHeavy, commandsheavy, convertheavy, heavytypes, getBaseHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, assignHeavy, commandsheavy, convertheavy, heavytypes, getBaseHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getCollar, getCollarPerm, canAccessCollar } = require("./../functions/collarfunctions.js"); const { getChastity, assignChastity, getChastityName, getChastityBraName, } = require("./../functions/vibefunctions.js"); const { getMittenName, assignMitten, getMitten, mittentypes, getBaseMitten } = require("./../functions/gagfunctions.js"); @@ -15,8 +15,8 @@ const { getUserTags } = require("../functions/configfunctions.js"); module.exports = { data: new SlashCommandBuilder() .setName("collarequip") - .setDescription(`Put chastity, mittens or heavy bondage on someone with a collar`) - .addSubcommand((subcommand) => + .setDescription(`Put chastity someone with a collar`) + /*.addSubcommand((subcommand) => subcommand .setName("mittens") .setDescription("Apply Mittens...") @@ -29,7 +29,7 @@ module.exports = { .setDescription("Apply Heavy Bondage...") .addUserOption((opt) => opt.setName("user").setDescription("To who?").setRequired(true)) .addStringOption((opt) => opt.setName("type").setDescription("Which Restraint?").setAutocomplete(true)), - ) + )*/ .addSubcommand((subcommand) => subcommand .setName("chastity") @@ -278,7 +278,7 @@ module.exports = { } } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, collareduser.id)) { data.heavy = true; interaction.reply(getText(data)); } else if (collareduser == interaction.user) { diff --git a/commands/corset.js b/commands/corset.js index 282624d..dc0937a 100644 --- a/commands/corset.js +++ b/commands/corset.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js"); const { getChastity, getVibe, assignVibe, canAccessChastity } = require("./../functions/vibefunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { getCorset, assignCorset, getBaseCorset } = require("./../functions/corsetfunctions.js"); @@ -110,7 +110,7 @@ module.exports = { if (blocked) { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, corsetuser.id)) { // In heavy bondage, fail data.heavy = true; if (corsetuser == interaction.user) { diff --git a/commands/gag.js b/commands/gag.js index 5fa6b75..6ca5cdc 100644 --- a/commands/gag.js +++ b/commands/gag.js @@ -2,7 +2,7 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("disco const fs = require("fs"); const path = require("path"); const { getGag, assignGag, getMitten, getGagLast } = require("./../functions/gagfunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent, handleExtremeRestraint } = require("./../functions/interactivefunctions.js"); const { getText, getTextGeneric } = require("./../functions/textfunctions.js"); @@ -118,7 +118,7 @@ module.exports = { return; } - // REFLECT + // REFLECT // We may need to move this to within the nomitten section. if (gaggeduser.id == process.client.user.id) { data.gagreflect = true; data.textdata.interactionuser = process.client.user; @@ -127,7 +127,7 @@ module.exports = { gaggeduser = interaction.user; } - if (getHeavy(interactionuser.id)) { + if (!getHeavyBound(interaction.user.id, gaggeduser.id)) { // in heavy bondage, cant equip data.heavy = true; if (interactionuser == gaggeduser) { diff --git a/commands/heavy.js b/commands/heavy.js index 1747af3..067d69d 100644 --- a/commands/heavy.js +++ b/commands/heavy.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js"); const { calculateTimeout } = require("./../functions/timefunctions.js"); -const { getHeavy, assignHeavy, commandsheavy, convertheavy, heavytypes, getBaseHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, assignHeavy, commandsheavy, convertheavy, heavytypes, getBaseHeavy, getHeavyRestrictions, getHeavyBound, getHeavyList } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent, handleExtremeRestraint, handleMajorRestraint } = require("./../functions/interactivefunctions.js"); const { getText } = require("./../functions/textfunctions.js"); @@ -21,6 +21,7 @@ module.exports = { async autoComplete(interaction) { try { const focusedValue = interaction.options.getFocused(); + let chosenuserid = interaction.options.get("user")?.value ?? interaction.user.id; // Note we can only retrieve the user ID here! let autocompletes = process.heavytypes.filter((f) => !getBaseHeavy(f.value).noself); let matches = didYouMean(focusedValue, autocompletes, { matchPath: ['name'], @@ -31,7 +32,7 @@ module.exports = { if (matches.length == 0) { matches = autocompletes; } - let tags = getUserTags(interaction.user.id); + let tags = getUserTags(chosenuserid); let newsorted = []; matches.forEach((f) => { let tagged = false; @@ -101,7 +102,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, targetuser.id)) { data.heavy = true; interaction.reply(getText(data)); } else { @@ -114,71 +115,105 @@ module.exports = { interactionuser = process.client.user; targetuser = interaction.user; } + // This disaster of a function lol + let canwear = true; + let blocker; + let blockertype; + console.log(getHeavyList(targetuser.id).map((h) => getBaseHeavy(h.type))) + getHeavyList(targetuser.id).map((h) => getBaseHeavy(h.type)).forEach((h) => { + h.heavytags.forEach((t) => { + if (getBaseHeavy(heavychoice).heavytags.includes(t)) { + canwear = false + blocker = h + blockertype = t + } + }) + }) await interaction.deferReply({ flags: MessageFlags.Ephemeral }); - if ((interaction.user.id != targetuser.id) || data.textdata.interactionuser == process.client.user) { + if ((interaction.user.id != targetuser.id) || (data.textdata.interactionuser == process.client.user)) { // Someone else! data.other = true; - await handleMajorRestraint(interaction.user, targetuser, "heavy", heavychoice).then(async () => { + if (canwear) { + data.canwear = true + await handleMajorRestraint(interaction.user, targetuser, "heavy", heavychoice).then(async () => { + await handleExtremeRestraint(interaction.user, targetuser, "heavy", heavychoice).then( + async (success) => { + await interaction.followUp({ content: `Equipping ${convertheavy(heavychoice)}`, withResponse: true, flags: MessageFlags.Ephemeral }); + await interaction.followUp(getText(data)); + assignHeavy(targetuser.id, heavychoice, interaction.user.id); + }, + async (reject) => { + let nomessage = `${targetuser} rejected the ${convertheavy(heavychoice)}.`; + if (reject == "Disabled") { + nomessage = `${convertheavy(heavychoice)} is currently disabled in ${targetuser}'s Extreme options.`; + } + if (reject == "Error") { + nomessage = `Something went wrong - Submit a bug report!`; + } + if (reject == "NoDM") { + nomessage = `Something went wrong sending a DM to ${targetuser}, or ${getPronouns(targetuser.id, "subject")} ${getPronouns(targetuser.id, "subject") == "they" ? `have` : "has"} DMs from this server disabled. Cannot obtain consent for this restraint.`; + } + await interaction.followUp({ content: nomessage }); + }, + ); + }, + async (reject) => { + let nomessage = `${targetuser} rejected the ${convertheavy(heavychoice)}.`; + if (reject == "Disabled") { + nomessage = `${targetuser} has disabled being bound in major restraints without a collar.`; + } + if (reject == "Error") { + nomessage = `Something went wrong - Submit a bug report!`; + } + if (reject == "NoDM") { + nomessage = `Something went wrong sending a DM to ${targetuser}, or ${getPronouns(targetuser.id, "subject")} ${getPronouns(targetuser.id, "subject") == "they" ? `have` : "has"} DMs from this server disabled. Cannot obtain consent for this restraint.`; + } + if (reject == "Cooldown") { + nomessage = `${targetuser} has blocked major bondage restraints for now. Please try again in the future.`; + } + await interaction.followUp({ content: nomessage }); + }) + } + else { + data.nocanwear = true + data[blockertype] = true + data.textdata.c4 = blocker.name + await interaction.followUp(`Attempting to equip a ${convertheavy(heavychoice)}...`) + await interaction.followUp(getText(data)); + } + } + else { + data.self = true; + if (canwear) { + data.canwear = true await handleExtremeRestraint(interaction.user, targetuser, "heavy", heavychoice).then( async (success) => { - await interaction.followUp({ content: `Equipping ${convertheavy(heavychoice)}`, withResponse: true, flags: MessageFlags.Ephemeral }); + await interaction.followUp({ content: `Equipping ${convertheavy(heavychoice)}`, withResponse: true }); await interaction.followUp(getText(data)); - assignHeavy(targetuser.id, heavychoice, interaction.user.id); + assignHeavy(interaction.user.id, heavychoice, interaction.user.id); }, async (reject) => { - let nomessage = `${targetuser} rejected the ${convertheavy(heavychoice)}.`; + let nomessage = `You rejected the ${convertheavy(heavychoice)}.`; if (reject == "Disabled") { - nomessage = `${convertheavy(heavychoice)} is currently disabled in ${targetuser}'s Extreme options.`; + nomessage = `${convertheavy(heavychoice)} is currently disabled in your Extreme options - **/config**`; } if (reject == "Error") { nomessage = `Something went wrong - Submit a bug report!`; } if (reject == "NoDM") { - nomessage = `Something went wrong sending a DM to ${targetuser}, or ${getPronouns(targetuser.id, "subject")} ${getPronouns(targetuser.id, "subject") == "they" ? `have` : "has"} DMs from this server disabled. Cannot obtain consent for this restraint.`; + nomessage = `Something went wrong sending a DM to you, or you have DMs from this server disabled. Cannot obtain consent for this restraint.`; } - await interaction.followUp({ content: nomessage }); + await interaction.followUp(nomessage); }, ); - }, - async (reject) => { - let nomessage = `${targetuser} rejected the ${convertheavy(heavychoice)}.`; - if (reject == "Disabled") { - nomessage = `${targetuser} has disabled being bound in major restraints without a collar.`; - } - if (reject == "Error") { - nomessage = `Something went wrong - Submit a bug report!`; - } - if (reject == "NoDM") { - nomessage = `Something went wrong sending a DM to ${targetuser}, or ${getPronouns(targetuser.id, "subject")} ${getPronouns(targetuser.id, "subject") == "they" ? `have` : "has"} DMs from this server disabled. Cannot obtain consent for this restraint.`; - } - if (reject == "Cooldown") { - nomessage = `${targetuser} has blocked major bondage restraints for now. Please try again in the future.`; - } - await interaction.followUp({ content: nomessage }); - }) - } - else { - data.self = true; - await handleExtremeRestraint(interaction.user, targetuser, "heavy", heavychoice).then( - async (success) => { - await interaction.followUp({ content: `Equipping ${convertheavy(heavychoice)}`, withResponse: true }); - await interaction.followUp(getText(data)); - assignHeavy(interaction.user.id, heavychoice, interaction.user.id); - }, - async (reject) => { - let nomessage = `You rejected the ${convertheavy(heavychoice)}.`; - if (reject == "Disabled") { - nomessage = `${convertheavy(heavychoice)} is currently disabled in your Extreme options - **/config**`; - } - if (reject == "Error") { - nomessage = `Something went wrong - Submit a bug report!`; - } - if (reject == "NoDM") { - nomessage = `Something went wrong sending a DM to you, or you have DMs from this server disabled. Cannot obtain consent for this restraint.`; - } - await interaction.followUp(nomessage); - }, - ); + } + else { + data.nocanwear = true + data[blockertype] = true + data.textdata.c4 = blocker.name + await interaction.followUp(`Attempting to equip a ${convertheavy(heavychoice)}...`) + await interaction.followUp(getText(data)); + } } } } catch (err) { diff --git a/commands/letgo.js b/commands/letgo.js index 616869e..ec673dd 100644 --- a/commands/letgo.js +++ b/commands/letgo.js @@ -2,7 +2,7 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js"); const { their } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { tryOrgasm, getChastity, setArousalCooldown } = require("../functions/vibefunctions.js"); -const { getHeavy } = require("../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("../functions/heavyfunctions.js"); const { getText } = require("./../functions/textfunctions.js"); module.exports = { @@ -37,7 +37,7 @@ module.exports = { return; } - const heavy = getHeavy(interaction.user.id); + const heavy = !getHeavyBound(interaction.user.id, interaction.user.id); if (heavy) { data.heavy = true; interaction.reply(getText(data)); diff --git a/commands/mask.js b/commands/mask.js index 592062a..63f1a89 100644 --- a/commands/mask.js +++ b/commands/mask.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js"); const { getMitten } = require("./../functions/gagfunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent, handleMajorRestraint, handleExtremeRestraint } = require("./../functions/interactivefunctions.js"); const { getHeadwear, assignHeadwear, getHeadwearName, getBaseHeadwear } = require("../functions/headwearfunctions.js"); @@ -99,7 +99,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, targetuser.id)) { // target is in heavy bondage data.heavy = true; if (headwearuser.id == interaction.user.id) { diff --git a/commands/mitten.js b/commands/mitten.js index 71b4d68..a4c17e4 100644 --- a/commands/mitten.js +++ b/commands/mitten.js @@ -1,7 +1,7 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js"); const { mittentypes, getMittenName, getGag, assignMitten, getMitten, getBaseMitten } = require("./../functions/gagfunctions.js"); const { calculateTimeout } = require("./../functions/timefunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent, handleMajorRestraint, handleExtremeRestraint } = require("./../functions/interactivefunctions.js"); const { getText } = require("./../functions/textfunctions.js"); @@ -97,7 +97,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, targetuser.id)) { data.heavy = true; interaction.reply(getText(data)); } else if (getMitten(interaction.user.id)) { diff --git a/commands/timelock.js b/commands/timelock.js index 7e0ad95..bb245b5 100644 --- a/commands/timelock.js +++ b/commands/timelock.js @@ -3,7 +3,7 @@ const { timelockChastityModal, timelockChastityBraModal, timelockCollarModal, ti const { getChastity, getChastityBra, canAccessChastity, canAccessChastityBra } = require("../functions/vibefunctions.js"); const { getCollar, canAccessCollar } = require("../functions/collarfunctions.js"); const { their } = require("../functions/pronounfunctions.js"); -const { getHeavy } = require("../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("../functions/heavyfunctions.js"); const { timelockChastity, timelockChastityBra, timelockCollar } = require("./../functions/timelockfunctions.js"); const { parseTime } = require("./../functions/timefunctions.js"); const { getText } = require("../functions/textfunctions.js"); @@ -61,7 +61,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, wearer.id)) { if (wearer == interaction.user) { interaction.reply(`${interaction.user} pulls against ${their(wearer.id)} ${getHeavy(interaction.user.id).type} trying to apply a timelock to ${their(wearer.id)} chastity belt, but is completely stuck!`); return; @@ -91,7 +91,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, wearer.id)) { if (wearer == interaction.user) { interaction.reply(`${interaction.user} pulls against ${their(wearer.id)} ${getHeavy(interaction.user.id).type} trying to apply a timelock to ${their(wearer.id)} chastity bra, but is completely stuck!`); return; @@ -121,7 +121,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, wearer.id)) { if (wearer == interaction.user) { interaction.reply(`${interaction.user} pulls against ${their(wearer.id)} ${getHeavy(interaction.user.id).type} trying to apply a timelock to ${their(wearer.id)} collar, but is completely stuck!`); return; diff --git a/commands/toy.js b/commands/toy.js index 087726a..e920963 100644 --- a/commands/toy.js +++ b/commands/toy.js @@ -3,7 +3,7 @@ const { default: didYouMean, ReturnTypeEnums } = require("didyoumean2"); const { getBaseToy, getSpecificToy, userBlockArousingToy, assignToy } = require("../functions/toyfunctions"); const { getText } = require("../functions/textfunctions"); const { getConsent } = require("../functions/interactivefunctions"); -const { getHeavy } = require("../functions/heavyfunctions"); +const { getHeavy, getHeavyBound } = require("../functions/heavyfunctions"); module.exports = { @@ -82,7 +82,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, toyuser.id)) { // We are in heavy bondage data.heavy = true; if (toyuser == interaction.user) { diff --git a/commands/unchastity.js b/commands/unchastity.js index ac647ad..6105338 100644 --- a/commands/unchastity.js +++ b/commands/unchastity.js @@ -1,7 +1,7 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js"); const { getChastity, removeChastity, canAccessChastity } = require("./../functions/vibefunctions.js"); const { calculateTimeout } = require("./../functions/timefunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { rollKeyFumble } = require("../functions/keyfindingfunctions.js"); @@ -41,7 +41,7 @@ module.exports = { data[braorbelt] = true; if (braorbelt == "chastitybelt") { // Trying to take off a chastity belt - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, chastitywearer.id)) { // In heavy bondage, cannot take off the belt anyway data.heavy = true; if (chastitywearer == interaction.user) { @@ -155,7 +155,7 @@ module.exports = { } } else { // Trying to take off a chastity bra - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, chastitywearer.id)) { // In heavy bondage, cannot take off the belt anyway data.heavy = true; if (chastitywearer == interaction.user) { diff --git a/commands/uncollar.js b/commands/uncollar.js index 73a597b..6b46575 100644 --- a/commands/uncollar.js +++ b/commands/uncollar.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getCollar, removeCollar, canAccessCollar } = require("./../functions/collarfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); @@ -23,7 +23,7 @@ module.exports = { }, }; - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, interaction.user.id)) { // in heavy bondage, can't data.heavy = true; if (interaction.user == collaruser) { diff --git a/commands/uncorset.js b/commands/uncorset.js index 431b5a1..5196d6a 100644 --- a/commands/uncorset.js +++ b/commands/uncorset.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js"); const { getChastity, canAccessChastity } = require("./../functions/vibefunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { getCorset, removeCorset, getBaseCorset } = require("./../functions/corsetfunctions.js"); @@ -33,7 +33,7 @@ module.exports = { }, }; - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, corsetuser.id)) { // User is in heavy bondage data.heavy = true; if (corsetuser == interaction.user) { diff --git a/commands/ungag.js b/commands/ungag.js index ee21dc3..df4ee65 100644 --- a/commands/ungag.js +++ b/commands/ungag.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js"); const { getGag, deleteGag, getMitten, getGags } = require("./../functions/gagfunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { getText, getTextGeneric } = require("./../functions/textfunctions.js"); @@ -65,7 +65,7 @@ module.exports = { }; // Fuck it, I'm just gonna redo the code path because I've been redoing all the removals anyway. - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, gaggeduser.id)) { // We are in heavy bondage data.heavy = true; if (gaggeduser == interaction.user) { diff --git a/commands/unheavy.js b/commands/unheavy.js index 4cc9eec..891b80f 100644 --- a/commands/unheavy.js +++ b/commands/unheavy.js @@ -1,19 +1,48 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js"); const { calculateTimeout } = require("./../functions/timefunctions.js"); -const { getHeavy, removeHeavy, convertheavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, removeHeavy, convertheavy, getHeavyList, getBaseHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { getText, getTextGeneric } = require("./../functions/textfunctions.js"); const { checkBondageRemoval, handleBondageRemoval } = require("../functions/interactivefunctions.js"); +const { default: didYouMean, ReturnTypeEnums } = require("didyoumean2"); module.exports = { data: new SlashCommandBuilder() .setName("unheavy") - .setDescription(`Free someone else from their heavy bondage`) - .addUserOption((opt) => opt.setName("user").setDescription("Who to free from their predicament...")), + .setDescription(`Free someone from their heavy bondage`) + .addUserOption((opt) => opt.setName("user").setDescription("Who to free from their predicament...")) + .addStringOption((opt) => + opt + .setName("type") + .setDescription("Which heavy restraint to remove?") + .setAutocomplete(true), + ), + async autoComplete(interaction) { + try { + const focusedValue = interaction.options.getFocused(); + let chosenuserid = interaction.options.get("user")?.value ?? interaction.user.id; // Note we can only retrieve the user ID here! + let autocompletes = getHeavyList(chosenuserid).map((h) => { return { name: getBaseHeavy(h.type).name, value: h.type }}) + let matches = didYouMean(focusedValue, autocompletes, { + matchPath: ['name'], + returnType: ReturnTypeEnums.ALL_SORTED_MATCHES, // Returns any match meeting 20% of the input + threshold: 0.2, // Default is 0.4 - this is how much of the word must exist. + }) + + if (matches.length == 0) { + matches = autocompletes; + } + + interaction.respond(matches.slice(0,25)) + } + catch (err) { + console.log(err); + } + }, async execute(interaction) { try { let heavyuser = interaction.options.getUser("user") ? interaction.options.getUser("user") : interaction.user; + let heavytype = interaction.options.getString("type") ?? getHeavy(interaction.user.id)?.type; // CHECK IF THEY CONSENTED! IF NOT, MAKE THEM CONSENT if (!getConsent(interaction.user.id)?.mainconsent) { await handleConsent(interaction, interaction.user.id); @@ -25,11 +54,11 @@ module.exports = { interactionuser: interaction.user, targetuser: heavyuser, c1: getHeavy(interaction.user.id)?.type, // heavy bondage type - c2: getHeavy(heavyuser.id)?.type, // Target's heavy bondage + c2: getHeavy(heavyuser.id, heavytype)?.displayname ?? getBaseHeavy(heavytype)?.name }, }; - if (!getHeavy(heavyuser.id)) { + if (!getHeavy(heavyuser.id, heavytype)) { // They aren't bound lol. data.noheavy = true; data.noheavyequipped = true; @@ -38,7 +67,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, heavyuser.id)) { // user IS in heavy bondage data.heavy = true; if (interaction.user == heavyuser) { @@ -53,23 +82,23 @@ module.exports = { } else { // Not in heavy bondage data.noheavy = true; - if (getHeavy(heavyuser.id)) { + if (getHeavy(heavyuser.id, heavytype)) { data.heavyequipped = true; // Now lets make sure the wearer wants that. if (checkBondageRemoval(interaction.user.id, heavyuser.id, "heavy") == true) { // Allowed immediately, lets go interaction.reply(getText(data)); - removeHeavy(heavyuser.id); + removeHeavy(heavyuser.id, heavytype); } else { // We need to ask first. let datatogeneric = Object.assign({}, data.textdata); datatogeneric.c1 = "heavy bondage"; interaction.reply({ content: getTextGeneric("unbind", datatogeneric), flags: MessageFlags.Ephemeral }); - let canRemove = await handleBondageRemoval(interaction.user, heavyuser, "heavy bondage").then( + let canRemove = await handleBondageRemoval(interaction.user, heavyuser, getHeavy(heavyuser.id, heavytype)?.displayname ?? "heavy bondage").then( async (res) => { await interaction.editReply(getTextGeneric("unbind_accept", datatogeneric)); await interaction.followUp(getText(data)); - removeHeavy(heavyuser.id); + removeHeavy(heavyuser.id, heavytype); }, async (rej) => { await interaction.editReply(getTextGeneric("unbind_decline", datatogeneric)); diff --git a/commands/unmask.js b/commands/unmask.js index 3b645e1..2a46d81 100644 --- a/commands/unmask.js +++ b/commands/unmask.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js"); const { getMitten } = require("./../functions/gagfunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { getHeadwear, getHeadwearName, deleteHeadwear, getLockedHeadgear } = require("../functions/headwearfunctions.js"); @@ -75,7 +75,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, headwearuser.id)) { // target is in heavy bondage data.heavy = true; if (headwearuser.id == interaction.user.id) { diff --git a/commands/unmitten.js b/commands/unmitten.js index 333262c..265c331 100644 --- a/commands/unmitten.js +++ b/commands/unmitten.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js"); const { getGag, getMitten, deleteMitten, getMittenName } = require("./../functions/gagfunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { getText, getTextGeneric } = require("./../functions/textfunctions.js"); @@ -28,7 +28,7 @@ module.exports = { c2: getMittenName(getMitten(mitteneduser.id)?.mittenname) ?? "mittens" }, }; - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, mitteneduser.id)) { data.heavy = true; if (interaction.options.getUser("user") == interaction.user) { data.self = true; diff --git a/commands/untoy.js b/commands/untoy.js index b47d2ae..d81c865 100644 --- a/commands/untoy.js +++ b/commands/untoy.js @@ -3,7 +3,7 @@ const { default: didYouMean, ReturnTypeEnums } = require("didyoumean2"); const { getBaseToy, getSpecificToy, getToys, removeToy } = require("../functions/toyfunctions"); const { getText } = require("../functions/textfunctions"); const { getConsent } = require("../functions/interactivefunctions"); -const { getHeavy } = require("../functions/heavyfunctions"); +const { getHeavy, getHeavyBound } = require("../functions/heavyfunctions"); module.exports = { @@ -86,7 +86,7 @@ module.exports = { return; }*/ - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, toyuser.id)) { // We are in heavy bondage data.heavy = true; if (toyuser == interaction.user) { diff --git a/commands/unwear.js b/commands/unwear.js index 220da8d..d2de795 100644 --- a/commands/unwear.js +++ b/commands/unwear.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, MessageFlags } = require("discord.js"); const { getMitten } = require("./../functions/gagfunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { getWearable, getWearableName, deleteWearable, getLockedWearable } = require("../functions/wearablefunctions.js"); @@ -74,7 +74,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, wearableuser.id)) { // target is in heavy bondage data.heavy = true; if (wearableuser.id == interaction.user.id) { diff --git a/commands/wear.js b/commands/wear.js index b221bf7..88889b9 100644 --- a/commands/wear.js +++ b/commands/wear.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, MessageFlags, TextDisplayBuilder } = require("discord.js"); const { getMitten } = require("./../functions/gagfunctions.js"); -const { getHeavy } = require("./../functions/heavyfunctions.js"); +const { getHeavy, getHeavyBound } = require("./../functions/heavyfunctions.js"); const { getPronouns } = require("./../functions/pronounfunctions.js"); const { getConsent, handleConsent } = require("./../functions/interactivefunctions.js"); const { getWearable, assignWearable, getWearableName, getBaseWearable } = require("../functions/wearablefunctions.js"); @@ -98,7 +98,7 @@ module.exports = { return; } - if (getHeavy(interaction.user.id)) { + if (!getHeavyBound(interaction.user.id, wearableuser.id)) { // target is in heavy bondage data.heavy = true; if (wearableuser.id == interaction.user.id) { diff --git a/commands/test.js b/disabledCommands/test.js similarity index 100% rename from commands/test.js rename to disabledCommands/test.js diff --git a/functions/heavyfunctions.js b/functions/heavyfunctions.js index d9b907b..d09acb9 100644 --- a/functions/heavyfunctions.js +++ b/functions/heavyfunctions.js @@ -4,122 +4,124 @@ const https = require("https"); const heavytypes = [ // Armbinders - { name: "Ancient Armbinder", value: "armbinder_ancient", tags: ["metal"], denialCoefficient: 3.5 }, - { name: "Latex Armbinder", value: "armbinder_latex", tags: ["latex"], denialCoefficient: 2 }, - { name: "Leather Armbinder", value: "armbinder_leather", tags: ["leather"], denialCoefficient: 2 }, - { name: "High-Security Armbinder", value: "armbinder_secure", denialCoefficient: 3.5 }, - { name: "Shadow Latex Armbinder", value: "armbinder_shadowlatex", tags: ["latex"], denialCoefficient: 3 }, - { name: "Crystal Armbinder", value: "armbinder_crystal", denialCoefficient: 3 }, - { name: "Black Hole Armbinder", value: "armbinder_blackhole", denialCoefficient: 3.5 }, - { name: "Wolfbinder", value: "armbinder_wolf", denialCoefficient: 3 }, - { name: "Wolf Queenbinder", value: "armbinder_wolfqueen", tags: ["leather"], denialCoefficient: 3 }, + { name: "Ancient Armbinder", value: "armbinder_ancient", tags: ["metal"], denialCoefficient: 3.5, heavytags: ["arms"] }, + { name: "Latex Armbinder", value: "armbinder_latex", tags: ["latex"], denialCoefficient: 2, heavytags: ["arms"] }, + { name: "Leather Armbinder", value: "armbinder_leather", tags: ["leather"], denialCoefficient: 2, heavytags: ["arms"] }, + { name: "High-Security Armbinder", value: "armbinder_secure", denialCoefficient: 3.5, heavytags: ["arms"] }, + { name: "Shadow Latex Armbinder", value: "armbinder_shadowlatex", tags: ["latex"], denialCoefficient: 3, heavytags: ["arms"] }, + { name: "Crystal Armbinder", value: "armbinder_crystal", denialCoefficient: 3, heavytags: ["arms"] }, + { name: "Black Hole Armbinder", value: "armbinder_blackhole", denialCoefficient: 3.5, heavytags: ["arms"] }, + { name: "Wolfbinder", value: "armbinder_wolf", denialCoefficient: 3, heavytags: ["arms"] }, + { name: "Wolf Queenbinder", value: "armbinder_wolfqueen", tags: ["leather"], denialCoefficient: 3, heavytags: ["arms"] }, // Boxbinders - { name: "Latex Boxbinder", value: "boxbinder_latex", tags: ["latex"], denialCoefficient: 2 }, - { name: "Leather Boxbinder", value: "boxbinder_leather", tags: ["leather"], denialCoefficient: 2.5 }, - { name: "High-Security Boxbinder", value: "boxbinder_hisec", denialCoefficient: 3.5 }, - { name: "Experimental Boxtie Binder", value: "boxbinder_experimental", denialCoefficient: 3.5 }, - { name: "Black Hole Boxbinder", value: "boxbinder_blackhole", denialCoefficient: 2 }, - { name: "Dragon Queen Straps", value: "boxbinder_dragon", tags: ["leather"], denialCoefficient: 2.5 }, + { name: "Latex Boxbinder", value: "boxbinder_latex", tags: ["latex"], denialCoefficient: 2, heavytags: ["arms"] }, + { name: "Leather Boxbinder", value: "boxbinder_leather", tags: ["leather"], denialCoefficient: 2.5, heavytags: ["arms"] }, + { name: "High-Security Boxbinder", value: "boxbinder_hisec", denialCoefficient: 3.5, heavytags: ["arms"] }, + { name: "Experimental Boxtie Binder", value: "boxbinder_experimental", denialCoefficient: 3.5, heavytags: ["arms"] }, + { name: "Black Hole Boxbinder", value: "boxbinder_blackhole", denialCoefficient: 2, heavytags: ["arms"] }, + { name: "Dragon Queen Straps", value: "boxbinder_dragon", tags: ["leather"], denialCoefficient: 2.5, heavytags: ["arms"] }, // Straitjackets - { name: "Comfy Straitjacket", value: "straitjacket_comfy", denialCoefficient: 3 }, - { name: "Maid Straitjacket", value: "straitjacket_maid", denialCoefficient: 3.5 }, - { name: "Maid Punishment Straitjacket", value: "straitjacket_maidpunishment", denialCoefficient: 4.5 }, - { name: "Doll Straitjacket", value: "straitjacket_doll", denialCoefficient: 3.5 }, - { name: "Latex Straitjacket", value: "straitjacket_latex", tags: ["latex"], denialCoefficient: 4 }, - { name: "Shadow Latex Straitjacket", value: "straitjacket_shadowlatex", tags: ["latex"], denialCoefficient: 4 }, - { name: "Asylum Straitjacket", value: "straitjacket_asylum", denialCoefficient: 5 }, - { name: "Black Hole Straitjacket", value: "straitjacket_blackhole", denialCoefficient: 4.5 }, + { name: "Comfy Straitjacket", value: "straitjacket_comfy", denialCoefficient: 3, heavytags: ["arms"] }, + { name: "Maid Straitjacket", value: "straitjacket_maid", denialCoefficient: 3.5, heavytags: ["arms"] }, + { name: "Maid Punishment Straitjacket", value: "straitjacket_maidpunishment", denialCoefficient: 4.5, heavytags: ["arms"] }, + { name: "Doll Straitjacket", value: "straitjacket_doll", denialCoefficient: 3.5, heavytags: ["arms"] }, + { name: "Latex Straitjacket", value: "straitjacket_latex", tags: ["latex"], denialCoefficient: 4, heavytags: ["arms"] }, + { name: "Shadow Latex Straitjacket", value: "straitjacket_shadowlatex", tags: ["latex"], denialCoefficient: 4, heavytags: ["arms"] }, + { name: "Asylum Straitjacket", value: "straitjacket_asylum", denialCoefficient: 5, heavytags: ["arms"] }, + { name: "Black Hole Straitjacket", value: "straitjacket_blackhole", denialCoefficient: 4.5, heavytags: ["arms"] }, + + { name: "Latex Legbinder", value: "legbinder_latex", denialCoefficient: 3, heavytags: ["legs"] }, // Petsuits - { name: "Piddlefours", value: "petsuit_piddlefours", tags: ["pet", "leather"], denialCoefficient: 2 }, - { name: "Leather Petsuit", value: "petsuit_leather", tags: ["pet", "leather"], denialCoefficient: 2.5 }, - { name: "Alchemical Petsuit", value: "petsuit_alchemical", tags: ["pet", "latex"], denialCoefficient: 2.5 }, - { name: "Autotape Petsuit", value: "petsuit_tape", tags: ["pet"], denialCoefficient: 2.5 }, - { name: "Latex Petsuit", value: "petsuit_latex", tags: ["pet", "latex"], denialCoefficient: 3 }, - { name: "Seamless Latex Petsuit", value: "petsuit_seamlesslatex", tags: ["pet", "latex"], denialCoefficient: 3 }, - { name: "Shadow Latex Petsuit", value: "petsuit_shadowlatex", tags: ["pet", "latex"], denialCoefficient: 3 }, - { name: "Bast Petsuit", value: "petsuit_bast", tags: ["pet"], denialCoefficient: 3 }, - { name: "Nevermere Punishment Suit", value: "petsuit_nevermere", tags: ["pet", "leather"], denialCoefficient: 3.5 }, - { name: "Ancient Petsuit", value: "petsuit_ancient", tags: ["pet", "metal"], denialCoefficient: 4 }, + { name: "Piddlefours", value: "petsuit_piddlefours", tags: ["pet", "leather"], denialCoefficient: 2, heavytags: ["arms", "legs"] }, + { name: "Leather Petsuit", value: "petsuit_leather", tags: ["pet", "leather"], denialCoefficient: 2.5, heavytags: ["arms", "legs"] }, + { name: "Alchemical Petsuit", value: "petsuit_alchemical", tags: ["pet", "latex"], denialCoefficient: 2.5, heavytags: ["arms", "legs"] }, + { name: "Autotape Petsuit", value: "petsuit_tape", tags: ["pet"], denialCoefficient: 2.5, heavytags: ["arms", "legs"] }, + { name: "Latex Petsuit", value: "petsuit_latex", tags: ["pet", "latex"], denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Seamless Latex Petsuit", value: "petsuit_seamlesslatex", tags: ["pet", "latex"], denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Shadow Latex Petsuit", value: "petsuit_shadowlatex", tags: ["pet", "latex"], denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Bast Petsuit", value: "petsuit_bast", tags: ["pet"], denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Nevermere Punishment Suit", value: "petsuit_nevermere", tags: ["pet", "leather"], denialCoefficient: 3.5, heavytags: ["arms", "legs"] }, + { name: "Ancient Petsuit", value: "petsuit_ancient", tags: ["pet", "metal"], denialCoefficient: 4, heavytags: ["arms", "legs"] }, // Static Restraints - { name: "Display Stand", value: "displaystand", tags: ["metal"], denialCoefficient: 4 }, - { name: "Stocks", value: "stocks", denialCoefficient: 4 }, - { name: "One Bar Prison", value: "one_bar_prison", tags: ["metal"], denialCoefficient: 1.5 }, - { name: "Latex Encasement Stand", value: "encasementstand_latex", tags: ["latex"], denialCoefficient: 4 }, - { name: "Sarcophagus", value: "sarco_mummy", tags: ["confined"], denialCoefficient: 3 }, - { name: "Wooden Horse", value: "wooden_horse", denialCoefficient: 3 }, - { name: "X-Frame", value: "x_frame", denialCoefficient: 5 }, - { name: "Dancer's Pole", value: "pole_dancer", denialCoefficient: 1.5 }, - { name: "Leashing Post", value: "leashing_post", denialCoefficient: 2.5 }, - { name: "Latex Vacbed", value: "vacbed_latex", tags: ["latex"], denialCoefficient: 3.5 }, - { name: "Latex Vaccube", value: "vaccube_latex", tags: ["latex"], denialCoefficient: 4.5 }, - { name: "Doll Processing Facility", value: "doll_processing", denialCoefficient: 5 }, - { name: "Doll Storage Unit", value: "doll_storage", tags: ["confined"], denialCoefficient: 3.5 }, - { name: "Weighted Blanket", value: "blanket_weighted", denialCoefficient: 1.5 }, - { name: "Pile of Cats", value: "catpile", denialCoefficient: 99 }, // Are you ***really*** going to disturb the kitties to let go? - { name: "Giant Pile of Plushies", value: "plushie_pile", denialCoefficient: 1.5 }, - { name: "Bed Restraints", value: "bedrestraints", denialCoefficient: 6 }, - { name: "Massage Table Binding", value: "massage_table_binding", denialCoefficient: 2 }, - { name: "Pet Cage", value: "pet_cage", tags: ["pet"], denialCoefficient: 4 }, - { name: "Chair with Cuffs", value: "chaircuffs", denialCoefficient: 3.5 }, - { name: "Resin Coating", value: "resin_coated", denialCoefficient: 4 }, - { name: "Pillory", value: "pillory", denialCoefficient: 8 }, + { name: "Display Stand", value: "displaystand", tags: ["metal"], denialCoefficient: 4, heavytags: ["arms", "legs"] }, + { name: "Stocks", value: "stocks", denialCoefficient: 4, heavytags: ["arms"] }, + { name: "One Bar Prison", value: "one_bar_prison", tags: ["metal"], denialCoefficient: 1.5, heavytags: ["legs"] }, + { name: "Latex Encasement Stand", value: "encasementstand_latex", tags: ["latex"], denialCoefficient: 4, heavytags: ["arms", "legs"] }, + { name: "Sarcophagus", value: "sarco_mummy", tags: ["confined"], denialCoefficient: 3, heavytags: ["container"] }, + { name: "Wooden Horse", value: "wooden_horse", denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "X-Frame", value: "x_frame", denialCoefficient: 5, heavytags: ["arms", "legs"] }, + { name: "Dancer's Pole", value: "pole_dancer", denialCoefficient: 1.5, heavytags: ["arms", "legs"] }, + { name: "Leashing Post", value: "leashing_post", denialCoefficient: 2.5, heavytags: ["container"] }, + { name: "Latex Vacbed", value: "vacbed_latex", tags: ["latex"], denialCoefficient: 3.5, heavytags: ["arms", "legs"] }, + { name: "Latex Vaccube", value: "vaccube_latex", tags: ["latex"], denialCoefficient: 4.5, heavytags: ["arms", "legs"] }, + { name: "Doll Processing Facility", value: "doll_processing", denialCoefficient: 5, heavytags: ["arms", "legs"] }, + { name: "Doll Storage Unit", value: "doll_storage", tags: ["confined"], denialCoefficient: 3.5, heavytags: ["arms", "legs"] }, + { name: "Weighted Blanket", value: "blanket_weighted", denialCoefficient: 1.5, heavytags: ["arms", "legs"] }, + { name: "Pile of Cats", value: "catpile", denialCoefficient: 99, heavytags: ["arms", "legs"] }, // Are you ***really*** going to disturb the kitties to let go? + { name: "Giant Pile of Plushies", value: "plushie_pile", denialCoefficient: 1.5, heavytags: ["arms", "legs"] }, + { name: "Bed Restraints", value: "bedrestraints", denialCoefficient: 6, heavytags: ["arms", "legs"] }, + { name: "Massage Table Binding", value: "massage_table_binding", denialCoefficient: 2, heavytags: ["arms", "legs"] }, + { name: "Pet Cage", value: "pet_cage", tags: ["pet"], denialCoefficient: 4, heavytags: ["container"] }, + { name: "Chair with Cuffs", value: "chaircuffs", denialCoefficient: 3.5, heavytags: ["arms", "legs"] }, + { name: "Resin Coating", value: "resin_coated", denialCoefficient: 4, heavytags: ["arms", "legs"] }, + { name: "Pillory", value: "pillory", denialCoefficient: 8, heavytags: ["arms"] }, // Metal Restraints - { name: "Scavenger's Daughter", value: "scavengersdaughter", tags: ["metal"], denialCoefficient: 4 }, - { name: "Yoke", value: "yoke", tags: ["metal"], denialCoefficient: 2 }, - { name: "Handcuffs", value: "handcuffs", tags: ["metal"], denialCoefficient: 2 }, - { name: "Handcuffs (Irish-8)", value: "handcuffs_irish8", tags: ["metal"], denialCoefficient: 4 }, - { name: "Handcuffs (Hinged)", value: "handcuffs_hinged", tags: ["metal"], denialCoefficient: 4 }, - { name: "Hardlight Cuffs (loose links)", value: "hardlight_looselink", denialCoefficient: 1.5 }, - { name: "Hardlight Cuffs (hogtie)", value: "hardlight_hogtie", denialCoefficient: 3 }, - { name: "Hardlight Cuffs (strict)", value: "hardlight_strict", denialCoefficient: 4.5 }, + { name: "Scavenger's Daughter", value: "scavengersdaughter", tags: ["metal"], denialCoefficient: 4, heavytags: ["arms", "legs"] }, + { name: "Yoke", value: "yoke", tags: ["metal"], denialCoefficient: 2, heavytags: ["arms"] }, + { name: "Handcuffs", value: "handcuffs", tags: ["metal"], denialCoefficient: 2, heavytags: ["arms"] }, + { name: "Handcuffs (Irish-8)", value: "handcuffs_irish8", tags: ["metal"], denialCoefficient: 4, heavytags: ["arms"] }, + { name: "Handcuffs (Hinged)", value: "handcuffs_hinged", tags: ["metal"], denialCoefficient: 4, heavytags: ["arms"] }, + { name: "Hardlight Cuffs (loose links)", value: "hardlight_looselink", denialCoefficient: 1.5, heavytags: ["arms"] }, + { name: "Hardlight Cuffs (hogtie)", value: "hardlight_hogtie", denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Hardlight Cuffs (strict)", value: "hardlight_strict", denialCoefficient: 4.5, heavytags: ["arms"] }, // Rope Restraints - { name: "Hogtie", value: "rope_hogtie", denialCoefficient: 3 }, - { name: "Shrimp Tie", value: "rope_shrimp", denialCoefficient: 3 }, - { name: "Frogtie", value: "rope_frogtie", denialCoefficient: 2.5 }, - { name: "Rope Boxtie", value: "rope_boxtie", denialCoefficient: 2 }, - { name: "Ribbons", value: "ribbons", denialCoefficient: 1.5 }, - { name: "Suspended Frogtie", value: "rope_suspension_frog", denialCoefficient: 3 }, + { name: "Hogtie", value: "rope_hogtie", denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Shrimp Tie", value: "rope_shrimp", denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Frogtie", value: "rope_frogtie", denialCoefficient: 2.5, heavytags: ["arms", "legs"] }, + { name: "Rope Boxtie", value: "rope_boxtie", denialCoefficient: 2, heavytags: ["arms"] }, + { name: "Ribbons", value: "ribbons", denialCoefficient: 1.5, heavytags: ["arms"] }, + { name: "Suspended Frogtie", value: "rope_suspension_frog", denialCoefficient: 3, heavytags: ["arms", "legs"] }, //Encasement and Wrappings - { name: "Bandage Wrappings", value: "bandage_wrap", denialCoefficient: 1.5 }, - { name: "Autotape Wrapping", value: "autotape_wrap", denialCoefficient: 2 }, - //{ name: "Slime Coating", value: "encasement_slime", tags: ["slime"], denialCoefficient: 2 }, Names Needed? - //{ name: "Solidified Rubber Coating", value: "encasement_slime", tags: ["slime"], denialCoefficient: 3 }, - { name: "Crystalline Pillar", value: "encasement_crystal", denialCoefficient: 4 }, - { name: "Latex Ball", value: "sphere_latex", tags: ["latex"], denialCoefficient: 3.5 }, - { name: "Latex Sleepsack", value: "sleepsack_latex", tags: ["latex"], denialCoefficient: 4 }, - { name: "Duffel Bag", value: "duffel_bag", denialCoefficient: 2 }, - { name: "Shadow Latex Ballsuit", value: "shadow_latex_ball", tags: ["latex"], denialCoefficient: 4 }, - { name: "Magic Mirror", value: "encasement_mirror", tags: ["confined", "dimensional"], denialCoefficient: 5 }, + { name: "Bandage Wrappings", value: "bandage_wrap", denialCoefficient: 1.5, heavytags: ["arms", "legs"] }, + { name: "Autotape Wrapping", value: "autotape_wrap", denialCoefficient: 2, heavytags: ["arms", "legs"] }, + { name: "Slime Coating", value: "encasement_slime", tags: ["slime"], denialCoefficient: 2, heavytags: ["arms", "legs"] }, + { name: "Solidified Rubber Coating", value: "encasement_slime", tags: ["slime"], denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Crystalline Pillar", value: "encasement_crystal", denialCoefficient: 4, heavytags: ["arms", "legs"] }, + { name: "Latex Ball", value: "sphere_latex", tags: ["latex"], denialCoefficient: 3.5, heavytags: ["arms", "legs"] }, + { name: "Latex Sleepsack", value: "sleepsack_latex", tags: ["latex"], denialCoefficient: 4, heavytags: ["arms", "legs"] }, + { name: "Duffel Bag", value: "duffel_bag", denialCoefficient: 2, heavytags: ["arms", "legs"] }, + { name: "Shadow Latex Ballsuit", value: "shadow_latex_ball", tags: ["latex"], denialCoefficient: 4, heavytags: ["arms", "legs"] }, + { name: "Magic Mirror", value: "encasement_mirror", tags: ["confined", "dimensional"], denialCoefficient: 5, heavytags: ["arms", "legs"] }, // Misc Heavy Restraints - { name: "Lockdown Virus", value: "lockdown_virus", denialCoefficient: 4 }, + { name: "Lockdown Virus", value: "lockdown_virus", denialCoefficient: 4, heavytags: ["arms", "legs"] }, // { name: "Silk Cocoon", value: "silk_cocoon", denialCoefficient: 2 }, Removed due to Arachnophobia - { name: "Binding Dress", value: "dress_binding", denialCoefficient: 4.5 }, - { name: "Blanket Burrito", value: "blanket_burrito", denialCoefficient: 2 }, - { name: "Toasty Kotatsu", value: "kotatsu_trap", denialCoefficient: 1.5 }, - { name: "Festive Ribbons", value: "ribbons_festive", denialCoefficient: 1.5 }, - { name: "Wrapping Paper", value: "wrapping_paper", denialCoefficient: 2 }, - { name: "Shadow Hands", value: "shadowhands", tags: ["living"], denialCoefficient: 1.5 }, - { name: "Entangling Vines", value: "entangling_vines", tags: ["living"], denialCoefficient: 1.5 }, + { name: "Binding Dress", value: "dress_binding", denialCoefficient: 4.5, heavytags: ["arms"] }, + { name: "Blanket Burrito", value: "blanket_burrito", denialCoefficient: 2, heavytags: ["arms", "legs"] }, + { name: "Toasty Kotatsu", value: "kotatsu_trap", denialCoefficient: 1.5, heavytags: ["arms", "legs"] }, + { name: "Festive Ribbons", value: "ribbons_festive", denialCoefficient: 1.5, heavytags: ["arms"] }, + { name: "Wrapping Paper", value: "wrapping_paper", denialCoefficient: 2, heavytags: ["arms", "legs"] }, + { name: "Shadow Hands", value: "shadowhands", tags: ["living"], denialCoefficient: 1.5, heavytags: ["arms", "legs"] }, + { name: "Entangling Vines", value: "entangling_vines", tags: ["living"], denialCoefficient: 1.5, heavytags: ["arms", "legs"] }, //{ name: "Glue Spill", value: "glue_trap", denialCoefficient: 3.5 }, - { name: "Hands-off Blouse", value: "blouse_handsoff", denialCoefficient: 7.5 }, - { name: "Bondage Exosuit", value: "exosuit_bondage", tags: ["metal"], denialCoefficient: 5 }, - { name: "Sticky Glue", value: "stickyglue_bondage", tags: ["slime"], denialCoefficient: 5 }, - { name: "Costumer Mimic", value: "costumer_mimic", tags: ["confined", "latex"], denialCoefficient: 5 }, - { name: "Costumer Mimic (Latex)", value: "costumer_mimic_latex", tags: ["confined", "latex"], denialCoefficient: 5 }, - { name: "Costumer Mimic (Chaos)", value: "costumer_mimic_chaos", tags: ["confined", "latex"], denialCoefficient: 5 }, - { name: "Capture Sphere", value: "capture_sphere", tags: ["confined", "dimensional"], denialCoefficient: 3 }, - { name: "Love Sphere", value: "capture_sphere_love", tags: ["confined", "dimensional"], denialCoefficient: 3 }, - { name: "Great Sphere", value: "capture_sphere_great", tags: ["confined", "dimensional"], denialCoefficient: 5 }, - { name: "Ultra Sphere", value: "capture_sphere_ultra", tags: ["confined", "dimensional"], denialCoefficient: 7 }, - { name: "Master Sphere", value: "capture_sphere_master", tags: ["confined", "dimensional"], denialCoefficient: 9 }, + { name: "Hands-off Blouse", value: "blouse_handsoff", denialCoefficient: 7.5, heavytags: ["arms"] }, + { name: "Bondage Exosuit", value: "exosuit_bondage", tags: ["metal"], denialCoefficient: 5, heavytags: ["arms", "legs"] }, + { name: "Sticky Glue", value: "stickyglue_bondage", tags: ["slime"], denialCoefficient: 5, heavytags: ["arms", "legs"] }, + { name: "Costumer Mimic", value: "costumer_mimic", tags: ["confined", "latex"], denialCoefficient: 5, heavytags: ["arms", "legs"] }, + { name: "Costumer Mimic (Latex)", value: "costumer_mimic_latex", tags: ["confined", "latex"], denialCoefficient: 5, heavytags: ["arms", "legs"] }, + { name: "Costumer Mimic (Chaos)", value: "costumer_mimic_chaos", tags: ["confined", "latex"], denialCoefficient: 5, heavytags: ["arms", "legs"] }, + { name: "Capture Sphere", value: "capture_sphere", tags: ["confined", "dimensional"], denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Love Sphere", value: "capture_sphere_love", tags: ["confined", "dimensional"], denialCoefficient: 3, heavytags: ["arms", "legs"] }, + { name: "Great Sphere", value: "capture_sphere_great", tags: ["confined", "dimensional"], denialCoefficient: 5, heavytags: ["arms", "legs"] }, + { name: "Ultra Sphere", value: "capture_sphere_ultra", tags: ["confined", "dimensional"], denialCoefficient: 7, heavytags: ["arms", "legs"] }, + { name: "Master Sphere", value: "capture_sphere_master", tags: ["confined", "dimensional"], denialCoefficient: 9, heavytags: ["arms", "legs"] }, // Heavy Restraints with unique name functions { @@ -128,6 +130,7 @@ const heavytypes = [ denialCoefficient: 3, noself: true, noother: false, + heavytags: ["container"], namefunction: async (interaction, data) => { if (data.textarray != "texts_collarequip" && data.textarray != "texts_struggle") { return data; @@ -169,62 +172,320 @@ const convertheavy = (type) => { return convertheavyarr[type]; }; -// Get the base heavy object by type +/******************** + * Get Heavy Restraint's name from heavyfunctions.js by ID + * - **(string) type** retrieves the name for the heavy type. + ********************/ +const getHeavyName = (type) => { + return heavytypes.find((h) => h.value === type)?.name +} + +/************** + * Gets the base heavy object from heavyfunctions.js by ID + * - **(string) type** retrieves the object for the heavy type. + **************/ const getBaseHeavy = (type) => { - return heavytypes.find((h) => h.value == type); + return heavytypes.find((h) => h.value === type); }; +/******************** + * Get Heavy Restraint's denial coefficient by ID + * - **(string) type** retrieves the denial coefficient for the heavy type. + ********************/ const heavyDenialCoefficient = (type) => { - return heavytypes.find((h) => h.value == type)?.denialCoefficient; + return heavytypes.find((h) => h.value === type)?.denialCoefficient; }; +/************** + * Adds a heavy bondage to a user by userid. + * - **(user id) user** will receive the bondage + * - **(string) type** is the heavy bondage id + * - **(user id) origbinder** should be person tying them up + * - **(string) customname** defaults to default heavy name + **************/ const assignHeavy = (user, type, origbinder, customname) => { if (process.heavy == undefined) { process.heavy = {}; } - let originalbinder = process.heavy[user]?.origbinder; - process.heavy[user] = { type: customname ?? convertheavy(type), typeval: type, origbinder: originalbinder ?? origbinder }; + if (process.heavy[user] == undefined) { + process.heavy[user] = []; + } + if (process.heavy[user].length > 0) { + let existingheavy = process.heavy[user].find((h) => h.type === type) + if (existingheavy) { + existingheavy.origbinder = origbinder; + existingheavy.displayname = customname ?? getHeavyName(type); + } + else { + process.heavy[user].push({ + type: type, + origbinder: origbinder, + displayname: customname ?? getHeavyName(type) + }) + } + } + else { + process.heavy[user].push({ + type: type, + origbinder: origbinder, + displayname: customname ?? getHeavyName(type) + }) + } + //process.heavy[user] = { type: customname ?? convertheavy(type), typeval: type, origbinder: originalbinder ?? origbinder }; if (process.readytosave == undefined) { process.readytosave = {}; } process.readytosave.heavy = true; }; -const getHeavy = (user) => { +/************* + * Get Heavy Bondage worn by user ID. Check for falsy values to determine if they're free. Returns the most RELEVANT heavy bondage in the list (arms -> legs -> container). See getHeavyList to retrieve all of them. Specify a type to get a specific bondage the user is wearing. + * - **(user id) user** to retrieve bondage for + * - **(string) type** to retrieve a specific bondage, if worn. + *************/ +const getHeavy = (user, type) => { if (process.heavy == undefined) { process.heavy = {}; } - return process.heavy[user]; + let returnarms; + let returnlegs; + let returncontainer; + let returnedval; + if (process.heavy[user] && (process.heavy[user].length > 0)) { + if (!type) { + let mapped = process.heavy[user].map((h) => getBaseHeavy(h.type)) + + // return arms first + mapped.forEach((h) => { + if (h.heavytags.includes("arms")) { + returnarms = process.heavy[user].find((heavy) => heavy.type === h.value) + } + }) + // return legs next + mapped.forEach((h) => { + if (h.heavytags.includes("legs")) { + returnlegs = process.heavy[user].find((heavy) => heavy.type === h.value) + } + }) + // return container last + mapped.forEach((h) => { + if (h.heavytags.includes("container")) { + returncontainer = process.heavy[user].find((heavy) => heavy.type === h.value) + } + }) + if (returnarms) { + returnedval = returnarms; + } + else if (returnlegs) { + returnedval = returnlegs; + } + else if (returncontainer) { + returnedval = returncontainer; + } + } + else { + returnedval = process.heavy[user].find((h) => h.type === type); + } + } + return returnedval }; -const getHeavyBinder = (user) => { +/************* + * Get Heavy Bondage worn by user ID. Returns a list (even if none). Use getHeavy to determine if they're wearing any heavy bondage at all. + * - **(user id) user** to retrieve bondage for + *************/ +const getHeavyList = (user) => { + if (process.heavy == undefined) { + process.heavy = {}; + } + if (process.heavy[user]) { + return process.heavy[user]; + } + else { + return []; + } +} + +/************ + * Get Heavy Bondage's **origbinder**. Will retrieve the first bondage's **origbinder** if **type** is not specified. If **type** IS specified, will return undefined if the wearer is not wearing that bondage. + * - **(user id) user** to retrieve bondage for + * - **(string) type** to check for + ************/ +const getHeavyBinder = (user, type) => { if (process.heavy == undefined) { process.heavy = {}; } - return process.heavy[user]?.origbinder; + if (process.heavy[user] == undefined) { + process.heavy[user] = []; + } + if (process.heavy[user].length > 0) { + if (type) { + return process.heavy[user].find((h) => h.type === type)?.origbinder + } + else { + return process.heavy[user][0]?.origbinder + } + }; }; -const removeHeavy = (user) => { +/********* + * Remove Heavy Bondage from user. If **type** is not specified, will remove the first heavy bondage in the list. + * - **(user id) user** to remove heavy bondage for + * - **(string) type** to remove specific heavy bondage + *********/ +const removeHeavy = (user, type) => { if (process.heavy == undefined) { process.heavy = {}; } if (process.heavy[user] && process.heavy[user].typeval && process.onremovefunctions && process.onremovefunctions.heavy && process.onremovefunctions.heavy[process.heavy[user].typeval]) { process.onremovefunctions.heavy[process.heavy[user].typeval](user); } - delete process.heavy[user]; + if (process.heavy[user]) { + if (type) { + let find = process.heavy[user].findIndex((h) => h.type === type) + if (find > -1) { + if (process.heavy[user][find] && process.onremovefunctions && process.onremovefunctions.heavy && process.onremovefunctions.heavy[process.heavy[user][find].type]) { + process.onremovefunctions.heavy[process.heavy[user][find].type](user); + } + process.heavy[user].splice(find,1); + } + } + else { + if (process.heavy[user][0] && process.onremovefunctions && process.onremovefunctions.heavy && process.onremovefunctions.heavy[process.heavy[user][0].type]) { + process.onremovefunctions.heavy[process.heavy[user][0].type](user); + } + process.heavy[user].splice(0,1); + } + } + if (process.heavy[user].length == 0) { + delete process.heavy[user] + } if (process.readytosave == undefined) { process.readytosave = {}; } process.readytosave.heavy = true; }; +/********* + * Retrieve a user's restrictions based on their current heavy bondage. + * - **(user id) user** to check heavy bondage for + * + * Returns an object: + * ### heavytags: [array of tags user is wearing] + * ### touchself: boolean + * ### touchothers: boolean + * ### touchlist: [array of userIDs user can action on]* + * + * *If **touchlist** is **undefined**, the user is NOT restricted from any particular target. + *********/ +const getHeavyRestrictions = (user) => { + let returnobject = { + heavytags: [], + touchself: true, + touchothers: true, + } + if (process.heavy == undefined) { + process.heavy = {}; + } + if (process.heavy[user] == undefined) { + return returnobject; // User is unbound, they can do anything. + } + else { + process.heavy[user].forEach((heavy) => { + if (getBaseHeavy(heavy.type).heavytags.includes("arms")) { + returnobject.heavytags.push("arms"); + returnobject.touchself = false; + returnobject.touchothers = false; + } + if (getBaseHeavy(heavy.type).heavytags.includes("legs")) { + returnobject.heavytags.push("legs"); + returnobject.touchothers = false; + } + if (getBaseHeavy(heavy.type).heavytags.includes("container")) { + returnobject.heavytags.push("container"); + if (!returnobject.touchlist) { + returnobject.touchlist = []; + } + // Users in a container can ONLY do stuff to OTHERS in that same container. + Object.keys(process.heavy).forEach((k) => { + if (getHeavy(k, heavy.type)) { + returnobject.touchlist.push(k); + } + }) + } + }) + console.log(returnobject.touchlist); + return returnobject; + } +} + +/************* + * Return all heavytags affecting a user ID right now. + * - **(user id) user** to check heavy bondage for + *************/ +const getHeavyTagsOnUser = (user) => { + if (process.heavy == undefined) { + process.heavy = {}; + } + if (process.heavy[user] == undefined) { + return []; // They're not bound by anything lol + } + else { + let tags = []; + process.heavy[user].forEach((heavy) => { + getBaseHeavy(heavy.type).heavytags.forEach((t) => { + tags.push(t); + }) + }) + return tags; + } +} + +/************ + * Check if **user** can bind **target** by ID. Returns **true** if able to, **false** if not. + * - **(user id) user** to check heavy bondage for + * - **(user id) target** to check if they can do anything to them + */ +const getHeavyBound = (user, target) => { + if (process.heavy == undefined) { + process.heavy = {}; + } + if (process.heavy[user] == undefined) { + return true; // No need to worry, they are able to do anything! + } + else { + let bound; + let heavyrestrictions = getHeavyRestrictions(user); + // Check if we can touch ourself + if (user == target) { + return heavyrestrictions.touchself; + } + // Check if the target user is in the same container AND we can touch others + else if (heavyrestrictions.touchlist) { + if (heavyrestrictions.touchlist.includes(target) && heavyrestrictions.touchothers) { + return true; + } + } + // Check if we can touch others + else { + return heavyrestrictions.touchothers; + } + } +} + exports.loadHeavyTypes = loadHeavyTypes; exports.heavytypes = heavytypes; exports.assignHeavy = assignHeavy; exports.getHeavy = getHeavy; +exports.getHeavyList = getHeavyList; exports.getHeavyBinder = getHeavyBinder; exports.removeHeavy = removeHeavy; exports.commandsheavy = heavytypes; -exports.convertheavy = convertheavy; +exports.convertheavy = getHeavyName; +exports.getHeavyName = getHeavyName; exports.getBaseHeavy = getBaseHeavy; exports.heavyDenialCoefficient = heavyDenialCoefficient; + +exports.getHeavyRestrictions = getHeavyRestrictions; +exports.getHeavyTagsOnUser = getHeavyTagsOnUser; +exports.getHeavyBound = getHeavyBound; \ No newline at end of file diff --git a/functions/interactivefunctions.js b/functions/interactivefunctions.js index b36ebbc..b3b778a 100644 --- a/functions/interactivefunctions.js +++ b/functions/interactivefunctions.js @@ -22,7 +22,7 @@ const { getBaseChastity } = require("./chastityfunctions.js"); // Generates a consent button which the user will have to agree to. const consentMessage = (interaction, user) => { let outtext = `# Consent to being Bound -<@${process.env.CLIENTID}> is a bot which facilitates restraints in this channel, which have certain effects on you as you wear them, primarily centered around some form of speech impairment. Effects will only apply within this channel. +<@${process.client.user.id}> is a bot which facilitates restraints in this channel, which have certain effects on you as you wear them, primarily centered around some form of speech impairment. Effects will only apply within this channel. Restraints and toys used include the following: - Gags, Corsets and Toys: Impair and modify speech in various ways - Mittens and Chastity: Restrict modifying these settings @@ -632,11 +632,6 @@ const assignMemeImages = () => { function checkBondageRemoval(userID, targetID, type) { let useroption = getOption(targetID, "removebondage"); - console.log(`PERMS`); - console.log(useroption == "all_binder_and_keyholder"); - console.log(canAccessCollar(userID, targetID, true)); - console.log(useroption == "all_binder_and_keyholder" && (canAccessChastity(targetID, userID, true).access || canAccessCollar(targetID, userID, true).access)); - // Return true immediately if it's accepted without question if (useroption == "accept") { return true; @@ -657,7 +652,7 @@ function checkBondageRemoval(userID, targetID, type) { if (useroption == "all_binder" || useroption == "all_binder_and_keyholder") { let restraintobject; if (type == "heavy") { - restraintobject = getHeavyBinder(targetID); + restraintobject = getHeavyBinder(targetID, type); } if (type == "gag") { restraintobject = getGagBinder(targetID); diff --git a/functions/outfitfunctions.js b/functions/outfitfunctions.js index 2fe8523..c1fad95 100644 --- a/functions/outfitfunctions.js +++ b/functions/outfitfunctions.js @@ -10,7 +10,7 @@ const { getCorset, getBaseCorset } = require("./corsetfunctions"); const { getChastity, getVibe, getChastityTimelock, getArousal, getChastityKeys, getArousalDescription, getArousalChangeDescription } = require("./vibefunctions"); const { getChastityBra } = require("./vibefunctions"); const { getHeadwear, getHeadwearName, getHeadwearRestrictions, getLockedHeadgear } = require("./headwearfunctions"); -const { getHeavy, convertheavy } = require("./heavyfunctions"); +const { getHeavy, convertheavy, getBaseHeavy, getHeavyList, getHeavyRestrictions } = require("./heavyfunctions"); const { canAccessChastity } = require("./vibefunctions"); const { canAccessChastityBra } = require("./vibefunctions"); const { getChastityName } = require("./vibefunctions"); @@ -755,7 +755,9 @@ async function inspectModal(userID, inspectuserIDin, menu, page) { } // Heavy Bondage if (getHeavy(inspectuserID)) { - wearingtext = `${wearingtext}\n${process.emojis.armbinder} Heavy Bondage: **${getHeavy(inspectuserID).type}**` + wearingtext = `${wearingtext}\n${process.emojis.armbinder} Heavy Bondage: **${getHeavyList(inspectuserID).map((heavy) => heavy.displayname).join(", ")}**` + let heavyrestrictions = getHeavyRestrictions(inspectuserID); + wearingtext = `${wearingtext}\n-# ‎ ⤷ ⛓️ Restrictions - **Arms: ${heavyrestrictions.touchself ? "✅" : "⛔"}, Legs: ${heavyrestrictions.touchothers ? "✅" : "⛔"}, Container: ${!heavyrestrictions.touchlist ? "✅" : "⛔"}**` } // Chastity Belt @@ -929,7 +931,9 @@ async function inspectModal(userID, inspectuserIDin, menu, page) { } // Heavy Bondage if (getHeavy(inspectuserID)) { - wearingtext = `${wearingtext}\n${process.emojis.armbinder} Heavy Bondage: **${getHeavy(inspectuserID).type}**` + wearingtext = `${wearingtext}\n${process.emojis.armbinder} Heavy Bondage: **${getHeavyList(inspectuserID).map((heavy) => heavy.displayname).join(", ")}**` + let heavyrestrictions = getHeavyRestrictions(inspectuserID); + wearingtext = `${wearingtext}\n-# ‎ ⤷ ⛓️ Restrictions - **Arms: ${heavyrestrictions.touchself ? "✅" : "⛔"}, Legs: ${heavyrestrictions.touchothers ? "✅" : "⛔"}, Container: ${!heavyrestrictions.touchlist ? "✅" : "⛔"}**` } let keyedrestraints = `## Keyed Restraints:` diff --git a/functions/textfunctions.js b/functions/textfunctions.js index d48ee95..810d7bb 100644 --- a/functions/textfunctions.js +++ b/functions/textfunctions.js @@ -808,329 +808,368 @@ const texts_headwear = { const texts_heavy = { heavy: [`USER_TAG writhes in USER_THEIR VAR_C1, trying to change USER_THEIR bondage, but may need some help!`], noheavy: { - self: [ - `USER_TAG slips into a VAR_C2, rendering USER_THEIR arms and hands completely useless!`, - // Doll - { - only: (t) => { - return t.c2 == "Doll Processing Facility"; + self: { + canwear: [ + `USER_TAG slips into a VAR_C2, rendering USER_THEIR arms and hands completely useless!`, + // Doll + { + only: (t) => { + return t.c2 == "Doll Processing Facility"; + }, + text: `Unable to resist the temptation, USER_TAG throws USER_THEMSELF into a VAR_C2 to become a Doll!`, }, - text: `Unable to resist the temptation, USER_TAG throws USER_THEMSELF into a VAR_C2 to become a Doll!`, - }, - // General Types - { - only: (t) => { - return t.c2.includes("Petsuit") || t.c2.includes("Piddlefours"); + // General Types + { + only: (t) => { + return t.c2.includes("Petsuit") || t.c2.includes("Piddlefours"); + }, + text: `USER_TAG slips into a VAR_C2, trapping USER_THEIR arms and legs and forcing them to crawl like a pet!`, }, - text: `USER_TAG slips into a VAR_C2, trapping USER_THEIR arms and legs and forcing them to crawl like a pet!`, - }, - // Stationary - { - only: (t) => { - return t.c2.includes("Display Stand"); + // Stationary + { + only: (t) => { + return t.c2.includes("Display Stand"); + }, + text: `USER_TAG climbs into the VAR_C2, securing USER_THEIR legs before sliding USER_THEIR arms into the rigid cuffs, locking them in place! USER_THEIR_CAP body is held in a strict, ramrod position!`, }, - text: `USER_TAG climbs into the VAR_C2, securing USER_THEIR legs before sliding USER_THEIR arms into the rigid cuffs, locking them in place! USER_THEIR_CAP body is held in a strict, ramrod position!`, - }, - { - only: (t) => { - return t.c2.includes("One Bar Prison"); + { + only: (t) => { + return t.c2.includes("One Bar Prison"); + }, + text: `USER_TAG steps onto the VAR_C2, spreading USER_THEIR legs to stand in the footrests. The pole rises between USER_THEIR legs, trapping USER_THEM in place!`, }, - text: `USER_TAG steps onto the VAR_C2, spreading USER_THEIR legs to stand in the footrests. The pole rises between USER_THEIR legs, trapping USER_THEM in place!`, - }, - { - only: (t) => { - return t.c2.includes("X-Frame"); + { + only: (t) => { + return t.c2.includes("X-Frame"); + }, + text: `USER_TAG steps up to the VAR_C2, bending down to secure USER_THEIR legs to the frame before reaching up and locking USER_THEIR arms into the upper cuffs leaving USER_THEMSELF completely exposed!`, }, - text: `USER_TAG steps up to the VAR_C2, bending down to secure USER_THEIR legs to the frame before reaching up and locking USER_THEIR arms into the upper cuffs leaving USER_THEMSELF completely exposed!`, - }, - { - only: (t) => { - return t.c2.includes("Wooden Horse"); + { + only: (t) => { + return t.c2.includes("Wooden Horse"); + }, + text: `USER_TAG climbs onto the VAR_C2, bending down to secure USER_THEIR legs into the cuffs and then laying over the frame and slipping USER_THEIR wrists into the front cuffs! USER_THEIR_CAP weight presses the top edge of the frame into USER_THEIR crotch!`, }, - text: `USER_TAG climbs onto the VAR_C2, bending down to secure USER_THEIR legs into the cuffs and then laying over the frame and slipping USER_THEIR wrists into the front cuffs! USER_THEIR_CAP weight presses the top edge of the frame into USER_THEIR crotch!`, - }, - { - only: (t) => { - return t.c2.includes("Latex Encasement"); + { + only: (t) => { + return t.c2.includes("Latex Encasement"); + }, + text: `USER_TAG steps into a latex puddle, feeling it spread over USER_THEIR feet and begin to climb up USER_THEIR legs. Before long everything below USER_THEIR neck is covered in a layer of latex!`, }, - text: `USER_TAG steps into a latex puddle, feeling it spread over USER_THEIR feet and begin to climb up USER_THEIR legs. Before long everything below USER_THEIR neck is covered in a layer of latex!`, - }, - { - only: (t) => { - return t.c2.includes("Dancer's Pole"); + { + only: (t) => { + return t.c2.includes("Dancer's Pole"); + }, + text: `USER_TAG climbs onto the stage and cuffs USER_THEMSELF to the VAR_C2, swaying to the beat and dancing sensually around it!`, }, - text: `USER_TAG climbs onto the stage and cuffs USER_THEMSELF to the VAR_C2, swaying to the beat and dancing sensually around it!`, - }, - { - only: (t) => { - return t.c2.includes("Pet Cage"); + { + only: (t) => { + return t.c2.includes("Pet Cage"); + }, + text: `USER_TAG crawls into the VAR_C2, blushing as USER_THEY hear the door to the VAR_C2 swing closed behind USER_THEM and lock with a soft click!`, }, - text: `USER_TAG crawls into the VAR_C2, blushing as USER_THEY hear the door to the VAR_C2 swing closed behind USER_THEM and lock with a soft click!`, - }, - { - only: (t) => { - return t.c2.includes("Leashing Post"); + { + only: (t) => { + return t.c2.includes("Leashing Post"); + }, + text: `USER_TAG walks over to the VAR_C2, clipping on a leash and blushing as USER_THEY kneelUSER_S down and tieUSER_S the other end to the VAR_C2!`, }, - text: `USER_TAG walks over to the VAR_C2, clipping on a leash and blushing as USER_THEY kneelUSER_S down and tieUSER_S the other end to the VAR_C2!`, - }, - // Latex - { - only: (t) => { - return t.c2.includes("Latex Vacbed"); + // Latex + { + only: (t) => { + return t.c2.includes("Latex Vacbed"); + }, + text: `USER_TAG slides between the sheets of the VAR_C2, allowing them to seal together behind USER_THEM. With a humming sound the air is pumped out, sealing USER_THEM helplessly in place!`, }, - text: `USER_TAG slides between the sheets of the VAR_C2, allowing them to seal together behind USER_THEM. With a humming sound the air is pumped out, sealing USER_THEM helplessly in place!`, - }, - { - only: (t) => { - return t.c2.includes("Latex Vaccube"); + { + only: (t) => { + return t.c2.includes("Latex Vaccube"); + }, + text: `USER_TAG slips into the VAR_C2 leaving only USER_THEIR head poking out as USER_THEY kneel in place. With a humming sound the air is pumped out and the latex seals around USER_THEM, trapping USER_THEM helplessly inside!`, }, - text: `USER_TAG slips into the VAR_C2 leaving only USER_THEIR head poking out as USER_THEY kneel in place. With a humming sound the air is pumped out and the latex seals around USER_THEM, trapping USER_THEM helplessly inside!`, - }, - // Furniture - { - only: (t) => { - return t.c2.includes("Bed Restraints"); + // Furniture + { + only: (t) => { + return t.c2.includes("Bed Restraints"); + }, + text: `Sitting on the bed, USER_TAG leans forward to lock USER_THEIR ankles into the VAR_C2, before lying back and reaching up to lock USER_THEIR arms into the remaining pair of cuffs in a spreadeagle!`, }, - text: `Sitting on the bed, USER_TAG leans forward to lock USER_THEIR ankles into the VAR_C2, before lying back and reaching up to lock USER_THEIR arms into the remaining pair of cuffs in a spreadeagle!`, - }, - { - only: (t) => { - return t.c2.includes("Chair with Cuffs"); + { + only: (t) => { + return t.c2.includes("Chair with Cuffs"); + }, + text: `Sitting down in the VAR_C2, USER_TAG leans forward to slip USER_THEIR ankles into the ankle cuffs, before sliding USER_THEIR arms into cuffs behind USER_THEM and allowing them to snap shut!`, }, - text: `Sitting down in the VAR_C2, USER_TAG leans forward to slip USER_THEIR ankles into the ankle cuffs, before sliding USER_THEIR arms into cuffs behind USER_THEM and allowing them to snap shut!`, - }, - // Encasement or Wrappings - { - only: (t) => { - return t.c2.includes("Autotape"); + // Encasement or Wrappings + { + only: (t) => { + return t.c2.includes("Autotape"); + }, + text: `USER_TAG releases a swarm of small drones that zip around USER_THEM, dispensing Autotape and binding USER_THEM into an VAR_C2!`, }, - text: `USER_TAG releases a swarm of small drones that zip around USER_THEM, dispensing Autotape and binding USER_THEM into an VAR_C2!`, - }, - { - only: (t) => { - return t.c2.includes("Bandage"); + { + only: (t) => { + return t.c2.includes("Bandage"); + }, + text: `USER_TAG pulls out a roll of VAR_C2 and enchants them to wind around USER_THEMSELF! Soon enough USER_THEY USER_ISARE completely mummified by the VAR_C3!`, }, - text: `USER_TAG pulls out a roll of VAR_C2 and enchants them to wind around USER_THEMSELF! Soon enough USER_THEY USER_ISARE completely mummified by the VAR_C3!`, - }, - // Comfy - { - only: (t) => { - return t.c2.includes("Weighted Blanket"); + // Comfy + { + only: (t) => { + return t.c2.includes("Weighted Blanket"); + }, + text: `USER_TAG slips into a VAR_C2! Unfortunately, it is so comfy that USER_THEY can't wiggle out of the extremely heavy blanket!`, }, - text: `USER_TAG slips into a VAR_C2! Unfortunately, it is so comfy that USER_THEY can't wiggle out of the extremely heavy blanket!`, - }, - { - only: (t) => { - return t.c2.includes("Blanket Burrito"); + { + only: (t) => { + return t.c2.includes("Blanket Burrito"); + }, + text: `Rolling USER_THEMSELF into a VAR_C2, USER_TAG realises USER_THEY might be trapped by USER_THEIR own comfort!`, }, - text: `Rolling USER_THEMSELF into a VAR_C2, USER_TAG realises USER_THEY might be trapped by USER_THEIR own comfort!`, - }, - { - only: (t) => { - return t.c2.includes("Toasty Kotatsu"); + { + only: (t) => { + return t.c2.includes("Toasty Kotatsu"); + }, + text: `As USER_THEY slide into the warmth of the VAR_C2, USER_TAG realises USER_THEY can't bring USER_THEMSELF to leave the VAR_C2!`, }, - text: `As USER_THEY slide into the warmth of the VAR_C2, USER_TAG realises USER_THEY can't bring USER_THEMSELF to leave the VAR_C2!`, - }, - // Misc - { - only: (t) => { - return t.c2.includes("Festive Ribbons") || t.c2.includes("Wrapping Paper"); + // Misc + { + only: (t) => { + return t.c2.includes("Festive Ribbons") || t.c2.includes("Wrapping Paper"); + }, + text: `USER_THEY carefully wraps USER_THEMSELF in VAR_C2! Who is the lucky person recieving such a present~?`, }, - text: `USER_THEY carefully wraps USER_THEMSELF in VAR_C2! Who is the lucky person recieving such a present~?`, - }, - { - only: (t) => { - return t.c2.includes("Magic Mirror"); + { + only: (t) => { + return t.c2.includes("Magic Mirror"); + }, + text: `USER_TAG places a hand on the VAR_C2, then in a flash of light finds themselves trapped within the reflection!`, }, - text: `USER_TAG places a hand on the VAR_C2, then in a flash of light finds themselves trapped within the reflection!`, - }, - { - only: (t) => { - return t.c2.includes("Mimic"); + { + only: (t) => { + return t.c2.includes("Mimic"); + }, + text: `USER_TAG disturbs a VAR_C2! It snaps open and entangles USER_THEIR arms and legs with its tentacles, dragging USER_THEM inside and slamming shut before sealing with a resounding click!`, }, - text: `USER_TAG disturbs a VAR_C2! It snaps open and entangles USER_THEIR arms and legs with its tentacles, dragging USER_THEM inside and slamming shut before sealing with a resounding click!`, - }, - { - only: (t) => { - return t.c2.includes("Hands-off Blouse"); + { + only: (t) => { + return t.c2.includes("Hands-off Blouse"); + }, + text: `USER_TAG puts a VAR_C2 on, slipping USER_THEIR arms into the arms and placing USER_THEIR hands into the integrated mittens. Using a magical spell, USER_THEY threadUSER_S USER_THEIR hand mitten straps through the neck cuff and ties them into a neat bow in front!`, }, - text: `USER_TAG puts a VAR_C2 on, slipping USER_THEIR arms into the arms and placing USER_THEIR hands into the integrated mittens. Using a magical spell, USER_THEY threadUSER_S USER_THEIR hand mitten straps through the neck cuff and ties them into a neat bow in front!`, - }, - { - only: (t) => { - return t.c2.includes("Sphere"); + { + only: (t) => { + return t.c2.includes("Sphere"); + }, + text: `USER_TAG tosses a VAR_C2 in the air and lets it hit USER_THEIR head, activating its capture function and sealing USER_THEM inside!`, }, - text: `USER_TAG tosses a VAR_C2 in the air and lets it hit USER_THEIR head, activating its capture function and sealing USER_THEM inside!`, - }, - ], - other: [ - `USER_TAG pulls a VAR_C3 out and grabs TARGET_TAG, forcing TARGET_THEIR arms and hands into the tight restraint! TARGET_THEY_CAP squirmTARGET_S in protest, but TARGET_THEY can't do anything about it!`, - // Doll - { - only: (t) => { - return t.c3 == "Doll Processing Facility"; + ], + nocanwear: { + arms: [ + `USER_TAG tries to put their arms in a VAR_C3 somehow, but USER_THEIR VAR_C4 is in the way!` + ], + legs: [ + `USER_TAG tries to further restrain USER_THEIR legs with a VAR_C3, but that's quite unnecessary because of USER_THEIR VAR_C4.` + ], + container: [ + `USER_TAG tries to step into a VAR_C3, but since USER_THEY USER_ISARE already in a VAR_C4, USER_THEY would need some kind of spacial magic!` + ] + } + }, + other: { + canwear: [ + `USER_TAG pulls a VAR_C3 out and grabs TARGET_TAG, forcing TARGET_THEIR arms and hands into the tight restraint! TARGET_THEY_CAP squirmTARGET_S in protest, but TARGET_THEY can't do anything about it!`, + // Doll + { + only: (t) => { + return t.c3 == "Doll Processing Facility"; + }, + text: `Snickering to USER_THEMSELF, USER_TAG throws TARGET_TAG into a VAR_C3 to become a Doll!`, }, - text: `Snickering to USER_THEMSELF, USER_TAG throws TARGET_TAG into a VAR_C3 to become a Doll!`, - }, - // General Types - { - only: (t) => { - return t.c3.includes("Petsuit") || t.c3.includes("Piddlefours"); + // General Types + { + only: (t) => { + return t.c3.includes("Petsuit") || t.c3.includes("Piddlefours"); + }, + text: `USER_TAG pushes TARGET_TAG to TARGET_THEIR knees before kneeling down USER_THEMSELF and slipping TARGET_THEIR limbs into a VAR_C3, forcing TARGET_THEM to crawl around like a pet!`, }, - text: `USER_TAG pushes TARGET_TAG to TARGET_THEIR knees before kneeling down USER_THEMSELF and slipping TARGET_THEIR limbs into a VAR_C3, forcing TARGET_THEM to crawl around like a pet!`, - }, - // Stationary - { - only: (t) => { - return t.c3.includes("Display Stand"); + // Stationary + { + only: (t) => { + return t.c3.includes("Display Stand"); + }, + text: `USER_TAG lifts TARGET_TAG into the VAR_C3, securing TARGET_THEIR legs before guiding TARGET_THEIR arms into the rigid cuffs, locking them in place! TARGET_THEIR_CAP body is held in a strict, ramrod position!`, }, - text: `USER_TAG lifts TARGET_TAG into the VAR_C3, securing TARGET_THEIR legs before guiding TARGET_THEIR arms into the rigid cuffs, locking them in place! TARGET_THEIR_CAP body is held in a strict, ramrod position!`, - }, - { - only: (t) => { - return t.c3.includes("One Bar Prison"); + { + only: (t) => { + return t.c3.includes("One Bar Prison"); + }, + text: `USER_TAG guides TARGET_TAG onto the VAR_C3, forcing TARGET_THEM to spread TARGET_THEIR legs to stand in the footrests before holding TARGET_THEM in place as the pole rises between TARGET_THEIR's legs, trapping TARGET_THEM in place!`, }, - text: `USER_TAG guides TARGET_TAG onto the VAR_C3, forcing TARGET_THEM to spread TARGET_THEIR legs to stand in the footrests before holding TARGET_THEM in place as the pole rises between TARGET_THEIR's legs, trapping TARGET_THEM in place!`, - }, - { - only: (t) => { - return t.c3.includes("X-Frame"); + { + only: (t) => { + return t.c3.includes("X-Frame"); + }, + text: `USER_TAG presses TARGET_TAG up against the VAR_C3, reaching up and locking TARGET_THEIR arms into the upper cuffs. Then after trapping TARGET_THEM, USER_THEY bendUSER_S down to lock TARGET_THEIR legs to the frame, leaving TARGET_THEM completely exposed!`, }, - text: `USER_TAG presses TARGET_TAG up against the VAR_C3, reaching up and locking TARGET_THEIR arms into the upper cuffs. Then after trapping TARGET_THEM, USER_THEY bendUSER_S down to lock TARGET_THEIR legs to the frame, leaving TARGET_THEM completely exposed!`, - }, - { - only: (t) => { - return t.c3.includes("Wooden Horse"); + { + only: (t) => { + return t.c3.includes("Wooden Horse"); + }, + text: `USER_TAG helps TARGET_TAG climb onto the VAR_C3, securing TARGET_THEIR legs into the cuffs and then reaching over and securing TARGET_THEIR wrists into the front cuffs! Stepping back to enjoy the sight of TARGET_TAG squirming as TARGET_THEIR_CAP weight presses the top edge of the frame into TARGET_THEIR crotch!`, }, - text: `USER_TAG helps TARGET_TAG climb onto the VAR_C3, securing TARGET_THEIR legs into the cuffs and then reaching over and securing TARGET_THEIR wrists into the front cuffs! Stepping back to enjoy the sight of TARGET_TAG squirming as TARGET_THEIR_CAP weight presses the top edge of the frame into TARGET_THEIR crotch!`, - }, - { - only: (t) => { - return t.c3.includes("Latex Encasement"); + { + only: (t) => { + return t.c3.includes("Latex Encasement"); + }, + text: `USER_TAG guides TARGET_TAG into a latex puddle, watching as it spreads over TARGET_THEIR feet and begins to climb up TARGET_THEIR legs. Before long everything below TARGET_THEIR neck is covered in a layer of latex!`, }, - text: `USER_TAG guides TARGET_TAG into a latex puddle, watching as it spreads over TARGET_THEIR feet and begins to climb up TARGET_THEIR legs. Before long everything below TARGET_THEIR neck is covered in a layer of latex!`, - }, - { - only: (t) => { - return t.c3.includes("Dancer's Pole"); + { + only: (t) => { + return t.c3.includes("Dancer's Pole"); + }, + text: `USER_TAG helps TARGET_TAG climb onto the stage and cuffs TARGET_THEMSELF to the VAR_C3, swatting TARGET_THEM on the ass before climbing down and settling into a comfortable seat to watch TARGET_TAG dancing sensually for USER_THEIR enjoyment~!`, }, - text: `USER_TAG helps TARGET_TAG climb onto the stage and cuffs TARGET_THEMSELF to the VAR_C3, swatting TARGET_THEM on the ass before climbing down and settling into a comfortable seat to watch TARGET_TAG dancing sensually for USER_THEIR enjoyment~!`, - }, - { - only: (t) => { - return t.c3.includes("Pet Cage"); + { + only: (t) => { + return t.c3.includes("Pet Cage"); + }, + text: `USER_TAG opens the door and gestures for TARGET_TAG to crawl into the VAR_C3, swinging the door closed behind TARGET_THEM and locking it in place with a soft but final click!`, }, - text: `USER_TAG opens the door and gestures for TARGET_TAG to crawl into the VAR_C3, swinging the door closed behind TARGET_THEM and locking it in place with a soft but final click!`, - }, - { - only: (t) => { - return t.c3.includes("Leashing Post"); + { + only: (t) => { + return t.c3.includes("Leashing Post"); + }, + text: `USER_TAG leads TARGET_TAG over to the VAR_C3, forcing TARGET_THEM to kneel down before leashing TARGET_THEM securely to the VAR_C3!`, }, - text: `USER_TAG leads TARGET_TAG over to the VAR_C3, forcing TARGET_THEM to kneel down before leashing TARGET_THEM securely to the VAR_C3!`, - }, - // Latex - { - only: (t) => { - return t.c3.includes("Latex Vacbed"); + // Latex + { + only: (t) => { + return t.c3.includes("Latex Vacbed"); + }, + text: `USER_TAG lifts the upper sheet of the VAR_C3, waiting while TARGET_TAG slides into the VAR_C3, before dropping it back in place and allowing the sheets to seal together around TARGET_THEM. With a humming sound the air is pumped out, sealing TARGET_TAG helplessly in place!`, }, - text: `USER_TAG lifts the upper sheet of the VAR_C3, waiting while TARGET_TAG slides into the VAR_C3, before dropping it back in place and allowing the sheets to seal together around TARGET_THEM. With a humming sound the air is pumped out, sealing TARGET_TAG helplessly in place!`, - }, - { - only: (t) => { - return t.c3.includes("Latex Vaccube"); + { + only: (t) => { + return t.c3.includes("Latex Vaccube"); + }, + text: `USER_TAG helps TARGET_TAG slip into the VAR_C3, leaving only TARGET_THEIR head poking out as TARGET_THEY kneelUSER_S within the cube. With a humming sound the air is pumped out and the latex seals around TARGET_THEM, trapping TARGET_THEM helplessly inside!`, }, - text: `USER_TAG helps TARGET_TAG slip into the VAR_C3, leaving only TARGET_THEIR head poking out as TARGET_THEY kneelUSER_S within the cube. With a humming sound the air is pumped out and the latex seals around TARGET_THEM, trapping TARGET_THEM helplessly inside!`, - }, - // Furniture - { - only: (t) => { - return t.c3.includes("Bed Restraints"); + // Furniture + { + only: (t) => { + return t.c3.includes("Bed Restraints"); + }, + text: `Guiding TARGET_TAG to stretch out on the bed, USER_TAG leans over to lock TARGET_THEIR ankles into the VAR_C3 before straddling TARGET_THEM and reaching up to lock TARGET_THEIR arms into the remaining pair of cuffs, leaving TARGET_THEM helplessly spread out beneath USER_THEM~!`, }, - text: `Guiding TARGET_TAG to stretch out on the bed, USER_TAG leans over to lock TARGET_THEIR ankles into the VAR_C3 before straddling TARGET_THEM and reaching up to lock TARGET_THEIR arms into the remaining pair of cuffs, leaving TARGET_THEM helplessly spread out beneath USER_THEM~!`, - }, - { - only: (t) => { - return t.c3.includes("Chair with Cuffs"); + { + only: (t) => { + return t.c3.includes("Chair with Cuffs"); + }, + text: `Sitting TARGET_TAG down in the VAR_C3, USER_TAG kneels and slips TARGET_THEIR ankles into the ankle cuffs, before standing up and walking around to slip TARGET_THEIR arms into cuffs behind TARGET_THEM and snapping them shut!`, }, - text: `Sitting TARGET_TAG down in the VAR_C3, USER_TAG kneels and slips TARGET_THEIR ankles into the ankle cuffs, before standing up and walking around to slip TARGET_THEIR arms into cuffs behind TARGET_THEM and snapping them shut!`, - }, - // Encasement or Wrappings - { - only: (t) => { - return t.c3.includes("Autotape"); + // Encasement or Wrappings + { + only: (t) => { + return t.c3.includes("Autotape"); + }, + text: `USER_TAG releases a swarm of small drones that zip around TARGET_TAG, dispensing Autotape and binding TARGET_THEM into an VAR_C3!`, }, - text: `USER_TAG releases a swarm of small drones that zip around TARGET_TAG, dispensing Autotape and binding TARGET_THEM into an VAR_C3!`, - }, - { - only: (t) => { - return t.c3.includes("Bandage"); + { + only: (t) => { + return t.c3.includes("Bandage"); + }, + text: `USER_TAG pulls out a roll of VAR_C3 and begins to wind them around TARGET_TAG! Soon enough TARGET_THEY TARGET_ISARE completely mummified by the VAR_C3!`, }, - text: `USER_TAG pulls out a roll of VAR_C3 and begins to wind them around TARGET_TAG! Soon enough TARGET_THEY TARGET_ISARE completely mummified by the VAR_C3!`, - }, - // Comfy - { - only: (t) => { - return t.c3.includes("Weighted Blanket"); + // Comfy + { + only: (t) => { + return t.c3.includes("Weighted Blanket"); + }, + text: `USER_TAG tosses a VAR_C3 over TARGET_TAG! It is so comfy that TARGET_THEY can't bring TARGET_THEMSELF to wriggle out from under the extremely heavy blanket!`, }, - text: `USER_TAG tosses a VAR_C3 over TARGET_TAG! It is so comfy that TARGET_THEY can't bring TARGET_THEMSELF to wriggle out from under the extremely heavy blanket!`, - }, - { - only: (t) => { - return t.c3.includes("Blanket Burrito"); + { + only: (t) => { + return t.c3.includes("Blanket Burrito"); + }, + text: `USER_TAG wraps TARGET_TAG up into a VAR_C3! It doesn't take TARGET_TAG long before TARGET_THEY realiseUSER_S USER_TAG has trapped TARGET_THEM in a warm comfy prison!`, }, - text: `USER_TAG wraps TARGET_TAG up into a VAR_C3! It doesn't take TARGET_TAG long before TARGET_THEY realiseUSER_S USER_TAG has trapped TARGET_THEM in a warm comfy prison!`, - }, - { - only: (t) => { - return t.c3.includes("Toasty Kotatsu"); + { + only: (t) => { + return t.c3.includes("Toasty Kotatsu"); + }, + text: `As USER_TAG helps TARGET_TAG slide into the warmth of the VAR_C3, TARGET_TAG realises TARGET_THEY can't bring TARGET_THEMSELF to leave the VAR_C3!`, }, - text: `As USER_TAG helps TARGET_TAG slide into the warmth of the VAR_C3, TARGET_TAG realises TARGET_THEY can't bring TARGET_THEMSELF to leave the VAR_C3!`, - }, - // Misc - { - only: (t) => { - return t.c3.includes("Festive Ribbons") || t.c3.includes("Wrapping Paper"); + // Misc + { + only: (t) => { + return t.c3.includes("Festive Ribbons") || t.c3.includes("Wrapping Paper"); + }, + text: `USER_TAG carefully wraps TARGET_TAG in VAR_C3! Who USER_ISARE USER_THEY planning to gift such a present to~?`, }, - text: `USER_TAG carefully wraps TARGET_TAG in VAR_C3! Who USER_ISARE USER_THEY planning to gift such a present to~?`, - }, - { - only: (t) => { - return t.c3.includes("Magic Mirror"); + { + only: (t) => { + return t.c3.includes("Magic Mirror"); + }, + text: `USER_TAG pushes TARGET_TAG backwards into a VAR_C3! As TARGET_THEY touchUSER_ES it the Mirror emits a bright flash of light, and TARGET_TAG finds TARGET_THEMSELF trapped within the reflection!`, }, - text: `USER_TAG pushes TARGET_TAG backwards into a VAR_C3! As TARGET_THEY touchUSER_ES it the Mirror emits a bright flash of light, and TARGET_TAG finds TARGET_THEMSELF trapped within the reflection!`, - }, - { - only: (t) => { - return t.c3.endsWith("'s Lap"); + { + only: (t) => { + return t.c3.endsWith("'s Lap"); + }, + text: `USER_TAG pulls TARGET_TAG into USER_THEIR lap, holding TARGET_THEM gently but firmly.`, }, - text: `USER_TAG pulls TARGET_TAG into USER_THEIR lap, holding TARGET_THEM gently but firmly.`, - }, - { - only: (t) => { - return t.c3.includes("Mimic"); + { + only: (t) => { + return t.c3.includes("Mimic"); + }, + text: `With a cheeky grin, USER_TAG tosses TARGET_TAG towards a resting VAR_C3! It snaps open and drags TARGET_THEM inside with its tentacles before slamming shut and sealing with a resounding click!`, }, - text: `With a cheeky grin, USER_TAG tosses TARGET_TAG towards a resting VAR_C3! It snaps open and drags TARGET_THEM inside with its tentacles before slamming shut and sealing with a resounding click!`, - }, - { - only: (t) => { - return t.c3.includes("Hands-off Blouse"); + { + only: (t) => { + return t.c3.includes("Hands-off Blouse"); + }, + text: `USER_TAG helps TARGET_TAG into a VAR_C3, pulling the arm sleeves and integrated mittens over TARGET_THEIR arms and hands! Once buttoned up, USER_THEY grabUSER_S the straps on TARGET_THEIR mittens and pulls them behind TARGET_THEM into a reverse prayer, threading the mitten straps through TARGET_THEIR neck cuff on the blouse, and then tying them into a neat bow.`, }, - text: `USER_TAG helps TARGET_TAG into a VAR_C3, pulling the arm sleeves and integrated mittens over TARGET_THEIR arms and hands! Once buttoned up, USER_THEY grabUSER_S the straps on TARGET_THEIR mittens and pulls them behind TARGET_THEM into a reverse prayer, threading the mitten straps through TARGET_THEIR neck cuff on the blouse, and then tying them into a neat bow.`, - }, - { - only: (t) => { - return t.c3.includes("Sphere"); + { + only: (t) => { + return t.c3.includes("Sphere"); + }, + text: `USER_TAG throws a VAR_C3 at TARGET_TAG! It clunks off of TARGET_THEIR body before activating and pulling TARGET_THEM inside!`, }, - text: `USER_TAG throws a VAR_C3 at TARGET_TAG! It clunks off of TARGET_THEIR body before activating and pulling TARGET_THEM inside!`, - }, - ], + ], + nocanwear: { + arms: [ + `USER_TAG tries to put TARGET_TAG's arms into a VAR_C3, however TARGET_THEIR arms are already quite helplessly bound in a VAR_C4.` + ], + legs: [ + `USER_TAG tries to immobilize TARGET_TAG's legs using a VAR_C3, but TARGET_THEY TARGET_ISARE already unable to reach everyone because of TARGET_THEIR VAR_C4.` + ], + container: [ + `USER_TAG tries to toss TARGET_TAG into a VAR_C3, but TARGET_THEY are already trapped in a VAR_C4!` + ] + } + }, reflect: { - other: [ - `TARGET_TAG tries to put USER_TAG in a VAR_C3. Unfortunately for TARGET_THEM, it is far faster and instead turns the tables to put it on TARGET_THEM!`, - `The USER_TAG stares at TARGET_TAG, almost audibly sighing to itself as it sees the VAR_C3. It places it swiftly on the brat.`, - `USER_TAG grins widely as TARGET_TAG throws a VAR_C3 at it, before picking it up with several mechanical arms and forcing TARGET_THEM into it.`, - `A giggle is heard from the USER_TAG's vocal servos as it grabs the VAR_C3 out of TARGET_TAG's hands and forces TARGET_THEM into it!` - ] + other: { + canwear: [ + `TARGET_TAG tries to put USER_TAG in a VAR_C3. Unfortunately for TARGET_THEM, it is far faster and instead turns the tables to put it on TARGET_THEM!`, + `The USER_TAG stares at TARGET_TAG, almost audibly sighing to itself as it sees the VAR_C3. It places it swiftly on the brat.`, + `USER_TAG grins widely as TARGET_TAG throws a VAR_C3 at it, before picking it up with several mechanical arms and forcing TARGET_THEM into it.`, + `A giggle is heard from the USER_TAG's vocal servos as it grabs the VAR_C3 out of TARGET_TAG's hands and forces TARGET_THEM into it!` + ], + nocanwear: { + arms: [ + `TARGET_TAG scoots against a VAR_C3, but since USER_THEY USER_ISARE wearing a VAR_C4, the USER_TAG simply laughs at the useless response.` + ], + legs: [ + `TARGET_TAG tries USER_THEIR very best to bind the USER_TAG's legs with a VAR_C3. Since it cannot put it on TARGET_THEM due to TARGET_THEIR VAR_C4, it quietly discards the restraint.` + ], + container: [ + `TARGET_TAG tries to throw USER_TAG into a VAR_C3 using dimensional space magic but the spell fizzles. It cannot retaliate because it does not know such space magic.` + ] + } + } } } }; diff --git a/index.js b/index.js index 00a77be..449060a 100644 --- a/index.js +++ b/index.js @@ -108,18 +108,27 @@ processdatatoload.forEach((s) => { } }) -/*try { - // remove empty arrays in process.gag - for (const key in process.gags) { - if (process.gags[key].length == 0) { - delete process.gags[key]; - console.log(`Deleting process.gag entry for ${key}`); +try { + // Remove existing heavies for new system in outfits + for (const key in process.outfits) { + if (process.outfits[key]) { + for (let i = 0; i < process.outfits[key].length; i++) { + if (process.outfits[key][i] && process.outfits[key][i].heavy) { + console.log(`Deleting process.outfits.heavy entry for ${key} for outfit ${i+1}`); + console.log(process.outfits[key][i]) + process.outfits[key][i].heavy = undefined; + if (process.readytosave == undefined) { + process.readytosave = {}; + } + process.readytosave.outfits = true; + } + } } } } catch (err) { console.log(err); -}*/ +} // Later loaders for autocompletes setUpGags();