mirror of
https://gitgud.io/BondageProjects/Bondage-College.git
synced 2026-04-28 04:19:50 +00:00
Fix a crash in the dialog code when selecting another character
This goes a bit deeper, and removes the extra `DialogDontAllowItemPermssion` in favor of a negated check on `DialogAllowsItem`. Also rename those functions to clarify that one of them is a setter.
This commit is contained in:
parent
f306359d62
commit
fc5bcdcd45
5 changed files with 14 additions and 22 deletions
|
|
@ -1,7 +1,7 @@
|
|||
PlayerGagged,,,(You can use or remove items by selecting specific body regions.),,DialogDoAllowItem()
|
||||
PlayerGagged,,,(You don't have access to use or remove items on DialogCharacterObject.),,DialogDontAllowItemPermission()
|
||||
0,,,(You can use or remove items by selecting specific body regions.),,DialogDoAllowItem()
|
||||
0,,,(You don't have access to use or remove items on DialogCharacterObject.),,DialogDontAllowItemPermission()
|
||||
PlayerGagged,,,(You can use or remove items by selecting specific body regions.),,DialogAllowsItem()
|
||||
PlayerGagged,,,(You don't have access to use or remove items on DialogCharacterObject.),,!DialogAllowsItem()
|
||||
0,,,(You can use or remove items by selecting specific body regions.),,DialogAllowsItem()
|
||||
0,,,(You don't have access to use or remove items on DialogCharacterObject.),,!DialogAllowsItem()
|
||||
0,,(View DialogCharacterPossessive profile.),,DialogViewProfile(),
|
||||
0,,(Change DialogCharacterPossessive clothes.),,DialogChangeClothes(),DialogCanChangeClothes()
|
||||
0,10,(Manage your relationship.),"(You can give more access to your items by putting DialogCharacterObject on your whitelist, or less control by putting DialogCharacterObject on your blacklist.)",,
|
||||
|
|
|
|||
|
|
|
@ -130,9 +130,9 @@ ResultDrawBondage,0,Maybe later. (Leave her.),,DialogLeave(),
|
|||
140,10,Wow! That was great.,"Oh yes! That was wonderful, but let's dress before we get caught. (You both dress back up.) Another game?",RestoreAppearance(),
|
||||
140,10,I needed that.,"Same here. That was amazing, but let's dress before we get caught. (You both dress back up.) Another game?",RestoreAppearance(),
|
||||
140,10,Best chess game ever.,"Absolutely. That was great, but let's dress before we get caught. (You both dress back up.) Another game?",RestoreAppearance(),
|
||||
200,210,I have some toys for you.,What kind of toys? What do you have in your bag? (You can now use your items on her.),DialogAllowItem(True),
|
||||
200,210,I've brought some BDSM items for you.,BDSM items? What do you have in your bag? (You can now use your items on her.),DialogAllowItem(True),
|
||||
200,210,You will be my bondage model.,What's a bondage model? What do you have in your bag? (You can now use your items on her.),DialogAllowItem(True),
|
||||
200,210,I have some toys for you.,What kind of toys? What do you have in your bag? (You can now use your items on her.),DialogSetAllowItem(True),
|
||||
200,210,I've brought some BDSM items for you.,BDSM items? What do you have in your bag? (You can now use your items on her.),DialogSetAllowItem(True),
|
||||
200,210,You will be my bondage model.,What's a bondage model? What do you have in your bag? (You can now use your items on her.),DialogSetAllowItem(True),
|
||||
210,,,(She seems to worry a little.) What will you do to me?,,
|
||||
210,,(Strip her down.),(You strip her naked as she blushes.) I won't let you beat me again.,DialogNaked(Opponent),CanStripOpponent()
|
||||
210,,(Pinch her.),(She screams softly as you pinch her skin.) Ow! Unfair!,OpponentBlush(),
|
||||
|
|
|
|||
|
|
|
@ -37,7 +37,7 @@ ItemPelvisCrop,,,(You lash the leather crop pretty hard on her.) Oooow! I'm gl
|
|||
10,,Can I make my room bigger?,"Yes, you can get two room expansions. Each of them will allow you to receive four more friends.",,
|
||||
10,,What are the improvements I can get?,"Wardrobe, fancy beds, cages, security and expansions for now. But the club is always improving, you can check again later.",,
|
||||
10,0,That's all the questions I had.,Alright. What can I do for you then?,,
|
||||
20,0,Can I tie you up?,"Alright, you can use anything you want on me. I won't complain too much.",DialogAllowItem(true),"DialogReputationGreater(""Dominant"", -29)"
|
||||
20,0,Can I tie you up?,"Alright, you can use anything you want on me. I won't complain too much.",DialogSetAllowItem(true),"DialogReputationGreater(""Dominant"", -29)"
|
||||
20,0,Can I tie you up?,A subbie like you? No way! (She grabs your arms and restrains them.) This is much better.,"DialogWearRandomItem(""ItemArms"")","DialogReputationLess(""Dominant"", -30)"
|
||||
20,0,Will you tie me up?,Sure! Give me your hands. (She restrains your arms.) Anything else I can do for you?,"DialogWearRandomItem(""ItemArms"")","DialogReputationLess(""Dominant"", 29)"
|
||||
20,0,Will you tie me up?,"Miss, I cannot tie you up. I don't want to get in trouble with a Domme.",,"DialogReputationGreater(""Dominant"", 30)"
|
||||
|
|
|
|||
|
|
|
@ -86,9 +86,9 @@ RemoveVibratingEgg,,,(She does one last moan as you remove the egg.) Ooooh! Th
|
|||
110,,,Mistress Sophie? DialogPlayerName? Marco? (She laughs.),,
|
||||
110,,I shouldn't be here?,I don't know if you'll get in trouble for being here. Don't make Mistress Sophie angry.,DialogRemove(),
|
||||
110,,Do you want to be left alone?,"I guess you can stay, it's boring to be left alone. Unless it's part of my punishment and you could get in trouble with Mistress Sophie.",DialogRemove(),
|
||||
110,120,Do you want to get out of these chains?,Sure! It's been a while now. Do you have the key or something to pick the lock? (She shows you her restraints.),DialogAllowItem(True),
|
||||
110,120,Can I play with you?,Of course! The more the merrier. (She giggles and gets a little bit closer.),DialogAllowItem(True),
|
||||
110,120,(Play with her.),(She giggles and gets a little bit closer.),DialogAllowItem(True),
|
||||
110,120,Do you want to get out of these chains?,Sure! It's been a while now. Do you have the key or something to pick the lock? (She shows you her restraints.),DialogSetAllowItem(True),
|
||||
110,120,Can I play with you?,Of course! The more the merrier. (She giggles and gets a little bit closer.),DialogSetAllowItem(True),
|
||||
110,120,(Play with her.),(She giggles and gets a little bit closer.),DialogSetAllowItem(True),
|
||||
110,,(Leave her.),,DialogLeave(),
|
||||
120,,,I'm so glad that you and Amanda came here. I wish I could hug you both.,,KnowAmandaInRoom()
|
||||
120,,,Mistress Sophie? DialogPlayerName? Marco? (She laughs.),,"DialogIsBlind(""CurrentCharacter"")"
|
||||
|
|
|
|||
|
|
|
@ -229,7 +229,7 @@ function DialogGetCharacter(C) {
|
|||
// @ts-ignore Strict-TS: force-cast here because there's a bunch of side-effects to having this return `null`
|
||||
return (C.toUpperCase().trim() == "PLAYER") ? Player : CurrentCharacter;
|
||||
}
|
||||
return C;
|
||||
return C ?? CurrentCharacter;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -337,7 +337,7 @@ function DialogLogQuery(LogType, LogGroup) { return LogQuery(LogType, LogGroup);
|
|||
* Sets the AllowItem flag on the current character
|
||||
* @param {string} Allow - The flag to set. Either "TRUE" or "FALSE"
|
||||
*/
|
||||
function DialogAllowItem(Allow) { if (CurrentCharacter) CurrentCharacter.AllowItem = (Allow.toUpperCase().trim() == "TRUE"); }
|
||||
function DialogSetAllowItem(Allow) { if (CurrentCharacter) CurrentCharacter.AllowItem = (Allow.toUpperCase().trim() == "TRUE"); }
|
||||
|
||||
/**
|
||||
* Returns the value of the AllowItem flag of a given character
|
||||
|
|
@ -345,15 +345,7 @@ function DialogAllowItem(Allow) { if (CurrentCharacter) CurrentCharacter.AllowIt
|
|||
* Either the player (value: Player) or the current character (value: CurrentCharacter)
|
||||
* @returns {boolean} - The value of the given character's AllowItem flag
|
||||
*/
|
||||
function DialogDoAllowItem(C) { return !DialogDontAllowItemPermission(C); }
|
||||
|
||||
|
||||
/**
|
||||
* Returns TRUE if the AllowItem flag doesn't allow putting an item on the current character
|
||||
* @param {string | Character} C
|
||||
* @returns {boolean} - The reversed value of the given character's AllowItem flag
|
||||
*/
|
||||
function DialogDontAllowItemPermission(C) { return !DialogGetCharacter(C).AllowItem; }
|
||||
function DialogAllowsItem(C) { C = DialogGetCharacter(C ?? CharacterGetCurrent()); return C?.AllowItem ?? false; }
|
||||
|
||||
/**
|
||||
* Returns TRUE if no item can be used by the player on the current character because of the map distance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue