GGTS - Control Futuristic Items

GGTS - Control Futuristic Items
This commit is contained in:
Ben987 2021-11-26 14:10:48 -05:00
parent 42ccb5de81
commit 40580c0b71
4 changed files with 40 additions and 19 deletions
BondageClub
Icons
Screens
Character/Player
Room/AsylumGGTS
Scripts

Binary file not shown.

After

(image error) Size: 2.4 KiB

View file

@ -43,6 +43,7 @@ SavedExpressionsSave,,,Save,,
SavedExpressionsLoad,,,Load,,
SavedExpressions,,,Save/Load Expressions,,
SavedExpressionsEmpty,,,(Empty),,
GGTSControl,,,GGTS control this item,,
ItemArmsWrappedBlanketSelect,,,Select Blanket Bondage,,
ItemArmsWrappedBlanketNormalWrapped,,,Normal,,
ItemArmsWrappedBlanketShouldersWrapped,,,Shoulders Wrapped,,
@ -2719,6 +2720,7 @@ GGTSIntroPublic,,,[GGTS] GGTS control public room. Be good girl SourceCharacter
GGTSIntroPrivate,,,[GGTS] Launching GGTS private room. Time counts triple. GGTS more active. Good girl follow commands. Three strikes equal punishment. GGTS in control. Be good girl SourceCharacter.,,
GGTSIntroPendingPunishment,,,[GGTS] GGTS inactive for SourceCharacter. Three strikes recorded. Report GGTS for punishment.,,
GGTSIntroNotPlaying,,,[GGTS] GGTS control public room. SourceCharacter unrecognized for GGTS.,,
GGTSIntroOnlyInAsylum,,,[GGTS] GGTS is only available in the asylum.,,
GGTSNoAdminPrivate,,,[GGTS] Good girl do not administrate room.,,
GGTSTimeOverStrike1,,,[GGTS] Time over SourceCharacter. Strike one recorded. Three strikes equal punishment.,,
GGTSTimeOverStrike2,,,[GGTS] Time over SourceCharacter. Strike two recorded. Three strikes equal punishment.,,

Can't render this file because it has a wrong number of fields in line 461.

View file

@ -111,6 +111,7 @@ function AsylumGGTSQuit() {
* @returns {void} - Nothing
*/
function AsylumGGTSBuildPrivate() {
ChatRoomSpace = "Asylum";
AsylumGGTSTimer = 0;
AsylumGGTSTask = null;
ChatCreateBackgroundList = BackgroundsGenerateList([BackgroundsTagAsylum]);
@ -238,6 +239,7 @@ function AsylumGGTSNewTask() {
AsylumGGTSTask = null;
AsylumGGTSTimer = Math.round(CommonTime() + 60000);
if (AsylumGGTSGetLevel(Player) <= 0) return;
if ((ChatRoomSpace == null) || (ChatRoomSpace != "Asylum")) return;
if ((Player.Game != null) && (Player.Game.GGTS != null) && (Player.Game.GGTS.Strike >= 3)) return;
let TaskList = [];
let Level = AsylumGGTSGetLevel(Player);
@ -282,6 +284,8 @@ function AsylumGGTSEndTaskSave() {
* @returns {void} - Nothing
*/
function AsylumGGTSEndTask() {
if ((ChatRoomSpace == null) || (ChatRoomSpace != "Asylum")) return;
if ((Player.Game != null) && (Player.Game.GGTS != null) && (Player.Game.GGTS.Strike >= 3)) return;
if (AsylumGGTSTaskDone(Player, AsylumGGTSTask)) {
AsylumGGTSMessage("TaskDone");
return AsylumGGTSEndTaskSave();
@ -304,7 +308,8 @@ function AsylumGGTSProcess() {
AsylumGGTSTaskEnd = CommonTime();
AsylumGGTSTimer = 0;
AsylumGGTSSetTimer();
if (AsylumGGTSGetLevel(Player) <= 0) AsylumGGTSMessage("IntroNotPlaying");
if ((ChatRoomSpace == null) || (ChatRoomSpace != "Asylum")) AsylumGGTSMessage("IntroOnlyInAsylum");
else if (AsylumGGTSGetLevel(Player) <= 0) AsylumGGTSMessage("IntroNotPlaying");
else if ((Player.Game != null) && (Player.Game.GGTS != null) && (Player.Game.GGTS.Strike >= 3)) AsylumGGTSMessage("IntroPendingPunishment");
else if (ChatRoomData.Private && (ChatSearchReturnToScreen == "AsylumGGTS")) AsylumGGTSMessage("IntroPrivate");
else AsylumGGTSMessage("IntroPublic");
@ -359,4 +364,16 @@ function AsylumGGTSStartPunishment() {
if (ReputationGet("Asylum") <= -50) AsylumEntrancePlayerJacket("Normal");
DialogLeave();
CommonSetScreen("Room", "AsylumBedroom");
}
/**
* Returns TRUE if the item is controlled by GGTS, so the player should not have control
* @returns {boolean} - TRUE if the item is controlled by GGTS
*/
function AsylumGGTSControlItem(Item) {
if ((ChatRoomSpace == null) || (ChatRoomSpace != "Asylum")) return false;
if ((ChatRoomData == null) || (ChatRoomData.Game == null) || (ChatRoomData.Game != "GGTS")) return false;
if ((Item == null) || (Item.Asset == null) || (Item.Asset.Name == null)) return false;
if (Item.Asset.Name.substr(0, 10) == "Futuristic") return true;
return false;
}

View file

@ -850,25 +850,25 @@ function DialogMenuButtonBuild(C) {
) {
DialogMenuButton.push("LockMenu");
}
if ((Item != null) && (C.ID == 0) && (!Player.CanInteract() || (IsItemLocked && !DialogCanUnlock(C, Item))) && (DialogMenuButton.indexOf("Unlock") < 0) && InventoryAllow(
C, Item.Asset) && !IsGroupBlocked) DialogMenuButton.push("Struggle");
if ((Item != null) && !IsItemLocked && Player.CanInteract() && InventoryAllow(C, Item.Asset) && !IsGroupBlocked) {
if (Item.Asset.AllowLock && (!Item.Property || (Item.Property && Item.Property.AllowLock !== false))) {
if (!Item.Asset.AllowLockType || (Item.Property && Item.Asset.AllowLockType.includes(Item.Property.Type))) {
DialogMenuButton.push(ItemBlockedOrLimited ? "LockDisabled" : "Lock");
}
}
}
if ((Item != null) && !IsItemLocked && !InventoryItemHasEffect(Item, "Mounted", true) && !InventoryItemHasEffect(Item, "Enclose", true) && Player.CanInteract() && InventoryAllow(
C, Item.Asset) && !IsGroupBlocked) DialogMenuButton.push("Remove");
if ((Item != null) && !IsItemLocked && InventoryItemHasEffect(Item, "Mounted", true) && Player.CanInteract() && InventoryAllow(
C, Item.Asset) && !IsGroupBlocked) DialogMenuButton.push("Dismount");
if ((Item != null) && !IsItemLocked && InventoryItemHasEffect(Item, "Enclose", true) && Player.CanInteract() && InventoryAllow(
C, Item.Asset) && !IsGroupBlocked) DialogMenuButton.push("Escape");
if ((Item != null) && Item.Asset.Extended && ((Player.CanInteract()) || DialogAlwaysAllowRestraint() || Item.Asset.AlwaysInteract) && (!IsGroupBlocked || Item.Asset.AlwaysExtend) && (!Item.Asset.OwnerOnly || (C.IsOwnedByPlayer())) && (!Item.Asset.LoverOnly || (C.IsLoverOfPlayer()))) DialogMenuButton.push(ItemBlockedOrLimited ? "UseDisabled" : "Use");
// Extended icon doesnt show up if remote works
if (!DialogMenuButton.includes("Use") && DialogCanUseRemote(C, Item)) DialogMenuButton.push(ItemBlockedOrLimited ? "RemoteDisabled" : "Remote");
if ((Item != null) && (C.ID == 0) && (!Player.CanInteract() || (IsItemLocked && !DialogCanUnlock(C, Item))) && (DialogMenuButton.indexOf("Unlock") < 0) && InventoryAllow(C, Item.Asset) && !IsGroupBlocked)
DialogMenuButton.push("Struggle");
// If the Asylum GGTS controls the item, we show a disabled button and hide the other buttons
if (AsylumGGTSControlItem(Item)) {
DialogMenuButton.push("GGTSControl");
} else {
if ((Item != null) && !IsItemLocked && Player.CanInteract() && InventoryAllow(C, Item.Asset) && !IsGroupBlocked)
if (Item.Asset.AllowLock && (!Item.Property || (Item.Property && Item.Property.AllowLock !== false)))
if (!Item.Asset.AllowLockType || (Item.Property && Item.Asset.AllowLockType.includes(Item.Property.Type)))
DialogMenuButton.push(ItemBlockedOrLimited ? "LockDisabled" : "Lock");
if ((Item != null) && !IsItemLocked && !InventoryItemHasEffect(Item, "Mounted", true) && !InventoryItemHasEffect(Item, "Enclose", true) && Player.CanInteract() && InventoryAllow(C, Item.Asset) && !IsGroupBlocked) DialogMenuButton.push("Remove");
if ((Item != null) && !IsItemLocked && InventoryItemHasEffect(Item, "Mounted", true) && Player.CanInteract() && InventoryAllow(C, Item.Asset) && !IsGroupBlocked) DialogMenuButton.push("Dismount");
if ((Item != null) && !IsItemLocked && InventoryItemHasEffect(Item, "Enclose", true) && Player.CanInteract() && InventoryAllow(C, Item.Asset) && !IsGroupBlocked) DialogMenuButton.push("Escape");
if ((Item != null) && Item.Asset.Extended && ((Player.CanInteract()) || DialogAlwaysAllowRestraint() || Item.Asset.AlwaysInteract) && (!IsGroupBlocked || Item.Asset.AlwaysExtend) && (!Item.Asset.OwnerOnly || (C.IsOwnedByPlayer())) && (!Item.Asset.LoverOnly || (C.IsLoverOfPlayer()))) DialogMenuButton.push(ItemBlockedOrLimited ? "UseDisabled" : "Use");
if (!DialogMenuButton.includes("Use") && DialogCanUseRemote(C, Item)) DialogMenuButton.push(ItemBlockedOrLimited ? "RemoteDisabled" : "Remote");
}
// Color selection
if (DialogCanColor(C, Item)) DialogMenuButton.push(ItemBlockedOrLimited ? "ColorPickDisabled" : "ColorPick");
// Make sure the target player zone is allowed for an activity
@ -1369,6 +1369,7 @@ function DialogItemClick(ClickItem) {
// Gets the current character and item
var C = (Player.FocusGroup != null) ? Player : CurrentCharacter;
var CurrentItem = InventoryGet(C, C.FocusGroup.Name);
if (AsylumGGTSControlItem(CurrentItem)) return;
// In permission mode, the player can allow or block items for herself
if ((C.ID == 0) && DialogItemPermissionMode) {
@ -1692,6 +1693,7 @@ function DialogSetText(NewText) {
* @returns {void} - Nothing
*/
function DialogExtendItem(Item, SourceItem) {
if (AsylumGGTSControlItem(Item)) return;
const C = CharacterGetCurrent();
if (InventoryBlockedOrLimited(C, Item)) return;
StruggleProgress = -1;