Beta fix, changes and translate my item

This commit is contained in:
Constantan 2023-09-12 03:35:10 +00:00
parent b2df021012
commit d401b17956
16 changed files with 385 additions and 62 deletions

View file

@ -4617,7 +4617,7 @@ var AssetFemale3DCG = [
Prerequisite: ["AccessCrotch", "CanCoverVulva"], Hide: ["ItemVulva", "Pussy"],
DefaultColor: ["Default", "Default", "Default", "Default", "#4FFF00" ],
HideItem: ["ItemButtAnalBeads2", "ItemVulvaVibratingDildo", "ItemVulvaClitSuctionCup", "ItemVulvaInflatableVibeDildo", "ItemVulvaHeavyWeightClamp", "ItemVulvaPenisDildo", "ItemVulvaShockDildo", "ItemVulvaPiercingsVibeHeartClitPiercing", "ItemVulvaPiercingsClitRing", "ItemVulvaPiercingsChastityClitShield", "ItemVulvaPiercingsHighSecurityVulvaShield"],
Effect: ["Chaste"], Block: ["ItemVulva", "ItemVulvaPiercings", "ItemButt"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }],
Effect: ["Chaste"], ExpressionTrigger: [{ Name: "Soft", Group: "Eyebrows", Timer: 10 }],
Extended: true, HasType: false,
Layer: [
{ Name: "Belt" },

View file

@ -755,19 +755,19 @@ var AssetFemale3DCGExtended = {
Archetype: ExtendedArchetype.VIBRATING,
}, // TickleBra
ForbiddenChastityBra: {
Archetype: ExtendedArchetype.TYPED,
ChatTags: [CommonChatTags.SOURCE_CHAR, CommonChatTags.DEST_CHAR, CommonChatTags.ASSET_NAME],
Options: [
{ Name: "Low", Property: { ShockLevel: 0 } },
{ Name: "Medium", Property: { ShockLevel: 1 } },
{ Name: "High", Property: { ShockLevel: 2 } },
],
ScriptHooks: {
Draw: InventoryItemBreastForbiddenChastityBraDrawHook,
Click: InventoryItemBreastForbiddenChastityBraClickHook,
},
DrawImages: false,
BaselineProperty: { TriggerCount: 0, ShowText: true, BlinkState: false },
Archetype: ExtendedArchetype.MODULAR,
ChatTags: [CommonChatTags.SOURCE_CHAR, CommonChatTags.DEST_CHAR],
Modules: [
{
Name: "ShockModule", Key: "s",
Options: [
{}, // 0 - disabled
{ HasSubscreen: true }, // 1 - enabled
],
},
],
ChangeWhenLocked: false,
BaselineProperty: { TriggerCount: 0, ShowText: true, BlinkState: false, ShockLevel: 0, PunishOrgasm: false, PunishStandup: false, PunishStruggle: false },
}, // ForbiddenChastityBra
}, // ItemBreast
ItemArms: {
@ -8557,20 +8557,48 @@ var AssetFemale3DCGExtended = {
ChangeWhenLocked: false,
}, // MetalChastityBelt
ForbiddenChastityBelt: {
Archetype: ExtendedArchetype.TYPED,
ChatTags: [CommonChatTags.SOURCE_CHAR, CommonChatTags.DEST_CHAR, CommonChatTags.ASSET_NAME],
Options: [
{ Name: "Low", Property: { ShockLevel: 0 } },
{ Name: "Medium", Property: { ShockLevel: 1 } },
{ Name: "High", Property: { ShockLevel: 2 } },
],
ScriptHooks: {
Draw: InventoryItemPelvisForbiddenChastityBeltDrawHook,
Click: InventoryItemPelvisForbiddenChastityBeltClickHook,
},
DrawImages: false,
BaselineProperty: { TriggerCount: 0, ShowText: true, BlinkState: false },
}, // ForbiddenChastityBelt
Archetype: ExtendedArchetype.MODULAR,
ChatTags: [CommonChatTags.SOURCE_CHAR, CommonChatTags.DEST_CHAR],
Modules: [
{
Name: "CrotchShield", Key: "c",
Options: [
{}, // 0 - open
{ // 1 - close front
Prerequisite: ["CanCoverVulva"],
Property: {
Effect: ["Chaste"],
Block: ["ItemVulva", "ItemVulvaPiercings"],
HideItem: ["ItemVulvaPiercingsChastityClitShield", "ItemVulvaPiercingsHighSecurityVulvaShield"],
}
},
{ // 2 - close back
Property: {
Effect: ["Chaste"],
Block: ["ItemButt"],
}
},
{ // 3 - close both
Prerequisite: ["CanCoverVulva"],
Property: {
Effect: ["Chaste"],
Block: ["ItemVulva", "ItemVulvaPiercings", "ItemButt"],
HideItem: ["ItemVulvaPiercingsChastityClitShield", "ItemVulvaPiercingsHighSecurityVulvaShield"],
}
},
],
},
{
Name: "ShockModule", Key: "s",
Options: [
{}, // 0 - disabled
{ HasSubscreen: true }, // 1 - enabled
],
},
],
ChangeWhenLocked: false,
BaselineProperty: { TriggerCount: 0, ShowText: true, BlinkState: false, ShockLevel: 0, PunishOrgasm: false, PunishStandup: false, PunishStruggle: false },
}, // ForbiddenChastityBelt
OrnateChastityBelt: {
Archetype: ExtendedArchetype.TYPED,
CopyConfig: { AssetName: "MetalChastityBelt" },

View file

@ -1637,6 +1637,8 @@ Studded Chastity Belt
Шипованный Пояс Верности
Metal Chastity Belt
Металлический Пояс Верности
Forbidden Chastity Belt
Запретный Пояс Верности
Polished Chastity Belt
Полированный Пояс Верности
Futuristic Chastity Belt
@ -1773,6 +1775,8 @@ Breasts
Грудь
Metal Chastity Bra
Металлический бюстгальтер целомудрия
Forbidden Chastity Bra
Запретный бюстгальтер целомудрия
Polished Chastity Bra
Полированный бюстгальтер целомудрия
Futuristic Chastity Bra

View file

@ -701,4 +701,6 @@ Shade
Lenses
Линзы
Edging
Кайма
Кайма
Detail
Элементы

View file

@ -1548,6 +1548,16 @@ ItemBreastForbiddenChastityBraSelect,,,Select shock intensity,,
ItemBreastForbiddenChastityBraLow,,,Low,,
ItemBreastForbiddenChastityBraMedium,,,Medium,,
ItemBreastForbiddenChastityBraHigh,,,High,,
ItemBreastForbiddenChastityBraSelectBase,,,Choose the belt's options.,,
ItemBreastForbiddenChastityBraModuleShockModule,,,Shock Module,,
ItemBreastForbiddenChastityBraSelectShockModule,,,Select Shock Module,,
ItemBreastForbiddenChastityBraOptions0,,,Disable,,
ItemBreastForbiddenChastityBraOptions1,,,Settings,,
ForbiddenChastityBraPunishOrgasm,,,Forbidden Orgasm,,
ForbiddenChastityBraPunishStandup,,,Forbidden Stand Up,,
ForbiddenChastityBraPunishStruggle,,,Forbidden Struggle,,
ItemBreastForbiddenChastityBraSetOptions0,,,SourceCharacter sets DestinationCharacter AssetName to disable shock module.,,
ItemBreastForbiddenChastityBraSetOptions1,,,SourceCharacter sets DestinationCharacter AssetName to enable shock module.,,
ItemBreastForbiddenChastityBraSetLow,,,SourceCharacter sets DestinationCharacter AssetName to low intensity.,,
ItemBreastForbiddenChastityBraSetMedium,,,SourceCharacter sets DestinationCharacter AssetName to moderate intensity.,,
ItemBreastForbiddenChastityBraSetHigh,,,SourceCharacter sets DestinationCharacter AssetName to high intensity.,,
@ -4565,6 +4575,26 @@ ItemPelvisForbiddenChastityBeltSelect,,,Select shock intensity,,
ItemPelvisForbiddenChastityBeltLow,,,Low,,
ItemPelvisForbiddenChastityBeltMedium,,,Medium,,
ItemPelvisForbiddenChastityBeltHigh,,,High,,
ItemPelvisForbiddenChastityBeltSelectBase,,,Choose the belt's options.,,
ItemPelvisForbiddenChastityBeltSelectCrotchShield,,,Select crotch shield,,
ItemPelvisForbiddenChastityBeltModuleCrotchShield,,,Crotch Shield,,
ItemPelvisForbiddenChastityBeltModuleShockModule,,,Shock Module,,
ItemPelvisForbiddenChastityBeltSelectShockModule,,,Select Shock Module,,
ItemPelvisForbiddenChastityBeltOptionc0,,,Open,,
ItemPelvisForbiddenChastityBeltOptionc1,,,Close Front,,
ItemPelvisForbiddenChastityBeltOptionc2,,,Close Back,,
ItemPelvisForbiddenChastityBeltOptionc3,,,Close Both,,
ItemPelvisForbiddenChastityBeltOptions0,,,Disable,,
ItemPelvisForbiddenChastityBeltOptions1,,,Settings,,
ForbiddenChastityBeltPunishOrgasm,,,Forbidden Orgasm,,
ForbiddenChastityBeltPunishStandup,,,Forbidden Stand Up,,
ForbiddenChastityBeltPunishStruggle,,,Forbidden Struggle,,
ItemPelvisForbiddenChastityBeltSetOptionc0,,,SourceCharacter sets DestinationCharacter AssetName to open all crotch shields.,,
ItemPelvisForbiddenChastityBeltSetOptionc1,,,SourceCharacter sets DestinationCharacter AssetName to close front crotch shield.,,
ItemPelvisForbiddenChastityBeltSetOptionc2,,,SourceCharacter sets DestinationCharacter AssetName to close rear crotch shield.,,
ItemPelvisForbiddenChastityBeltSetOptionc3,,,SourceCharacter sets DestinationCharacter AssetName to close all crotch shields.,,
ItemPelvisForbiddenChastityBeltSetOptions0,,,SourceCharacter sets DestinationCharacter AssetName to disable shock module.,,
ItemPelvisForbiddenChastityBeltSetOptions1,,,SourceCharacter sets DestinationCharacter AssetName to enable shock module.,,
ItemPelvisForbiddenChastityBeltSetLow,,,SourceCharacter sets DestinationCharacter AssetName to low intensity.,,
ItemPelvisForbiddenChastityBeltSetMedium,,,SourceCharacter sets DestinationCharacter AssetName to moderate intensity.,,
ItemPelvisForbiddenChastityBeltSetHigh,,,SourceCharacter sets DestinationCharacter AssetName to high intensity.,,

Can't render this file because it contains an unexpected character in line 3316 and column 92.

View file

@ -7514,4 +7514,25 @@ SourceCharacter changes the fluids on DestinationCharacterName behind.
SourceCharacter изменяет следы семени на DestinationCharacterName.
SourceCharacter changes DestinationCharacterName portrait on the AssetName.
SourceCharacter изменяет монитор для DestinationCharacterName на AssetName.
Disable
Выключить
Settings
Настройки
Forbidden Orgasm
Наказание за Оргазм
Forbidden Stand Up
Назазание за попытку встать
Forbidden Struggle
Назазание за попытку освободиться
SourceCharacter sets DestinationCharacter AssetName to disable shock module.
SourceCharacter выбирает на DestinationCharacter AssetName отключить шоковый модуль.
SourceCharacter sets DestinationCharacter AssetName to enable shock module.
SourceCharacter выбирает на DestinationCharacter AssetName включить шоковый модуль.
SourceCharacter sets DestinationCharacter AssetName to open all crotch shields.
SourceCharacter выбирает на DestinationCharacter AssetName открыть все щитки.
SourceCharacter sets DestinationCharacter AssetName to close front crotch shield.
SourceCharacter выбирает на DestinationCharacter AssetName закрыть передний щиток.
SourceCharacter sets DestinationCharacter AssetName to close rear crotch shield.
SourceCharacter выбирает на DestinationCharacter AssetName закрыть задний щиток.
SourceCharacter sets DestinationCharacter AssetName to close all crotch shields.
SourceCharacter выбирает на DestinationCharacter AssetName закрыть все щитки.

View file

@ -1,36 +1,80 @@
"use strict";
/** @type {ExtendedItemScriptHookCallbacks.Draw<ExtendedItemData>} */
function InventoryItemBreastForbiddenChastityBraDrawHook(Data, OriginalFunction) {
OriginalFunction();
/** @type {ExtendedItemCallbacks.Load} */
function InventoryItemBreastForbiddenChastityBras1Load() {}
/** @type {ExtendedItemCallbacks.Draw} */
function InventoryItemBreastForbiddenChastityBras1Draw() {
// Draw the header and item
ExtendedItemDrawHeader(1387, 125);
DrawText(DialogFindPlayer("ShockLevel"), 1500, 440, "White", "Gray");
ExtendedItemCustomDraw("Low", 1165, 470, null, DialogFocusItem.Property.ShockLevel === 0);
ExtendedItemCustomDraw("Medium", 1400, 470, null, DialogFocusItem.Property.ShockLevel === 1);
ExtendedItemCustomDraw("High", 1635, 470, null, DialogFocusItem.Property.ShockLevel === 2);
MainCanvas.textAlign = "right";
DrawText(DialogFindPlayer("ShockCount"), 1500, 575, "White", "Gray");
MainCanvas.textAlign = "left";
DrawText(`${DialogFocusItem.Property.TriggerCount}`, 1510, 575, "White", "Gray");
MainCanvas.textAlign = "center";
DrawCheckbox(1175, 618, 64, 64, "", DialogFocusItem.Property.ShowText, ExtendedItemPermissionMode);
DrawText(DialogFindPlayer("ShowMessageInChat"), 1420, 648, "White", "Gray");
DrawCheckbox(1100, 618, 64, 64, DialogFindPlayer("ShowMessageInChat"), DialogFocusItem.Property.ShowText, ExtendedItemPermissionMode, "White");
MainCanvas.textAlign = "center";
ExtendedItemCustomDraw("ResetShockCount", 1635, 550);
ExtendedItemCustomDraw("TriggerShock", 1635, 625);
MainCanvas.textAlign = "left";
DrawCheckbox(1100, 700, 64, 64, DialogFindPlayer("ForbiddenChastityBraPunishOrgasm"), DialogFocusItem.Property.PunishOrgasm, false, "White");
DrawCheckbox(1100, 770, 64, 64, DialogFindPlayer("ForbiddenChastityBraPunishStandup"), DialogFocusItem.Property.PunishStandup, false, "White");
DrawCheckbox(1100, 840, 64, 64, DialogFindPlayer("ForbiddenChastityBraPunishStruggle"), DialogFocusItem.Property.PunishStruggle, false, "White");
MainCanvas.textAlign = "center";
}
/** @type {ExtendedItemScriptHookCallbacks.Click<ExtendedItemData>} */
function InventoryItemBreastForbiddenChastityBraClickHook(Data, OriginalFunction) {
OriginalFunction();
/** @type {ExtendedItemCallbacks.Click} */
function InventoryItemBreastForbiddenChastityBras1Click() {
if (MouseIn(1885, 25, 90, 90)) {
InventoryItemBreastForbiddenChastityBras1Exit();
return;
}
const C = CurrentCharacter;
if (!DialogFocusItem) {
return;
} else if (MouseIn(1175, 618, 64, 64) && !ExtendedItemPermissionMode) {
} else if (MouseIn(1165, 470, 225, 55)) {
DialogFocusItem.Property.ShockLevel = 0;
} else if (MouseIn(1400, 470, 225, 55)) {
DialogFocusItem.Property.ShockLevel = 1;
} else if (MouseIn(1635, 470, 225, 55)) {
DialogFocusItem.Property.ShockLevel = 2;
} else if (MouseIn(1100, 618, 64, 64) && !ExtendedItemPermissionMode) {
DialogFocusItem.Property.ShowText = !DialogFocusItem.Property.ShowText;
} else if (MouseIn(1635, 550, 225, 55)) {
ExtendedItemCustomClick("ResetShockCount", InventoryItemBreastForbiddenChastityBraResetCount);
} else if (MouseIn(1635, 625, 225, 55)) {
ExtendedItemCustomClick("TriggerShock", PropertyShockPublishAction);
} else if (MouseIn(1100, 700, 64, 64)) {
DialogFocusItem.Property.PunishOrgasm = !DialogFocusItem.Property.PunishOrgasm;
ChatRoomCharacterItemUpdate(C, DialogFocusItem.Asset.Group.Name);
return;
} else if (MouseIn(1100, 770, 64, 64)) {
DialogFocusItem.Property.PunishStandup = !DialogFocusItem.Property.PunishStandup;
ChatRoomCharacterItemUpdate(C, DialogFocusItem.Asset.Group.Name);
return;
} else if (MouseIn(1100, 840, 64, 64)) {
DialogFocusItem.Property.PunishStruggle = !DialogFocusItem.Property.PunishStruggle;
ChatRoomCharacterItemUpdate(C, DialogFocusItem.Asset.Group.Name);
return;
}
}
/** @type {ExtendedItemCallbacks.Exit} */
function InventoryItemBreastForbiddenChastityBras1Exit() {
ExtendedItemSubscreen = null;
}
// Resets the trigger count
function InventoryItemBreastForbiddenChastityBraResetCount() {
// Gets the current item and character
@ -47,7 +91,11 @@ function InventoryItemBreastForbiddenChastityBraResetCount() {
}
}
/** @type {ExtendedItemCallbacks.BeforeDraw<ShockUnitPersistentData>} */
/**
* @typedef {{ UpdateTime?: number, CheckTime?: number, LastMessageLen?: number, LastTriggerCount?: number, DisplayCount?: number }} ForbiddenChastityBraPersistentData
*/
/** @type {ExtendedItemCallbacks.BeforeDraw<ForbiddenChastityBraPersistentData>} */
function AssetsItemBreastForbiddenChastityBraBeforeDraw(data) {
if (data.L === "_Light") {
const persistentData = data.PersistentData();
@ -64,28 +112,99 @@ function AssetsItemBreastForbiddenChastityBraBeforeDraw(data) {
}
}
/** @type {ExtendedItemCallbacks.ScriptDraw<ShockUnitPersistentData>} */
/**
* @param {Item} Item
*/
function InventoryForbiddenChastityBraCheckPunish(Item) {
const { PunishOrgasm, PunishStandup, PunishStruggle} = Item.Property;
if (Item.Property.NextShockTime - CurrentTime <= 0 && PunishOrgasm && Player.ArousalSettings && Player.ArousalSettings.OrgasmStage > 1) {
// Punish the player if they orgasm
Item.Property.NextShockTime = CurrentTime + FuturisticChastityBeltShockCooldownOrgasm; // Difficult to have two orgasms in 10 seconds
return "Orgasm";
} else if (PunishStandup && FuturisticTrainingBeltStandUpFlag) {
// Punish the player if they stand up
FuturisticTrainingBeltStandUpFlag = false;
return "StandUp";
} else if (PunishStruggle && Player.FocusGroup && StruggleProgressPrevItem != null && StruggleProgressStruggleCount > 0 && (StruggleProgress > 10 || StruggleLockPickProgressCurrentTries > 0)) {
// Punish the player if they Struggle
return "Struggle";
}
return "";
}
/**
* @param {DynamicScriptCallbackData<FuturisticChastityBraPersistentData>} data
* @param {number} LastTime
*/
function AssetsItemBreastForbiddenChastityBraUpdate(data, LastTime) {
let Item = data.Item;
let C = data.C;
if (!Item.Property) return;
let punishment = InventoryForbiddenChastityBraCheckPunish(Item);
console.log(`punishment: ${punishment}`);
switch (punishment) {
case "Orgasm":
PropertyShockPublishAction(C, Item, true);
break;
case "StandUp":
PropertyShockPublishAction(C, Item, true);
CharacterSetActivePose(Player, "Kneel");
ServerSend("ChatRoomCharacterPoseUpdate", { Pose: Player.ActivePose });
break;
case "Struggle":
PropertyShockPublishAction(C, Item, true);
StruggleProgressStruggleCount = 0;
StruggleProgress = 0;
DialogLeaveDueToItem = true;
break;
}
}
/** @type {ExtendedItemCallbacks.ScriptDraw<ForbiddenChastityBraPersistentData>} */
function AssetsItemBreastForbiddenChastityBraScriptDraw(data) {
const persistentData = data.PersistentData();
/** @type {ItemProperties} */
const property = (data.Item.Property = data.Item.Property || {});
if (typeof persistentData.ChangeTime !== "number") persistentData.ChangeTime = CommonTime() + 4000;
if (typeof persistentData.UpdateTime !== "number") persistentData.UpdateTime = CommonTime() + 4000;
if (typeof persistentData.LastMessageLen !== "number") persistentData.LastMessageLen = (ChatRoomLastMessage) ? ChatRoomLastMessage.length : 0;
if (typeof persistentData.CheckTime !== "number") persistentData.CheckTime = CommonTime();
if (typeof persistentData.DisplayCount !== "number") persistentData.DisplayCount = 0;
if (typeof persistentData.LastTriggerCount !== "number") persistentData.LastTriggerCount = property.TriggerCount;
if (typeof property.NextShockTime !== "number") property.NextShockTime = 0;
if (typeof property.Type !== "string") property.Type = "";
// Trigger a check if a new message is detected
let lastMsgIndex = ChatRoomChatLog.length - 1;
if (lastMsgIndex >= 0 && ChatRoomChatLog[lastMsgIndex].Time > persistentData.CheckTime)
persistentData.UpdateTime = Math.min(persistentData.UpdateTime, CommonTime() + 200); // Trigger if the user speaks
const isTriggered = persistentData.LastTriggerCount < property.TriggerCount;
const newlyTriggered = isTriggered && persistentData.DisplayCount == 0;
if (newlyTriggered)
persistentData.ChangeTime = Math.min(persistentData.ChangeTime, CommonTime());
persistentData.UpdateTime = Math.min(persistentData.UpdateTime, CommonTime());
if (persistentData.UpdateTime < CommonTime()) {
if (data.C.IsPlayer() && CommonTime() > data.Item.Property.NextShockTime) {
AssetsItemBreastForbiddenChastityBraUpdate(data, persistentData.CheckTime);
persistentData.LastMessageLen = (ChatRoomLastMessage) ? ChatRoomLastMessage.length : 0;
}
// Set CheckTime to last processed chat message time
persistentData.CheckTime = (lastMsgIndex >= 0 ? ChatRoomChatLog[lastMsgIndex].Time : 0);
if (persistentData.ChangeTime < CommonTime()) {
if (persistentData.LastTriggerCount > property.TriggerCount) persistentData.LastTriggerCount = 0;
const wasBlinking = property.BlinkState;
property.BlinkState = wasBlinking && !newlyTriggered ? false : true;
const timeFactor = isTriggered ? 12 : 1;
const timeToNextRefresh = (wasBlinking ? 4000 : 1000) / timeFactor;
persistentData.ChangeTime = CommonTime() + timeToNextRefresh;
persistentData.UpdateTime = CommonTime() + timeToNextRefresh;
AnimationRequestRefreshRate(data.C, (5000 / timeFactor) - timeToNextRefresh);
AnimationRequestDraw(data.C);
}
}

Binary file not shown.

After

(image error) Size: 38 KiB

Binary file not shown.

After

(image error) Size: 39 KiB

View file

@ -1,36 +1,80 @@
"use strict";
/** @type {ExtendedItemScriptHookCallbacks.Draw<ExtendedItemData>} */
function InventoryItemPelvisForbiddenChastityBeltDrawHook(Data, OriginalFunction) {
OriginalFunction();
/** @type {ExtendedItemCallbacks.Load} */
function InventoryItemPelvisForbiddenChastityBelts1Load() {}
/** @type {ExtendedItemCallbacks.Draw} */
function InventoryItemPelvisForbiddenChastityBelts1Draw() {
// Draw the header and item
ExtendedItemDrawHeader(1387, 125);
DrawText(DialogFindPlayer("ShockLevel"), 1500, 440, "White", "Gray");
ExtendedItemCustomDraw("Low", 1165, 470, null, DialogFocusItem.Property.ShockLevel === 0);
ExtendedItemCustomDraw("Medium", 1400, 470, null, DialogFocusItem.Property.ShockLevel === 1);
ExtendedItemCustomDraw("High", 1635, 470, null, DialogFocusItem.Property.ShockLevel === 2);
MainCanvas.textAlign = "right";
DrawText(DialogFindPlayer("ShockCount"), 1500, 575, "White", "Gray");
MainCanvas.textAlign = "left";
DrawText(`${DialogFocusItem.Property.TriggerCount}`, 1510, 575, "White", "Gray");
MainCanvas.textAlign = "center";
DrawCheckbox(1175, 618, 64, 64, "", DialogFocusItem.Property.ShowText, ExtendedItemPermissionMode);
DrawText(DialogFindPlayer("ShowMessageInChat"), 1420, 648, "White", "Gray");
DrawCheckbox(1100, 618, 64, 64, DialogFindPlayer("ShowMessageInChat"), DialogFocusItem.Property.ShowText, ExtendedItemPermissionMode, "White");
MainCanvas.textAlign = "center";
ExtendedItemCustomDraw("ResetShockCount", 1635, 550);
ExtendedItemCustomDraw("TriggerShock", 1635, 625);
MainCanvas.textAlign = "left";
DrawCheckbox(1100, 700, 64, 64, DialogFindPlayer("ForbiddenChastityBeltPunishOrgasm"), DialogFocusItem.Property.PunishOrgasm, false, "White");
DrawCheckbox(1100, 770, 64, 64, DialogFindPlayer("ForbiddenChastityBeltPunishStandup"), DialogFocusItem.Property.PunishStandup, false, "White");
DrawCheckbox(1100, 840, 64, 64, DialogFindPlayer("ForbiddenChastityBeltPunishStruggle"), DialogFocusItem.Property.PunishStruggle, false, "White");
MainCanvas.textAlign = "center";
}
/** @type {ExtendedItemScriptHookCallbacks.Click<ExtendedItemData>} */
function InventoryItemPelvisForbiddenChastityBeltClickHook(Data, OriginalFunction) {
OriginalFunction();
/** @type {ExtendedItemCallbacks.Click} */
function InventoryItemPelvisForbiddenChastityBelts1Click() {
if (MouseIn(1885, 25, 90, 90)) {
InventoryItemPelvisForbiddenChastityBelts1Exit();
return;
}
const C = CurrentCharacter;
if (!DialogFocusItem) {
return;
} else if (MouseIn(1175, 618, 64, 64) && !ExtendedItemPermissionMode) {
} else if (MouseIn(1165, 470, 225, 55)) {
DialogFocusItem.Property.ShockLevel = 0;
} else if (MouseIn(1400, 470, 225, 55)) {
DialogFocusItem.Property.ShockLevel = 1;
} else if (MouseIn(1635, 470, 225, 55)) {
DialogFocusItem.Property.ShockLevel = 2;
} else if (MouseIn(1100, 618, 64, 64) && !ExtendedItemPermissionMode) {
DialogFocusItem.Property.ShowText = !DialogFocusItem.Property.ShowText;
} else if (MouseIn(1635, 550, 225, 55)) {
ExtendedItemCustomClick("ResetShockCount", InventoryItemPelvisForbiddenChastityBeltResetCount);
} else if (MouseIn(1635, 625, 225, 55)) {
ExtendedItemCustomClick("TriggerShock", PropertyShockPublishAction);
} else if (MouseIn(1100, 700, 64, 64)) {
DialogFocusItem.Property.PunishOrgasm = !DialogFocusItem.Property.PunishOrgasm;
ChatRoomCharacterItemUpdate(C, DialogFocusItem.Asset.Group.Name);
return;
} else if (MouseIn(1100, 770, 64, 64)) {
DialogFocusItem.Property.PunishStandup = !DialogFocusItem.Property.PunishStandup;
ChatRoomCharacterItemUpdate(C, DialogFocusItem.Asset.Group.Name);
return;
} else if (MouseIn(1100, 840, 64, 64)) {
DialogFocusItem.Property.PunishStruggle = !DialogFocusItem.Property.PunishStruggle;
ChatRoomCharacterItemUpdate(C, DialogFocusItem.Asset.Group.Name);
return;
}
}
/** @type {ExtendedItemCallbacks.Exit} */
function InventoryItemPelvisForbiddenChastityBelts1Exit() {
ExtendedItemSubscreen = null;
}
// Resets the trigger count
function InventoryItemPelvisForbiddenChastityBeltResetCount() {
// Gets the current item and character
@ -47,7 +91,11 @@ function InventoryItemPelvisForbiddenChastityBeltResetCount() {
}
}
/** @type {ExtendedItemCallbacks.BeforeDraw<ShockUnitPersistentData>} */
/**
* @typedef {{ UpdateTime?: number, CheckTime?: number, LastMessageLen?: number, LastTriggerCount?: number, DisplayCount?: number }} ForbiddenChastityBeltPersistentData
*/
/** @type {ExtendedItemCallbacks.BeforeDraw<ForbiddenChastityBeltPersistentData>} */
function AssetsItemPelvisForbiddenChastityBeltBeforeDraw(data) {
if (data.L === "_Light") {
const persistentData = data.PersistentData();
@ -64,28 +112,99 @@ function AssetsItemPelvisForbiddenChastityBeltBeforeDraw(data) {
}
}
/** @type {ExtendedItemCallbacks.ScriptDraw<ShockUnitPersistentData>} */
/**
* @param {Item} Item
*/
function InventoryForbiddenChastityBeltCheckPunish(Item) {
const { PunishOrgasm, PunishStandup, PunishStruggle} = Item.Property;
if (Item.Property.NextShockTime - CurrentTime <= 0 && PunishOrgasm && Player.ArousalSettings && Player.ArousalSettings.OrgasmStage > 1) {
// Punish the player if they orgasm
Item.Property.NextShockTime = CurrentTime + FuturisticChastityBeltShockCooldownOrgasm; // Difficult to have two orgasms in 10 seconds
return "Orgasm";
} else if (PunishStandup && FuturisticTrainingBeltStandUpFlag) {
// Punish the player if they stand up
FuturisticTrainingBeltStandUpFlag = false;
return "StandUp";
} else if (PunishStruggle && Player.FocusGroup && StruggleProgressPrevItem != null && StruggleProgressStruggleCount > 0 && (StruggleProgress > 10 || StruggleLockPickProgressCurrentTries > 0)) {
// Punish the player if they Struggle
return "Struggle";
}
return "";
}
/**
* @param {DynamicScriptCallbackData<FuturisticChastityBeltPersistentData>} data
* @param {number} LastTime
*/
function AssetsItemPelvisForbiddenChastityBeltUpdate(data, LastTime) {
let Item = data.Item;
let C = data.C;
if (!Item.Property) return;
let punishment = InventoryForbiddenChastityBeltCheckPunish(Item);
console.log(`punishment: ${punishment}`);
switch (punishment) {
case "Orgasm":
PropertyShockPublishAction(C, Item, true);
break;
case "StandUp":
PropertyShockPublishAction(C, Item, true);
CharacterSetActivePose(Player, "Kneel");
ServerSend("ChatRoomCharacterPoseUpdate", { Pose: Player.ActivePose });
break;
case "Struggle":
PropertyShockPublishAction(C, Item, true);
StruggleProgressStruggleCount = 0;
StruggleProgress = 0;
DialogLeaveDueToItem = true;
break;
}
}
/** @type {ExtendedItemCallbacks.ScriptDraw<ForbiddenChastityBeltPersistentData>} */
function AssetsItemPelvisForbiddenChastityBeltScriptDraw(data) {
const persistentData = data.PersistentData();
/** @type {ItemProperties} */
const property = (data.Item.Property = data.Item.Property || {});
if (typeof persistentData.ChangeTime !== "number") persistentData.ChangeTime = CommonTime() + 4000;
if (typeof persistentData.UpdateTime !== "number") persistentData.UpdateTime = CommonTime() + 4000;
if (typeof persistentData.LastMessageLen !== "number") persistentData.LastMessageLen = (ChatRoomLastMessage) ? ChatRoomLastMessage.length : 0;
if (typeof persistentData.CheckTime !== "number") persistentData.CheckTime = CommonTime();
if (typeof persistentData.DisplayCount !== "number") persistentData.DisplayCount = 0;
if (typeof persistentData.LastTriggerCount !== "number") persistentData.LastTriggerCount = property.TriggerCount;
if (typeof property.NextShockTime !== "number") property.NextShockTime = 0;
if (typeof property.Type !== "string") property.Type = "";
// Trigger a check if a new message is detected
let lastMsgIndex = ChatRoomChatLog.length - 1;
if (lastMsgIndex >= 0 && ChatRoomChatLog[lastMsgIndex].Time > persistentData.CheckTime)
persistentData.UpdateTime = Math.min(persistentData.UpdateTime, CommonTime() + 200); // Trigger if the user speaks
const isTriggered = persistentData.LastTriggerCount < property.TriggerCount;
const newlyTriggered = isTriggered && persistentData.DisplayCount == 0;
if (newlyTriggered)
persistentData.ChangeTime = Math.min(persistentData.ChangeTime, CommonTime());
persistentData.UpdateTime = Math.min(persistentData.UpdateTime, CommonTime());
if (persistentData.UpdateTime < CommonTime()) {
if (data.C.IsPlayer() && CommonTime() > data.Item.Property.NextShockTime) {
AssetsItemPelvisForbiddenChastityBeltUpdate(data, persistentData.CheckTime);
persistentData.LastMessageLen = (ChatRoomLastMessage) ? ChatRoomLastMessage.length : 0;
}
// Set CheckTime to last processed chat message time
persistentData.CheckTime = (lastMsgIndex >= 0 ? ChatRoomChatLog[lastMsgIndex].Time : 0);
if (persistentData.ChangeTime < CommonTime()) {
if (persistentData.LastTriggerCount > property.TriggerCount) persistentData.LastTriggerCount = 0;
const wasBlinking = property.BlinkState;
property.BlinkState = wasBlinking && !newlyTriggered ? false : true;
const timeFactor = isTriggered ? 12 : 1;
const timeToNextRefresh = (wasBlinking ? 4000 : 1000) / timeFactor;
persistentData.ChangeTime = CommonTime() + timeToNextRefresh;
persistentData.UpdateTime = CommonTime() + timeToNextRefresh;
AnimationRequestRefreshRate(data.C, (5000 / timeFactor) - timeToNextRefresh);
AnimationRequestDraw(data.C);
}
}

Binary file not shown.

After

(image error) Size: 72 KiB

Binary file not shown.

After

(image error) Size: 72 KiB

Binary file not shown.

After

(image error) Size: 72 KiB

Binary file not shown.

After

(image error) Size: 72 KiB

Binary file not shown.

After

(image error) Size: 39 KiB

Binary file not shown.

After

(image error) Size: 39 KiB