bc-stubs 96.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/bc/Assets/Female3DCG/Female3DCG.d.ts +41 -0
  4. package/bc/Assets/Female3DCG/Female3DCGExtended.d.ts +29 -0
  5. package/bc/Backgrounds/Backgrounds.d.ts +37 -0
  6. package/bc/Female3DCG_Types.d.ts +875 -0
  7. package/bc/Screens/Character/Appearance/Appearance.d.ts +392 -0
  8. package/bc/Screens/Character/BackgroundSelection/BackgroundSelection.d.ts +98 -0
  9. package/bc/Screens/Character/Cheat/Cheat.d.ts +54 -0
  10. package/bc/Screens/Character/Creation/Creation.d.ts +40 -0
  11. package/bc/Screens/Character/Disclaimer/Disclaimer.d.ts +21 -0
  12. package/bc/Screens/Character/FriendList/FriendList.d.ts +102 -0
  13. package/bc/Screens/Character/InformationSheet/InformationSheet.d.ts +46 -0
  14. package/bc/Screens/Character/ItemColor/ItemColor.d.ts +232 -0
  15. package/bc/Screens/Character/Login/Login.d.ts +194 -0
  16. package/bc/Screens/Character/OnlineProfile/OnlineProfile.d.ts +27 -0
  17. package/bc/Screens/Character/PasswordReset/PasswordReset.d.ts +28 -0
  18. package/bc/Screens/Character/Preference/Preference.d.ts +658 -0
  19. package/bc/Screens/Character/Relog/Relog.d.ts +36 -0
  20. package/bc/Screens/Character/Title/Title.d.ts +68 -0
  21. package/bc/Screens/Character/Wardrobe/Wardrobe.d.ts +93 -0
  22. package/bc/Screens/Cutscene/NPCCollaring/NPCCollaring.d.ts +26 -0
  23. package/bc/Screens/Cutscene/NPCSlaveAuction/NPCSlaveAuction.d.ts +27 -0
  24. package/bc/Screens/Cutscene/NPCWedding/NPCWedding.d.ts +35 -0
  25. package/bc/Screens/Cutscene/PlayerCollaring/PlayerCollaring.d.ts +26 -0
  26. package/bc/Screens/Cutscene/PlayerMistress/PlayerMistress.d.ts +24 -0
  27. package/bc/Screens/Cutscene/SarahIntro/SarahIntro.d.ts +22 -0
  28. package/bc/Screens/Inventory/Cloth/CheerleaderTop/CheerleaderTop.d.ts +33 -0
  29. package/bc/Screens/Inventory/Cloth/FrilledShirt/FrilledShirt.d.ts +10 -0
  30. package/bc/Screens/Inventory/ClothAccessory/Bib/Bib.d.ts +2 -0
  31. package/bc/Screens/Inventory/EyeShadow/EyeShadow.d.ts +60 -0
  32. package/bc/Screens/Inventory/Futuristic/Futuristic.d.ts +60 -0
  33. package/bc/Screens/Inventory/ItemArms/FullLatexSuit/FullLatexSuit.d.ts +6 -0
  34. package/bc/Screens/Inventory/ItemArms/HempRope/HempRope.d.ts +2 -0
  35. package/bc/Screens/Inventory/ItemArms/NylonRope/NylonRope.d.ts +2 -0
  36. package/bc/Screens/Inventory/ItemArms/PrisonLockdownSuit/PrisonLockdownSuit.d.ts +4 -0
  37. package/bc/Screens/Inventory/ItemArms/TransportJacket/TransportJacket.d.ts +10 -0
  38. package/bc/Screens/Inventory/ItemBreast/ForbiddenChastityBra/ForbiddenChastityBra.d.ts +32 -0
  39. package/bc/Screens/Inventory/ItemBreast/FuturisticBra/FuturisticBra.d.ts +24 -0
  40. package/bc/Screens/Inventory/ItemButt/AnalBeads2/AnalBeads2.d.ts +2 -0
  41. package/bc/Screens/Inventory/ItemButt/InflVibeButtPlug/InflVibeButtPlug.d.ts +2 -0
  42. package/bc/Screens/Inventory/ItemDevices/DollBox/DollBox.d.ts +2 -0
  43. package/bc/Screens/Inventory/ItemDevices/FuckMachine/FuckMachine.d.ts +16 -0
  44. package/bc/Screens/Inventory/ItemDevices/FuturisticCrate/FuturisticCrate.d.ts +8 -0
  45. package/bc/Screens/Inventory/ItemDevices/KabeshiriWall/KabeshiriWall.d.ts +13 -0
  46. package/bc/Screens/Inventory/ItemDevices/Kennel/Kennel.d.ts +18 -0
  47. package/bc/Screens/Inventory/ItemDevices/LuckyWheel/LuckyWheel.d.ts +48 -0
  48. package/bc/Screens/Inventory/ItemDevices/PetBowl/PetBowl.d.ts +6 -0
  49. package/bc/Screens/Inventory/ItemDevices/VacBedDeluxe/VacBedDeluxe.d.ts +2 -0
  50. package/bc/Screens/Inventory/ItemDevices/WheelFortune/WheelFortune.d.ts +10 -0
  51. package/bc/Screens/Inventory/ItemDevices/WoodenBox/WoodenBox.d.ts +13 -0
  52. package/bc/Screens/Inventory/ItemFeet/HempRope/HempRope.d.ts +2 -0
  53. package/bc/Screens/Inventory/ItemFeet/NylonRope/NylonRope.d.ts +2 -0
  54. package/bc/Screens/Inventory/ItemHandhelds/PortalTablet/PortalTablet.d.ts +10 -0
  55. package/bc/Screens/Inventory/ItemHead/DroneMask/DroneMask.d.ts +2 -0
  56. package/bc/Screens/Inventory/ItemHood/CanvasHood/CanvasHood.d.ts +6 -0
  57. package/bc/Screens/Inventory/ItemMisc/CombinationPadlock/CombinationPadlock.d.ts +16 -0
  58. package/bc/Screens/Inventory/ItemMisc/ExclusivePadlock/ExclusivePadlock.d.ts +6 -0
  59. package/bc/Screens/Inventory/ItemMisc/FamilyPadlock/FamilyPadlock.d.ts +6 -0
  60. package/bc/Screens/Inventory/ItemMisc/HighSecurityPadlock/HighSecurityPadlock.d.ts +15 -0
  61. package/bc/Screens/Inventory/ItemMisc/IntricatePadlock/IntricatePadlock.d.ts +6 -0
  62. package/bc/Screens/Inventory/ItemMisc/LoversPadlock/LoversPadlock.d.ts +6 -0
  63. package/bc/Screens/Inventory/ItemMisc/LoversTimerPadlock/LoversTimerPadlock.d.ts +17 -0
  64. package/bc/Screens/Inventory/ItemMisc/MetalPadlock/MetalPadlock.d.ts +6 -0
  65. package/bc/Screens/Inventory/ItemMisc/MistressPadlock/MistressPadlock.d.ts +6 -0
  66. package/bc/Screens/Inventory/ItemMisc/MistressTimerPadlock/MistressTimerPadlock.d.ts +13 -0
  67. package/bc/Screens/Inventory/ItemMisc/OwnerPadlock/OwnerPadlock.d.ts +6 -0
  68. package/bc/Screens/Inventory/ItemMisc/OwnerTimerPadlock/OwnerTimerPadlock.d.ts +22 -0
  69. package/bc/Screens/Inventory/ItemMisc/PandoraPadlock/PandoraPadlock.d.ts +6 -0
  70. package/bc/Screens/Inventory/ItemMisc/PasswordPadlock/PasswordPadlock.d.ts +17 -0
  71. package/bc/Screens/Inventory/ItemMisc/PortalLinkPadlock/PortalLinkPadlock.d.ts +6 -0
  72. package/bc/Screens/Inventory/ItemMisc/SafewordPadlock/SafewordPadlock.d.ts +12 -0
  73. package/bc/Screens/Inventory/ItemMisc/TimerPadlock/TimerPadlock.d.ts +13 -0
  74. package/bc/Screens/Inventory/ItemMisc/TimerPasswordPadlock/TimerPasswordPadlock.d.ts +13 -0
  75. package/bc/Screens/Inventory/ItemMisc/WoodenSign/WoodenSign.d.ts +2 -0
  76. package/bc/Screens/Inventory/ItemMouth/FuturisticPanelGag/FuturisticPanelGag.d.ts +49 -0
  77. package/bc/Screens/Inventory/ItemNeck/AutoShockCollar/AutoShockCollar.d.ts +4 -0
  78. package/bc/Screens/Inventory/ItemNeck/FuturisticCollar/FuturisticCollar.d.ts +59 -0
  79. package/bc/Screens/Inventory/ItemNeck/PetSuitShockCollar/PetSuitShockCollar.d.ts +4 -0
  80. package/bc/Screens/Inventory/ItemNeck/ShockCollar/ShockCollar.d.ts +4 -0
  81. package/bc/Screens/Inventory/ItemNeck/SlaveCollar/SlaveCollar.d.ts +25 -0
  82. package/bc/Screens/Inventory/ItemNeckAccessories/CollarAutoShockUnit/CollarAutoShockUnit.d.ts +15 -0
  83. package/bc/Screens/Inventory/ItemNeckAccessories/CollarNameTag/CollarNameTag.d.ts +8 -0
  84. package/bc/Screens/Inventory/ItemNeckAccessories/CollarShockUnit/CollarShockUnit.d.ts +17 -0
  85. package/bc/Screens/Inventory/ItemNeckAccessories/CustomCollarTag/CustomCollarTag.d.ts +2 -0
  86. package/bc/Screens/Inventory/ItemNeckAccessories/ElectronicTag/ElectronicTag.d.ts +2 -0
  87. package/bc/Screens/Inventory/ItemNeckRestraints/CollarLeash/CollarLeash.d.ts +4 -0
  88. package/bc/Screens/Inventory/ItemNeckRestraints/PetPost/PetPost.d.ts +2 -0
  89. package/bc/Screens/Inventory/ItemNipples/LactationPump/LactationPump.d.ts +2 -0
  90. package/bc/Screens/Inventory/ItemPelvis/ForbiddenChastityBelt/ForbiddenChastityBelt.d.ts +32 -0
  91. package/bc/Screens/Inventory/ItemPelvis/FuturisticChastityBelt/FuturisticChastityBelt.d.ts +28 -0
  92. package/bc/Screens/Inventory/ItemPelvis/FuturisticTrainingBelt/FuturisticTrainingBelt.d.ts +103 -0
  93. package/bc/Screens/Inventory/ItemPelvis/LoveChastityBelt/LoveChastityBelt.d.ts +8 -0
  94. package/bc/Screens/Inventory/ItemPelvis/ObedienceBelt/ObedienceBelt.d.ts +29 -0
  95. package/bc/Screens/Inventory/ItemPelvis/PortalPanties/PortalPanties.d.ts +10 -0
  96. package/bc/Screens/Inventory/ItemPelvis/SciFiPleasurePanties/SciFiPleasurePanties.d.ts +6 -0
  97. package/bc/Screens/Inventory/ItemTorso/FuturisticHarness/FuturisticHarness.d.ts +8 -0
  98. package/bc/Screens/Inventory/ItemVulva/ClitAndDildoVibratorbelt/ClitAndDildoVibratorbelt.d.ts +4 -0
  99. package/bc/Screens/Inventory/ItemVulva/FuturisticVibrator/FuturisticVibrator.d.ts +65 -0
  100. package/bc/Screens/Inventory/ItemVulva/LoversVibrator/LoversVibrator.d.ts +2 -0
  101. package/bc/Screens/Inventory/Wings/SteampunkWings/SteampunkWings.d.ts +16 -0
  102. package/bc/Screens/MiniGame/Chess/BondageChess.d.ts +30 -0
  103. package/bc/Screens/MiniGame/Chess/chess.d.ts +7 -0
  104. package/bc/Screens/MiniGame/ChestLockpick/ChestLockpick.d.ts +27 -0
  105. package/bc/Screens/MiniGame/ClubCard/ClubCard.d.ts +373 -0
  106. package/bc/Screens/MiniGame/ClubCardBuilder/ClubCardBuilder.d.ts +66 -0
  107. package/bc/Screens/MiniGame/DojoStruggle/DojoStruggle.d.ts +25 -0
  108. package/bc/Screens/MiniGame/GetUp/GetUp.d.ts +31 -0
  109. package/bc/Screens/MiniGame/HorseWalk/HorseWalk.d.ts +85 -0
  110. package/bc/Screens/MiniGame/Kidnap/Kidnap.d.ts +165 -0
  111. package/bc/Screens/MiniGame/KinkyDungeon/KDAutoStruggle.d.ts +99 -0
  112. package/bc/Screens/MiniGame/KinkyDungeon/KDClasses.d.ts +11 -0
  113. package/bc/Screens/MiniGame/KinkyDungeon/KDDelayedActions.d.ts +17 -0
  114. package/bc/Screens/MiniGame/KinkyDungeon/KDFixForBC.d.ts +11 -0
  115. package/bc/Screens/MiniGame/KinkyDungeon/KDModUtils.d.ts +93 -0
  116. package/bc/Screens/MiniGame/KinkyDungeon/KDParticles.d.ts +37 -0
  117. package/bc/Screens/MiniGame/KinkyDungeon/KDTypeDefs.d.ts +2161 -0
  118. package/bc/Screens/MiniGame/KinkyDungeon/KDWardrobe.d.ts +84 -0
  119. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeon.d.ts +653 -0
  120. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonAlt.d.ts +481 -0
  121. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonBones.d.ts +16 -0
  122. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonBoss.d.ts +119 -0
  123. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonBuffs.d.ts +33 -0
  124. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonBuffsList.d.ts +865 -0
  125. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonConsumables.d.ts +36 -0
  126. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonConsumablesList.d.ts +66 -0
  127. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonCurse.d.ts +44 -0
  128. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonDialogue.d.ts +171 -0
  129. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonDialogueList.d.ts +45 -0
  130. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonDialogueTriggers.d.ts +48 -0
  131. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonDraw.d.ts +738 -0
  132. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonDress.d.ts +62 -0
  133. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonDressList.d.ts +33 -0
  134. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonEditor.d.ts +1124 -0
  135. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonEditorGen.d.ts +113 -0
  136. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonEditorTiles.d.ts +4 -0
  137. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonEffectTiles.d.ts +6 -0
  138. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonEnemies.d.ts +544 -0
  139. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonEnemiesList.d.ts +22 -0
  140. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonEnemyEventList.d.ts +18 -0
  141. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonErrors.d.ts +59 -0
  142. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonEvents.d.ts +151 -0
  143. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonFactions.d.ts +53 -0
  144. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonFactionsList.d.ts +650 -0
  145. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonFight.d.ts +453 -0
  146. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonFurniture.d.ts +28 -0
  147. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonGame.d.ts +429 -0
  148. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonHUD.d.ts +134 -0
  149. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonInput.d.ts +23 -0
  150. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonInventory.d.ts +178 -0
  151. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonItem.d.ts +33 -0
  152. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonJail.d.ts +142 -0
  153. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonJailList.d.ts +105 -0
  154. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonLoot.d.ts +66 -0
  155. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonLootList.d.ts +866 -0
  156. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonLore.d.ts +37 -0
  157. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonMagic.d.ts +113 -0
  158. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonMagicCode.d.ts +23 -0
  159. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonMagicList.d.ts +62 -0
  160. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonMapMods.d.ts +5 -0
  161. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonMistress.d.ts +10 -0
  162. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonMultiplayer.d.ts +26 -0
  163. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonMusic.d.ts +28 -0
  164. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonObject.d.ts +42 -0
  165. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonParams.d.ts +4 -0
  166. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonPathfinding.d.ts +36 -0
  167. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonPerks.d.ts +147 -0
  168. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonPersonality.d.ts +83 -0
  169. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonPlayerEffects.d.ts +35 -0
  170. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonQuest.d.ts +10 -0
  171. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonReputation.d.ts +229 -0
  172. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonRestraints.d.ts +766 -0
  173. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonRestraintsList.d.ts +55 -0
  174. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonSetpiece.d.ts +91 -0
  175. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonShrine.d.ts +89 -0
  176. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonSpawns.d.ts +49 -0
  177. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonStats.d.ts +282 -0
  178. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonTests.d.ts +5 -0
  179. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonTiles.d.ts +160 -0
  180. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonTilesList.d.ts +72 -0
  181. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonTraps.d.ts +34 -0
  182. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonVibe.d.ts +98 -0
  183. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonVision.d.ts +24 -0
  184. package/bc/Screens/MiniGame/KinkyDungeon/KinkyDungeonWeaponList.d.ts +5 -0
  185. package/bc/Screens/MiniGame/MagicBattle/MagicBattle.d.ts +73 -0
  186. package/bc/Screens/MiniGame/MagicPuzzle/MagicPuzzle.d.ts +75 -0
  187. package/bc/Screens/MiniGame/MaidCleaning/MaidCleaning.d.ts +51 -0
  188. package/bc/Screens/MiniGame/MaidDrinks/MaidDrinks.d.ts +82 -0
  189. package/bc/Screens/MiniGame/PlayerAuction/PlayerAuction.d.ts +36 -0
  190. package/bc/Screens/MiniGame/PuppyWalker/PuppyWalker.d.ts +39 -0
  191. package/bc/Screens/MiniGame/RhythmGame/RhythmGame.d.ts +76 -0
  192. package/bc/Screens/MiniGame/SlaveAuction/SlaveAuction.d.ts +39 -0
  193. package/bc/Screens/MiniGame/Tennis/Tennis.d.ts +52 -0
  194. package/bc/Screens/MiniGame/Therapy/Therapy.d.ts +39 -0
  195. package/bc/Screens/MiniGame/WheelFortune/WheelFortune.d.ts +105 -0
  196. package/bc/Screens/Online/AdvancedRule/AdvancedRule.d.ts +32 -0
  197. package/bc/Screens/Online/ChatAdmin/ChatAdmin.d.ts +59 -0
  198. package/bc/Screens/Online/ChatBlockItem/ChatBlockItem.d.ts +30 -0
  199. package/bc/Screens/Online/ChatCreate/ChatCreate.d.ts +66 -0
  200. package/bc/Screens/Online/ChatRoom/ChatRoom.d.ts +1342 -0
  201. package/bc/Screens/Online/ChatRoom/Commands.d.ts +66 -0
  202. package/bc/Screens/Online/ChatSearch/ChatSearch.d.ts +241 -0
  203. package/bc/Screens/Online/ChatSelect/ChatSelect.d.ts +33 -0
  204. package/bc/Screens/Online/ForbiddenWords/ForbiddenWords.d.ts +33 -0
  205. package/bc/Screens/Online/Game/OnlineGame.d.ts +69 -0
  206. package/bc/Screens/Online/GameClubCard/GameClubCard.d.ts +131 -0
  207. package/bc/Screens/Online/GameLARP/GameLARP.d.ts +279 -0
  208. package/bc/Screens/Online/GameMagicBattle/GameMagicBattle.d.ts +159 -0
  209. package/bc/Screens/Online/WheelFortuneCustomize/WheelFortuneCustomize.d.ts +24 -0
  210. package/bc/Screens/Room/Arcade/Arcade.d.ts +94 -0
  211. package/bc/Screens/Room/AsylumBedroom/AsylumBedroom.d.ts +16 -0
  212. package/bc/Screens/Room/AsylumEntrance/AsylumEntrance.d.ts +265 -0
  213. package/bc/Screens/Room/AsylumGGTS/AsylumGGTS.d.ts +330 -0
  214. package/bc/Screens/Room/AsylumMeeting/AsylumMeeting.d.ts +110 -0
  215. package/bc/Screens/Room/AsylumTherapy/AsylumTherapy.d.ts +117 -0
  216. package/bc/Screens/Room/Cafe/Cafe.d.ts +144 -0
  217. package/bc/Screens/Room/Cell/Cell.d.ts +32 -0
  218. package/bc/Screens/Room/ClubCardLounge/ClubCardLounge.d.ts +28 -0
  219. package/bc/Screens/Room/CollegeCafeteria/CollegeCafeteria.d.ts +57 -0
  220. package/bc/Screens/Room/CollegeChess/CollegeChess.d.ts +75 -0
  221. package/bc/Screens/Room/CollegeDetention/CollegeDetention.d.ts +98 -0
  222. package/bc/Screens/Room/CollegeEntrance/CollegeEntrance.d.ts +54 -0
  223. package/bc/Screens/Room/CollegeTeacher/CollegeTeacher.d.ts +71 -0
  224. package/bc/Screens/Room/CollegeTennis/CollegeTennis.d.ts +47 -0
  225. package/bc/Screens/Room/CollegeTheater/CollegeTheater.d.ts +100 -0
  226. package/bc/Screens/Room/Crafting/Crafting.d.ts +213 -0
  227. package/bc/Screens/Room/DailyJob/DailyJob.d.ts +111 -0
  228. package/bc/Screens/Room/Empty/Empty.d.ts +84 -0
  229. package/bc/Screens/Room/Gambling/Gambling.d.ts +269 -0
  230. package/bc/Screens/Room/Infiltration/Infiltration.d.ts +223 -0
  231. package/bc/Screens/Room/InfiltrationPerks/InfiltrationPerks.d.ts +42 -0
  232. package/bc/Screens/Room/Introduction/Introduction.d.ts +195 -0
  233. package/bc/Screens/Room/KidnapLeague/KidnapLeague.d.ts +253 -0
  234. package/bc/Screens/Room/LARP/LARP.d.ts +39 -0
  235. package/bc/Screens/Room/Magic/Magic.d.ts +199 -0
  236. package/bc/Screens/Room/MagicSchoolEscape/MagicSchoolEscape.d.ts +36 -0
  237. package/bc/Screens/Room/MagicSchoolLaboratory/MagicSchoolLaboratory.d.ts +170 -0
  238. package/bc/Screens/Room/MaidQuarters/MaidQuarters.d.ts +305 -0
  239. package/bc/Screens/Room/MainHall/MainHall.d.ts +255 -0
  240. package/bc/Screens/Room/Management/Management.d.ts +544 -0
  241. package/bc/Screens/Room/MovieStudio/MovieStudio.d.ts +178 -0
  242. package/bc/Screens/Room/Nursery/Nursery.d.ts +85 -0
  243. package/bc/Screens/Room/Pandora/Pandora.d.ts +348 -0
  244. package/bc/Screens/Room/PandoraPrison/PandoraPrison.d.ts +180 -0
  245. package/bc/Screens/Room/Photographic/Photographic.d.ts +53 -0
  246. package/bc/Screens/Room/Platform/Platform.d.ts +1730 -0
  247. package/bc/Screens/Room/PlatformDialog/PlatformDialog.d.ts +3966 -0
  248. package/bc/Screens/Room/PlatformIntro/PlatformIntro.d.ts +21 -0
  249. package/bc/Screens/Room/PlatformProfile/PlatformProfile.d.ts +62 -0
  250. package/bc/Screens/Room/Poker/Poker.d.ts +141 -0
  251. package/bc/Screens/Room/Poker/PokerHandValue.d.ts +65 -0
  252. package/bc/Screens/Room/Prison/Prison.d.ts +118 -0
  253. package/bc/Screens/Room/Private/Private.d.ts +781 -0
  254. package/bc/Screens/Room/PrivateBed/PrivateBed.d.ts +78 -0
  255. package/bc/Screens/Room/PrivateRansom/PrivateRansom.d.ts +28 -0
  256. package/bc/Screens/Room/Sarah/Sarah.d.ts +162 -0
  257. package/bc/Screens/Room/Shibari/Shibari.d.ts +162 -0
  258. package/bc/Screens/Room/Shop/Shop.d.ts +162 -0
  259. package/bc/Screens/Room/SlaveMarket/SlaveMarket.d.ts +90 -0
  260. package/bc/Screens/Room/Stable/Stable.d.ts +236 -0
  261. package/bc/Scripts/Activity.d.ts +270 -0
  262. package/bc/Scripts/AfkTimer.d.ts +43 -0
  263. package/bc/Scripts/Animation.d.ts +81 -0
  264. package/bc/Scripts/Asset.d.ts +216 -0
  265. package/bc/Scripts/Audio.d.ts +105 -0
  266. package/bc/Scripts/Character.d.ts +495 -0
  267. package/bc/Scripts/CharacterName.d.ts +1 -0
  268. package/bc/Scripts/ColorPicker.d.ts +155 -0
  269. package/bc/Scripts/Common.d.ts +499 -0
  270. package/bc/Scripts/CommonDraw.d.ts +34 -0
  271. package/bc/Scripts/ControllerSupport.d.ts +107 -0
  272. package/bc/Scripts/Dialog.d.ts +970 -0
  273. package/bc/Scripts/DictionaryBuilder.d.ts +210 -0
  274. package/bc/Scripts/Drawing.d.ts +581 -0
  275. package/bc/Scripts/Drawing3D.d.ts +21 -0
  276. package/bc/Scripts/DynamicDraw.d.ts +310 -0
  277. package/bc/Scripts/Element.d.ts +154 -0
  278. package/bc/Scripts/ExtendedItem.d.ts +339 -0
  279. package/bc/Scripts/GLDraw.d.ts +223 -0
  280. package/bc/Scripts/Game.d.ts +61 -0
  281. package/bc/Scripts/GameLog.d.ts +87 -0
  282. package/bc/Scripts/Graph.d.ts +46 -0
  283. package/bc/Scripts/Import.d.ts +7 -0
  284. package/bc/Scripts/Inventory.d.ts +509 -0
  285. package/bc/Scripts/MiniGame.d.ts +30 -0
  286. package/bc/Scripts/ModularItem.d.ts +286 -0
  287. package/bc/Scripts/Mouse.d.ts +34 -0
  288. package/bc/Scripts/NPC.d.ts +105 -0
  289. package/bc/Scripts/Notification.d.ts +120 -0
  290. package/bc/Scripts/PortalLink.d.ts +159 -0
  291. package/bc/Scripts/Property.d.ts +98 -0
  292. package/bc/Scripts/Reputation.d.ts +36 -0
  293. package/bc/Scripts/Server.d.ts +239 -0
  294. package/bc/Scripts/Skill.d.ts +107 -0
  295. package/bc/Scripts/Speech.d.ts +145 -0
  296. package/bc/Scripts/Struggle.d.ts +357 -0
  297. package/bc/Scripts/Testing.d.ts +30 -0
  298. package/bc/Scripts/Text.d.ts +92 -0
  299. package/bc/Scripts/TextItem.d.ts +65 -0
  300. package/bc/Scripts/TightenLoosenItem.d.ts +31 -0
  301. package/bc/Scripts/Timer.d.ts +62 -0
  302. package/bc/Scripts/Translation.d.ts +101 -0
  303. package/bc/Scripts/TypedItem.d.ts +242 -0
  304. package/bc/Scripts/Validation.d.ts +324 -0
  305. package/bc/Scripts/VariableHeight.d.ts +108 -0
  306. package/bc/Scripts/VibratorMode.d.ts +209 -0
  307. package/bc/Scripts/lib/LZString.d.ts +12 -0
  308. package/bc/Scripts/lib/three/FBXLoader.d.ts +0 -0
  309. package/bc/Scripts/lib/three/GLTFLoader.d.ts +0 -0
  310. package/bc/Scripts/lib/webgl/resources/m4.d.ts +0 -0
  311. package/bc/Typedef.d.ts +3933 -0
  312. package/package.json +19 -0
@@ -0,0 +1,3933 @@
1
+ //#region Common
2
+
3
+ declare namespace SocketIO {
4
+ type Socket = import("socket.io-client").Socket;
5
+ }
6
+
7
+ declare function io(serv: string): SocketIO.Socket;
8
+
9
+ interface String {
10
+ replaceAt(index: number, character: string): string;
11
+ }
12
+
13
+ declare function parseInt(s: string | number, radix?: number): number;
14
+
15
+ type MemoizedFunction<T extends Function> = T & {
16
+ /** Clears the cache of the memoized function */
17
+ clearCache(): void;
18
+ };
19
+
20
+ // GL shim
21
+ interface WebGL2RenderingContext {
22
+ program?: WebGLProgram;
23
+ programFull?: WebGLProgram;
24
+ programHalf?: WebGLProgram;
25
+ programTexMask?: WebGLProgram;
26
+ textureCache?: Map<string, { width: number, height: number, texture: WebGLTexture }>;
27
+ maskCache?: Map<string, WebGLTexture>;
28
+ }
29
+
30
+ interface WebGLProgram {
31
+ u_alpha?: WebGLUniformLocation;
32
+ u_color?: WebGLUniformLocation;
33
+ a_position?: number;
34
+ a_texcoord?: number;
35
+ u_matrix?: WebGLUniformLocation;
36
+ u_texture?: WebGLUniformLocation;
37
+ u_alpha_texture?: WebGLUniformLocation;
38
+ position_buffer?: WebGLBuffer;
39
+ texcoord_buffer?: WebGLBuffer;
40
+ }
41
+
42
+ interface HTMLCanvasElement {
43
+ GL?: WebGL2RenderingContext;
44
+ }
45
+
46
+ interface HTMLImageElement {
47
+ errorcount?: number;
48
+ }
49
+
50
+ interface HTMLElement {
51
+ setAttribute(qualifiedName: string, value: any): void;
52
+ }
53
+
54
+ interface RGBColor {
55
+ r: number;
56
+ g: number;
57
+ b: number;
58
+ }
59
+
60
+ interface RGBAColor extends RGBColor {
61
+ a: number;
62
+ }
63
+
64
+ /** A 4-tuple with X & Y coordinates, width and height */
65
+ type RectTuple = [X: number, Y: number, W: number, H: number];
66
+
67
+ /** A 4-tuple with X & Y coordinates and, optionally, width and height */
68
+ type PartialRectTuple = [X: number, Y: number, W?: number, H?: number];
69
+
70
+ type CommonSubstituteReplacer = (match: string, offset: number, replacement: string, string: string) => string;
71
+ type CommonSubtituteSubstitution = [tag: string, substitution: string, replacer?: CommonSubstituteReplacer];
72
+
73
+ interface CommonGenerateGridParameters {
74
+ /** Starting X coordinate of the grid */
75
+ x: number,
76
+ /** Starting Y coordinate of the grid */
77
+ y: number,
78
+ /** Maximum width of the grid */
79
+ width: number,
80
+ /** Maximum height of the grid */
81
+ height: number,
82
+ /** Width of one grid item */
83
+ itemWidth: number,
84
+ /** Height of one grid item */
85
+ itemHeight: number,
86
+ }
87
+
88
+ type CommonGenerateGridCallback<T> = (item: T, x: number, y: number, width: number, height: number) => boolean;
89
+
90
+ //#endregion
91
+
92
+ //#region Enums
93
+
94
+ type DialogMenuMode = "dialog" | "items" | "colorDefault" | "colorExpression" | "colorItem" | "permissions" | "activities" | "locking" | "locked" | "extended" | "tighten" | "crafted" | "struggle";
95
+
96
+ type DialogMenuButton = "Activity" |
97
+ "ColorCancel" | "ColorChange" | "ColorChangeMulti" | "ColorDefault" | "ColorPickDisabled" | "ColorSelect" |
98
+ "Crafting" |
99
+ "DialogNormalMode" | "DialogPermissionMode" |
100
+ "Dismount" | "Escape" | "Remove" |
101
+ "Exit" |
102
+ "GGTSControl" |
103
+ "InspectLock" | "InspectLockDisabled" |
104
+ "Lock" | "LockDisabled" | "LockMenu" |
105
+ "Next" | "Prev" | "PickLock" | "PickLockDisabled" |
106
+ "Remote" | "RemoteDisabled" | `RemoteDisabledFor${VibratorRemoteAvailability}` |
107
+ "Unlock" | "Use" | "UseDisabled" | "Struggle" | "TightenLoosen" |
108
+ // Wardrobe buttons
109
+ "Wardrobe" | "WardrobeDisabled" | "Reset" | "WearRandom" | "Random" | "Naked" | "Accept" | "Cancel" | "Character"
110
+ ;
111
+
112
+ type DialogSortOrder = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
113
+
114
+ type DialogStruggleActionType = "ActionUse" | "ActionSwap" | "ActionRemove" | "ActionUnlock" | "ActionUnlockAndRemove" | "ActionStruggle" | "ActionEscape" | "ActionDismount";
115
+
116
+ type CharacterType = "online" | "npc" | "simple";
117
+
118
+ type CharacterPronouns = "SheHer" | "HeHim";
119
+
120
+ type VibratorIntensity = -1 | 0 | 1 | 2 | 3;
121
+
122
+ type VibratorModeState = "Default" | "Deny" | "Orgasm" | "Rest";
123
+
124
+ type VibratorMode = "Off" | "Low" | "Medium" | "High" | "Maximum" | "Random" | "Escalate" | "Tease" | "Deny" | "Edge";
125
+
126
+ type VibratorRemoteAvailability = "Available" | "NoRemote" | "NoRemoteOwnerRuleActive" | "NoLoversRemote" | "RemotesBlocked" | "CannotInteract" | "NoAccess" | "InvalidItem";
127
+
128
+ type ItemVulvaFuturisticVibratorAccessMode = "" | "ProhibitSelf" | "LockMember";
129
+
130
+ /** The {@link EffectName} values for all gag-related effects. */
131
+ type GagEffectName = (
132
+ "GagVeryLight"
133
+ | "GagEasy"
134
+ | "GagLight"
135
+ | "GagNormal"
136
+ | "GagMedium"
137
+ | "GagHeavy"
138
+ | "GagVeryHeavy"
139
+ | "GagTotal"
140
+
141
+ // Those are only supposed to be "transient", as in, they appear because of stacked gags
142
+ | "GagTotal2"
143
+ | "GagTotal3"
144
+ | "GagTotal4"
145
+ );
146
+
147
+ /** The {@link EffectName} values for all blindness-related effects. */
148
+ type BlindEffectName = "BlindLight" | "BlindNormal" | "BlindHeavy" | "BlindTotal";
149
+
150
+ /** The {@link EffectName} values for all blurring-related effects. */
151
+ type BlurEffectName = "BlurLight" | "BlurNormal" | "BlurHeavy" | "BlurTotal";
152
+
153
+ /** The {@link EffectName} values for all deafness-related effects. */
154
+ type DeafEffectName = "DeafLight" | "DeafNormal" | "DeafHeavy" | "DeafTotal";
155
+
156
+ /**
157
+ * @property Freeze - Prevents walking and kneeling unaided. There's a few caveats with the kneeling part.
158
+ * @property Prone - Indicates the character is prone. Looks non-functional.
159
+ * @property Block - Indicates that the character is "blocked". Acts as a restraint.
160
+ * @property Mounted - Indicates that the character is mounted onto something. Acts as a restraint and blocks moving around.
161
+ * @property KneelFreeze - Prevents walking.
162
+ * @property ForceKneel - Prevents kneeling unaided.
163
+ * @property BlockKneel - Prevents items that have the CanKneel prerequisite from being applied.
164
+ *
165
+ * @property CuffedFeet - Enable items that have the CuffedFeet prerequisite to be applied.
166
+ * @property CuffedLegs - Enable items that have the CuffedLegs prerequisite to be applied.
167
+ * @property CuffedArms - Enable items that have the CuffedArms prerequisite to be applied.
168
+ * @property IsChained - Prevents items that have the NotChained prerequisite from being applied.
169
+ * @property FixedHead - Locks the character's head in-place. Prevents nodding and shaking activities on it.
170
+ * @property MergedFingers - Indicates the character can't use their fingers normally. Limits activities.
171
+ *
172
+ * @property Shackled - Prevents items that have the NotShackled prerequisite from being applied.
173
+ * @property Tethered - Prevents leashing items from working.
174
+ * @property Enclose - Indicates the character cannot be interacted with and can't interact back.
175
+ * @property OneWayEnclose - Indicates the character can be interacted with but can't interact back.
176
+ * @property OnBed - Enable items that have the OnBed prerequisite to be applied.
177
+ * @property Lifted - Prevents items that have the NotLifted prerequisite to be applied.
178
+ *
179
+ * @property Slow - Indicates the character is slowed. Used when exiting chatrooms.
180
+ * @property FillVulva - Marks the item as filling the character's vulva.
181
+ * Used when checking activities' prerequisites and the auto-stimulation events.
182
+ * @property ShaftVulva - Marks the item as being some sort of shaft extending out of the vulva.
183
+ * Used to block things like chastity from closing.
184
+ * @property IsPlugged - Marks the item as filling the character's butt.
185
+ * @property IsPlugged - Marks the item as filling the character's butt.
186
+ * Used when checking activities' prerequisites and the auto-stimulation events.
187
+ *
188
+ * @property Egged - Marks the item as being a "vibrator" kind-of item.
189
+ * Make the item's Vibrator-related properties be taken into account for arousal,
190
+ * as well as the stuttering effect.
191
+ * @property Vibrating - Indicates an "Egged" item as being vibrating.
192
+ * Normally handled automatically by VibrationMode. Makes the item preview wobble
193
+ * in the inventory, as well as cause auto-stimulation events.
194
+ *
195
+ * @property Edged - Marks the item as causing the character to be edged.
196
+ * Normally handled automatically by VibrationMode. Causes the character's arousal
197
+ * to be capped, and ruins its orgasms.
198
+ * @property DenialMode - Marks the item as causing the character to be denied.
199
+ * Causes the character's arousal to be capped (higher that Edged).
200
+ * @property RuinOrgasms - Marks the item as ruining orgasms.
201
+ * Requires DenialMode. Makes the character unable to fully orgasm.
202
+ *
203
+ * @property Remote - Marks the item as a remote. Looks non-functional.
204
+ * @property UseRemote - Marks the item as needing a remote to be changed.
205
+ * @property BlockRemotes - Marks the item as preventing remotes from being used
206
+ * on the character.
207
+ *
208
+ * @property Lock - Marks the item as being some kind of lock.
209
+ * @property NotSelfPickable - Disables the item from being lock-picked.
210
+ *
211
+ * @property Chaste - Marks the item as applying chastity.
212
+ * Prevents items that have the NotChaste prerequisite from being applied.
213
+ * Allows the item to be taken off at the club management.
214
+ * @property BreastChaste - Marks the item as applying breast chastity.
215
+ * Allows the item to be taken off at the club management.
216
+ *
217
+ * @property Leash - Marks the item as being usable as a leash.
218
+ * @property IsLeashed - Marks a leash item as being held.
219
+ * @property CrotchRope - Marks the item as being a crotchrope-style item.
220
+ * Used for the auto-stimulation events.
221
+ *
222
+ * @property ReceiveShock - Marks the item as being a shock-dispensing item.
223
+ * @property TriggerShock - Marks the item as being a trigger for shock-dispensing items.
224
+ *
225
+ * @property OpenPermission - Marks the item as requiring collar-permissions (Futuristic).
226
+ * @property OpenPermissionArm - Marks the item as requiring arm-permissions (Futuristic).
227
+ * @property OpenPermissionLeg - Marks the item as requiring arm-permissions (Futuristic).
228
+ * @property OpenPermissionChastity - Marks the item as requiring chastity-permissions (Futuristic).
229
+ *
230
+ * @property BlockMouth - Marks the item as blocking the character's mouth.
231
+ * Prevents items that have the NotLifted prerequisite to be applied.
232
+ * Also used when checking activities' prerequisites.
233
+ * @property OpenMouth - Marks the item as opening the character's mouth.
234
+ * Used when checking activities' prerequisites.
235
+ *
236
+ * @property ProtrudingMouth - Indicates that the item bulges out from the character's mouth.
237
+ * Prevents items that wrap the head to be applied.
238
+ *
239
+ * @property Wiggling - Indicates that the item hangs from the character and can wiggle from it,
240
+ * triggering arousal. Used as part of the stimulation event system.
241
+ */
242
+ type EffectName =
243
+ GagEffectName | BlindEffectName | BlurEffectName | DeafEffectName |
244
+
245
+ "Freeze" | "Prone" | "Block" | "Mounted" | "KneelFreeze" | "ForceKneel" | "BlockKneel" |
246
+
247
+ "CuffedFeet" | "CuffedLegs" | "CuffedArms" | "IsChained" | "FixedHead" | "MergedFingers" |
248
+
249
+ "Shackled" | "Tethered" | "Enclose" | "OneWayEnclose" | "OnBed" | "Lifted" | "Suspended" |
250
+
251
+ "Slow" | "FillVulva" | "VulvaShaft" | "IsPlugged" |
252
+
253
+ "Egged" | "Vibrating" |
254
+
255
+ "Edged" | "DenialMode" | "RuinOrgasms" |
256
+
257
+ "Remote" | "UseRemote" | "BlockRemotes" |
258
+
259
+ "Lock" | "NotSelfPickable" |
260
+
261
+ "Chaste" | "BreastChaste" | "ButtChaste" |
262
+
263
+ "Leash" | "IsLeashed" | "CrotchRope" |
264
+
265
+ "ReceiveShock" | "TriggerShock" |
266
+
267
+ "OpenPermission" | "OpenPermissionArm" | "OpenPermissionLeg" | "OpenPermissionChastity" |
268
+
269
+ "BlockMouth" | "OpenMouth" |
270
+
271
+ "VR" | "VRAvatars" | "KinkyDungeonParty" |
272
+
273
+ "LightBall" |
274
+
275
+ "RegressedTalk" |
276
+
277
+ "HideRestraints" |
278
+
279
+ "Unlock-MetalPadlock" | "Unlock-OwnerPadlock" | "Unlock-OwnerTimerPadlock" |
280
+ "Unlock-LoversPadlock" | "Unlock-LoversTimerPadlock" |
281
+ "Unlock-FamilyPadlock" |
282
+ "Unlock-MistressPadlock" | "Unlock-MistressTimerPadlock" |
283
+ "Unlock-PandoraPadlock" |
284
+
285
+ "Unlock-MetalCuffs" | "Unlock-EscortAnkleCuffs" | "Unlock-PortalPanties" |
286
+
287
+ // XXX: only for lockpicks?
288
+ "Unlock-" |
289
+
290
+ "ProtrudingMouth" | "Wiggling" |
291
+ ""
292
+ ;
293
+
294
+ interface ExpressionNameMap {
295
+ Eyebrows: null | "Raised" | "Lowered" | "OneRaised" | "Harsh" | "Angry" | "Soft",
296
+ Eyes: (
297
+ null | "Closed" | "Dazed" | "Shy" | "Sad" | "Horny" | "Lewd" | "VeryLewd" |
298
+ "Heart" | "HeartPink" | "LewdHeart" | "LewdHeartPink" | "Dizzy" | "Daydream" |
299
+ "ShylyHappy" | "Angry" | "Surprised" | "Scared"
300
+ ),
301
+ Eyes2: ExpressionNameMap["Eyes"],
302
+ Mouth: (
303
+ null | "Frown" | "Sad" | "Pained" | "Angry" | "HalfOpen" | "Open" | "Ahegao" | "Moan" |
304
+ "TonguePinch" | "LipBite" | "Happy" | "Devious" | "Laughing" | "Grin" | "Smirk" | "Pout"
305
+ ),
306
+ Pussy: null | "Hard",
307
+ Blush: null | "Low" | "Medium" | "High" | "VeryHigh" | "Extreme" | "ShortBreath",
308
+ Fluids: (
309
+ null | "DroolLow" | "DroolMedium" | "DroolHigh" | "DroolSides" | "DroolMessy" | "DroolTearsLow" |
310
+ "DroolTearsMedium" | "DroolTearsHigh" | "DroolTearsMessy" | "DroolTearsSides" |
311
+ "TearsHigh" | "TearsMedium" | "TearsLow"
312
+ ),
313
+ Emoticon: (
314
+ null | "Afk" | "Whisper" | "Sleep" | "Hearts" | "Tear" | "Hearing" | "Confusion" | "Exclamation" |
315
+ "Annoyed" | "Read" | "RaisedHand" | "Spectator" | "ThumbsDown" | "ThumbsUp" | "LoveRope" |
316
+ "LoveGag" | "LoveLock" | "Wardrobe" | "Gaming" | "Coffee"
317
+ ),
318
+ }
319
+
320
+ type ExpressionGroupName = keyof ExpressionNameMap;
321
+ type ExpressionName = ExpressionNameMap[ExpressionGroupName];
322
+
323
+ type AssetGroupItemName =
324
+ 'ItemAddon' | 'ItemArms' | 'ItemBoots' | 'ItemBreast' | 'ItemButt' |
325
+ 'ItemDevices' | 'ItemEars' | 'ItemFeet' | 'ItemHands' | 'ItemHead' |
326
+ 'ItemHood' | 'ItemLegs' | 'ItemMisc' | 'ItemMouth' | 'ItemMouth2' |
327
+ 'ItemMouth3' | 'ItemNeck' | 'ItemNeckAccessories' | 'ItemNeckRestraints' |
328
+ 'ItemNipples' | 'ItemNipplesPiercings' | 'ItemNose' | 'ItemPelvis' |
329
+ 'ItemTorso' | 'ItemTorso2'| 'ItemVulva' | 'ItemVulvaPiercings' |
330
+ 'ItemHandheld' |
331
+
332
+ 'ItemHidden' /* TODO: investigate, not a real group */
333
+ ;
334
+
335
+ type AssetGroupScriptName = 'ItemScript';
336
+
337
+ type AssetGroupBodyName =
338
+ ExpressionGroupName | 'BodyLower' | 'BodyUpper' | 'Bra' | 'Bracelet' | 'Cloth' |
339
+ 'ClothAccessory' | 'ClothLower' | 'Corset' | 'EyeShadow' | 'FacialHair' | 'Garters' | 'Glasses' | 'Gloves' |
340
+ 'HairAccessory1' | 'HairAccessory2' | 'HairAccessory3' | 'HairBack' |
341
+ 'HairFront' | 'FacialHair' | 'Hands' | 'Hat' | 'Head' | 'Height' | 'Jewelry' | 'LeftAnklet' | 'LeftHand' | 'Mask' |
342
+ 'Necklace' | 'Nipples' | 'Panties' | 'Pronouns' | 'RightAnklet' | 'RightHand' |
343
+ 'Shoes' | 'Socks' | 'SocksLeft' | 'SocksRight' | 'Suit' | 'SuitLower' | 'TailStraps' | 'Wings'
344
+ ;
345
+
346
+ type AssetGroupName = AssetGroupBodyName | AssetGroupItemName | AssetGroupScriptName;
347
+
348
+ type AssetPoseCategory = 'BodyUpper' | 'BodyLower' | 'BodyFull';
349
+
350
+ type AssetPoseName =
351
+ /* BodyUpper */ 'BaseUpper' | 'BackBoxTie' | 'BackCuffs' | 'BackElbowTouch' | 'OverTheHead' | 'TapedHands' | 'Yoked' |
352
+ /* BodyLower */ 'BaseLower' | 'Kneel' | 'KneelingSpread' | 'LegsClosed' | 'LegsOpen' | 'Spread' |
353
+
354
+ /* BodyFull */ 'Hogtied' | 'AllFours' |
355
+ /* BodyAddon */ 'Suspension'
356
+ ;
357
+
358
+ type AssetPoseMapping = Partial<Record<AssetPoseName, AssetPoseName | "">>;
359
+
360
+ type AssetLockType =
361
+ "CombinationPadlock" | "ExclusivePadlock" | "HighSecurityPadlock" |
362
+ "IntricatePadlock" | "LoversPadlock" | "LoversTimerPadlock" | "FamilyPadlock" |
363
+ "MetalPadlock" | "MistressPadlock" | "MistressTimerPadlock" |
364
+ "OwnerPadlock" | "OwnerTimerPadlock" | "PandoraPadlock" |
365
+ "PasswordPadlock" | "PortalLinkPadlock" | "SafewordPadlock" | "TimerPadlock" |
366
+ "TimerPasswordPadlock"
367
+ ;
368
+
369
+ type CraftingPropertyType =
370
+ "Normal" | "Large" | "Small" | "Thick" | "Thin" | "Secure" | "Loose" | "Decoy" |
371
+ "Malleable" | "Rigid" | "Simple" | "Puzzling" | "Painful" | "Comfy" | "Strong" |
372
+ "Flexible" | "Nimble" | "Arousing" | "Dull"
373
+ ;
374
+
375
+ type AssetAttribute =
376
+ "Skirt" | "SuitLower" | "UpperLarge" |
377
+ "ShortHair" | "SmallEars" | "NoEars" | "NoseRing" | "HoodieFix" |
378
+ "CanAttachMittens" |
379
+ "PenisLayer" | "PussyLayer" | "GenitaliaCover" | "Pussy1" | "Pussy2" | "Pussy3" |
380
+ "CagePlastic2" | "CageTechno" | "CageFlat" |
381
+ "FuturisticRecolor" | "FuturisticRecolorDisplay" |
382
+ "PortalLinkLockable" | `PortalLinkChastity${string}` | `PortalLinkActivity${ActivityName}` | `PortalLinkTarget${AssetGroupItemName}`
383
+ ;
384
+
385
+ type AssetPrerequisite =
386
+ "AccessBreast" | "AccessBreastSuitZip" | "AccessButt" | "AccessFullPenis" | "AccessMouth" | "AccessTorso" | "AccessVulva" | "AccessCrotch" |
387
+ "AllFours" | "BlockedMouth" | "ButtEmpty" | "CanBeCeilingTethered" | "CanCloseLegs" | "CanCoverVulva" | "CanHaveErection" | "CanKneel" | "CannotBeSuited" | "CannotHaveWand" |
388
+ "ClitEmpty" | "Collared" | "CuffedArms" | "CuffedArmsOrEmpty" | "CuffedFeet" | "CuffedFeetOrEmpty" | "CuffedLegs" | "CuffedLegsOrEmpty" |
389
+ "DisplayFrame" | "EyesEmpty" | "GagCorset" | "GagFlat" | "GagUnique" | "GasMask" | "HasBreasts" | "HasFlatChest" | "HasPenis" | "HasVagina" |
390
+ "HoodEmpty" | "LegsOpen" | "NakedFeet" | "NakedHands" | "NeedsHarness" | "NeedsNippleRings" | "NoChastityCage" | "NoClothLower" | "NoFeetSpreader" | "NoItemArms" |
391
+ "NoItemFeet" | "NoItemHands" | "NoItemLegs" | "NoMaidTray" | "NoOuterClothes" | "NotChained" | "NotChaste" | "NotHogtied" | "NotHorse" | "NotKneeling" |
392
+ "NotKneelingSpread" | "NotLifted" | "NotMasked" | "NotMounted" | "NotProtrudingFromMouth" | "NotShackled" | "NotSuspended" | "NotYoked" | "OnBed" |
393
+ "RemotesAllowed" | "VulvaEmpty"
394
+ ;
395
+
396
+ type CraftingStatusType = 0 | 1 | 2;
397
+
398
+ type ItemColorMode = "Default" | "ColorPicker";
399
+
400
+ type CharacterHook = "BeforeSortLayers" | "AfterLoadCanvas";
401
+
402
+ type AnimationDataTypes = "AssetGroup" | "" | "DynamicPlayerCanvas" | "PersistentData" | "Rebuild" | "RefreshTime" | "RefreshRate";
403
+
404
+ type ChatColorThemeType = "Light" | "Dark" | "Light2" | "Dark2";
405
+ type ChatEnterLeaveType = "Normal" | "Smaller" | "Hidden";
406
+ type ChatMemberNumbersType = "Always" | "Never" | "OnMouseover";
407
+ type ChatFontSizeType = "Small" | "Medium" | "Large";
408
+
409
+ type ArousalActiveName = "Inactive" | "NoMeter" | "Manual" | "Hybrid" | "Automatic";
410
+ type ArousalVisibleName = "All" | "Access" | "Self";
411
+ type ArousalAffectStutterName = "None" | "Arousal" | "Vibration" | "All";
412
+
413
+ type SettingsSensDepName = "SensDepLight" | "Normal" | "SensDepNames" | "SensDepTotal" | "SensDepExtreme";
414
+ type SettingsVFXName = "VFXInactive" | "VFXSolid" | "VFXAnimatedTemp" | "VFXAnimated";
415
+ type SettingsVFXVibratorName = "VFXVibratorInactive" | "VFXVibratorSolid" | "VFXVibratorAnimated";
416
+ type SettingsVFXFilterName = "VFXFilterLight" | "VFXFilterMedium" | "VFXFilterHeavy";
417
+
418
+ type GraphicsFontName =
419
+ "Arial" | "TimesNewRoman" | "Papyrus" | "ComicSans" | "Impact" | "HelveticaNeue" | "Verdana" |
420
+ "CenturyGothic" | "Georgia" | "CourierNew" | "Copperplate"
421
+ ;
422
+
423
+ type PreferenceSubscreenName =
424
+ "General" | "Difficulty" | "Restriction" | "Chat" | "CensoredWords" | "Audio" | "Arousal" |
425
+ "Security" | "Online" | "Visibility" | "Immersion" | "Graphics" | "Controller" | "Notifications" |
426
+ "Gender" | "Scripts"
427
+ ;
428
+
429
+ type FetishName =
430
+ "Bondage" | "Gagged" | "Blindness" | "Deafness" | "Chastity" | "Exhibitionist" | "Masochism" |
431
+ "Sadism" | "Rope" | "Latex" | "Leather" | "Metal" | "Tape" | "Nylon" | "Lingerie" | "Pet" |
432
+ "Pony" | "ABDL" | "Forniphilia"
433
+ ;
434
+
435
+ type BackgroundTag =
436
+ "Filter by tag" | "Indoor" | "Outdoor" | "Aquatic" | "Special Events" | "SciFi & Fantasy" |
437
+ "Club & College" | "Regular house" | "Dungeon" | "Asylum"
438
+ ;
439
+
440
+ // NOTE: `NPCArchetype` is for NPC's only
441
+ type TitleName =
442
+ NPCArchetype | "None" | "Mistress" | "ClubSlave" | "Maid" | "HeadMaid" | "BondageMaid" | "Kidnapper" |
443
+ "MasterKidnapper" | "Patient" | "PermanentPatient" | "EscapedPatient" | "Nurse" | "Doctor" |
444
+ "LadyLuck" | "Patron" | "CollegeStudent" |"Nawashi" | "Houdini" | "PonyAlicorn" |
445
+ "PonyPegasus" | "PonyUnicorn" | "PonyWild" | "PonyHot" | "PonyWarm" | "PonyCold" | "PonyFarm" |
446
+ "PonyFoal" | "InfilrationMole" | "InfilrationInfiltrator" | "InfilrationAgent" |
447
+ "InfilrationOperative" | "InfilrationSuperspy" | "MagicSchoolWizard" | "MagicSchoolMagus" |
448
+ "MagicSchoolMagician" | "MagicSchoolSorcerer" | "MagicSchoolSage" | "MagicSchoolOracle" |
449
+ "MagicSchoolWitch" | "MagicSchoolWarlock" | "Duchess" | "LittleOne" | "Baby" | "DL" |
450
+ "BondageBaby" | "Switch" | "Kitten" | "Puppy" | "Foxy" | "Bunny" | "Doll" | "Demon" | "Angel" |
451
+ "Succubus" | "GoodGirl" | "GoodSlaveGirl" | "GoodSlave" | "Drone"
452
+ ;
453
+
454
+ type MagicSchoolHouse = "Maiestas" | "Vincula" | "Amplector" | "Corporis";
455
+
456
+ type ModuleType = "Character" | "Cutscene" | "MiniGame" | "Online" | "Room";
457
+
458
+ type AssetCategory = "Medical" | "Extreme" | "Pony" | "SciFi" | "ABDL" | "Fantasy";
459
+
460
+ type PortalLinkStatus = "PortalLinkInvalidCode" | "PortalLinkClipboardError" | "PortalLinkValidCode" | `PortalLinkSearching${number}` | "PortalLinkDuplicateCode" | "PortalLinkTargetNotFound" | "PortalLinkEstablished";
461
+ type PortalLinkFunction = "PortalLinkFunctionLock" | "PortalLinkFunctionUnlock" | "PortalLinkFunctionCycleChastity" | `PortalLinkFunctionActivity${ActivityName}`;
462
+
463
+ /** Valid thumb icons for range slider elements */
464
+ type ThumbIcon = "lock" | "blindfold" | "lightbulb" | "player" | "rope";
465
+
466
+ //#endregion
467
+
468
+ //#region Server Messages
469
+
470
+ interface IChatRoomGameResponse {
471
+ Data: {
472
+ KinkyDungeon: string;
473
+ OnlineBounty: {
474
+ finishTime: number,
475
+ target: number,
476
+ };
477
+ /* LARP */
478
+ GameProgress?: "Start" | "Stop" | "Next" | "Skip" | "Action" | "Query";
479
+ Action?: undefined;
480
+ Target?: number;
481
+ Item?: string;
482
+
483
+ /* MagicBattle */
484
+ Spell?: number;
485
+ Time?: number; /* ms */
486
+
487
+ /* Club Card */
488
+ Player1?: number;
489
+ Player2?: number;
490
+ CCData: [any];
491
+ CCLog: string;
492
+ }
493
+ Sender: number;
494
+ RNG: number
495
+ }
496
+
497
+ //#endregion
498
+
499
+ //#region Server messages
500
+
501
+ interface IChatRoomSyncExpressionMessageBase<T extends ExpressionGroupName> {
502
+ MemberNumber: number;
503
+ Group: T;
504
+ Name?: ExpressionNameMap[T];
505
+ }
506
+ type IChatRoomSyncExpressionMessageMap<T> = T extends ExpressionGroupName ? IChatRoomSyncExpressionMessageBase<T> : never;
507
+ type IChatRoomSyncExpressionMessage = IChatRoomSyncExpressionMessageMap<ExpressionGroupName>;
508
+
509
+ interface IChatRoomSyncPoseMessage {
510
+ MemberNumber: number;
511
+ Pose: AssetPoseName[];
512
+ }
513
+
514
+ interface IChatRoomSyncArousalMessage {
515
+ MemberNumber: number;
516
+ OrgasmTimer: number;
517
+ OrgasmCount: number;
518
+ Progress: number;
519
+ ProgressTimer: number;
520
+ }
521
+ //#endregion
522
+
523
+ //#region Chat
524
+
525
+ type ChatRoomLovershipOption = "" | "CanOfferBeginWedding" | "CanBeginWedding";
526
+ type ChatRoomOwnershipOption = "" | "CanOfferEndTrial" | "CanOfferTrial" | "CanEndTrial";
527
+ type ChatRoomSpaceType = "X" | "" | "M" | "Asylum";
528
+ type ChatRoomGame = "" | "ClubCard" | "LARP" | "MagicBattle" | "GGTS";
529
+ type ChatRoomBlockCategory = AssetCategory | "Leashing" | "Photos" | "Arousal";
530
+ type ChatRoomLanguage = "EN" | "DE" | "FR" | "ES" | "CN" | "RU";
531
+
532
+ interface ChatRoom {
533
+ Name: string;
534
+ Description: string;
535
+ Admin: number[];
536
+ Ban: number[];
537
+ Limit: number;
538
+ Game: ChatRoomGame;
539
+ Background: string;
540
+ Private: boolean;
541
+ Locked: boolean;
542
+ BlockCategory: ChatRoomBlockCategory[];
543
+ Language: ChatRoomLanguage;
544
+ Character?: any[]; /* From server, not really a Character object */
545
+ }
546
+
547
+ type StimulationAction = "Kneel" | "Walk" | "Struggle" | "StruggleFail" | "Talk";
548
+
549
+ interface StimulationEvent {
550
+ /** The chance that this event will trigger at 0 arousal */
551
+ Chance: number;
552
+ /** Scaling factor for chance, depending on the arousal */
553
+ ArousalScaling?: number;
554
+ /** Scaling factor for chance, depending on the vibe intensity */
555
+ VibeScaling?: number;
556
+ /** Scaling factor for chance, depending on the inflation amount */
557
+ InflationScaling?: number;
558
+ /** The chance that this event will trigger when talking */
559
+ TalkChance?: number;
560
+ }
561
+
562
+ interface ChatRoomChatLogEntry {
563
+ Chat: string;
564
+ Garbled: string;
565
+ Original: string;
566
+ SenderName: string;
567
+ SenderMemberNumber: number;
568
+ Time: number;
569
+ }
570
+
571
+ type MessageActionType = "Action" | "Chat" | "Whisper" | "Emote" | "Activity" | "Hidden" |
572
+ "LocalMessage" | "ServerMessage" | "Status";
573
+
574
+ type MessageContentType = string;
575
+
576
+ type CharacterReferenceTag =
577
+ | "SourceCharacter"
578
+ | "DestinationCharacter"
579
+ | "DestinationCharacterName"
580
+ | "TargetCharacter"
581
+ | "TargetCharacterName"
582
+
583
+ type CommonChatTags =
584
+ | CharacterReferenceTag
585
+ | "AssetName"
586
+ | "Automatic";
587
+
588
+ /**
589
+ * A dictionary entry containing a replacement tag to be replaced by some value. The replacement strategy depends on
590
+ * the type of dictionary entry.
591
+ */
592
+ interface TaggedDictionaryEntry {
593
+ /** The tag that will be replaced in the message */
594
+ Tag: string;
595
+ }
596
+
597
+ /**
598
+ * A dictionary entry used to reference a character. The character reference tag will be replaced with the provided
599
+ * character's name or pronoun. The display format will depend on the tag chosen.
600
+ * Example substitutions for each tag (assuming the character name is Ben987):
601
+ * * SourceCharacter: "Ben987"
602
+ * * DestinationCharacter: "Ben987's" (if character is not self), "her"/"him" (if character is self)
603
+ * * DestinationCharacterName: "Ben987's"
604
+ * * TargetCharacter: "Ben987" (if character is not self), "herself"/"himself" (if character is self)
605
+ * * TargetCharacterName: "Ben987"
606
+ * @deprecated Use {@link SourceCharacterDictionaryEntry} and {@link TargetCharacterDictionaryEntry} instead.
607
+ */
608
+ interface CharacterReferenceDictionaryEntry extends TaggedDictionaryEntry {
609
+ /** The member number of the referenced character */
610
+ MemberNumber: number;
611
+ /** The character reference tag, determining how the character's name or pronoun will be interpreted */
612
+ Tag: CharacterReferenceTag;
613
+ /**
614
+ * The nickname of the referenced character
615
+ * @deprecated Redundant information
616
+ */
617
+ Text?: string;
618
+ }
619
+
620
+ /**
621
+ * A dictionary entry used to indicate the source character of a chat message or action (i.e. the character initiating
622
+ * the message or action).
623
+ */
624
+ interface SourceCharacterDictionaryEntry {
625
+ SourceCharacter: number;
626
+ }
627
+
628
+ /**
629
+ * A dictionary entry used to indicate the target character of a chat message or action (i.e. the character that is
630
+ * being acted upon as part of the message or action).
631
+ */
632
+ interface TargetCharacterDictionaryEntry {
633
+ TargetCharacter: number;
634
+ Index?: number;
635
+ }
636
+
637
+ /**
638
+ * A dictionary entry which indicates the focused group. This represents the group that was focused or interacted with
639
+ * when sending a chat message. For example, if the message was caused by performing an activity or modifying an item
640
+ * on the `ItemArms` group, then it would be appropriate to send this dictionary entry with `ItemArms` as the focus
641
+ * group name.
642
+ */
643
+ interface FocusGroupDictionaryEntry {
644
+ /**
645
+ * The tag to be replaced - this is always FocusAssetGroup.
646
+ * @deprecated Redundant information.
647
+ */
648
+ Tag?: "FocusAssetGroup";
649
+ /** The group name representing focused group for the purposes of the sent message */
650
+ FocusGroupName: AssetGroupItemName;
651
+ }
652
+
653
+ /**
654
+ * A direct text substitution dictionary entry. Any occurrences of the given {@link Tag} string in the associated
655
+ * message will be directly replaced with the {@link Text} from this dictionary entry (no text lookup will be done).
656
+ * For example, given the message:
657
+ * ```
658
+ * Life is like a box of ConfectionaryName.
659
+ * ```
660
+ * and the {@link TextDictionaryEntry}:
661
+ * ```js
662
+ * {Tag: "ConfectionaryName", Text: "chocolates"}
663
+ * ```
664
+ * The resulting message would be:
665
+ * ```
666
+ * Life is like a box of chocolates.
667
+ * ```
668
+ */
669
+ interface TextDictionaryEntry extends TaggedDictionaryEntry {
670
+ /** The text that will be substituted for the tag */
671
+ Text: string;
672
+ }
673
+
674
+ /**
675
+ * A text substitution dictionary entry with text lookup functionality. Any occurrences of the given {@link Tag} string
676
+ * in the associated message will be replaced with the {@link Text} from the dictionary entry, but only after a text
677
+ * lookup has been done on the {@link Text}, meaning that if the text has localisations, the localised version will be
678
+ * used. The text will be looked up against `Dialog_Player.csv`.
679
+ * For example, given the message:
680
+ * ```
681
+ * Hello, {GreetingObjectName}!
682
+ * ```
683
+ * And the {@link TextLookupDictionaryEntry}:
684
+ * ```js
685
+ * {Tag: "GreetingObjectName", TextToLookup: "WorldObject"}
686
+ * ```
687
+ * And the following in `Dialog_Player.csv`:
688
+ * ```
689
+ * WorldObject,,,World,,
690
+ * ```
691
+ * The text to lookup (`"WorldObject"`) would be looked up against `Dialog_Player.csv`, resolving to `"World"`. This
692
+ * would then be used to replace the tag `"GreetingObjectName"` in the message, resulting in:
693
+ * ```
694
+ * Hello, World!
695
+ * ```
696
+ */
697
+ interface TextLookupDictionaryEntry extends TaggedDictionaryEntry {
698
+ /** The text whose lookup will be substituted for the tag */
699
+ TextToLookUp: string;
700
+ }
701
+
702
+ /**
703
+ * A dictionary entry that references an asset group. Note that this is different from
704
+ * {@link FocusGroupDictionaryEntry}, which denotes the group being acted on. A dictionary should only ever contain
705
+ * one {@link FocusGroupDictionaryEntry}, whereas it may contain many {@link GroupReferenceDictionaryEntry}s. This
706
+ * represents any group that might be referenced in the message, but is not necessarily the focused group.
707
+ * For example, given the message:
708
+ * ```
709
+ * Use your BodyPart!
710
+ * ```
711
+ * And the {@link GroupReferenceDictionaryEntry}:
712
+ * ```
713
+ * {Tag: "BodyPart", GroupName: "ItemHands"}
714
+ * ```
715
+ * The name of the `"ItemHands"` group would be looked up, and this would be used to replace the `"BodyPart"` tag. The
716
+ * resulting message would be:
717
+ * ```
718
+ * Use your Hands!
719
+ * ```
720
+ */
721
+ interface GroupReferenceDictionaryEntry extends TaggedDictionaryEntry {
722
+ /** The name of the asset group to reference */
723
+ GroupName: AssetGroupName;
724
+ }
725
+
726
+ /**
727
+ * A dictionary entry that references an asset. Note that a dictionary may contain multiple of these entries, one for
728
+ * each asset mentioned or referenced in the message. For example, a message when swapping two restraints might contain
729
+ * two of these entries, one for the restraint being removed, and one for the restraint being added.
730
+ */
731
+ interface AssetReferenceDictionaryEntry extends GroupReferenceDictionaryEntry {
732
+ /** The name of the asset being referenced */
733
+ AssetName: string;
734
+ /** The (optional) {@link CraftingItem.Name} in case the asset was referenced via a crafted item */
735
+ CraftName?: string;
736
+ }
737
+
738
+ /**
739
+ * A special instance of an {@link AssetReferenceDictionaryEntry} which indicates that this asset was used to carry
740
+ * out an activity.
741
+ */
742
+ interface ActivityAssetReferenceDictionaryEntry extends AssetReferenceDictionaryEntry {
743
+ Tag: "ActivityAsset";
744
+ }
745
+
746
+ /**
747
+ * A metadata dictionary entry sent with a shock event message including a shock intensity representing the strength
748
+ * of the shock. This is used to determine the severity of any visual or gameplay effects the shock may have.
749
+ */
750
+ interface ShockEventDictionaryEntry {
751
+ /** The intensity of the shock - must be a non-negative number */
752
+ ShockIntensity: number;
753
+ }
754
+
755
+ /**
756
+ * A metadata dictionary entry indicating that the message has been generated due to an automated event. Can be used
757
+ * to filter out what might otherwise be spammy chat messages (these include things like automatic vibrator intensity
758
+ * changes and events & messages triggered by some futuristic items).
759
+ */
760
+ interface AutomaticEventDictionaryEntry {
761
+ /** Indicates that this message was triggered by an automatic event */
762
+ Automatic: true;
763
+ }
764
+
765
+ /**
766
+ * A metadata dictionary entry carrying a numeric counter for an associated event or activity. Currently only used by
767
+ * the Anal Beads XL to indicate how many beads were inserted.
768
+ */
769
+ interface ActivityCounterDictionaryEntry {
770
+ /** Counter metadata to be sent with a message */
771
+ ActivityCounter: number;
772
+ }
773
+
774
+ /**
775
+ * A dictionary entry for group lookup & replacement. Used ambiguously for both {@link FocusGroupDictionaryEntry} and
776
+ * {@link GroupReferenceDictionaryEntry}. This dictionary entry type is deprecated, and one of the aforementioned entry
777
+ * types should be used instead.
778
+ * @deprecated Use {@link FocusGroupDictionaryEntry}/{@link GroupReferenceDictionaryEntry}
779
+ */
780
+ interface AssetGroupNameDictionaryEntry {
781
+ Tag?: "FocusAssetGroup";
782
+ AssetGroupName: AssetGroupItemName;
783
+ }
784
+
785
+ /**
786
+ * A dictionary entry indicating the name of an activity. Sent with chat messages to indicate that an activity was
787
+ * carried out as part of the message.
788
+ */
789
+ interface ActivityNameDictionaryEntry {
790
+ /** The name of the activity carried out */
791
+ ActivityName: ActivityName;
792
+ }
793
+
794
+ type ChatMessageDictionaryEntry =
795
+ | CharacterReferenceDictionaryEntry
796
+ | SourceCharacterDictionaryEntry
797
+ | TargetCharacterDictionaryEntry
798
+ | FocusGroupDictionaryEntry
799
+ | TextDictionaryEntry
800
+ | TextLookupDictionaryEntry
801
+ | GroupReferenceDictionaryEntry
802
+ | AssetReferenceDictionaryEntry
803
+ | ActivityAssetReferenceDictionaryEntry
804
+ | ShockEventDictionaryEntry
805
+ | AutomaticEventDictionaryEntry
806
+ | ActivityCounterDictionaryEntry
807
+ | AssetGroupNameDictionaryEntry
808
+ | ActivityNameDictionaryEntry;
809
+
810
+ type ChatMessageDictionary = ChatMessageDictionaryEntry[];
811
+
812
+ interface IChatRoomMessageBasic {
813
+ Content: MessageContentType;
814
+ Sender: number;
815
+ // SourceMemberNumber: number;
816
+ }
817
+
818
+ interface IChatRoomMessage extends IChatRoomMessageBasic {
819
+ Type: MessageActionType;
820
+ Dictionary?: ChatMessageDictionary;
821
+ Timeout?: number;
822
+ }
823
+
824
+ interface IChatRoomSyncBasic {
825
+ SourceMemberNumber: number
826
+ }
827
+
828
+ interface IChatRoomSyncMessage extends IChatRoomSyncBasic, ChatRoom { }
829
+
830
+ interface IChatRoomMessageMetadata {
831
+ /** The name of the sender character, appropriately garbled if deafened */
832
+ senderName?: string;
833
+ /** The character targetted by the message */
834
+ TargetCharacter?: Character;
835
+ AdditionalTargets?: Record<number, Character>;
836
+ /** The character sending the message */
837
+ SourceCharacter?: Character;
838
+ /** The member number of the target */
839
+ TargetMemberNumber?: number;
840
+ /** Whether the message is considered game-initiated. Used for automatic vibe changes for example. */
841
+ Automatic?: boolean;
842
+ /** The group that has been interacted with to trigger the message */
843
+ FocusGroup?: AssetItemGroup;
844
+ /** The name of the group that has been interacted with to trigger the message */
845
+ GroupName?: AssetGroupName;
846
+ /** The assets referenced in the message */
847
+ Assets?: Record<string, Asset>;
848
+ /** The {@link CraftingItem.Name} of the assets referenced in the message (if applicable) */
849
+ CraftingNames?: Record<string, string>;
850
+ /** The groups referenced in the message */
851
+ Groups?: Partial<Record<AssetGroupName, AssetGroup[]>>;
852
+ /** How intense the shock should be */
853
+ ShockIntensity?: number;
854
+ ActivityCounter?: number;
855
+ /** The triggered activity */
856
+ ActivityName?: ActivityName;
857
+ /** The name of the asset used for the activity */
858
+ ActivityAsset?: Asset;
859
+ /** The name of the chatroom, appropriately garbled */
860
+ ChatRoomName?: string;
861
+ }
862
+
863
+ /**
864
+ * A metadata extractor for a given message.
865
+ *
866
+ * @param data - The chat message to extract from.
867
+ * @param sender - The character that sent the message.
868
+ * @return An object with the following keys:
869
+ * - `metadata`: an object for the extracted metadata (key/value)
870
+ * - `substitutions`: an array of [tag, substitutions] to perform on the message.
871
+ * @return null if the extraction has nothing to report.
872
+ */
873
+ type ChatRoomMessageExtractor =
874
+ (data: IChatRoomMessage, sender: Character) => { metadata: IChatRoomMessageMetadata, substitutions: CommonSubtituteSubstitution[] } | null;
875
+
876
+ /**
877
+ * A chat message handler.
878
+ *
879
+ * This is used in ChatRoomMessage to perform filtering and actions on
880
+ * the recieved message. You can register one of those with
881
+ * ChatRoomRegisterMessageHandler if you need to peek at incoming messages.
882
+ *
883
+ * Message processing is done in three phases:
884
+ * - all pre-handlers are called
885
+ * - metadata extraction & tag substitutions are collected
886
+ * from the message's dictionary, then latter are applied to
887
+ * the message's contents.
888
+ * - finally, post-handlers are called.
889
+ *
890
+ * The handler's priority determines when the handler will get executed:
891
+ * - Negative values make the handler run before metadata extraction
892
+ * - Positive values make it run afterward.
893
+ * In both cases, lower values mean higher priority, so -100 handler will
894
+ * run before a -1, and a 1 handler will run before a 100.
895
+ *
896
+ * The return from the callback determines what will happen: if it's true,
897
+ * message processing will stop, making the filter act like a handler.
898
+ * If it's false, then it will continue. You can also return an object with
899
+ * a `msg` property if the handler is a transformation and wishes to update
900
+ * the message's contents inflight and/or a `skip` property if you'd like
901
+ * to cause a subsequent handler to not be called.
902
+ *
903
+ * @warning Note that the in-flight message is only escaped when it gets
904
+ * sent to the chat log via ChatRoomMessageDisplay. If you're manipulating
905
+ * that by any other means, make sure to call ChatRoomEscapeEntities on its
906
+ * content to close any injection attacks.
907
+ *
908
+ * A few notable priority values are:
909
+ *
910
+ * -200: ghosted player cutoff
911
+ * -1: default Hidden message processing (and cutoff)
912
+ * 0: emotes reformatting
913
+ * 100: sensory-deprivation processing
914
+ * 200: automatic actions on others' cutoff
915
+ * 300: sensory-deprivation cutoff.
916
+ * 500: usually output handlers. That's when audio, notifications and the
917
+ * message being added to the chat happens.
918
+ *
919
+ * Hidden messages never make it to post-processing.
920
+ *
921
+ */
922
+ interface ChatRoomMessageHandler {
923
+ /** A short description of what the handler does. For debugging purposes */
924
+ Description?: string;
925
+
926
+ /**
927
+ * This handler's priority, used to determine when the code should run.
928
+ */
929
+ Priority: number;
930
+
931
+ /**
932
+ * Actual action to perform.
933
+ * @param data - The chat message to handle.
934
+ * @param sender - The character that sent the message.
935
+ * @param msg - The formatted string extracted from the message.
936
+ * If the handler is in "post" mode, all substitutions have been performed.
937
+ * @param metadata - The collected metadata from the message's dictionary, only available in "post" mode.
938
+ * @returns {boolean} true if the message was handled and the processing should stop, false otherwise.
939
+ */
940
+ Callback: (data: IChatRoomMessage, sender: Character, msg: string, metadata?: IChatRoomMessageMetadata) => boolean | { msg?: string; skip?: (handler: ChatRoomMessageHandler) => boolean };
941
+ }
942
+
943
+ //#endregion
944
+
945
+ //#region FriendList
946
+
947
+ interface IFriendListBeepLogMessage {
948
+ MemberNumber?: number; /* undefined for NPCs */
949
+ MemberName: string;
950
+ ChatRoomName?: string;
951
+ Private: boolean;
952
+ ChatRoomSpace?: string;
953
+ Sent: boolean;
954
+ Time: Date;
955
+ Message?: string;
956
+ }
957
+
958
+ //#endregion
959
+
960
+ //#region Assets
961
+
962
+ type IAssetFamily = "Female3DCG";
963
+
964
+ interface AssetGroup {
965
+ Family: IAssetFamily;
966
+ Name: AssetGroupName;
967
+ Description: string;
968
+ Asset: readonly Asset[];
969
+ ParentGroupName: AssetGroupName | "";
970
+ Category: 'Appearance' | 'Item' | 'Script';
971
+ IsDefault: boolean;
972
+ IsRestraint: boolean;
973
+ AllowNone: boolean;
974
+ AllowColorize: boolean;
975
+ AllowCustomize: boolean;
976
+ Random?: boolean;
977
+ ColorSchema: readonly string[];
978
+ ParentSize: AssetGroupName | "";
979
+ ParentColor: AssetGroupName | "";
980
+ Clothing: boolean;
981
+ Underwear: boolean;
982
+ BodyCosplay: boolean;
983
+ Hide?: readonly AssetGroupName[];
984
+ Block?: readonly AssetGroupItemName[];
985
+ Zone?: readonly [number, number, number, number][];
986
+ SetPose?: readonly AssetPoseName[];
987
+ AllowPose: readonly AssetPoseName[];
988
+ AllowExpression?: readonly ExpressionName[];
989
+ Effect: readonly EffectName[];
990
+ MirrorGroup: AssetGroupName | "";
991
+ RemoveItemOnRemove: readonly { Group: AssetGroupItemName; Name: string; Type?: string }[];
992
+ DrawingPriority: number;
993
+ DrawingLeft: number;
994
+ DrawingTop: number;
995
+ DrawingFullAlpha: boolean;
996
+ DrawingBlink: boolean;
997
+ InheritColor: AssetGroupName | null;
998
+ FreezeActivePose: readonly AssetPoseCategory[];
999
+ PreviewZone?: RectTuple;
1000
+ DynamicGroupName: AssetGroupName;
1001
+
1002
+ MirrorActivitiesFrom?: AssetGroupItemName;
1003
+ ArousalZone?: AssetGroupItemName;
1004
+
1005
+ /** A dict mapping colors to custom filename suffices.
1006
+ The "HEX_COLOR" key is special-cased to apply to all color hex codes. */
1007
+ ColorSuffix?: Record<string, string>;
1008
+ ExpressionPrerequisite?: readonly AssetPrerequisite[];
1009
+ HasPreviewImages: boolean;
1010
+ /** Return whether this group belongs to the `Appearance` {@link AssetGroup.Category} */
1011
+ IsAppearance(): this is AssetAppearanceGroup;
1012
+ /** Return whether this group belongs to the `Item` {@link AssetGroup.Category} */
1013
+ IsItem(): this is AssetItemGroup;
1014
+ /** Return whether this group belongs to the `Script` {@link AssetGroup.Category} */
1015
+ IsScript(): this is AssetScriptGroup;
1016
+ }
1017
+
1018
+ /** An AssetGroup subtype for the `Appearance` {@link AssetGroup.Category} */
1019
+ interface AssetAppearanceGroup extends AssetGroup {
1020
+ Category: "Appearance";
1021
+ Name: AssetGroupBodyName;
1022
+ IsRestraint: false;
1023
+ AllowExpression?: readonly ExpressionName[];
1024
+ }
1025
+
1026
+ /** An AssetGroup subtype for the `Item` {@link AssetGroup.Category} */
1027
+ interface AssetItemGroup extends AssetGroup {
1028
+ Category: "Item";
1029
+ Name: AssetGroupItemName;
1030
+ Underwear: false;
1031
+ BodyCosplay: false;
1032
+ Clothing: false;
1033
+ IsDefault: false;
1034
+ AllowExpression?: undefined;
1035
+ Zone: readonly [number, number, number, number][];
1036
+ }
1037
+
1038
+ /** An AssetGroup subtype for the `Script` {@link AssetGroup.Category} */
1039
+ interface AssetScriptGroup extends AssetGroup {
1040
+ Category: "Script";
1041
+ Name: AssetGroupScriptName;
1042
+ IsRestraint: false;
1043
+ BodyCosplay: false;
1044
+ Underwear: false;
1045
+ Clothing: false;
1046
+ IsDefault: false;
1047
+ AllowExpression?: undefined;
1048
+ }
1049
+
1050
+ /** Mapped type for mapping group names to their respective {@link AssetGroup} subtype */
1051
+ type AssetGroupMap = (
1052
+ {[k in AssetGroupBodyName]: AssetAppearanceGroup}
1053
+ & {[k in AssetGroupItemName]: AssetItemGroup}
1054
+ & {[k in AssetGroupScriptName]: AssetScriptGroup}
1055
+ );
1056
+
1057
+ /** An object defining a drawable layer of an asset */
1058
+ interface AssetLayer {
1059
+ /** The name of the layer - may be null if the asset only contains a single default layer */
1060
+ Name: string | null;
1061
+ /** whether or not this layer can be colored */
1062
+ AllowColorize: boolean;
1063
+ /** if not null, specifies that this layer should always copy the color of the named layer */
1064
+ CopyLayerColor: string | null;
1065
+ /** specifies the name of a color group that this layer belongs to. Any layers within the same color group can be colored together via the item color UI */
1066
+ ColorGroup: string | null;
1067
+ /** whether or not this layer can be colored in the coloring UI */
1068
+ HideColoring: boolean;
1069
+ /** A list of allowed extended item types that this layer permits - the layer will only be drawn if
1070
+ the item type matches one of these types. If null, the layer is considered to permit all extended types. */
1071
+ AllowTypes: readonly string[] | null;
1072
+ /** whether or not the layer has separate assets per type. If not, the extended type will not be included in
1073
+ the URL when fetching the layer's image */
1074
+ HasType: boolean;
1075
+ /** The name of the parent group for this layer. If null, the layer has no parent group. If
1076
+ undefined, the layer inherits its parent group from it's asset/group. */
1077
+ ParentGroupName?: AssetGroupName | "" | null;
1078
+ /** An array of poses that this layer permits. If set, it will override the poses permitted
1079
+ by the parent asset/group. */
1080
+ AllowPose: readonly AssetPoseName[] | null;
1081
+ /** An array of poses that this layer should be hidden for. */
1082
+ HideForPose: readonly (AssetPoseName | "")[];
1083
+ /** An array of objects mapping poses to other poses to determine their draw folder */
1084
+ PoseMapping?: AssetPoseMapping;
1085
+ /** The drawing priority of this layer. Inherited from the parent asset/group if not specified in the layer
1086
+ definition. */
1087
+ Priority: number;
1088
+ InheritColor: AssetGroupName | null;
1089
+ Alpha: readonly AlphaDefinition[];
1090
+ /** The asset that this layer belongs to */
1091
+ Asset: Asset;
1092
+ DrawingLeft?: number;
1093
+ DrawingTop?: number;
1094
+ HideAs?: { Group: AssetGroupName; Asset?: string };
1095
+ /** That layer is drawing at a fixed Y position */
1096
+ FixedPosition?: boolean;
1097
+ HasImage: boolean;
1098
+ Opacity: number;
1099
+ MinOpacity: number;
1100
+ MaxOpacity: number;
1101
+ BlendingMode: GlobalCompositeOperation;
1102
+ LockLayer: boolean;
1103
+ MirrorExpression?: AssetGroupName;
1104
+ AllowModuleTypes?: readonly string[];
1105
+ /** The coloring index for this layer */
1106
+ ColorIndex: number;
1107
+ /** Any group-specific alpha masks that should be applied when drawing the layer. Only available on layers that have
1108
+ been created prior to drawing */
1109
+ GroupAlpha?: AlphaDefinition[];
1110
+ /** A module for which the layer can have types. */
1111
+ ModuleType: readonly string[] | null;
1112
+ /* Specifies that this layer should not be drawn if the character is wearing any item with the given attributes */
1113
+ HideForAttribute: readonly AssetAttribute[] | null;
1114
+ /* Specifies that this layer should not be drawn unless the character is wearing an item with one of the given attributes */
1115
+ ShowForAttribute: readonly AssetAttribute[] | null;
1116
+ /** Used along with a hook to make layers of an asset disappear in some cases. */
1117
+ Visibility: "Player" | "AllExceptPlayerDialog" | "Others" | "OthersExceptDialog" | "Owner" | "Lovers" | "Mistresses" | null;
1118
+ ColorSuffix: Record<string, string> | null;
1119
+ }
1120
+
1121
+ /** An object defining a group of alpha masks to be applied when drawing an asset layer */
1122
+ interface AlphaDefinition {
1123
+ /** A list of the group names that the given alpha masks should be applied to. If empty or not present, the
1124
+ alpha masks will be applied to every layer underneath the present one. */
1125
+ Group?: AssetGroupName[];
1126
+ /** A list of the poses that the given alpha masks should be applied to. If empty or not present, the alpha
1127
+ masks will be applied regardless of character pose. */
1128
+ Pose?: AssetPoseName[];
1129
+ /** A list of the extended types that the given alpha masks should be applied to. If empty or not present, the alpha
1130
+ masks will be applied regardless of the extended type. */
1131
+ Type?: string[];
1132
+ /** A list of alpha mask definitions. A definition is a 4-tuple of numbers defining the top left coordinate of
1133
+ a rectangle and the rectangle's width and height - e.g. [left, top, width, height] */
1134
+ Masks: RectTuple[];
1135
+ }
1136
+
1137
+ interface TintDefinition {
1138
+ Color: number | string;
1139
+ Strength: number;
1140
+ DefaultColor?: string;
1141
+ }
1142
+
1143
+ interface ResolvedTintDefinition extends TintDefinition {
1144
+ Item: Item;
1145
+ }
1146
+
1147
+ interface ExpressionTriggerBase<GroupName extends ExpressionGroupName> {
1148
+ Group: GroupName;
1149
+ Name: null | ExpressionNameMap[GroupName];
1150
+ Timer: number;
1151
+ }
1152
+ type ExpressionTriggerMap<T> = T extends ExpressionGroupName ? ExpressionTriggerBase<T> : never;
1153
+ type ExpressionTrigger = ExpressionTriggerMap<ExpressionGroupName>;
1154
+
1155
+ interface ExpressionItem {
1156
+ Appearance: Item,
1157
+ Group: ExpressionGroupName,
1158
+ CurrentExpression: null | ExpressionName,
1159
+ ExpressionList: ExpressionName[],
1160
+ }
1161
+
1162
+ /**
1163
+ * The internal Asset definition of an asset.
1164
+ *
1165
+ * See AssetDefinition in Female3DCG.d.ts for documentation.
1166
+ */
1167
+ interface Asset {
1168
+ Name: string;
1169
+ Description: string;
1170
+ Group: AssetGroup;
1171
+ ParentItem?: string;
1172
+ ParentGroupName?: AssetGroupName | null;
1173
+ Enable: boolean;
1174
+ Visible: boolean;
1175
+ NotVisibleOnScreen?: readonly string[];
1176
+ Wear: boolean;
1177
+ Activity: ActivityName | null;
1178
+ AllowActivity?: readonly ActivityName[];
1179
+ ActivityAudio?: readonly string[];
1180
+ ActivityExpression: Partial<Record<ActivityName, readonly ExpressionTrigger[]>>;
1181
+ AllowActivityOn?: readonly AssetGroupItemName[];
1182
+ BuyGroup?: string;
1183
+ PrerequisiteBuyGroups?: readonly string[];
1184
+ Effect: readonly EffectName[];
1185
+ Bonus?: AssetBonusName;
1186
+ Block?: readonly AssetGroupItemName[];
1187
+ Expose: readonly AssetGroupItemName[];
1188
+ Hide?: readonly AssetGroupName[];
1189
+ HideItem?: readonly string[];
1190
+ HideItemExclude: readonly string[];
1191
+ HideItemAttribute: readonly AssetAttribute[];
1192
+ Require: readonly AssetGroupBodyName[];
1193
+ SetPose?: readonly AssetPoseName[];
1194
+ AllowPose: readonly AssetPoseName[] | null;
1195
+ HideForPose: readonly (AssetPoseName | "")[];
1196
+ PoseMapping?: AssetPoseMapping;
1197
+ AllowActivePose?: readonly AssetPoseName[];
1198
+ WhitelistActivePose?: readonly AssetPoseName[];
1199
+ Value: number;
1200
+ Difficulty: number;
1201
+ SelfBondage: number;
1202
+ SelfUnlock: boolean;
1203
+ ExclusiveUnlock: boolean;
1204
+ Random: boolean;
1205
+ RemoveAtLogin: boolean;
1206
+ WearTime: number;
1207
+ RemoveTime: number;
1208
+ RemoveTimer: number;
1209
+ MaxTimer: number;
1210
+ DrawingPriority?: number;
1211
+ DrawingLeft?: number;
1212
+ DrawingTop?: number;
1213
+ HeightModifier: number;
1214
+ ZoomModifier: number;
1215
+ Alpha?: readonly AlphaDefinition[];
1216
+ Prerequisite: readonly AssetPrerequisite[];
1217
+ Extended: boolean;
1218
+ AlwaysExtend: boolean;
1219
+ AlwaysInteract: boolean;
1220
+ AllowLock: boolean;
1221
+ LayerVisibility: boolean;
1222
+ IsLock: boolean;
1223
+ PickDifficulty: number;
1224
+ OwnerOnly: boolean;
1225
+ LoverOnly: boolean;
1226
+ FamilyOnly: boolean;
1227
+ ExpressionTrigger?: readonly ExpressionTrigger[];
1228
+ RemoveItemOnRemove: readonly { Name: string; Group: AssetGroupName; Type?: string; }[];
1229
+ AllowEffect?: readonly EffectName[];
1230
+ AllowBlock?: readonly AssetGroupItemName[];
1231
+ AllowHide?: readonly AssetGroupName[];
1232
+ AllowHideItem?: readonly string[];
1233
+ AllowType?: readonly string[];
1234
+ AllowTighten?: boolean;
1235
+ /**
1236
+ * The default color of the item: an array of length {@link Asset.ColorableLayerCount} consisting of `"Default"` and/or valid color hex codes.
1237
+ */
1238
+ DefaultColor: readonly string[];
1239
+ Opacity: number;
1240
+ MinOpacity: number;
1241
+ MaxOpacity: number;
1242
+ Audio?: string;
1243
+ Category?: readonly AssetCategory[];
1244
+ Fetish?: readonly FetishName[];
1245
+ CustomBlindBackground?: string;
1246
+ ArousalZone: AssetGroupItemName;
1247
+ IsRestraint: boolean;
1248
+ BodyCosplay: boolean;
1249
+ OverrideBlinking: boolean;
1250
+ DialogSortOverride?: DialogSortOrder;
1251
+ DynamicDescription: (C: Character) => string;
1252
+ DynamicPreviewImage: (C: Character) => string;
1253
+ DynamicAllowInventoryAdd: (C: Character) => boolean;
1254
+ DynamicName: (C: Character) => string;
1255
+ DynamicGroupName: AssetGroupName;
1256
+ DynamicActivity: (C: Character) => ActivityName | null | undefined;
1257
+ DynamicAudio: ((C: Character) => string) | null;
1258
+ CharacterRestricted: boolean;
1259
+ AllowRemoveExclusive: boolean;
1260
+ InheritColor?: AssetGroupName;
1261
+ DynamicBeforeDraw: boolean;
1262
+ DynamicAfterDraw: boolean;
1263
+ DynamicScriptDraw: boolean;
1264
+ HasType: boolean;
1265
+ AllowLockType?: readonly string[];
1266
+ AllowColorizeAll: boolean;
1267
+ AvailableLocations: readonly string[];
1268
+ OverrideHeight?: AssetOverrideHeight;
1269
+ FreezeActivePose: readonly AssetPoseCategory[];
1270
+ DrawLocks: boolean;
1271
+ AllowExpression?: readonly ExpressionName[];
1272
+ MirrorExpression?: AssetGroupBodyName;
1273
+ FixedPosition: boolean;
1274
+ Layer: readonly AssetLayer[];
1275
+ /** The number of colorable layers. Guaranteed to be >= 1 */
1276
+ ColorableLayerCount: number;
1277
+ Archetype?: ExtendedArchetype;
1278
+ Attribute: readonly AssetAttribute[];
1279
+ PreviewIcons: readonly InventoryIcon[];
1280
+ Tint: readonly TintDefinition[];
1281
+ AllowTint: boolean;
1282
+ DefaultTint?: string;
1283
+ Gender?: 'F' | 'M';
1284
+ CraftGroup: string;
1285
+ ColorSuffix: Record<string, string>;
1286
+ ExpressionPrerequisite?: readonly AssetPrerequisite[];
1287
+ }
1288
+
1289
+ //#endregion
1290
+
1291
+ /** An ItemBundle is a minified version of the normal Item */
1292
+ interface ItemBundle {
1293
+ Group: AssetGroupName;
1294
+ Name: string;
1295
+ Difficulty?: number;
1296
+ Color?: ItemColor;
1297
+ Property?: ItemProperties;
1298
+ Craft?: CraftingItem;
1299
+ }
1300
+
1301
+ /** An AppearanceBundle is whole minified appearance of a character */
1302
+ type AppearanceBundle = ItemBundle[];
1303
+
1304
+ interface Pose {
1305
+ Name: AssetPoseName;
1306
+ Category?: AssetPoseCategory;
1307
+ AllowMenu?: true;
1308
+ /** Only show in menu if an asset supports it */
1309
+ AllowMenuTransient?: true;
1310
+ OverrideHeight?: AssetOverrideHeight;
1311
+ Hide?: AssetGroupName[];
1312
+ MovePosition?: { Group: AssetGroupName; X: number; Y: number; }[];
1313
+ }
1314
+
1315
+ type ActivityNameBasic = "Bite" | "Caress" | "Choke" | "Cuddle" | "FrenchKiss" |
1316
+ "GagKiss" | "GaggedKiss" | "Grope" | "HandGag" | "Kick" |
1317
+ "Kiss" | "Lick" | "MassageFeet" | "MassageHands" | "MasturbateFist" |
1318
+ "MasturbateFoot" |"MasturbateHand" | "MasturbateTongue" |
1319
+ "MoanGag" | "MoanGagAngry" | "MoanGagGiggle" | "MoanGagGroan" | "MoanGagTalk" |
1320
+ "MoanGagWhimper" | "Nibble" | "Nod" | "PenetrateFast" |
1321
+ "PenetrateSlow" | "Pet" | "Pinch" | "PoliteKiss" | "Pull" |
1322
+ "RestHead" | "Rub" | "Sit" | "Slap" | "Spank" | "Step" | "StruggleArms" | "StruggleLegs" |
1323
+ "Suck" | "TakeCare" | "Tickle" | "Whisper" | "Wiggle" |
1324
+ "SistersHug" | "BrothersHandshake" | "SiblingsCheekKiss"
1325
+ ;
1326
+
1327
+ type ActivityNameItem = "Inject" | "MasturbateItem" | "PenetrateItem" | "PourItem" | "RollItem" | "RubItem" | "ShockItem" | "SipItem" | "SpankItem" | "TickleItem";
1328
+
1329
+ type ActivityName = ActivityNameBasic | ActivityNameItem;
1330
+
1331
+ type ActivityPrerequisite =
1332
+ "AssEmpty" | "CantUseArms" | "CantUseFeet" | "CanUsePenis" | "CanUseTongue" | "HasVagina" | "IsGagged" | "MoveHead" |
1333
+ `Needs-${ActivityNameItem}` |
1334
+ "TargetCanUseTongue" | "TargetKneeling" | "TargetMouthBlocked" | "TargetMouthOpen" | "TargetZoneAccessible" | "TargetZoneNaked" |
1335
+ "UseArms" | "UseFeet" | "UseHands" | "UseMouth" | "UseTongue" | "VulvaEmpty" | "ZoneAccessible" | "ZoneNaked" |
1336
+ "Sisters" | "Brothers" | "SiblingsWithDifferentGender"
1337
+ ;
1338
+
1339
+ interface Activity {
1340
+ Name: ActivityName;
1341
+ MaxProgress: number;
1342
+ MaxProgressSelf?: number;
1343
+ Prerequisite: ActivityPrerequisite[];
1344
+ Target: AssetGroupItemName[];
1345
+ TargetSelf?: AssetGroupItemName[] | true;
1346
+ /** Whether to reverse the prerequisite checks for that one */
1347
+ Reverse?: true;
1348
+ /** used for setting {@link ExtendedItemAutoPunishHandled} */
1349
+ MakeSound?: boolean;
1350
+ /** An action that trigger when that activity is used */
1351
+ StimulationAction?: StimulationAction;
1352
+ /** The default expression for that activity. Can be overriden using ActivityExpression on the asset */
1353
+ ActivityExpression?: ExpressionTrigger[];
1354
+ }
1355
+
1356
+ type ItemActivityRestriction = "blocked" | "limited" | "unavail";
1357
+
1358
+ interface ItemActivity {
1359
+ /** The activity performed */
1360
+ Activity: Activity;
1361
+ /** An optional item used for the activity. Null if the player is used their hand, for example. */
1362
+ Item?: Item;
1363
+ /** Whether the item is blocked or limited on the target character, or unavailable because the player is blocked. Undefined means no restriction. */
1364
+ Blocked?: ItemActivityRestriction;
1365
+ }
1366
+
1367
+ type ItemColor = string | string[];
1368
+
1369
+ /** An item is a pair of asset and its dynamic properties that define a worn asset. */
1370
+ interface Item {
1371
+ Asset: Asset;
1372
+ Color?: ItemColor;
1373
+ Difficulty?: number;
1374
+ Craft?: CraftingItem;
1375
+ Property?: ItemProperties;
1376
+ }
1377
+
1378
+ type FavoriteIcon = "Favorite" | "FavoriteBoth" | "FavoritePlayer";
1379
+ type ItemEffectIcon = "BlindLight" | "BlindNormal" | "BlindHeavy" | "DeafLight" | "DeafNormal" | "DeafHeavy" | "GagLight" | "GagNormal" | "GagHeavy" | "GagTotal";
1380
+ type InventoryIcon = FavoriteIcon | ItemEffectIcon | "AllowedLimited" | "Handheld" | "Locked" | "LoverOnly" | "FamilyOnly" | "OwnerOnly" | "Unlocked" | AssetLockType;
1381
+
1382
+ interface InventoryItem {
1383
+ Group: AssetGroupName;
1384
+ Name: string;
1385
+ Asset: Asset;
1386
+ }
1387
+
1388
+ type SkillType = "Bondage" | "SelfBondage" | "LockPicking" | "Evasion" | "Willpower" | "Infiltration" | "Dressage";
1389
+
1390
+ interface Skill {
1391
+ Type: SkillType;
1392
+ Level: number;
1393
+ Progress: number;
1394
+ Ratio?: number;
1395
+ ModifierLevel?: number;
1396
+ ModifierTimeout?: number;
1397
+ }
1398
+
1399
+ type ReputationType =
1400
+ "Dominant" | "Kidnap" | "ABDL" | "Gaming" | "Maid" | "LARP" | "Asylum" | "Gambling" |
1401
+ "HouseMaiestas" | "HouseVincula" | "HouseAmplector" | "HouseCorporis";
1402
+
1403
+ interface Reputation {
1404
+ Type: ReputationType;
1405
+ Value: number;
1406
+ }
1407
+
1408
+ interface Ownership {
1409
+ Name: string;
1410
+ MemberNumber: number;
1411
+ Stage: 0 | 1;
1412
+ Start: number;
1413
+ }
1414
+
1415
+ interface Lovership {
1416
+ Name: string;
1417
+ MemberNumber?: number;
1418
+ Stage?: 0 | 1 | 2;
1419
+ Start?: number;
1420
+ // Bad data sometimes received from server
1421
+ BeginDatingOfferedByMemberNumber?: unknown;
1422
+ BeginEngagementOfferedByMemberNumber?: unknown;
1423
+ BeginWeddingOfferedByMemberNumber?: unknown;
1424
+ }
1425
+
1426
+ interface ScreenFunctions {
1427
+ // Required
1428
+ /**
1429
+ * Called each frame
1430
+ * @param {number} time - The current time for frame
1431
+ */
1432
+ Run(time: number): void;
1433
+ /**
1434
+ * Called when user clicks on the canvas
1435
+ * @param {MouseEvent | TouchEvent} event - The event that triggered this
1436
+ */
1437
+ Click(event: MouseEvent | TouchEvent): void;
1438
+
1439
+ // Optional
1440
+ /** Called when screen is loaded using `CommonSetScreen` */
1441
+ Load?(): void;
1442
+ /** Called when this screen is being replaced */
1443
+ Unload?(): void;
1444
+ /**
1445
+ * Called when screen size or position changes or after screen load
1446
+ * @param {boolean} load - If the reason for call was load (`true`) or window resize (`false`)
1447
+ */
1448
+ Resize?(load: boolean): void;
1449
+ /**
1450
+ * Called when user presses any key
1451
+ * @param {KeyboardEvent} event - The event that triggered this
1452
+ */
1453
+ KeyDown?(event: KeyboardEvent): void;
1454
+ /** Called when user presses Esc */
1455
+ Exit?(): void;
1456
+ }
1457
+
1458
+ //#region Characters
1459
+
1460
+ /** A struct for representing an item with special permissions (limited, favorited, etc). */
1461
+ interface ItemPermissions {
1462
+ /** The {@link Asset.Name} of the item */
1463
+ Name: string;
1464
+ /** The {@link AssetGroup.Name} of the item */
1465
+ Group: AssetGroupName;
1466
+ /**
1467
+ * Either the item's {@link ItemProperties.Type} or, in the case of modular items,
1468
+ * a substring thereof denoting the type of a single module
1469
+ */
1470
+ Type?: string | null;
1471
+ }
1472
+
1473
+ interface ScriptPermission {
1474
+ permission: number;
1475
+ }
1476
+
1477
+ type ScriptPermissionProperty = "Hide" | "Block";
1478
+
1479
+ type ScriptPermissionLevel = "Self" | "Owner" | "Lovers" | "Friends" | "Whitelist" | "Public";
1480
+
1481
+ type ScriptPermissions = Record<ScriptPermissionProperty, ScriptPermission>;
1482
+
1483
+ interface DialogLine {
1484
+ Stage: string;
1485
+ NextStage: string;
1486
+ Option: string;
1487
+ Result: string;
1488
+ Function: string;
1489
+ Prerequisite: string;
1490
+ Group: string;
1491
+ Trait: string;
1492
+ }
1493
+
1494
+ interface DialogInfo {
1495
+ module: ModuleType;
1496
+ screen: string;
1497
+ name: string;
1498
+ }
1499
+
1500
+ interface Character {
1501
+ ID: number;
1502
+ /** Only on `Player` */
1503
+ OnlineID?: string;
1504
+ Type: CharacterType;
1505
+ /**
1506
+ * The character's loaded dialog info
1507
+ */
1508
+ DialogInfo?: DialogInfo;
1509
+ Name: string;
1510
+ Nickname?: string;
1511
+ AssetFamily: IAssetFamily;
1512
+ AccountName: string;
1513
+ Owner: string;
1514
+ Lover: string;
1515
+ Money: number;
1516
+ Inventory: InventoryItem[];
1517
+ Appearance: Item[];
1518
+ Stage: string;
1519
+ CurrentDialog: string;
1520
+ Dialog: DialogLine[];
1521
+ Reputation: Reputation[];
1522
+ Skill: Skill[];
1523
+ Pose: AssetPoseName[];
1524
+ ActivePose: AssetPoseName[];
1525
+ AllowedActivePose: AssetPoseName[];
1526
+ Effect: EffectName[];
1527
+ Tints: ResolvedTintDefinition[];
1528
+ Attribute: AssetAttribute[];
1529
+ FocusGroup: AssetItemGroup | null;
1530
+ Canvas: HTMLCanvasElement | null;
1531
+ CanvasBlink: HTMLCanvasElement | null;
1532
+ MustDraw: boolean;
1533
+ BlinkFactor: number;
1534
+ AllowItem: boolean;
1535
+ BlockItems: ItemPermissions[];
1536
+ FavoriteItems: ItemPermissions[];
1537
+ LimitedItems: ItemPermissions[];
1538
+ WhiteList: number[];
1539
+ HeightModifier: number;
1540
+ MemberNumber?: number;
1541
+ ItemPermission?: 0 | 1 | 2 | 3 | 4 | 5;
1542
+ Ownership?: Ownership;
1543
+ Lovership?: Lovership[];
1544
+ ExpressionQueue?: ExpressionQueueItem[];
1545
+ CanTalk: () => boolean;
1546
+ CanWalk: () => boolean;
1547
+ CanKneel: () => boolean;
1548
+ CanInteract: () => boolean;
1549
+
1550
+ /**
1551
+ * Check whether a character can change its own outfit.
1552
+ *
1553
+ * @warning Only usable on Player
1554
+ * @returns {boolean} - TRUE if changing is possible, FALSE otherwise.
1555
+ */
1556
+ CanChangeOwnClothes: () => boolean;
1557
+
1558
+ /**
1559
+ * Check whether a character can change another one's outfit.
1560
+ *
1561
+ * @param {Character} C - The character to check against.
1562
+ * @returns {boolean} - TRUE if changing is possible, FALSE otherwise.
1563
+ */
1564
+ CanChangeClothesOn: (C: Character) => boolean;
1565
+ IsProne: () => boolean;
1566
+ IsRestrained: () => boolean;
1567
+ IsBlind: () => boolean;
1568
+ IsEnclose: () => boolean;
1569
+ IsChaste: () => boolean;
1570
+ IsVulvaChaste: () => boolean;
1571
+ IsBreastChaste: () => boolean;
1572
+ IsButtChaste: () => boolean;
1573
+ IsEgged: () => boolean;
1574
+ IsOwned: () => boolean;
1575
+ IsOwnedByPlayer: () => boolean;
1576
+ IsOwner: () => boolean;
1577
+ IsKneeling: () => boolean;
1578
+ IsNaked: () => boolean;
1579
+ IsDeaf: () => boolean;
1580
+ IsGagged: () => boolean;
1581
+ HasNoItem: () => boolean;
1582
+ IsLoverOfPlayer: () => boolean;
1583
+ GetLoversNumbers: (MembersOnly?: boolean) => (number | string)[];
1584
+ HiddenItems: ItemPermissions[];
1585
+ HeightRatio: number;
1586
+ HasHiddenItems: boolean;
1587
+ SavedColors: HSVColor[];
1588
+ GetBlindLevel: (eyesOnly?: boolean) => number;
1589
+ GetBlurLevel: () => number;
1590
+ IsLocked: () => boolean;
1591
+ IsMounted: () => boolean;
1592
+ IsPlugged: () => boolean;
1593
+ IsShackled: () => boolean;
1594
+ IsSlow: () => boolean;
1595
+ IsMouthBlocked: () => boolean;
1596
+ IsMouthOpen: () => boolean;
1597
+ IsVulvaFull: () => boolean;
1598
+ IsAssFull: () => boolean;
1599
+ IsFixedHead: () => boolean;
1600
+ IsOwnedByMemberNumber: (memberNumber: number) => boolean;
1601
+ IsLover: (C: Character) => boolean;
1602
+ IsLoverOfMemberNumber: (memberNumber: number) => boolean;
1603
+ GetDeafLevel: () => number;
1604
+ IsLoverPrivate: () => boolean;
1605
+ IsEdged: () => boolean;
1606
+ IsPlayer: () => this is PlayerCharacter;
1607
+ IsBirthday: () => boolean;
1608
+ IsFamilyOfPlayer: () => boolean;
1609
+ IsInFamilyOfMemberNumber: (MemberNum: number) => boolean;
1610
+ IsOnline: () => boolean;
1611
+ IsNpc: () => this is NPCCharacter;
1612
+ IsSimple: () => boolean;
1613
+ GetDifficulty: () => number;
1614
+ IsSuspended: () => boolean;
1615
+ IsInverted: () => boolean;
1616
+ CanChangeToPose: (Pose: AssetPoseName) => boolean;
1617
+ GetClumsiness: () => number;
1618
+ HasEffect: (Effect: EffectName) => boolean;
1619
+ HasTints: () => boolean;
1620
+ GetTints: () => RGBAColor[];
1621
+ HasAttribute: (attribute: AssetAttribute) => boolean;
1622
+ DrawPose?: AssetPoseName[];
1623
+ DrawAppearance?: Item[];
1624
+ AppearanceLayers?: AssetLayer[];
1625
+ Hooks: Map<CharacterHook, Map<string, () => void>> | null;
1626
+ RegisterHook: (hookName: CharacterHook, hookInstance: string, callback: () => void) => boolean;
1627
+ UnregisterHook: (hookName: CharacterHook, hookInstance: string) => boolean;
1628
+ RunHooks: (hookName: CharacterHook) => void;
1629
+ HeightRatioProportion?: number;
1630
+ GetGenders: () => ("F" | "M")[];
1631
+ GetPronouns: () => CharacterPronouns;
1632
+ HasPenis: () => boolean;
1633
+ HasVagina: () => boolean;
1634
+ IsFlatChested: () => boolean;
1635
+ // Properties created in other places
1636
+ ArousalSettings?: ArousalSettingsType;
1637
+ AppearanceFull?: Item[];
1638
+ // Online character properties
1639
+ Title?: TitleName;
1640
+ LabelColor?: string;
1641
+ Creation?: number;
1642
+ Description?: string;
1643
+ OnlineSharedSettings?: CharacterOnlineSharedSettings;
1644
+ Game?: {
1645
+ LARP?: GameLARPParameters,
1646
+ MagicBattle?: GameMagicBattleParameters,
1647
+ GGTS?: GameGGTSParameters,
1648
+ Poker?: GamePokerParameters,
1649
+ ClubCard?: GameClubCardParameters,
1650
+ };
1651
+ BlackList: number[];
1652
+ RunScripts?: boolean;
1653
+ HasScriptedAssets?: boolean;
1654
+ Cage?: boolean;
1655
+ Difficulty?: {
1656
+ Level: number;
1657
+ LastChange?: number;
1658
+ };
1659
+ ArousalZoom?: boolean;
1660
+ FixedImage?: string;
1661
+ Rule?: LogRecord[];
1662
+ Status?: string | null;
1663
+ StatusTimer?: number;
1664
+ Crafting?: (null | CraftingItem)[];
1665
+ }
1666
+
1667
+ /**
1668
+ * The characters online shared settings.
1669
+ * @see {@link Character.OnlineSharedSettings}
1670
+ */
1671
+ interface CharacterOnlineSharedSettings {
1672
+ AllowFullWardrobeAccess: boolean;
1673
+ BlockBodyCosplay: boolean;
1674
+ AllowPlayerLeashing: boolean;
1675
+ DisablePickingLocksOnSelf: boolean;
1676
+ GameVersion: string;
1677
+ ItemsAffectExpressions: boolean;
1678
+ ScriptPermissions: ScriptPermissions;
1679
+ WheelFortune: string;
1680
+ }
1681
+
1682
+ type NPCArchetype =
1683
+ /* Pandora NPCs */
1684
+ "MemberNew"|"MemberOld"|"Cosplay"|"Mistress"|"Slave"|"Maid"|"Guard"|
1685
+ /* Pandora Special */
1686
+ "Victim"|"Target"|"Chest"|
1687
+ // Misc
1688
+ "Dominatrix" | "Nurse" | "Submissive" | "Mistress" | "Patient" | "Maid" | "Mistress" | "Maiestas" | "Vincula" | "Amplector" | "Corporis"
1689
+ ;
1690
+
1691
+ /** NPC Character extension */
1692
+ // FIXME: That one should find its way down to NPCCharacter, but
1693
+ // there's too many accesses to those properties from Character
1694
+ // to do so.
1695
+ interface Character {
1696
+ /** NPC type: Slave, Maid, etc. */
1697
+ Archetype?: NPCArchetype;
1698
+ Love?: number; /** The NPC's love value */
1699
+ WillRelease?(): boolean; /** Shop NPC-only: will it release the player when asked */
1700
+ }
1701
+
1702
+ /** NPC-only */
1703
+ interface NPCCharacter extends Character {
1704
+ Archetype?: NPCArchetype;
1705
+ Trait?: NPCTrait[];
1706
+ Event?: NPCTrait[];
1707
+ Affection?: number;
1708
+ Domination?: number;
1709
+ }
1710
+
1711
+ /** College */
1712
+ interface NPCCharacter {
1713
+ GoneAway?: boolean;
1714
+ }
1715
+
1716
+ /** Asylum */
1717
+ interface NPCCharacter {
1718
+ RunAway?: boolean;
1719
+ }
1720
+
1721
+ /** Movie Studio */
1722
+ interface NPCCharacter {
1723
+ TrialDone?: boolean;
1724
+ CanGetLongDuster?: boolean;
1725
+ CanGetForSaleSign?: boolean;
1726
+ OweFavor?: boolean;
1727
+ KissCount?: number;
1728
+ MasturbateCount?: number;
1729
+ ClothesTaken?: boolean;
1730
+ }
1731
+
1732
+ /** Sarah */
1733
+ interface Character {
1734
+ OrgasmMeter?: number;
1735
+ OrgasmDone?: boolean;
1736
+ }
1737
+
1738
+ /** Private Room & Private Bed */
1739
+ interface Character {
1740
+ PrivateBed?: boolean;
1741
+ PrivateBedActivityTimer?: number;
1742
+ PrivateBedLeft?: number;
1743
+ PrivateBedTop?: number;
1744
+ PrivateBedMoveTimer?: number;
1745
+ PrivateBedAppearance?: string;
1746
+ }
1747
+
1748
+ interface KidnapCard {
1749
+ Move: number;
1750
+ Value?: number;
1751
+ }
1752
+
1753
+ /** Kidnap minigame */
1754
+ interface Character {
1755
+ KidnapWillpower?: number;
1756
+ KidnapMaxWillpower?: number;
1757
+ KidnapCard?: KidnapCard[];
1758
+ KidnapStat?: [number, number, number, number];
1759
+ }
1760
+
1761
+ type PandoraPrisonActivity = "Beat" | "Water" | "Transfer" | "Quickie" | "Strip" | "Chastity" | "Tickle" | "ChangeBondage";
1762
+
1763
+ /** Pandora NPCs */
1764
+ interface Character {
1765
+ Recruit?: number;
1766
+ RecruitOdds?: number;
1767
+ RandomOdds?: number;
1768
+ QuizLog?: number[];
1769
+ QuizFail?: number;
1770
+ AllowMove?: boolean;
1771
+ DrinkValue?: number;
1772
+ TriggerIntro?: boolean;
1773
+ FromPandora?: boolean;
1774
+ // Pandora Prison
1775
+ LastActivity?: PandoraPrisonActivity;
1776
+ }
1777
+
1778
+ /** Magic School */
1779
+ interface Character {
1780
+ House?: "" | MagicSchoolHouse;
1781
+ }
1782
+
1783
+ /** MovieStudio */
1784
+ interface Character {
1785
+ Friendship?: string;
1786
+ InterviewCleanCount?: number;
1787
+ }
1788
+
1789
+ /** Slave market */
1790
+ interface Character {
1791
+ ExpectedTraining?: number;
1792
+ CurrentTraining?: number;
1793
+ TrainingIntensity?: number;
1794
+ TrainingCount?: number;
1795
+ TrainingCountLow?: number;
1796
+ TrainingCountHigh?: number;
1797
+ TrainingCountPerfect?: number;
1798
+ }
1799
+
1800
+ interface PlayerCharacter extends Character {
1801
+ // PreferenceInitPlayer() must be updated with defaults, when adding a new setting
1802
+ ChatSettings?: {
1803
+ ColorActions: boolean;
1804
+ ColorActivities: boolean;
1805
+ ColorEmotes: boolean;
1806
+ ColorNames: boolean;
1807
+ ColorTheme: ChatColorThemeType;
1808
+ DisplayTimestamps: boolean;
1809
+ EnterLeave: ChatEnterLeaveType;
1810
+ FontSize: ChatFontSizeType;
1811
+ MemberNumbers: ChatMemberNumbersType;
1812
+ MuStylePoses: boolean;
1813
+ ShowActivities: boolean;
1814
+ ShowAutomaticMessages: boolean;
1815
+ ShowBeepChat: boolean;
1816
+ ShowChatHelp: boolean;
1817
+ ShrinkNonDialogue: boolean;
1818
+ WhiteSpace: "" | "Preserve";
1819
+ /** @deprecated */
1820
+ AutoBanBlackList?: any;
1821
+ /** @deprecated */
1822
+ AutoBanGhostList?: any;
1823
+ /** @deprecated */
1824
+ SearchFriendsFirst?: any;
1825
+ /** @deprecated */
1826
+ DisableAnimations?: any;
1827
+ /** @deprecated */
1828
+ SearchShowsFullRooms?: any;
1829
+ CensoredWordsList: string;
1830
+ CensoredWordsLevel: number;
1831
+ };
1832
+ VisualSettings?: {
1833
+ ForceFullHeight?: boolean;
1834
+ UseCharacterInPreviews?: boolean;
1835
+ MainHallBackground?: string;
1836
+ PrivateRoomBackground?: string;
1837
+ };
1838
+ AudioSettings?: {
1839
+ Volume: number;
1840
+ PlayBeeps: boolean;
1841
+ /** Play items sounds in chatrooms */
1842
+ PlayItem: boolean;
1843
+ /** Play sounds only if the player is involved */
1844
+ PlayItemPlayerOnly: boolean;
1845
+ Notifications: boolean;
1846
+ };
1847
+ ControllerSettings?: {
1848
+ ControllerSensitivity: number;
1849
+ ControllerDeadZone: number;
1850
+ ControllerA: number;
1851
+ ControllerB: number;
1852
+ ControllerX: number;
1853
+ ControllerY: number;
1854
+ ControllerStickUpDown: number;
1855
+ ControllerStickLeftRight: number;
1856
+ ControllerStickRight: number;
1857
+ ControllerStickDown: number;
1858
+ ControllerDPadUp: number;
1859
+ ControllerDPadDown: number;
1860
+ ControllerDPadLeft: number;
1861
+ ControllerDPadRight: number;
1862
+ ControllerActive: boolean;
1863
+ };
1864
+ GameplaySettings?: {
1865
+ SensDepChatLog: SettingsSensDepName;
1866
+ BlindDisableExamine: boolean;
1867
+ DisableAutoRemoveLogin: boolean;
1868
+ ImmersionLockSetting: boolean;
1869
+ EnableSafeword: boolean;
1870
+ DisableAutoMaid: boolean;
1871
+ OfflineLockedRestrained: boolean;
1872
+ };
1873
+ ImmersionSettings?: {
1874
+ BlockGaggedOOC: boolean;
1875
+ StimulationEvents: boolean;
1876
+ ReturnToChatRoom: boolean;
1877
+ ReturnToChatRoomAdmin: boolean;
1878
+ SenseDepMessages: boolean;
1879
+ ChatRoomMuffle: boolean;
1880
+ BlindAdjacent: boolean;
1881
+ AllowTints: boolean;
1882
+ };
1883
+ LastChatRoom?: string;
1884
+ LastChatRoomBG?: string;
1885
+ LastChatRoomPrivate?: boolean;
1886
+ LastChatRoomSize?: number;
1887
+ LastChatRoomLanguage?: ChatRoomLanguage;
1888
+ LastChatRoomDesc?: string;
1889
+ LastChatRoomAdmin?: number[];
1890
+ LastChatRoomBan?: number[];
1891
+ LastChatRoomBlockCategory?: ChatRoomBlockCategory[];
1892
+ LastChatRoomTimer?: any;
1893
+ LastChatRoomSpace?: ChatRoomSpaceType;
1894
+ RestrictionSettings?: {
1895
+ BypassStruggle: boolean;
1896
+ SlowImmunity: boolean;
1897
+ BypassNPCPunishments: boolean;
1898
+ };
1899
+ OnlineSettings?: PlayerOnlineSettings;
1900
+ GraphicsSettings?: {
1901
+ Font: GraphicsFontName;
1902
+ InvertRoom: boolean;
1903
+ StimulationFlashes: boolean;
1904
+ DoBlindFlash: boolean;
1905
+ AnimationQuality: number;
1906
+ StimulationFlash: boolean;
1907
+ SmoothZoom: boolean;
1908
+ CenterChatrooms: boolean;
1909
+ AllowBlur: boolean;
1910
+ }
1911
+ NotificationSettings?: {
1912
+ /** @deprecated */
1913
+ Audio?: boolean;
1914
+ Beeps: NotificationSetting;
1915
+ /** @deprecated */
1916
+ Chat?: any;
1917
+ ChatMessage: NotificationSetting & {
1918
+ /** @deprecated */
1919
+ IncludeActions?: any;
1920
+ Mention?: boolean;
1921
+ Normal?: boolean;
1922
+ Whisper?: boolean;
1923
+ Activity?: boolean;
1924
+ };
1925
+ /** @deprecated */
1926
+ ChatActions?: any;
1927
+ ChatJoin: NotificationSetting & {
1928
+ /** @deprecated */
1929
+ Enabled?: any;
1930
+ Owner?: boolean;
1931
+ Lovers?: boolean;
1932
+ Friendlist?: boolean;
1933
+ Subs?: boolean;
1934
+ };
1935
+ Disconnect: NotificationSetting;
1936
+ Larp: NotificationSetting;
1937
+ Test: NotificationSetting;
1938
+ };
1939
+ GhostList?: number[];
1940
+ Wardrobe?: ItemBundle[][];
1941
+ WardrobeCharacterNames?: string[];
1942
+ SavedExpressions?: ({ Group: ExpressionGroupName, CurrentExpression?: ExpressionName }[] | null)[];
1943
+ SavedColors: HSVColor[];
1944
+ FriendList?: number[];
1945
+ FriendNames?: Map<number, string>;
1946
+ SubmissivesList?: Set<number>;
1947
+ ChatSearchFilterTerms?: string;
1948
+ GenderSettings: {
1949
+ HideShopItems: GenderSetting;
1950
+ AutoJoinSearch: GenderSetting;
1951
+ };
1952
+ /** The list of items we got confiscated in the Prison */
1953
+ ConfiscatedItems?: { Group: AssetGroupName, Name: string }[];
1954
+ }
1955
+
1956
+ /**
1957
+ * The player's online settings.
1958
+ * @see {@link Player.OnlineSettings}
1959
+ */
1960
+ interface PlayerOnlineSettings {
1961
+ AutoBanBlackList: boolean;
1962
+ AutoBanGhostList: boolean;
1963
+ DisableAnimations: boolean;
1964
+ SearchShowsFullRooms: boolean;
1965
+ SearchFriendsFirst: boolean;
1966
+ SendStatus?: boolean;
1967
+ ShowStatus?: boolean;
1968
+ EnableAfkTimer: boolean;
1969
+ }
1970
+
1971
+ /** Pandora Player extension */
1972
+ interface PlayerCharacter {
1973
+ Infiltration?: {
1974
+ Punishment?: {
1975
+ Minutes: number;
1976
+ Timer?: number;
1977
+ Background: string;
1978
+ Difficulty: number;
1979
+ FightDone?: boolean;
1980
+ }
1981
+ Perks?: string;
1982
+ }
1983
+ }
1984
+
1985
+ /** Kinky Dungeon Player extension */
1986
+ interface PlayerCharacter {
1987
+ KinkyDungeonKeybindings?: any;
1988
+ KinkyDungeonExploredLore?: any[];
1989
+ }
1990
+
1991
+ interface NPCTrait {
1992
+ Name: string;
1993
+ Value: number;
1994
+ }
1995
+
1996
+ //#endregion
1997
+
1998
+ //#region Extended items
1999
+
2000
+ /**
2001
+ * An interface with all available element metadata fields.
2002
+ * Note that only a subset of fields are generally used by a given archetype.
2003
+ * @see {@link ElementData}
2004
+ * @see {@link ExtendedItemDrawData}
2005
+ */
2006
+ interface ElementMetaData {
2007
+ /** Whether to draw an element-accompanying image or not */
2008
+ drawImage?: boolean,
2009
+ /**
2010
+ * The static image path of the to-be drawn image.
2011
+ * A value of `null` either implies that it should not be drawn (per {@link ElementMetaData.drawImage})
2012
+ * or that it's a dynamic image path (_e.g._ modular item modules).
2013
+ */
2014
+ imagePath?: null | string,
2015
+ /** The name of a supported thumbnail image in \CSS\Styles.css that will show the current position on the slider */
2016
+ icon?: ThumbIcon,
2017
+ /** Whether an options shows up in the UI. Useful for options that are managed programmatically. */
2018
+ hidden?: boolean,
2019
+ }
2020
+
2021
+ declare namespace ElementMetaData {
2022
+ interface Typed { drawImage: boolean, hidden: boolean, imagePath: null | string }
2023
+ interface Modular { drawImage: boolean, hidden: boolean, imagePath: null | string }
2024
+ interface Vibrating { drawImage: false, hidden: false, imagePath: null }
2025
+ interface Text {}
2026
+ interface VariableHeight { icon: ThumbIcon }
2027
+ }
2028
+
2029
+ /** @see {@link ElementData} */
2030
+ type ElementConfigData<MetaData extends ElementMetaData> = {
2031
+ /** A 4-tuple with X & Y coordinates, width and height. */
2032
+ position?: PartialRectTuple,
2033
+ } & MetaData;
2034
+
2035
+ /**
2036
+ * An interface with element coordinates and additional (archetype-specific metadata).
2037
+ * @template MetaData A record with (archetype-specific) additional element metadata
2038
+ * @see {@link ExtendedItemDrawData}
2039
+ */
2040
+ type ElementData<MetaData extends ElementMetaData> = {
2041
+ /** A 4-tuple with X & Y coordinates, width and height. */
2042
+ position: RectTuple,
2043
+ } & MetaData;
2044
+
2045
+ /** @see {@link ExtendedItemDrawData} */
2046
+ interface ExtendedItemConfigDrawData<MetaData extends ElementMetaData> {
2047
+ /** An array with two-tuples of X and Y coordinates for the buttons and, optionally, the buttons width and height */
2048
+ elementData?: ElementConfigData<MetaData>[],
2049
+ /** The number of buttons to be drawn per page */
2050
+ itemsPerPage?: number,
2051
+ }
2052
+
2053
+ /** @see {@link ExtendedItemDrawData} */
2054
+ interface VariableHeightConfigDrawData extends ExtendedItemConfigDrawData<{}> {
2055
+ elementData: { position: RectTuple, icon: ThumbIcon }[],
2056
+ }
2057
+
2058
+ /**
2059
+ * An interface with element-specific drawing data for a given screen.
2060
+ * @template MetaData A record with (archetype-specific) additional element metadata
2061
+ */
2062
+ interface ExtendedItemDrawData<MetaData extends ElementMetaData> extends Required<ExtendedItemConfigDrawData<MetaData>> {
2063
+ /** A list of {@link ElementData} interfaces, one for each to-be drawn element (_e.g._ buttons) */
2064
+ elementData: ElementData<MetaData>[],
2065
+ /** The number of pages */
2066
+ pageCount: number,
2067
+ /** Whether pagination is required; i.e. if the number of buttons is larger than {@link ExtendedItemDrawData.itemsPerPage} */
2068
+ paginate: boolean,
2069
+ }
2070
+
2071
+ /** A record containing various dialog keys used by the extended item screen */
2072
+ interface ExtendedItemDialog<
2073
+ OptionType extends ExtendedItemOption
2074
+ > {
2075
+ /** The dialogue prefix for the player prompt that is displayed on each module's menu screen */
2076
+ header: string;
2077
+ /** The dialogue prefix for the name of each module */
2078
+ module?: string;
2079
+ /** The dialogue prefix for the name of each option */
2080
+ option?: string;
2081
+ /** The dialogue prefix that will be used for each of the item's chatroom messages */
2082
+ chat?: string | ExtendedItemChatCallback<OptionType>;
2083
+ /** The prefix used for dialog keys representing an NPC's reactions to item type changes */
2084
+ npc?: string | ExtendedItemNPCCallback<OptionType>;
2085
+ }
2086
+
2087
+
2088
+ /** A record containing various dialog keys used by the extended item screen */
2089
+ interface ExtendedItemCapsDialog<
2090
+ OptionType extends ExtendedItemOption
2091
+ > {
2092
+ /** The dialogue prefix for the player prompt that is displayed on each module's menu screen */
2093
+ Header?: string;
2094
+ /** The dialogue prefix for the name of each module */
2095
+ Module?: string;
2096
+ /** The dialogue prefix for the name of each option */
2097
+ Option?: string;
2098
+ /** The dialogue prefix that will be used for each of the item's chatroom messages */
2099
+ Chat?: string | ExtendedItemChatCallback<OptionType>;
2100
+ /** The prefix used for dialog keys representing an NPC's reactions to item type changes */
2101
+ Npc?: string | ExtendedItemNPCCallback<OptionType>;
2102
+ }
2103
+
2104
+ /** Basic callback for extended item script hooks */
2105
+ type ExtendedItemScriptHookCallback<DataType extends ExtendedItemData<any>, T extends any[], RT=void> = (
2106
+ data: DataType,
2107
+ originalFunction: null | ((...args: T) => RT),
2108
+ ...args: T,
2109
+ ) => RT;
2110
+
2111
+ /** Basic callback for extended item functions */
2112
+ type ExtendedItemCallback<T extends any[], RT=void> = (
2113
+ ...args: T,
2114
+ ) => RT;
2115
+
2116
+ /** An interface-based version of {@link ExtendedItemScriptHookCallbacks} with decapitalized keys */
2117
+ interface ExtendedItemScriptHookStruct<
2118
+ DataType extends ExtendedItemData<any>,
2119
+ OptionType extends ExtendedItemOption
2120
+ > {
2121
+ load: null | ExtendedItemScriptHookCallbacks.Load<DataType>,
2122
+ draw: null | ExtendedItemScriptHookCallbacks.Draw<DataType>,
2123
+ click: null | ExtendedItemScriptHookCallbacks.Click<DataType>,
2124
+ exit: null | ExtendedItemScriptHookCallbacks.Exit<DataType>,
2125
+ validate: null | ExtendedItemScriptHookCallbacks.Validate<DataType, OptionType>,
2126
+ publishAction: null | ExtendedItemScriptHookCallbacks.PublishAction<DataType, OptionType>,
2127
+ init: null | ExtendedItemScriptHookCallbacks.Init<DataType>,
2128
+ setOption: null | ExtendedItemScriptHookCallbacks.SetOption<DataType, OptionType>,
2129
+ beforeDraw: null | ExtendedItemScriptHookCallbacks.BeforeDraw<DataType>,
2130
+ afterDraw: null | ExtendedItemScriptHookCallbacks.AfterDraw<DataType>,
2131
+ scriptDraw: null | ExtendedItemScriptHookCallbacks.ScriptDraw<DataType>,
2132
+ }
2133
+
2134
+ /** An interface-based version of {@link ExtendedItemScriptHookCallbacks} */
2135
+ interface ExtendedItemCapsScriptHooksStruct<
2136
+ DataType extends ExtendedItemData<any>,
2137
+ OptionType extends ExtendedItemOption
2138
+ > {
2139
+ Load?: ExtendedItemScriptHookCallbacks.Load<DataType>,
2140
+ Draw?: ExtendedItemScriptHookCallbacks.Draw<DataType>,
2141
+ Click?: ExtendedItemScriptHookCallbacks.Click<DataType>,
2142
+ Exit?: ExtendedItemScriptHookCallbacks.Exit<DataType>,
2143
+ Validate?: ExtendedItemScriptHookCallbacks.Validate<DataType, OptionType>,
2144
+ PublishAction?: ExtendedItemScriptHookCallbacks.PublishAction<DataType, OptionType>,
2145
+ Init?: ExtendedItemScriptHookCallbacks.Init<DataType>,
2146
+ SetOption?: ExtendedItemScriptHookCallbacks.SetOption<DataType, OptionType>,
2147
+ BeforeDraw?: ExtendedItemScriptHookCallbacks.BeforeDraw<DataType>,
2148
+ AfterDraw?: ExtendedItemScriptHookCallbacks.AfterDraw<DataType>,
2149
+ ScriptDraw?: ExtendedItemScriptHookCallbacks.ScriptDraw<DataType>,
2150
+ }
2151
+
2152
+ /** An interface-based version of {@link ExtendedItemCallbacks} with decapitalized keys*/
2153
+ interface ExtendedItemCallbackStruct<
2154
+ OptionType extends ExtendedItemOption
2155
+ > {
2156
+ load?: ExtendedItemCallbacks.Load,
2157
+ draw?: ExtendedItemCallbacks.Draw,
2158
+ click?: ExtendedItemCallbacks.Click,
2159
+ exit?: ExtendedItemCallbacks.Exit,
2160
+ validate?: ExtendedItemCallbacks.Validate<OptionType>,
2161
+ publishAction?: ExtendedItemCallbacks.PublishAction<OptionType>,
2162
+ init?: ExtendedItemCallbacks.Init,
2163
+ setOption?: ExtendedItemCallbacks.SetOption<OptionType>,
2164
+ beforeDraw?: ExtendedItemCallbacks.BeforeDraw,
2165
+ afterDraw?: ExtendedItemCallbacks.AfterDraw,
2166
+ scriptDraw?: ExtendedItemCallbacks.ScriptDraw,
2167
+ }
2168
+
2169
+ /** Namespace with item-specific functions typically called by extended items. */
2170
+ declare namespace ExtendedItemCallbacks {
2171
+ /**
2172
+ * Callback for extended item `Load` functions.
2173
+ * `Load` functions are responsible for setting up the UI when initially opening the extended item menu.
2174
+ */
2175
+ type Load = ExtendedItemCallback<[]>;
2176
+ /**
2177
+ * Callback for extended item `Draw` functions.
2178
+ * `Draw` functions are responsible for drawing any UI elements within the extended item menu.
2179
+ */
2180
+ type Draw = ExtendedItemCallback<[]>;
2181
+ /**
2182
+ * Callback for extended item `Click` functions.
2183
+ * `Click` functions are responsible for managing any mouse clicks within the extended item menu.
2184
+ */
2185
+ type Click = ExtendedItemCallback<[]>;
2186
+ /**
2187
+ * Callback for extended item `Exit` functions.
2188
+ * `Exit` functions are responsible for cleaning up any UI elements when closing the extended item menu.
2189
+ */
2190
+ type Exit = ExtendedItemCallback<[]>;
2191
+ /**
2192
+ * Callback for extended item `Validate` functions.
2193
+ * `Validate` functions are responsible for validating any change in an item's properties.
2194
+ * @param C The character that has the item equiped
2195
+ * @param item The item in question
2196
+ * @param newOption The newly selected extended item option
2197
+ * @param previousOption The previusly selected extended item option
2198
+ * @param permitExisting - Determines whether the validation should allow the new option and previous option
2199
+ * to be identical. Defaults to false.
2200
+ * @returns A non-empty message string if the item failed validation, or an empty string otherwise
2201
+ */
2202
+ type Validate<
2203
+ OptionType extends ExtendedItemOption
2204
+ > = ExtendedItemCallback<[C: Character, item: Item, newOption: OptionType, previousOption: OptionType, permitExisting?: boolean], string>;
2205
+ /**
2206
+ * Callback for extended item `PublishAction` functions.
2207
+ * `PublishAction` functions are responsible for reporting any changes to an item's properties via a chat message.
2208
+ * @param C The character that has the item equiped
2209
+ * @param item The item in question
2210
+ * @param newOption The newly selected extended item option
2211
+ * @param previousOption The previusly selected extended item option
2212
+ */
2213
+ type PublishAction<
2214
+ OptionType extends ExtendedItemOption
2215
+ > = ExtendedItemCallback<[C: Character, item: Item, newOption: OptionType, previousOption: OptionType]>;
2216
+ /**
2217
+ * Callback for extended item `Init` functions.
2218
+ * `Init` functions are responsible for setting the initial properties of an extended item.
2219
+ * @param C The character that has the item equiped
2220
+ * @param item The item in question
2221
+ * @param refresh Whether the character and relevant item should be refreshed and pushed to the server
2222
+ * @returns Whether the items properties were actually updated or not
2223
+ */
2224
+ type Init = ExtendedItemCallback<[C: Character, item: Item, refresh: boolean], boolean>;
2225
+ /**
2226
+ * Callback for extended item `SetOption` functions.
2227
+ * @param C The character that has the item equiped
2228
+ * @param item The item in question
2229
+ * @param newOption The newly selected extended item option
2230
+ * @param previousOption The previusly selected extended item option
2231
+ * @param push Whether to push to changes to the server
2232
+ */
2233
+ type SetOption<
2234
+ OptionType extends ExtendedItemOption
2235
+ > = ExtendedItemCallback<[C: Character, item: Item, newOption: OptionType, previousOption: OptionType, push: boolean]>;
2236
+ /**
2237
+ * Callback for extended item `AfterDraw` functions.
2238
+ * Relevant for assets that define {@link Asset.DynamicAfterDraw}.
2239
+ * @param drawData The dynamic draw data
2240
+ */
2241
+ type AfterDraw<
2242
+ PersistentData extends Record<string, any> = Record<string, unknown>
2243
+ > = ExtendedItemCallback<[drawData: DynamicDrawingData<PersistentData>]>;
2244
+ /**
2245
+ * Callback for extended item `BeforeDraw` functions.
2246
+ * Relevant for assets that define {@link Asset.DynamicBeforeDraw}.
2247
+ * @param drawData The dynamic draw data
2248
+ * @returns A record with any and all to-be overriden draw data
2249
+ */
2250
+ type BeforeDraw<
2251
+ PersistentData extends Record<string, any> = Record<string, unknown>
2252
+ > = ExtendedItemCallback<[drawData: DynamicDrawingData<PersistentData>], DynamicBeforeDrawOverrides>;
2253
+ /**
2254
+ * Callback for extended item `ScriptDraw` functions.
2255
+ * Relevant for assets that define {@link Asset.DynamicScriptDraw}.
2256
+ * @param drawData The dynamic draw data
2257
+ */
2258
+ type ScriptDraw<
2259
+ PersistentData extends Record<string, any> = Record<string, unknown>
2260
+ > = ExtendedItemCallback<[drawData: DynamicScriptCallbackData<PersistentData>]>;
2261
+ }
2262
+
2263
+ /**
2264
+ * Namespace with item-specific script hooks used for constructing typical extended items functions.
2265
+ * @see {@link ExtendedItemCallbacks}
2266
+ */
2267
+ declare namespace ExtendedItemScriptHookCallbacks {
2268
+ /**
2269
+ * Callback for extended item `Load` script hooks.
2270
+ * `Load` functions are responsible for setting up the UI when initially opening the extended item menu.
2271
+ * @param data The items extended item data
2272
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2273
+ */
2274
+ type Load<
2275
+ DataType extends ExtendedItemData<any>
2276
+ > = ExtendedItemScriptHookCallback<DataType, []>;
2277
+ /**
2278
+ * Callback for extended item `Draw` script hooks.
2279
+ * `Draw` functions are responsible for drawing any UI elements within the extended item menu.
2280
+ * @param data The items extended item data
2281
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2282
+ */
2283
+ type Draw<
2284
+ DataType extends ExtendedItemData<any>
2285
+ > = ExtendedItemScriptHookCallback<DataType, []>;
2286
+ /**
2287
+ * Callback for extended item `Click` script hooks.
2288
+ * `Click` functions are responsible for managing any mouse clicks within the extended item menu.
2289
+ * @param data The items extended item data
2290
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2291
+ */
2292
+ type Click<
2293
+ DataType extends ExtendedItemData<any>
2294
+ > = ExtendedItemScriptHookCallback<DataType, []>;
2295
+ /**
2296
+ * Callback for extended item `Exit` script hooks.
2297
+ * `Exit` functions are responsible for cleaning up any UI elements when closing the extended item menu.
2298
+ * @param data The items extended item data
2299
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2300
+ */
2301
+ type Exit<
2302
+ DataType extends ExtendedItemData<any>
2303
+ > = ExtendedItemScriptHookCallback<DataType, []>;
2304
+ /**
2305
+ * Callback for extended item `Validate` script hooks.
2306
+ * `Validate` functions are responsible for validating any change in an item's properties.
2307
+ * @param data The items extended item data
2308
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2309
+ * @param C The character that has the item equiped
2310
+ * @param item The item in question
2311
+ * @param newOption The newly selected extended item option
2312
+ * @param previousOption The previusly selected extended item option
2313
+ * @param permitExisting - Determines whether the validation should allow the new option and previous option
2314
+ * to be identical. Defaults to false.
2315
+ * @returns A non-empty message string if the item failed validation, or an empty string otherwise
2316
+ */
2317
+ type Validate<
2318
+ DataType extends ExtendedItemData<any>,
2319
+ OptionType extends ExtendedItemOption
2320
+ > = ExtendedItemScriptHookCallback<DataType, [C: Character, item: Item, newOption: OptionType, previousOption: OptionType, permitExisting?: boolean], string>;
2321
+ /**
2322
+ * Callback for extended item `PublishAction` script hooks.
2323
+ * `PublishAction` functions are responsible for reporting any changes to an item's properties via a chat message.
2324
+ * @param data The items extended item data
2325
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2326
+ * @param C The character that has the item equiped
2327
+ * @param item The item in question
2328
+ * @param newOption The newly selected extended item option
2329
+ * @param previousOption The previusly selected extended item option
2330
+ */
2331
+ type PublishAction<
2332
+ DataType extends ExtendedItemData<any>,
2333
+ OptionType extends ExtendedItemOption
2334
+ > = ExtendedItemScriptHookCallback<DataType, [C: Character, item: Item, newOption: OptionType, previousOption: OptionType]>;
2335
+ /**
2336
+ * Callback for extended item `Init` script hooks.
2337
+ * `Init` functions are responsible for setting the initial properties of an extended item.
2338
+ * @param data The items extended item data
2339
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2340
+ * @param C The character that has the item equiped
2341
+ * @param item The item in question
2342
+ * @param refresh Whether the character and relevant item should be refreshed and pushed to the server
2343
+ * @returns Whether the items properties were actually updated or not
2344
+ */
2345
+ type Init<
2346
+ DataType extends ExtendedItemData<any>
2347
+ > = ExtendedItemScriptHookCallback<DataType, [C: Character, item: Item, refresh: boolean], boolean>;
2348
+ /**
2349
+ * Callback for extended item `SetOption` functions.
2350
+ * @param data The items extended item data
2351
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2352
+ * @param C The character that has the item equiped
2353
+ * @param item The item in question
2354
+ * @param newOption The newly selected extended item option
2355
+ * @param previousOption The previusly selected extended item option
2356
+ * @param push Whether to push to changes to the server
2357
+ * @returns
2358
+ */
2359
+ type SetOption<
2360
+ DataType extends ExtendedItemData<any>,
2361
+ OptionType extends ExtendedItemOption
2362
+ > = ExtendedItemScriptHookCallback<DataType, [C: Character, item: Item, newOption: OptionType, previousOption: OptionType, push: boolean]>;
2363
+ /**
2364
+ * Callback for extended item `AfterDraw` functions.
2365
+ * Relevant for assets that define {@link Asset.DynamicAfterDraw}.
2366
+ * @param data The items extended item data
2367
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2368
+ * @param drawData The dynamic draw data
2369
+ */
2370
+ type AfterDraw<
2371
+ DataType extends ExtendedItemData<any>,
2372
+ PersistentData extends Record<string, any> = Record<string, unknown>
2373
+ > = ExtendedItemScriptHookCallback<DataType, [drawData: DynamicDrawingData<PersistentData>]>;
2374
+ /**
2375
+ * Callback for extended item `BeforeDraw` functions.
2376
+ * Relevant for assets that define {@link Asset.DynamicBeforeDraw}.
2377
+ * @param data The items extended item data
2378
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2379
+ * @param drawData The dynamic draw data
2380
+ * @returns A record with any and all to-be overriden draw data
2381
+ */
2382
+ type BeforeDraw<
2383
+ DataType extends ExtendedItemData<any>,
2384
+ PersistentData extends Record<string, any> = Record<string, unknown>
2385
+ > = ExtendedItemScriptHookCallback<DataType, [drawData: DynamicDrawingData<PersistentData>], DynamicBeforeDrawOverrides>;
2386
+ /**
2387
+ * Callback for extended item `ScriptDraw` functions.
2388
+ * Relevant for assets that define {@link Asset.DynamicScriptDraw}.
2389
+ * @param data The items extended item data
2390
+ * @param originalFunction The function (if any) that is normally called when an archetypical item reaches this point
2391
+ * @param drawData The dynamic draw data
2392
+ */
2393
+ type ScriptDraw<
2394
+ DataType extends ExtendedItemData<any>,
2395
+ PersistentData extends Record<string, any> = Record<string, unknown>
2396
+ > = ExtendedItemScriptHookCallback<DataType, [drawData: DynamicScriptCallbackData<PersistentData>]>;
2397
+ }
2398
+
2399
+ /** Union of all (archetype-specific) {@link ExtendedItemData.chatSetting} allowed values. */
2400
+ type ExtendedItemChatSetting = "default" | TypedItemChatSetting | ModularItemChatSetting;
2401
+
2402
+ /**
2403
+ * Abstract extended item data interface that all archetypical item data interfaces must implement.
2404
+ * Archetypes are free to demand any appropriate subtype for a given property.
2405
+ */
2406
+ interface ExtendedItemData<OptionType extends ExtendedItemOption> {
2407
+ /** The archetype of the extended item data */
2408
+ archetype: ExtendedArchetype;
2409
+ /**
2410
+ * The chat message setting for the item. This can be provided to allow
2411
+ * finer-grained chatroom message keys for the item.
2412
+ * Archetypes must use the `"default"` literal string as default value.
2413
+ */
2414
+ chatSetting: ExtendedItemChatSetting;
2415
+ /** A record containing various dialog keys used by the extended item screen */
2416
+ dialogPrefix: ExtendedItemDialog<OptionType>;
2417
+ /**
2418
+ * A recond containing functions that are run on load, click, draw, exit, and validate, with the original archetype function
2419
+ * and parameters passed on to them. If undefined, these are ignored.
2420
+ * Note that scripthook functions must be loaded before `Female3DCGExtended.js` in `index.html`.
2421
+ */
2422
+ scriptHooks: ExtendedItemScriptHookStruct<any, OptionType>;
2423
+ /** The asset reference */
2424
+ asset: Asset;
2425
+ /** A key uniquely identifying the asset */
2426
+ key: string;
2427
+ /** The common prefix used for all extended item functions associated with the asset */
2428
+ functionPrefix: string;
2429
+ /** The common prefix used for all dynamic asset hook functions for the asset */
2430
+ dynamicAssetsFunctionPrefix: string;
2431
+ /** An array of the chat message tags that should be included in the item's chatroom messages. */
2432
+ chatTags: CommonChatTags[];
2433
+ /** Contains custom dictionary entries in the event that the base ones do not suffice. */
2434
+ dictionary: ExtendedItemDictionaryCallback<OptionType>[];
2435
+ /**
2436
+ * To-be initialized properties independent of the selected item module(s).
2437
+ * Relevant if there are properties that are (near) exclusively managed by {@link ExtendedItemData.scriptHooks} functions.
2438
+ */
2439
+ baselineProperty: ItemPropertiesNoArray | null;
2440
+ /** The extended item option of the super screen that this archetype was initialized from (if any) */
2441
+ parentOption: null | ExtendedItemOption;
2442
+ /** An interface with element-specific drawing data for a given screen. */
2443
+ drawData: ExtendedItemDrawData<{}>;
2444
+ }
2445
+
2446
+ /** A struct-type that maps archetypes to their respective extended item data. */
2447
+ interface ExtendedDataLookupStruct {
2448
+ [ExtendedArchetype.TYPED]: TypedItemData;
2449
+ [ExtendedArchetype.MODULAR]: ModularItemData;
2450
+ [ExtendedArchetype.VIBRATING]: VibratingItemData;
2451
+ [ExtendedArchetype.VARIABLEHEIGHT]: VariableHeightData;
2452
+ [ExtendedArchetype.TEXT]: TextItemData;
2453
+ }
2454
+
2455
+ interface AssetOverrideHeight {
2456
+ Height: number;
2457
+ Priority: number;
2458
+ HeightRatioProportion?: number;
2459
+ }
2460
+
2461
+ /**
2462
+ * The type for OverridePriority in extended items.
2463
+ *
2464
+ * Either a single number that will cause all of the asset's layer to
2465
+ * inherit that priority, or a more precise specifier keyed by layer name.
2466
+ */
2467
+ type AssetLayerOverridePriority = Record<string, number> | number;
2468
+
2469
+ /**
2470
+ * Base properties of extended items derived from their respective {@link Asset} definition.
2471
+ *
2472
+ * Those are the properties the main game code enforces.
2473
+ */
2474
+ interface AssetDefinitionProperties {
2475
+ /**
2476
+ * The difficulty of the item
2477
+ * @see {@link Asset.Difficulty}
2478
+ */
2479
+ Difficulty?: number;
2480
+ /**
2481
+ * ???
2482
+ * @see {@link Asset.Attribute}
2483
+ */
2484
+ Attribute?: AssetAttribute[];
2485
+
2486
+ /**
2487
+ * Override the height of the item
2488
+ * @see {@link Asset.OverrideHeight}
2489
+ */
2490
+ OverrideHeight?: AssetOverrideHeight;
2491
+ /**
2492
+ * How much the character should be moved up
2493
+ * @see {@link Asset.HeightModifier}
2494
+ */
2495
+ HeightModifier?: number;
2496
+ /**
2497
+ * The drawing priority of the item
2498
+ * @see {@link Asset.OverridePriority}
2499
+ */
2500
+ OverridePriority?: AssetLayerOverridePriority;
2501
+ /**
2502
+ * The default color of the item
2503
+ * @see {@link Asset.DefaultColor}
2504
+ */
2505
+ DefaultColor?: ItemColor;
2506
+
2507
+ /**
2508
+ * A list of allowed activities
2509
+ * @see {@link Asset.AllowActivity}
2510
+ */
2511
+ AllowActivity?: ActivityName[];
2512
+ /**
2513
+ * A list of groups allowed activities
2514
+ * @see {@link Asset.AllowActivityOn}
2515
+ */
2516
+ AllowActivityOn?: AssetGroupName[];
2517
+
2518
+ /**
2519
+ * Items that should be hidden by this item
2520
+ * @see {@link Asset.HideItem}
2521
+ */
2522
+ HideItem?: string[];
2523
+ /**
2524
+ * Items that should not be hidden by this item
2525
+ * @see {@link Asset.HideItemExclude}
2526
+ */
2527
+ HideItemExclude?: string[];
2528
+ /**
2529
+ * Items groups that should be hidden by this item
2530
+ * @see {@link Asset.Hide}
2531
+ */
2532
+ Hide?: AssetGroupName[];
2533
+
2534
+ /**
2535
+ * The groups that this item blocks
2536
+ * @see {@link Asset.Block}
2537
+ */
2538
+ Block?: AssetGroupItemName[];
2539
+
2540
+ /**
2541
+ * Effects that are applied by this item
2542
+ * @see {@link Asset.Effect}
2543
+ */
2544
+ Effect?: EffectName[];
2545
+
2546
+ /**
2547
+ * A list of custom tints
2548
+ * @see {@link Asset.Tint}
2549
+ */
2550
+ Tint?: TintDefinition[];
2551
+
2552
+ // Pose-related properties
2553
+
2554
+ /**
2555
+ * A list of poses that should forcefully be set
2556
+ * @see {@link Asset.SetPose}
2557
+ */
2558
+ SetPose?: AssetPoseName[];
2559
+ /**
2560
+ * A list of poses
2561
+ * @see {@link Asset.AllowActivePose}
2562
+ */
2563
+ AllowActivePose?: AssetPoseName[];
2564
+ /**
2565
+ * A list of allowed poses
2566
+ * @see {@link Asset.AllowPose}
2567
+ */
2568
+ AllowPose?: AssetPoseName[];
2569
+ /**
2570
+ * A list of poses
2571
+ * @see {@link Asset.WhitelistActivePose}
2572
+ */
2573
+ WhitelistActivePose?: AssetPoseName[];
2574
+ /**
2575
+ * A list of poses that should be frozen
2576
+ * @see {@link Asset.FreezeActivePose}
2577
+ */
2578
+ FreezeActivePose?: AssetPoseCategory[];
2579
+
2580
+ /**
2581
+ * Whether an item can be unlocked by the player even if they're restrained
2582
+ * @see {@link Asset.SelfUnlock}
2583
+ */
2584
+ SelfUnlock?: boolean;
2585
+
2586
+ /**
2587
+ * The timer for after how long until a lock should be removed.
2588
+ * @see {@link Asset.RemoveTimer}
2589
+ */
2590
+ RemoveTimer?: number;
2591
+
2592
+ /**
2593
+ * The asset's draw opacity
2594
+ * @see {@link Asset.Opacity}
2595
+ */
2596
+ Opacity?: number;
2597
+
2598
+ /**
2599
+ * A custom background for this option that overrides the default
2600
+ * @see {@link Asset.CustomBlindBackground}
2601
+ */
2602
+ CustomBlindBackground?: string;
2603
+
2604
+ /**
2605
+ * A list of fetishes affected by the item
2606
+ * @see {@link Asset.Fetish}
2607
+ */
2608
+ Fetish?: FetishName[];
2609
+ }
2610
+
2611
+ /**
2612
+ * Properties for Expression Queue item
2613
+ */
2614
+
2615
+ interface ExpressionQueueItem {
2616
+ Time?: number;
2617
+ Group?: ExpressionGroupName;
2618
+ Expression?: ExpressionName;
2619
+ }
2620
+
2621
+ /**
2622
+ * Base properties for extended items
2623
+ *
2624
+ * Those are the properties the main game code enforces.
2625
+ */
2626
+ interface ItemPropertiesBase {
2627
+ /** A string (or `null`) denoting the state of an extended item. How the type-string translate to concrete properties depends on the Archetype in question. */
2628
+ Type?: string | null;
2629
+
2630
+ /** A facial expression */
2631
+ Expression?: ExpressionName;
2632
+
2633
+ // Vibratory-related properties
2634
+
2635
+ /** The vibrator mode */
2636
+ Mode?: VibratorMode;
2637
+ /** The vibrator intensity */
2638
+ Intensity?: VibratorIntensity;
2639
+ /** The vibrator's state; only relevant for advanced vibrator modes */
2640
+ State?: VibratorModeState;
2641
+ }
2642
+
2643
+ /**
2644
+ * Custom properties for extended items
2645
+ *
2646
+ * Those are properties that are asset-specific, so the handling might be done
2647
+ * per-item.
2648
+ */
2649
+ interface ItemPropertiesCustom {
2650
+ /**
2651
+ * The member number of the player adding the item.
2652
+ * Only set if the asset is marked as {@link AssetDefinition.CharacterRestricted}.
2653
+ */
2654
+ ItemMemberNumber?: number;
2655
+
2656
+ //#region Lock properties
2657
+
2658
+ /** Asset name of the lock */
2659
+ LockedBy?: AssetLockType;
2660
+ /** The member number of the person that applied the lock */
2661
+ LockMemberNumber?: number | string;
2662
+ /** `/^[A-Z]{1,8}$/`, Used by `PasswordPadlock`, `SafewordPadlock` and `TimerPasswordPadlock` lock */
2663
+ Password?: string;
2664
+ /** Comma separated numbers */
2665
+ LockPickSeed?: string;
2666
+ /** `/^[0-9]{4}$/`, Used by `CombinationPadlock` lock */
2667
+ CombinationNumber?: string;
2668
+ /** Comma separated numbers; used by `HighSecurityPadlock` */
2669
+ MemberNumberListKeys?: string;
2670
+ /** Used by `PasswordPadlock`, `SafewordPadlock` and `TimerPasswordPadlock` locks */
2671
+ Hint?: string;
2672
+ /** Used by `PasswordPadlock`, `SafewordPadlock` and `TimerPasswordPadlock` locks; if the lock has been set with password */
2673
+ LockSet?: boolean;
2674
+ /** Whether to remove item on timer lock unlock; used by `LoversTimerPadlock`, `MistressTimerPadlock`, `OwnerTimerPadlock`, `TimerPadlock`, `TimerPasswordPadlock` */
2675
+ RemoveItem?: boolean;
2676
+ /** Only for `PasswordPadlock` */
2677
+ RemoveOnUnlock?: boolean;
2678
+ /** Whether time is shown or "Unknown time left"; used by `LoversTimerPadlock`, `MistressTimerPadlock`, `OwnerTimerPadlock`, `TimerPasswordPadlock` */
2679
+ ShowTimer?: boolean;
2680
+ /** Enable input; used by `LoversTimerPadlock`, `MistressTimerPadlock`, `OwnerTimerPadlock`, `TimerPasswordPadlock` */
2681
+ EnableRandomInput?: boolean;
2682
+ /** List of people who publicly modified time on lock; used by `LoversTimerPadlock`, `MistressTimerPadlock`, `OwnerTimerPadlock`, `TimerPasswordPadlock` */
2683
+ MemberNumberList?: number[];
2684
+
2685
+ //#endregion
2686
+
2687
+ /** The inflation level of inflatable items */
2688
+ InflateLevel?: 0 | 1 | 2 | 3 | 4;
2689
+
2690
+ /** The suction level of items with a suction effect */
2691
+ SuctionLevel?: 0 | 1 | 2 | 3 | 4;
2692
+
2693
+ /** 1st line of text for user-entered text data */
2694
+ Text?: string;
2695
+ /** 2nd line of text for user-entered text data */
2696
+ Text2?: string;
2697
+ /** 3rd line of text for user-entered text data */
2698
+ Text3?: string;
2699
+
2700
+ /** Whether the item blocks access to the butt */
2701
+ LockButt?: boolean;
2702
+
2703
+ // #region Futuristic Set open permissions
2704
+
2705
+ /** Whether all players can use futuristic head devices */
2706
+ OpenPermission?: boolean;
2707
+ /** Whether all players can use futuristic arm devices */
2708
+ OpenPermissionArm?: boolean;
2709
+ /** Whether all players can use futuristic leg devices */
2710
+ OpenPermissionLeg?: boolean;
2711
+ /** Whether all players can use futuristic chastity devices */
2712
+ OpenPermissionChastity?: boolean;
2713
+ /** Whether the usage of remotes is blocked */
2714
+ BlockRemotes?: boolean;
2715
+
2716
+ // #endregion
2717
+
2718
+ /** The futuristic bra's heart rate value */
2719
+ HeartRate?: number;
2720
+ /** Is the futuristic bra's heart icon shown */
2721
+ HeartIcon?: boolean;
2722
+
2723
+ // #region Futuristic gag & panel gag settings */
2724
+
2725
+ /** The item's auto-punishment sensitivity */
2726
+ AutoPunish?: 0 | 1 | 2 | 3;
2727
+ /** The remaining time for the gag's auto-inflation */
2728
+ AutoPunishUndoTime?: number;
2729
+ /** The default time for the gag's auto-inflation */
2730
+ AutoPunishUndoTimeSetting?: 120000 | 300000 | 900000 | 3600000 | 72000000;
2731
+ /** The gag module-index prior to triggering auto-inflation */
2732
+ OriginalSetting?: 0 | 1 | 2 | 3;
2733
+ /** Whether gag's blinking light is on or off */
2734
+ BlinkState?: boolean;
2735
+ /**
2736
+ * An extended item option
2737
+ * @todo Investigate whether this property still actually exists
2738
+ */
2739
+ Option?: ExtendedItemOption;
2740
+
2741
+ // #endregion
2742
+
2743
+ // #region Futuristic chastity settings
2744
+
2745
+ /** Whether attempting to remove the belt should result in punishment */
2746
+ PunishStruggle?: boolean;
2747
+ /** Whether attempting to remove an item in general should result in punishment */
2748
+ PunishStruggleOther?: boolean;
2749
+ /** Whether orgasms should result in punishment */
2750
+ PunishOrgasm?: boolean;
2751
+ /** Whether standing up should result in punishment */
2752
+ PunishStandup?: boolean;
2753
+ /** The punishment for talking; represents an index of {@link FuturisticTrainingBeltSpeechPunishments} */
2754
+ PunishSpeech?: 0 | 1 | 2 | 3;
2755
+ /** The punishment for not speaking a required word; represents an index of {@link FuturisticTrainingBeltSpeechPunishments} */
2756
+ PunishRequiredSpeech?: 0 | 1 | 2 | 3;
2757
+ /** A string with comma-separated required words */
2758
+ PunishRequiredSpeechWord?: string;
2759
+ /** The punishment for speaking a prohibited word; represents an index of {@link FuturisticTrainingBeltSpeechPunishments} */
2760
+ PunishProhibitedSpeech?: 0 | 1 | 2 | 3;
2761
+ /** A string with comma-separated prohibited words */
2762
+ PunishProhibitedSpeechWords?: string;
2763
+ /** Internal cooldown timer for automatic shocks */
2764
+ NextShockTime?: number;
2765
+ /** The mode of the belts vibrator; represents an index of {@link FuturisticTrainingBeltModes} */
2766
+ PublicModeCurrent?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
2767
+ /** An integer denoting who can access the belt; represents an index of {@link FuturisticTrainingBeltPermissions} */
2768
+ PublicModePermission?: 0 | 1 | 2;
2769
+
2770
+ // #endregion
2771
+
2772
+ /** A comma-separated string with the futuristic vibrator's trigger words */
2773
+ TriggerValues?: string;
2774
+ /** A string denoting who has permission to use the vibrator's trigger words */
2775
+ AccessMode?: ItemVulvaFuturisticVibratorAccessMode;
2776
+
2777
+ /** How intense the shock should be */
2778
+ ShockLevel?: 0 | 1 | 2;
2779
+
2780
+ /** The number of inserted beads */
2781
+ InsertedBeads?: 1 | 2 | 3 | 4 | 5;
2782
+
2783
+ /** Whether the item displays a chat message to all other people in the room */
2784
+ ShowText?: boolean;
2785
+
2786
+ /** Number of times the item was triggered; often used by shock collars */
2787
+ TriggerCount?: number;
2788
+
2789
+ /** Number of times the suitcase got cracked */
2790
+ Iterations?: number;
2791
+
2792
+ /** Allows reverting back to these properties on exiting an extended menu */
2793
+ Revert?: boolean;
2794
+
2795
+ /** Whether the kennel door is open */
2796
+ Door?: boolean;
2797
+ /** Whether the kennel has padding */
2798
+ Padding?: boolean;
2799
+
2800
+ /** Only available as overrides on the script item */
2801
+ UnHide?: AssetGroupName[];
2802
+
2803
+ /** Lucky Wheel: the section labels */
2804
+ Texts?: string[];
2805
+
2806
+ /** Lucky Wheel: the angle the wheel should spin to */
2807
+ TargetAngle?: number;
2808
+
2809
+ /** PortalLink: Used to link a remote to its target asset. */
2810
+ PortalLinkCode?: string;
2811
+ }
2812
+
2813
+ interface ItemProperties extends ItemPropertiesBase, AssetDefinitionProperties, ItemPropertiesCustom { }
2814
+
2815
+ /** An {@link ItemProperties} super-type with all array-containing values removed. */
2816
+ type ItemPropertiesNoArray = { [k in keyof ItemProperties]: ItemProperties[k] extends any[] ? never : ItemProperties[k] };
2817
+
2818
+ //#endregion
2819
+
2820
+ /** An object containing modular item configuration for an asset. Contains all of the necessary information for the
2821
+ * item's load, draw & click handlers.
2822
+ */
2823
+ interface ModularItemData extends ExtendedItemData<ModularItemOption> {
2824
+ archetype: "modular";
2825
+ /**
2826
+ * The item's chatroom message setting. Determines the level of
2827
+ * granularity for chatroom messages when the item's module values change.
2828
+ */
2829
+ chatSetting: ModularItemChatSetting;
2830
+ /** The total number of types permitted by the item */
2831
+ typeCount: number;
2832
+ /** A record containing various dialog keys used by the extended item screen */
2833
+ dialogPrefix: {
2834
+ /** The dialogue prefix for the player prompt that is displayed on each module's menu screen */
2835
+ header: string;
2836
+ /** The dialogue prefix for the name of each module */
2837
+ module: string;
2838
+ /** The dialogue prefix for the name of each option */
2839
+ option: string;
2840
+ /** The dialogue prefix that will be used for each of the item's chatroom messages */
2841
+ chat: string | ExtendedItemChatCallback<ModularItemOption>;
2842
+ };
2843
+ /** The module definitions for the modular item */
2844
+ modules: ModularItemModule[];
2845
+ /** Name of currently active module */
2846
+ currentModule: string;
2847
+ /** A lookup for the current page in the extended item menu for each of the item's modules */
2848
+ pages: Record<string, number>;
2849
+ /** A lookup for the draw data for each of the item's modules */
2850
+ drawData: ExtendedItemDrawData<ElementMetaData.Modular>;
2851
+ /** A lookup for the draw functions for each of the item's modules */
2852
+ drawFunctions: Record<string, () => void>;
2853
+ /** A lookup for the click functions for each of the item's modules */
2854
+ clickFunctions: Record<string, () => void>;
2855
+ /**
2856
+ * A recond containing functions that are run on load, click, draw, exit, and validate, with the original archetype function
2857
+ * and parameters passed on to them. If undefined, these are ignored.
2858
+ * Note that scripthook functions must be loaded before `Female3DCGExtended.js` in `index.html`.
2859
+ */
2860
+ scriptHooks: ExtendedItemScriptHookStruct<ModularItemData, ModularItemOption>;
2861
+ parentOption: null;
2862
+ }
2863
+
2864
+ /** A 3-tuple containing data for drawing a button in a modular item screen. A button definition takes the
2865
+ * format:
2866
+ * ```
2867
+ * [moduleOrOption, currentOption, prefix]
2868
+ * ```
2869
+ * The moduleOrOption is the to be drawn item module or option.
2870
+ * The currentOption is currently active option within the relevant module.
2871
+ * The prefix is the dialog prefix for the buttons text.
2872
+ */
2873
+ type ModularItemButtonDefinition = [
2874
+ moduleOrOption: ModularItemOption | ModularItemModule,
2875
+ currentOption: ModularItemOption,
2876
+ prefix: string,
2877
+ ];
2878
+
2879
+ //#endregion
2880
+
2881
+ //#region Typed Items
2882
+
2883
+ /**
2884
+ * Callback for custom functions used for setting the `DialogFocusItem.Type` attribute.
2885
+ * Relevant for typed items that lack an archetype.
2886
+ */
2887
+ type TypedItemSetTypeCallback = (NewType: string) => void;
2888
+
2889
+ /**
2890
+ * An object containing typed item configuration for an asset. Contains all of the necessary information for the item's
2891
+ * load, draw & click handlers.
2892
+ */
2893
+ interface TypedItemData extends ExtendedItemData<TypedItemOption> {
2894
+ archetype: "typed";
2895
+ drawData: ExtendedItemDrawData<ElementMetaData.Typed>;
2896
+ /** The list of extended item options available for the item */
2897
+ options: TypedItemOption[];
2898
+ /** A record containing various dialog keys used by the extended item screen */
2899
+ dialogPrefix: {
2900
+ /** The dialog key for the item's load text (usually a prompt to select the type) */
2901
+ header: string;
2902
+ /** The prefix used for dialog keys representing the display names of the item's types */
2903
+ option: string;
2904
+ /** The prefix used for dialog keys representing the item's chatroom messages when its type is changed */
2905
+ chat: string | ExtendedItemChatCallback<TypedItemOption>;
2906
+ /** The prefix used for dialog keys representing an NPC's reactions to item type changes */
2907
+ npc: string | ExtendedItemNPCCallback<TypedItemOption>;
2908
+ };
2909
+ /**
2910
+ * The chat message setting for the item. This can be provided to allow
2911
+ * finer-grained chatroom message keys for the item. Defaults to {@link TypedItemChatSetting.TO_ONLY}
2912
+ */
2913
+ chatSetting: TypedItemChatSetting;
2914
+ /**
2915
+ * A recond containing functions that are run on load, click, draw, exit, validate and publishaction,
2916
+ * with the original archetype function and parameters passed on to them. If undefined, these are ignored.
2917
+ * Note that scripthook functions must be loaded before `Female3DCGExtended.js` in `index.html`.
2918
+ */
2919
+ scriptHooks: ExtendedItemScriptHookStruct<TypedItemData, TypedItemOption>;
2920
+ parentOption: null;
2921
+ }
2922
+
2923
+ //#region Validation
2924
+
2925
+ /**
2926
+ * A parameter object containing information used to validate and sanitize character appearance update diffs. An
2927
+ * appearance update has a source character (the player that sent the update) and a target character (the character
2928
+ * being updated). What is allowed in an update varies depending on the status of the target character in relation to
2929
+ * the source character (i.e. whether they are the target's lover/owner, or the target themselves, and also whether or
2930
+ * not they have been whitelisted by the target).
2931
+ */
2932
+ interface AppearanceUpdateParameters {
2933
+ /** The character whose appearance is being updated */
2934
+ C: Character;
2935
+ /** Whether or not the source player is the same as the target player */
2936
+ fromSelf: boolean;
2937
+ /**
2938
+ * Whether or not the source player has permissions to use owner-only items (i.e. they are either the target
2939
+ * themselves, or the target's owner)
2940
+ */
2941
+ fromOwner: boolean;
2942
+ /**
2943
+ * Whether or not the source player has permissions to use lover-only items (i.e. they are the target themselves,
2944
+ * one of the target's lovers, or the target's owner, provided the target's lover rules permit their owner using
2945
+ * lover-only items)
2946
+ */
2947
+ fromLover: boolean;
2948
+ /**
2949
+ * Whether or not the source player has permissions to use family-only items (in same BDSM family)
2950
+ */
2951
+ fromFamily: boolean;
2952
+ /** The script permission levels that the source player has with respect to the receiver */
2953
+ permissions: ScriptPermissionLevel[];
2954
+ /** The member number of the source player */
2955
+ sourceMemberNumber: number;
2956
+ }
2957
+
2958
+ /**
2959
+ * A wrapper object containing the results of a diff resolution. This includes the final item that the diff resolved to
2960
+ * (or null if the diff resulted in no item, for example in the case of item removal), along with a valid flag which
2961
+ * indicates whether or not the diff was fully valid or not.
2962
+ */
2963
+ interface ItemDiffResolution {
2964
+ /**
2965
+ * The resulting item after resolution of the item diff, or null if the diff resulted in no item being equipped in
2966
+ * the given group
2967
+ */
2968
+ item: Item | null;
2969
+ /**
2970
+ * Whether or not the diff was fully valid. In most cases, an invalid diff will result in the whole appearance
2971
+ * update being rolled back, but in some cases the change will be accepted, but some properties may be modified to
2972
+ * keep the resulting item valid - in both situations, the valid flag will be returned as false, indicating that a
2973
+ * remedial appearance update should be made by the target player.
2974
+ */
2975
+ valid: boolean;
2976
+ }
2977
+
2978
+ /**
2979
+ * A wrapper object containing the results of an appearance validation. Contains a sanitized appearance array and a
2980
+ * valid flag which indicates whether or not the appearance was fully valid or not.
2981
+ */
2982
+ interface AppearanceValidationWrapper {
2983
+ /** The resulting appearance after validation */
2984
+ appearance: Item[];
2985
+ /**
2986
+ * Whether or not the appearance was valid. A value of false indicates that the appearance has been modified, and a
2987
+ * remedial appearance update should be made by the target player.
2988
+ */
2989
+ valid: boolean;
2990
+ }
2991
+
2992
+ //#endregion
2993
+
2994
+ //#region Vibrating items
2995
+
2996
+ interface VibratingItemData extends ExtendedItemData<VibratingItemOption> {
2997
+ archetype: "vibrating";
2998
+ drawData: ExtendedItemDrawData<ElementMetaData.Vibrating>;
2999
+ /** The list of extended item options available for the item */
3000
+ options: VibratingItemOption[];
3001
+ /** The list with all groups of extended item options available for the item */
3002
+ modeSet: VibratorModeSet[];
3003
+ /** A record containing various dialog keys used by the extended item screen */
3004
+ dialogPrefix: {
3005
+ /** The dialog key for the item's load text (usually a prompt to select the type) */
3006
+ header: string;
3007
+ /** The dialogue prefix for the name of each option */
3008
+ option: string;
3009
+ /** The prefix used for dialog keys representing the item's chatroom messages when its type is changed */
3010
+ chat: string | ExtendedItemChatCallback<VibratingItemOption>;
3011
+ };
3012
+ /**
3013
+ * A record containing functions that are run on load, click, draw, exit, and validate, with the original archetype function
3014
+ * and parameters passed on to them. If undefined, these are ignored.
3015
+ * Note that scripthook functions must be loaded before `Female3DCGExtended.js` in `index.html`.
3016
+ */
3017
+ scriptHooks: ExtendedItemScriptHookStruct<VibratingItemData, VibratingItemOption>;
3018
+ chatSetting: "default";
3019
+ }
3020
+
3021
+ /**
3022
+ * A wrapper object defining a vibrator state and intensity
3023
+ */
3024
+ interface StateAndIntensity {
3025
+ /** The vibrator state */
3026
+ State: VibratorModeState;
3027
+ /** The vibrator intensity */
3028
+ Intensity: VibratorIntensity;
3029
+ }
3030
+
3031
+ //#endregion
3032
+
3033
+ //#region Variable Height items
3034
+
3035
+ /** The function that handles applying the height setting to the character */
3036
+ type VariableHeightGetHeightCallback = (
3037
+ property: ItemProperties,
3038
+ ) => number | null;
3039
+
3040
+ /** The function that handles finding the current variable height setting */
3041
+ type VariableHeightSetHeightCallback = (
3042
+ property: ItemProperties,
3043
+ height: number,
3044
+ maxHeight: number,
3045
+ minHeight: number,
3046
+ ) => void;
3047
+
3048
+ /**
3049
+ * An object containing typed item configuration for an asset. Contains all of the necessary information for the item's
3050
+ * load, draw & click handlers.
3051
+ */
3052
+ interface VariableHeightData extends ExtendedItemData<VariableHeightOption> {
3053
+ archetype: "variableheight";
3054
+ /** The highest Y co-ordinate that can be set */
3055
+ maxHeight: number;
3056
+ /** The lowest Y co-ordinate that can be set */
3057
+ minHeight: number;
3058
+ /** A record containing various dialog keys used by the extended item screen */
3059
+ dialogPrefix: {
3060
+ /** The dialog key for the item's load text (usually a prompt to select the type) */
3061
+ header: string,
3062
+ /** The prefix used for dialog keys representing the item's chatroom messages when its type is changed */
3063
+ chat: string | ExtendedItemChatCallback<VariableHeightOption>;
3064
+ /** The dialogue prefix for the name of each option */
3065
+ option: string;
3066
+ };
3067
+ scriptHooks: ExtendedItemScriptHookStruct<VariableHeightData, VariableHeightOption>;
3068
+ /** The function that handles finding the current variable height setting */
3069
+ getHeight: VariableHeightGetHeightCallback;
3070
+ /** The function that handles applying the height setting to the character */
3071
+ setHeight: VariableHeightSetHeightCallback;
3072
+ chatSetting: "default";
3073
+ drawData: ExtendedItemDrawData<ElementMetaData.VariableHeight>;
3074
+ }
3075
+
3076
+ //#endregion
3077
+
3078
+ // #region TextItem
3079
+
3080
+ interface TextItemData extends ExtendedItemData<TextItemOption> {
3081
+ archetype: "text";
3082
+ /** A record with the maximum length for each text-based properties with an input field. */
3083
+ maxLength: TextItemRecord<number>;
3084
+ /** A record containing various dialog keys used by the extended item screen */
3085
+ dialogPrefix: {
3086
+ /** The dialog key for the item's load text (usually a prompt to select the type) */
3087
+ header: string,
3088
+ /** The prefix used for dialog keys representing the item's chatroom messages when its type is changed */
3089
+ chat: string | ExtendedItemChatCallback<TextItemOption>;
3090
+ };
3091
+ scriptHooks: ExtendedItemScriptHookStruct<TextItemData, TextItemOption>;
3092
+ chatSetting: "default";
3093
+ baselineProperty: ItemPropertiesNoArray;
3094
+ eventListeners: TextItemRecord<TextItemEventListener>;
3095
+ drawData: ExtendedItemDrawData<ElementMetaData.Text>;
3096
+ pushOnPublish: boolean;
3097
+ textNames: TextItemNames[];
3098
+ /**
3099
+ * The font used for dynamically drawing text.
3100
+ * Requires {@link AssetDefinition.DynamicAfterDraw} to be set.
3101
+ */
3102
+ font: null | string;
3103
+ }
3104
+
3105
+ // NOTE: Use the intersection operator to enforce that the it remains a `keyof ItemProperties` subtype
3106
+ /** Property keys of {@link ItemProperties} with text input fields */
3107
+ type TextItemNames = keyof ItemProperties & (
3108
+ "Text" | "Text2" | "Text3"
3109
+ );
3110
+
3111
+ type TextItemRecord<T> = Partial<Record<TextItemNames, T>>;
3112
+
3113
+ /**
3114
+ * A callback signature for handling (throttled) text changes.
3115
+ * @param C - The character being modified
3116
+ * @param item - The item being modified
3117
+ * @param name - The property wherein the updated text should be stored
3118
+ * @param text - The new text to be assigned to the item
3119
+ */
3120
+ type TextItemEventListener = (
3121
+ C: Character,
3122
+ item: Item,
3123
+ name: TextItemNames,
3124
+ text: string,
3125
+ ) => void;
3126
+
3127
+ // #endregion
3128
+
3129
+ type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
3130
+
3131
+ interface ICommand {
3132
+ Tag: string;
3133
+ Description?: string;
3134
+ Reference?: string;
3135
+ Action?: (this: Optional<ICommand, 'Tag'>, args: string, msg: string, parsed: string[]) => void
3136
+ Prerequisite?: (this: Optional<ICommand, 'Tag'>) => boolean;
3137
+ AutoComplete?: (this: Optional<ICommand, 'Tag'>, parsed: string[], low: string, msg: string) => void;
3138
+ Clear?: false;
3139
+ }
3140
+
3141
+ // #region Struggle Minigame
3142
+
3143
+ type StruggleKnownMinigames = "Strength" | "Flexibility" | "Dexterity" | "Loosen" | "LockPick";
3144
+
3145
+ interface StruggleMinigame {
3146
+ Setup: (C: Character, PrevItem: Item, NextItem: Item) => void;
3147
+ Draw: (C: Character) => void;
3148
+ HandleEvent?: (EventType: "KeyDown"|"Click") => void;
3149
+ DisablingCraftedProperty?: CraftingPropertyType;
3150
+ }
3151
+
3152
+ interface StruggleCompletionData {
3153
+ Progress: number;
3154
+ PrevItem: Item;
3155
+ NextItem?: Item;
3156
+ Skill: number;
3157
+ Attempts: number;
3158
+ Interrupted: boolean;
3159
+ Auto?: boolean;
3160
+ }
3161
+
3162
+ type StruggleCompletionCallback = (character: Character, game: StruggleKnownMinigames, data: StruggleCompletionData) => void;
3163
+
3164
+ // #endregion
3165
+
3166
+ //#region Poker Minigame
3167
+
3168
+ type PokerGameType = "TwoCards" | "TexasHoldem";
3169
+ type PokerMode = "" | "DEAL" | "FLOP" | "TURN" | "RIVER" | "RESULT" | "END";
3170
+ type PokerPlayerType = "None" | "Set" | "Character";
3171
+ type PokerPlayerFamily = "None" | "Player" | "Illustration" | "Model";
3172
+ type PokerHand = number[];
3173
+
3174
+ interface PokerAsset {
3175
+ Family: PokerPlayerFamily;
3176
+ Type: PokerPlayerType;
3177
+ Opponent: string[];
3178
+ }
3179
+
3180
+ interface PokerPlayer {
3181
+ Type: PokerPlayerType;
3182
+ Family: PokerPlayerFamily;
3183
+ Name: string;
3184
+ Chip: number;
3185
+
3186
+ /* Runtime values */
3187
+ Difficulty?: number;
3188
+ Hand?: PokerHand;
3189
+ HandValue?: number;
3190
+ Cloth?: Item;
3191
+ ClothLower?: Item;
3192
+ ClothAccessory?: Item;
3193
+ Panties?: Item;
3194
+ Bra?: Item;
3195
+ Character?: Character;
3196
+ Data?: TextCache;
3197
+ Image?: string;
3198
+ TextColor?: string;
3199
+ TextSingle?: TextCache;
3200
+ TextMultiple?: TextCache;
3201
+ Text?: string;
3202
+ WebLink?: string;
3203
+ Alternate?: number;
3204
+ }
3205
+
3206
+ interface GamePokerParameters {
3207
+ Challenge?: string;
3208
+ }
3209
+
3210
+ interface GameClubCardParameters {
3211
+ Deck: string[];
3212
+ DeckName?: string[];
3213
+ Reward?: string;
3214
+ Status?: OnlineGameStatus;
3215
+ PlayerSlot?: number;
3216
+ }
3217
+
3218
+ //#endregion
3219
+
3220
+ // #region Online Games
3221
+
3222
+ /**
3223
+ * Online game status values.
3224
+ *
3225
+ * @property "" - The game is in the setup phase.
3226
+ * @property "Running" - The game is currently running.
3227
+ *
3228
+ * @fix FIXME: "" should really be renamed Setup
3229
+ */
3230
+ type OnlineGameStatus = "" | "Running";
3231
+
3232
+ interface GameLARPParameters {
3233
+ Status?: OnlineGameStatus;
3234
+ Class?: string;
3235
+ Team?: string;
3236
+ TimerDelay?: number;
3237
+ Level?: {
3238
+ Name: string;
3239
+ Level: number;
3240
+ Progress: number;
3241
+ }[];
3242
+ }
3243
+
3244
+ interface GameLARPOption {
3245
+ Name: string;
3246
+ Odds: number;
3247
+ }
3248
+
3249
+ interface GameMagicBattleParameters {
3250
+ Status: OnlineGameStatus;
3251
+ House: "Independent" | "NotPlaying" | "HouseMaiestas" | "HouseVincula" | "HouseAmplector" | "HouseCorporis";
3252
+ TeamType: "FreeForAll" | "House";
3253
+ }
3254
+
3255
+ interface GameGGTSParameters {
3256
+ Level: number;
3257
+ Time: number;
3258
+ Strike: number;
3259
+ Rule: string[];
3260
+ }
3261
+
3262
+ // #endregion
3263
+
3264
+ // #region Audio
3265
+
3266
+ type AudioSoundEffect = [string, number];
3267
+
3268
+ interface AudioEffect {
3269
+ /** The sound effect name */
3270
+ Name: string;
3271
+
3272
+ /** The sound file, or files to choose from randomly */
3273
+ File: string | string[];
3274
+ }
3275
+
3276
+ /**
3277
+ * Sound effect detector for chat messages.
3278
+ */
3279
+ interface AudioChatAction {
3280
+ /** Is that action applicable for that chat message? */
3281
+ IsAction: (data: IChatRoomMessage) => boolean;
3282
+
3283
+ /** Extracts the actual sound effect from the chat message */
3284
+ GetSoundEffect: (data: IChatRoomMessage, metadata: IChatRoomMessageMetadata) => (AudioSoundEffect | string | null);
3285
+ }
3286
+
3287
+ // #endregion
3288
+
3289
+ // #region Character drawing
3290
+
3291
+ /**
3292
+ * A callback function used for clearing a rectangular area of a canvas
3293
+ * @param {number} x - The x coordinate of the left of the rectangle to clear
3294
+ * @param {number} y - The y coordinate of the top of the rectangle to clear
3295
+ * @param {number} w - The width of the rectangle to clear
3296
+ * @param {number} h - The height of the rectangle to clear
3297
+ */
3298
+ type ClearRectCallback = (x: number, y: number, w: number, h: number) => void;
3299
+
3300
+ /**
3301
+ * A callback function used to draw a canvas on a canvas
3302
+ * @param {HTMLImageElement | HTMLCanvasElement} Img - The canvas to draw
3303
+ * @param {number} x - The x coordinate to draw the canvas at
3304
+ * @param {number} y - The y coordinate to draw the canvas at
3305
+ */
3306
+ type DrawCanvasCallback = (
3307
+ img: HTMLImageElement | HTMLCanvasElement,
3308
+ x: number,
3309
+ y: number,
3310
+ alphaMasks?: RectTuple[],
3311
+ ) => void;
3312
+
3313
+ /**
3314
+ * A callback function used to draw an image to a canvas
3315
+ * @param {string} src - The URL of the image to draw
3316
+ * @param {number} x - The x coordinate to draw the image at
3317
+ * @param {number} y - The y coordinate to draw the image at
3318
+ * @param {RectTuple[]} [alphaMasks] - A list of alpha masks to apply to the image when drawing
3319
+ * @param {number} [opacity=1] - The opacity at which to draw the image with
3320
+ * @param {boolean} [rotate=false] - If the image should be rotated by 180 degrees
3321
+ * @param {string} [blendingMode="source-over"] - blending mode for drawing the image
3322
+ */
3323
+ type DrawImageCallback = (
3324
+ src: string,
3325
+ x: number,
3326
+ y: number,
3327
+ alphasMasks: RectTuple[],
3328
+ opacity?: number,
3329
+ rotate?: boolean,
3330
+ blendingMode?: GlobalCompositeOperation,
3331
+ ) => void;
3332
+
3333
+ /**
3334
+ * A callback function used to draw a colorized image to a canvas
3335
+ * @callback drawImageColorize
3336
+ * @param {string} src - The URL of the image to draw
3337
+ * @param {number} x - The x coordinate to draw the image at
3338
+ * @param {number} y - The y coordinate to draw the image at
3339
+ * @param {string} color - The color to apply to the image
3340
+ * @param {boolean} fullAlpha - Whether or not to apply color to the entire image
3341
+ * @param {RectTuple[]} [alphaMasks] - A list of alpha masks to apply to the image when drawing
3342
+ * @param {number} [opacity=1] - The opacity at which to draw the image with
3343
+ * @param {boolean} [rotate=false] - If the image should be rotated by 180 degrees
3344
+ * @param {GlobalCompositeOperation} [blendingMode="source-over"] - blending mode for drawing the image
3345
+ */
3346
+ type DrawImageColorizeCallback = (
3347
+ src: string,
3348
+ x: number,
3349
+ y: number,
3350
+ color: string,
3351
+ fullAlpha: boolean,
3352
+ alphaMasks?: RectTuple[],
3353
+ opacity?: number,
3354
+ rotate?: boolean,
3355
+ blendingMode?: GlobalCompositeOperation,
3356
+ ) => void;
3357
+
3358
+ interface CommonDrawCallbacks {
3359
+ /**
3360
+ * A callback to clear an area of the main character canvas
3361
+ */
3362
+ clearRect: ClearRectCallback;
3363
+ /**
3364
+ * A callback to clear an area of the blink character canvas
3365
+ */
3366
+ clearRectBlink: ClearRectCallback;
3367
+ /**
3368
+ * Function used to draw a canvas on top of the normal canvas
3369
+ */
3370
+ drawCanvas: DrawCanvasCallback;
3371
+ /**
3372
+ * Function used to draw a canvas on top of the blink canvas
3373
+ */
3374
+ drawCanvasBlink: DrawCanvasCallback;
3375
+ /**
3376
+ * A callback to draw an image to the main character canvas
3377
+ */
3378
+ drawImage: DrawImageCallback;
3379
+ /**
3380
+ * A callback to draw an image to the blink character canvas
3381
+ */
3382
+ drawImageBlink: DrawImageCallback;
3383
+ /**
3384
+ * A callback to draw a colorized image to the main character canvas
3385
+ */
3386
+ drawImageColorize: DrawImageColorizeCallback;
3387
+ /**
3388
+ * A callback to draw a colorized image to the blink character canvas
3389
+ */
3390
+ drawImageColorizeBlink: DrawImageColorizeCallback;
3391
+ }
3392
+
3393
+ interface DynamicDrawingData<T extends Record<string, any> = Record<string, unknown>> {
3394
+ C: Character;
3395
+ X: number;
3396
+ Y: number;
3397
+ CA: Item;
3398
+ GroupName: AssetGroupName;
3399
+ Color: string;
3400
+ Opacity: number;
3401
+ Property: ItemProperties;
3402
+ A: Asset;
3403
+ G: string;
3404
+ AG: AssetGroup;
3405
+ L: string;
3406
+ Pose: AssetPoseName;
3407
+ LayerType: string;
3408
+ BlinkExpression: string;
3409
+ drawCanvas: DrawCanvasCallback;
3410
+ drawCanvasBlink: DrawCanvasCallback;
3411
+ AlphaMasks: RectTuple[];
3412
+ PersistentData: () => T;
3413
+ }
3414
+
3415
+ /**
3416
+ * Drawing overrides that can be returned by a dynamic BeforeDraw function
3417
+ */
3418
+ interface DynamicBeforeDrawOverrides {
3419
+ Property?: ItemProperties;
3420
+ CA?: Item;
3421
+ GroupName?: AssetGroupName;
3422
+ Color?: string;
3423
+ Opacity?: number;
3424
+ X?: number;
3425
+ Y?: number;
3426
+ LayerType?: string;
3427
+ L?: string;
3428
+ AlphaMasks?: RectTuple[];
3429
+ Pose?: AssetPoseName;
3430
+ }
3431
+
3432
+ type DynamicDrawTextEffect = "burn";
3433
+
3434
+ interface DynamicScriptCallbackData<T extends Record<string, any> = Record<string, unknown>> {
3435
+ C: Character;
3436
+ Item: Item;
3437
+ PersistentData: () => T;
3438
+ }
3439
+
3440
+ // #endregion
3441
+
3442
+ //#region Infiltration/Pandora
3443
+
3444
+ type InfiltrationMissionType = "Rescue" | "Kidnap" | "Retrieve" | "CatBurglar" | "ReverseMaid" | "Steal";
3445
+
3446
+ type InfiltrationTargetType = "NPC" | "USBKey" | "BDSMPainting" | "GoldCollar" | "GeneralLedger" | "SilverVibrator" | "DiamondRing" | "SignedPhoto" | "PandoraPadlockKeys";
3447
+
3448
+ interface InfiltrationMissionTarget {
3449
+ Type: InfiltrationTargetType;
3450
+ Name: string;
3451
+ /** Whether the target was found */
3452
+ Found?: boolean;
3453
+ /** Whether the mission failed */
3454
+ Fail?: boolean;
3455
+ /** Whether this is an Rescue NPC mission from having a Private Room character kidnapped */
3456
+ PrivateRoom?: boolean;
3457
+ }
3458
+
3459
+ type PandoraDirection = "North" | "South" | "East" | "West";
3460
+ type PandoraFloorDirection = "StairsUp" | "StairsDown" | PandoraDirection;
3461
+ type PandoraFloors = "Ground" | "Second" | "Underground";
3462
+
3463
+ interface PandoraSpecialRoom {
3464
+ Floor: "Exit" | "Search" | "Rest" | "Paint";
3465
+ }
3466
+
3467
+ interface PandoraBaseRoom {
3468
+ Floor: PandoraFloors;
3469
+ Background: string;
3470
+ Character: NPCCharacter[];
3471
+ Path: (PandoraBaseRoom | PandoraSpecialRoom)[];
3472
+ PathMap: PandoraBaseRoom[];
3473
+ Direction: string[];
3474
+ DirectionMap: PandoraFloorDirection[];
3475
+
3476
+ /* SearchRoom */
3477
+ SearchSquare?: {
3478
+ X: number;
3479
+ Y: number;
3480
+ W: number;
3481
+ H: number;
3482
+ }[];
3483
+ ItemX?: number;
3484
+ ItemY?: number;
3485
+
3486
+ /* PaintRoom */
3487
+ Graffiti?: number;
3488
+ }
3489
+
3490
+ //#endregion
3491
+
3492
+ //#region Crafting items
3493
+
3494
+ type CraftingMode = (
3495
+ "Slot" | "Item" | "Property" | "Lock" | "Name" | "Color" | "Extended"
3496
+ | "OverridePriority"
3497
+ );
3498
+
3499
+ type CraftingReorderType = "None" | "Select" | "Place";
3500
+
3501
+
3502
+ /**
3503
+ * A struct with an items crafting-related information.
3504
+ * @see {@link Item.Craft}
3505
+ */
3506
+ interface CraftingItem {
3507
+ /** The name of the crafted item. */
3508
+ Name: string;
3509
+ /** The name of the crafter. */
3510
+ MemberName?: string;
3511
+ /** The member ID of the crafter. */
3512
+ MemberNumber?: number;
3513
+ /** The custom item description. */
3514
+ Description: string;
3515
+ /** The crafted item propery. */
3516
+ Property: CraftingPropertyType;
3517
+ /** The comma-separated color(s) of the item. */
3518
+ Color: string;
3519
+ /** The name of the lock or, if absent, an empty string. */
3520
+ Lock: "" | AssetLockType;
3521
+ /** The name of the item; see {@link Asset.Name}. */
3522
+ Item: string;
3523
+ /** Whether the crafted item should be private or not. */
3524
+ Private: boolean;
3525
+ /**
3526
+ * The type of the crafted item; only relevant for extended items and should be an empty string otherwise.
3527
+ * @see {@link ItemProperties.Type}
3528
+ */
3529
+ Type: string | null;
3530
+ /**
3531
+ * An integer (or `null`) representing the item layering priority; see {@link ItemProperties.OverridePriority}.
3532
+ * @deprecated - superseded by {@link CraftingItem.ItemProperty}
3533
+ */
3534
+ OverridePriority?: null | number;
3535
+ /**
3536
+ * A record with a select few (optional) extra item properties:
3537
+ * * {@link ItemProperties.OverridePriority} in either its record or number form.
3538
+ * * Properties as specified in {@link ExtendedItemData.baselineProperty}
3539
+ */
3540
+ ItemProperty: ItemProperties | null;
3541
+ }
3542
+
3543
+ /**
3544
+ * A currently selected struct with an items crafting-related information.
3545
+ * @see {@link Item.Craft}
3546
+ */
3547
+ interface CraftingItemSelected {
3548
+ /** The name of the crafted item. */
3549
+ Name: string;
3550
+ /** The custom item description. */
3551
+ Description: string;
3552
+ /** The comma-separated color(s) of the item. */
3553
+ Color: string;
3554
+ /** The name of the crafted item. */
3555
+ Asset: Asset | null;
3556
+ /** The crafted item propery. */
3557
+ Property: CraftingPropertyType;
3558
+ /** The lock as equiped on the item or, if absent, `null`. */
3559
+ Lock: Asset | null;
3560
+ /** Whether the crafted item should be private or not. */
3561
+ Private: boolean;
3562
+ /**
3563
+ * The type of the crafted item; only relevant for extended items and should be an empty string otherwise.
3564
+ * Note that `null` values, which are legal for Typed extended items, *must* be converted to empty strings.
3565
+ * @see {@link ItemProperties.Type}
3566
+ */
3567
+ Type: string;
3568
+ /**
3569
+ * A record with a select few (optional) extra item properties:
3570
+ * * {@link ItemProperties.OverridePriority} in either its record or number form.
3571
+ * * Properties as specified in {@link ExtendedItemData.baselineProperty}
3572
+ */
3573
+ ItemProperty: ItemProperties;
3574
+ /** Get or set the `OverridePriority` property of {@link CraftingItemSelected.ItemProperty} */
3575
+ get OverridePriority(): null | AssetLayerOverridePriority;
3576
+ set OverridePriority(value: null | AssetLayerOverridePriority);
3577
+ }
3578
+
3579
+ /**
3580
+ * A struct with tools for validating {@link CraftingItem} properties.
3581
+ * @property {function} Validate - The validation function
3582
+ * @property {function} GetDefault - A function that creates default values for when the validation fails
3583
+ * @property {CraftingStatusType} - The {@link CraftingStatusType} code for when the validation fails
3584
+ */
3585
+ interface CratingValidationStruct {
3586
+ Validate: (Craft: CraftingItem, Asset: Asset | null) => boolean;
3587
+ GetDefault: (Craft: CraftingItem, Asset: Asset | null) => any;
3588
+ StatusCode: CraftingStatusType;
3589
+ }
3590
+
3591
+ //#endregion
3592
+
3593
+ //#region Color
3594
+
3595
+ /** An object defining a group of layers which can be colored together */
3596
+ interface ColorGroup {
3597
+ /** The name of the color group */
3598
+ name: string;
3599
+ /** The layers contained within the color group */
3600
+ layers: AssetLayer[];
3601
+ /** The color index for the color group - this is the lowest color index of any of the layers within the color group */
3602
+ colorIndex: number;
3603
+ }
3604
+
3605
+ /**
3606
+ * A callback function that is called when the item color UI exits
3607
+ * @param c - The character being colored
3608
+ * @param item - The item being colored
3609
+ * @param save - Whether the item's appearance changes should be saved
3610
+ */
3611
+ type itemColorExitListener = (
3612
+ c: Character,
3613
+ item: Item,
3614
+ save: boolean,
3615
+ ) => void;
3616
+
3617
+ interface ItemColorStateType {
3618
+ colorGroups: ColorGroup[];
3619
+ colors: string[];
3620
+ simpleMode: boolean;
3621
+ paginationButtonX: number;
3622
+ cancelButtonX: number;
3623
+ saveButtonX: number;
3624
+ colorPickerButtonX: number;
3625
+ colorDisplayButtonX: number;
3626
+ contentY: number;
3627
+ groupButtonWidth: number;
3628
+ pageSize: number;
3629
+ pageCount: number;
3630
+ colorInputWidth: number;
3631
+ colorInputX: number;
3632
+ colorInputY: number;
3633
+ exportButtonX: number;
3634
+ importButtonX: number;
3635
+ resetButtonX: number;
3636
+ drawImport: () => Promise<string>;
3637
+ drawExport: (data: string) => Promise<void>;
3638
+ }
3639
+
3640
+ /** A hexadecimal color code */
3641
+ type HexColor = string;
3642
+
3643
+ /** A HSV color value */
3644
+ interface HSVColor {
3645
+ H: number;
3646
+ S: number;
3647
+ V: number;
3648
+ }
3649
+
3650
+ /** The color picker callback called when selection completes. */
3651
+ type ColorPickerCallbackType = (Color: string) => void;
3652
+
3653
+ //#end region
3654
+
3655
+ // #region Log
3656
+
3657
+ interface LogRecord {
3658
+ Name: string;
3659
+ Group: LogGroupType;
3660
+ Value: number;
3661
+ }
3662
+
3663
+ /** The logging groups as supported by the {@link LogRecord.Group} */
3664
+ type LogGroupType = keyof LogNameType;
3665
+
3666
+ /** An interface mapping {@link LogRecord.Group} types to valid {@link LogRecord.Name} types */
3667
+ interface LogNameType {
3668
+ Arcade: "DeviousChallenge",
3669
+ Asylum: "Committed" | "Isolated" | "ForceGGTS" | "ReputationMaxed" | "Escaped",
3670
+ BadGirl: "Caught" | "Joined" | "Stolen" | "Hide",
3671
+ Cell: "Locked" | "KeyDeposit",
3672
+ College: "TeacherKey",
3673
+ Import: "BondageCollege",
3674
+ Introduction: "MaidOpinion" | "DailyJobDone",
3675
+ LockPick: "FailedLockPick",
3676
+ LoverRule: "BlockLoverLockSelf" | "BlockLoverLockOwner",
3677
+ MagicSchool: "Mastery",
3678
+ Maid: "JoinedSorority" | "LeadSorority" | "MaidsDisabled",
3679
+ MainHall: "IntroductionDone",
3680
+ Management: "ClubMistress" | "ClubSlave" | "ReleasedFromOwner" | "MistressWasPaid",
3681
+ "NPC-Amanda": "AmandaLover" | "AmandaCollared" | "AmandaCollaredWithCurfew" | "AmandaMistress",
3682
+ "NPC-AmandaSarah": "AmandaSarahLovers",
3683
+ "NPC-Jennifer": "JenniferLover" | "JenniferCollared" | "JenniferMistress" | "JenniferCollaredWithCurfew",
3684
+ "NPC-Sarah": "SarahLover" | "SarahCollared" | "SarahCollaredWithCurfew",
3685
+ "NPC-SarahIntro": "SarahWillBePunished" | "SarahCameWithPlayer",
3686
+ "NPC-Sidney": "SidneyLover" | "SidneyMistress" | "SidneyCollared" | "SidneyCollaredWithCurfew",
3687
+ "NPC-Julia": "Dominant" | "Submissive",
3688
+ "NPC-Yuki": "Dominant" | "Submissive",
3689
+ "NPC-Mildred": "Dominant" | "Submissive",
3690
+ // NOTE: A number of owner rules can have arbitrary suffices, and can thus not be expressed as string literals
3691
+ OwnerRule: (
3692
+ "BlockChange"
3693
+ | "BlockTalk"
3694
+ | "BlockEmote"
3695
+ | "BlockWhisper"
3696
+ | "BlockChangePose"
3697
+ | "BlockAccessSelf"
3698
+ | "BlockAccessOther"
3699
+ | "BlockKey"
3700
+ | "BlockOwnerLockSelf"
3701
+ | "BlockRemote"
3702
+ | "BlockRemoteSelf"
3703
+ | "BlockNickname"
3704
+ | "ReleasedCollar"
3705
+ | "BlockScreen"
3706
+ | "BlockAppearance"
3707
+ | "BlockItemGroup"
3708
+ | "ForbiddenWords"
3709
+ | "BlockTalkForbiddenWords"
3710
+ | string
3711
+ ),
3712
+ Pony: "JoinedStable",
3713
+ PonyExam: "JoinedStable",
3714
+ PrivateRoom: (
3715
+ "RentRoom"
3716
+ | "Expansion"
3717
+ | "SecondExpansion"
3718
+ | "Wardrobe"
3719
+ | "Cage"
3720
+ | "OwnerBeepActive"
3721
+ | "OwnerBeepTimer"
3722
+ | "Security"
3723
+ | "BedWhite"
3724
+ | "BedBlack"
3725
+ | "BedPink"
3726
+ ),
3727
+ Rule: "BlockChange" | "LockOutOfPrivateRoom" | "BlockCage" | "SleepCage",
3728
+ Sarah: "KidnapSophie",
3729
+ Shibari: "Training",
3730
+ SkillModifier: "ModifierDuration" | "ModifierLevel",
3731
+ SlaveMarket: "Auctioned",
3732
+ Trainer: "JoinedStable",
3733
+ TrainerExam: "JoinedStable",
3734
+ }
3735
+
3736
+ // #end region
3737
+
3738
+ // #region dialog
3739
+
3740
+ interface FavoriteState {
3741
+ TargetFavorite: boolean;
3742
+ PlayerFavorite: boolean;
3743
+ Icon: FavoriteIcon;
3744
+ UsableOrder: DialogSortOrder;
3745
+ UnusableOrder: DialogSortOrder;
3746
+ }
3747
+
3748
+ interface DialogInventoryItem extends Item {
3749
+ Worn: boolean;
3750
+ Icons: InventoryIcon[];
3751
+ SortOrder: string;
3752
+ Vibrating: boolean;
3753
+ }
3754
+
3755
+ interface DialogSelfMenuOptionType {
3756
+ Name: string;
3757
+ IsAvailable: () => boolean;
3758
+ Load?: () => void;
3759
+ Draw: () => void;
3760
+ Click: () => void;
3761
+ }
3762
+
3763
+ // #end region
3764
+
3765
+ // #region Notification
3766
+
3767
+ type NotificationAudioType = 0 | 1 | 2;
3768
+ type NotificationAlertType = 0 | 1 | 3 | 2;
3769
+ type NotificationEventType = "ChatMessage" | "ChatJoin" | "Beep" | "Disconnect" | "Test" | "Larp";
3770
+
3771
+ interface NotificationSetting {
3772
+ AlertType: NotificationAlertType,
3773
+ Audio: NotificationAudioType,
3774
+ }
3775
+
3776
+ interface NotificationData {
3777
+ body?: string,
3778
+ character?: Character,
3779
+ useCharAsIcon?: boolean,
3780
+ memberNumber?: number,
3781
+ characterName?: string,
3782
+ chatRoomName?: string,
3783
+ }
3784
+
3785
+ // #end region
3786
+
3787
+ // #region preference
3788
+
3789
+ interface ActivityEnjoyment {
3790
+ /** The relevant activity type */
3791
+ Name: ActivityName,
3792
+ /** The arousal factor for when the activity is performed on the player character */
3793
+ Self: ArousalFactor,
3794
+ /** The arousal factor for when the activity is performed on someone else */
3795
+ Other: ArousalFactor,
3796
+ }
3797
+
3798
+ interface ArousalZone {
3799
+ /** The relevant zone */
3800
+ Name: AssetGroupName,
3801
+ /** The arousal factor associated with the zone */
3802
+ Factor: ArousalFactor,
3803
+ /** Whether one can orgasm from stimulating the zone */
3804
+ Orgasm: boolean,
3805
+ }
3806
+
3807
+ interface ArousalFetish {
3808
+ /** The name of the fetish */
3809
+ Name: FetishName,
3810
+ /** The arousal factor associated with the fetish */
3811
+ Factor: ArousalFactor,
3812
+ }
3813
+
3814
+ /** The factor of the sexual activity (0 is horrible, 2 is normal, 4 is great) */
3815
+ type ArousalFactor = 0 | 1 | 2 | 3 | 4;
3816
+
3817
+ interface ArousalSettingsType {
3818
+ Active: ArousalActiveName;
3819
+ Visible: ArousalVisibleName;
3820
+ ShowOtherMeter: boolean;
3821
+ AffectExpression: boolean;
3822
+ AffectStutter: ArousalAffectStutterName;
3823
+ VFX: SettingsVFXName;
3824
+ VFXVibrator: SettingsVFXVibratorName;
3825
+ VFXFilter: SettingsVFXFilterName;
3826
+ Progress: number;
3827
+ ProgressTimer: number;
3828
+ VibratorLevel: number;
3829
+ ChangeTime: number;
3830
+ Activity: ActivityEnjoyment[];
3831
+ Zone: ArousalZone[];
3832
+ Fetish: ArousalFetish[];
3833
+ OrgasmTimer?: number;
3834
+ OrgasmStage?: number;
3835
+ OrgasmCount?: number;
3836
+ DisableAdvancedVibes: boolean;
3837
+ }
3838
+
3839
+ // #end region
3840
+
3841
+ // #region fortune wheel
3842
+
3843
+ /** A union of valid wheel of fortune button colors */
3844
+ type WheelFortuneColor = "Blue" | "Gold" | "Gray" | "Green" | "Orange" | "Purple" | "Red" | "Yellow";
3845
+
3846
+ /** Base type for fortune wheel options */
3847
+ interface WheelFortuneOptionType {
3848
+ /** A single-character UTF16 string with the option's ID */
3849
+ ID: string;
3850
+ /** The color of the option button */
3851
+ Color: WheelFortuneColor;
3852
+ /** An optional script that will be executed whenever the option is picked */
3853
+ Script?: () => void;
3854
+ }
3855
+
3856
+ // #end region
3857
+
3858
+ interface ClubCard {
3859
+ ID: number;
3860
+ Name: string;
3861
+ Type?: string;
3862
+ Title?: string;
3863
+ Text?: string;
3864
+ Prerequisite?: string;
3865
+ Reward?: string;
3866
+ RewardMemberNumber?: number;
3867
+ MoneyPerTurn?: number;
3868
+ FamePerTurn?: number;
3869
+ RequiredLevel?: number;
3870
+ Time?: number;
3871
+ ExtraTime?: number;
3872
+ ExtraDraw?: number;
3873
+ ExtraPlay?: number;
3874
+ Group?: any[];
3875
+ Location?: string;
3876
+ GlowTimer?: number;
3877
+ GlowColor?: string;
3878
+ OnPlay?: (C: ClubCardPlayer) => void;
3879
+ OnTurnEnd?: (C: ClubCardPlayer) => void;
3880
+ OnOpponentTurnEnd?: (C: ClubCardPlayer) => void;
3881
+ CanPlay?: (C: ClubCardPlayer) => boolean;
3882
+ }
3883
+
3884
+ interface ClubCardPlayer {
3885
+ Character: Character;
3886
+ Control: string;
3887
+ Index: number;
3888
+ Sleeve: string;
3889
+ Deck: ClubCard[];
3890
+ FullDeck: ClubCard[];
3891
+ Hand: ClubCard[];
3892
+ Board: ClubCard[];
3893
+ Event: ClubCard[];
3894
+ Level: number;
3895
+ Money: number;
3896
+ Fame: number;
3897
+ LastFamePerTurn?: number;
3898
+ LastMoneyPerTurn?: number;
3899
+ }
3900
+
3901
+ // #region drawing
3902
+
3903
+ /** Drawing options for an item's preview box */
3904
+ interface PreviewDrawOptions {
3905
+ /** The character using the item (used to calculate dynamic item descriptions/previews) */
3906
+ C?: Character;
3907
+ /** The preview box description. */
3908
+ Description?: string;
3909
+ /** The background color to draw the preview box in - defaults to white */
3910
+ Background?: string;
3911
+ /** The foreground (text) color to draw the description in - defaults to black */
3912
+ Foreground?: string;
3913
+ /** Whether or not to add vibration effects to the item - defaults to false */
3914
+ Vibrating?: boolean;
3915
+ /** Whether or not to draw a border around the preview box */
3916
+ Border?: boolean;
3917
+ /** Whether or not the button should enable hover behavior (background color change) */
3918
+ Hover?: boolean;
3919
+ /** The background color that should be used on mouse hover, if any */
3920
+ HoverBackground?: string;
3921
+ /** Whether or not the element is disabled (prevents hover functionality) */
3922
+ Disabled?: boolean;
3923
+ /** A list of images to draw in the top-left of the preview box */
3924
+ Icons?: readonly InventoryIcon[];
3925
+ /** The crafted properties of the item */
3926
+ Craft?: CraftingItem;
3927
+ /** The width of the preview rectangle */
3928
+ Width?: number;
3929
+ /** The height of the preview rectangle */
3930
+ Height?: number;
3931
+ }
3932
+
3933
+ // #end region