Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyoko-Jeremie committed Feb 13, 2024
1 parent 7c60ac0 commit 04671a6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 37 deletions.
6 changes: 6 additions & 0 deletions src/Cheats/Map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -660,3 +660,9 @@ export class MapGet {
// KinkyDungeonEscapeList.js
// let KinkyDungeonEscapeTypes = {


//
// if (KinkyDungeonStatsChoice.get("escapeselect")) {
// DrawTextFitKD(TextGet("KDEscapeMethod_" + KDPerkOrbMethod), 1250, 200 + count * pspacing, Twidth, "#ffffff", KDTextGray2, 30);
// DrawTextFitKD(TextGet("KDEscapeMethodDesc_" + KDPerkOrbMethod), 1250, 235 + count * pspacing, Twidth, "#ffffff", KDTextGray2, 22);
//
66 changes: 29 additions & 37 deletions src/GreasemonkeyScript/CreateGui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1113,16 +1113,14 @@ export class CreateGui {
const c = thisRef.gmc!.fields['AllRestraintItemSelect'].value;
if (c && isString(c)) {
const cc = c.split('|[');
if (cc.length === 2) {
const faction = thisRef.gmc!.fields['FactionSelect'].value;
thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.WearRestraints(
cc[0],
HumanName2LockList(thisRef.gmc!.fields['LockSelect'].value as string),
faction as KinkyDungeonFactionColors_Keys,
// faction === 'None' ? undefined : faction as KinkyDungeonFactionColors_Keys,
);
thisRef.flushNowWearRestraintItemSelect();
}
const faction = thisRef.gmc!.fields['FactionSelect'].value;
thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.WearRestraints(
cc[0],
HumanName2LockList(thisRef.gmc!.fields['LockSelect'].value as string),
faction as KinkyDungeonFactionColors_Keys,
// faction === 'None' ? undefined : faction as KinkyDungeonFactionColors_Keys,
);
thisRef.flushNowWearRestraintItemSelect();
}
},
cssClassName: 'd-inline',
Expand All @@ -1148,15 +1146,13 @@ export class CreateGui {
const l = thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.getNowWearRestraintItem();
if (c && isString(c)) {
const cc = c.split('|[');
if (cc.length === 2) {
const name = cc[0];
const n = l.find(T => T.restraint?.name === name);
if (n) {
thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.lockAWearingRestraintItem(n.item, k);
thisRef.flushNowWearRestraintItemSelect();
} else {
console.warn('LockNowWearRestraintItem not found', name);
}
const name = cc[0];
const n = l.find(T => T.restraint?.name === name);
if (n) {
thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.lockAWearingRestraintItem(n.item, k);
thisRef.flushNowWearRestraintItemSelect();
} else {
console.warn('LockNowWearRestraintItem not found', name);
}
}
},
Expand All @@ -1171,15 +1167,13 @@ export class CreateGui {
const l = thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.getNowWearRestraintItem();
if (c && isString(c)) {
const cc = c.split('|[');
if (cc.length === 2) {
const name = cc[0];
const n = l.find(T => T.restraint?.name === name);
if (n) {
thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.unlockAWearingRestraintItem(n.item);
thisRef.flushNowWearRestraintItemSelect();
} else {
console.warn('UnlockNowWearRestraintItem not found', name);
}
const name = cc[0];
const n = l.find(T => T.restraint?.name === name);
if (n) {
thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.unlockAWearingRestraintItem(n.item);
thisRef.flushNowWearRestraintItemSelect();
} else {
console.warn('UnlockNowWearRestraintItem not found', name);
}
}
},
Expand All @@ -1194,15 +1188,13 @@ export class CreateGui {
const l = thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.getNowWearRestraintItem();
if (c && isString(c)) {
const cc = c.split('|[');
if (cc.length === 2) {
const name = cc[0];
const n = l.find(T => T.restraint?.name === name);
if (n) {
thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.RemoveRestraintSpecific(n.item, true);
thisRef.flushNowWearRestraintItemSelect();
} else {
console.warn('RemoveNowWearRestraintItem not found', name);
}
const name = cc[0];
const n = l.find(T => T.restraint?.name === name);
if (n) {
thisRef.winRef.KinkyDungeonMod_EnchantedRestraints.Cheats.RemoveRestraintSpecific(n.item, true);
thisRef.flushNowWearRestraintItemSelect();
} else {
console.warn('RemoveNowWearRestraintItem not found', name);
}
}
},
Expand Down

0 comments on commit 04671a6

Please sign in to comment.