Skip to content

Commit

Permalink
ChoiceRemoveOne
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyoko-Jeremie committed Jan 31, 2024
1 parent a2e174f commit eca7f20
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Cheats/Choice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,16 @@ export class Choice {
// 当你入狱时,保留你的衣物。
// Second Wind [SecondWind]
// "Gain 2 WP every time you remove a non-trivial restraint."
// Deft Fingering [SomaticPlus]
// 指法灵巧
// You can cast arm spells using just your fingers, as long as your hands aren't bound.
// 只要你的手没有被束缚,你就可以只用手指施展手臂的法术。
// Smooth Talker [SmoothTalker]
// 以和为贵
// Being gagged does not increase your miscast chance for verbal spells unless fully gagged, and reduces gag power by 20%.
// 除非你的嘴被完全堵住,否则堵嘴不会增加你念错咒语的几率,并且会降低 20% 的塞嘴威力。
this._AddCheatChoice(
"Escapee Unchained Artist Slippery KeepOutfit SecondWind",
"Escapee Unchained Artist Slippery KeepOutfit SecondWind SomaticPlus SmoothTalker",
remove,
);
};
Expand Down
1 change: 1 addition & 0 deletions src/GUI_StringTable/CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export const StringTable_CN: StringTableType = {
'ChoiceAddOne Section': '添加单个 Choice Section',
ChoiceSelect: '选择Choice',
ChoiceAddOne: '添加一个Choice',
ChoiceRemoveOne: '删除一个Choice',
'ChoicePrint Section': '查看所有Choice列表 Section',
ChoicePrintAllValidChoice: '查看所有可用Choice列表',
ChoicePrintAllValidChoiceList: '查看所有可用Choice列表',
Expand Down
1 change: 1 addition & 0 deletions src/GUI_StringTable/EN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const StringTable_EN: StringTableType = {
'ChoiceAddOne Section': 'ChoiceAddOne Section',
ChoiceSelect: 'ChoiceSelect',
ChoiceAddOne: 'ChoiceAddOne',
ChoiceRemoveOne: 'ChoiceRemoveOne',
'ChoicePrint Section': 'ChoicePrint Section',
ChoicePrintAllValidChoice: 'ChoicePrintAllValidChoice',
ChoicePrintAllValidChoiceList: 'ChoicePrintAllValidChoiceList',
Expand Down
1 change: 1 addition & 0 deletions src/GUI_StringTable/StringTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const StringTableKeys = [
'ChoiceAddOne Section',
'ChoiceSelect',
'ChoiceAddOne',
'ChoiceRemoveOne',

'ChoicePrint Section',
'ChoicePrintAllValidChoice',
Expand Down
17 changes: 17 additions & 0 deletions src/GreasemonkeyScript/CreateGui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,23 @@ export class CreateGui {
cssClassName: 'd-inline',
xgmExtendField: {bootstrap: {btnType: thisRef.btnType}},
},
'ChoiceRemoveOne': {
label: StringTable['ChoiceRemoveOne'],
type: 'button',
click() {
const c = thisRef.gmc!.fields['ChoiceAddOneSelect'].value;
if (c) {
const N = thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.ChoiceGetAllValidChoiceData().find(T => {
return `${T.count}. ${T.name}[${T.keyName}]:${T.selected ? '██' : '_'}` === c;
});
if (N) {
thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats._AddCheatChoice(N.keyName, true);
}
}
},
cssClassName: 'd-inline',
xgmExtendField: {bootstrap: {btnType: thisRef.btnType}},
},
[thisRef.rId()]: {
section: GM_config.create(StringTable['ChoicePrint Section']),
type: 'br',
Expand Down

0 comments on commit eca7f20

Please sign in to comment.