interfaces.d.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071
  1. declare module "twine-sugarcube" {
  2. export interface SugarCubeSetupObject {
  3. Action: { new(parameter:any): Action };
  4. Appearance: { new(playerCharacter: PlayerCharacter): Appearance };
  5. BodyDescription: { new(): BodyDescription };
  6. Consumable: { new(): Consumable };
  7. Drugs: { new(): Drugs };
  8. Events: { new(): Events };
  9. GameTime: { new(): GameTime };
  10. Inventory: { new(): Inventory };
  11. Location:{ new(): GameLocation };
  12. LocationIdentifier:{ new(): LocationIdentifier };
  13. Mood: { new(): Mood };
  14. Moodlet: { new(): Moodlet };
  15. MoodletGroup: { new(): MoodletGroup };
  16. NPC:{ new(): NPC };
  17. OutfitItem: { new(): OutfitItem };
  18. Pain: { new(): Pain };
  19. PersonalityScale: { new(): PersonalityScale };
  20. PlayerCharacter: { new(): PlayerCharacter };
  21. Quest: {
  22. handler: object; new(questId?: any): Quest
  23. };
  24. QuestsDict: { new(): QuestsDict };
  25. Skill: { new(): Skill };
  26. VersionControl: { new(): VersionControl };
  27. //#region Listeners
  28. listeners_timeUpdate:{[key: string]: (minutes:number)=>void};
  29. //#endregion
  30. appearanceModificators: { [key: string]: AppearanceModificatorDefinition; };
  31. bodypart: { [key: string]: BodypartDefinition;}
  32. consumables: { [key: string]: ConsumableDefinition;}
  33. deco: { [key: string]: { [key: string]: any; }}
  34. drugs: { [key: string]: DrugDefinition}
  35. effects: { [key: string]: Effect;}
  36. consumableMenus:{ [key: string]: ConsumableMenuDefinition}
  37. items: { [key: string]: ItemDefinition; };
  38. jobs: { [key: string]: JobDefinition};
  39. locations: { [key: string]: LocationDefinition; };
  40. moodlets: { [key: string]: Moodlet; };
  41. moodletGroups: { [key: string]: MoodletGroup; };
  42. npcs:{ [key: string]: NPCDefinition; };
  43. npcDefaults:{ [key: string]: NPCDefaultDefinition; };
  44. npcPreferences:{ [key: string]: NPCPreferenceDefinition; };
  45. outfits: { [key: string]: OutfitDefinition; };
  46. outfitsDefaults: {[key: string]: {[key: string]: any; } };
  47. outfitItemImagePath: {[key: string]: string | {[key: string]: any; } };
  48. painReasons: {[key: string]: PainReasonDefinition}
  49. personalityScales: {[key: string]: PersonalityScaleDefinition};
  50. skills: { [key: string]: SkillDefinition; };
  51. startingCharacters: {[key: string]: StartCharacterDefinition};
  52. crimeLikelihood: (crimeId:string,location:LocationIdentifier)=>number;
  53. durationToString: any;
  54. filterDict:<T extends {}>(obj:T,filter: Filter) => T;
  55. func: (passage: string, ...arguments: Array<string|number>)=>any;
  56. getBodyparts:()=> {[key: string]:BodypartDefinition };
  57. getBodypart:(bodypartId:string)=>BodypartDefinition;
  58. getConsumable: (type:string)=>{ [key: string]: any; };
  59. getConsumableMenu: (id:string)=>ConsumableMenuDefinition;
  60. getDeco: (type:string,position:string,id:number|string)=>{ [key: string]: any; };
  61. getDrug: (type:string)=>DrugDefinition;
  62. getDecoPosition: (type:string,position:string) => { [key: string]: any; }
  63. getDecoPositions: (type:string)=>string[];
  64. getEffect: (type:string)=>Effect;
  65. getGenericActionApplied:(actionId:string)=>any;
  66. getLocation: (locationId: string)=>LocationDefinition;
  67. getStartingCharacter: (type:string)=>StartCharacterDefinition;
  68. getStartingCharactersByFilter: (filters:{},shallow:boolean)=>{};
  69. hasBodypart:(bodypartId:string)=>boolean;
  70. makeSVG: (tag:string, attrs:any,innerHTML?:string|number|undefined) => SVGElement;
  71. mediaPath(rawPath:string):string;
  72. mediaPathImage(rawPath:string):string;
  73. mergeDeep: (target:any, ...sources:any) => any;
  74. randomName: (type:string)=>string;
  75. startingCharacterApply:(id:string)=>void;
  76. startingCharacterTagsIncludes:(tag:string)=>boolean;
  77. tooltip:(elSelector:string, contentSelector:string)=>void;
  78. /**
  79. * Returns whether the place the playercharacter currently is at has internet access.
  80. * @returns {boolean}
  81. */
  82. hasInternet(): boolean;
  83. navigationOverride:(destinationPassageName:string)=>string;
  84. settingsApply:(settings: any)=>void;
  85. tooltipCounter:number;
  86. wardrobeSettings:WardrobeSettings;
  87. weekDayIntToString: any;
  88. worldSettings:any;
  89. isWebVersion:boolean;
  90. difficultyOfHighHeels(shoes?: OutfitItemShoes,levelCategory?:number):ESkillDifficulty
  91. skillHistoryDrawGraph(domElementId:string,skillID:string):void;
  92. appearanceFunctions:{
  93. current: {[key:string]: (pc:PlayerCharacter) => string};
  94. lasting: {[key:string]: (pc:PlayerCharacter) => string};
  95. genetic: {[key:string]: (pc:PlayerCharacter) => string};
  96. }
  97. wardrobeWearableFunctions:{[key:string]:((outfitOwned:OutfitOwned)=>string|null)};
  98. }
  99. export interface SugarCubeStoryVariables {
  100. events: Events;
  101. finances: any;
  102. housing:any;
  103. inventory: Inventory;
  104. jobs: any;
  105. location: GameLocation;
  106. npcs:NPCsDict;
  107. pc: PlayerCharacter;
  108. q: QuestsDict;
  109. settings:any;
  110. startCharacter: string;
  111. time: GameTime;
  112. wardrobe:Wardrobe;
  113. actions:{[actionId:string]:{cooldownEnd:number}}
  114. ARGS: Array<string>;
  115. connectedLocations: ConnectedLocation[];
  116. /**
  117. * The location to go back to once an event has fired.
  118. *
  119. * @type {LocationIdentifier}
  120. */
  121. eventReturnLocation: LocationIdentifier;
  122. here: string;
  123. location_var: object;
  124. media_path: string;
  125. quest: (id:string)=>Quest;
  126. result: number | string;
  127. /**
  128. * The version of the game. Format is xxxxxxx.xx.xx.
  129. * @type {number}
  130. * @example
  131. * version = 10345; //1.3.45
  132. */
  133. version: number;
  134. callStack: [string,number][];
  135. }
  136. export interface SugarCubeTemporaryVariables{
  137. actions:Action[];
  138. thisMainPassage:string;
  139. }
  140. }
  141. declare global {
  142. export interface Array<T>{
  143. fancyMathEvaluate(): number;
  144. filterByObject(filter: object): Array<T>;
  145. isConsecutive(stepSize?:number): boolean;
  146. }
  147. interface Math {
  148. /**
  149. * Rounds to the higher number if positive, to the lower number if negative.
  150. * @type {(n:number)=>number}
  151. */
  152. ceilAbs: (n:number)=>number;
  153. logBase: (n:number, base:number)=>number;
  154. }
  155. export interface Number{
  156. roundToDecimal:(decimalPlaces:number)=>number;
  157. toBoolean:()=>boolean;
  158. }
  159. export interface String{
  160. formatUnicorn(format:{}):string;
  161. removeLeading(leading:string):string;
  162. toBoolean():boolean;
  163. }
  164. export class Util{
  165. static slugify(s:string): string;
  166. }
  167. export interface Window{
  168. rand(x:number,y:number): number;
  169. NPCsDict: { new(): NPCsDict };
  170. Wardrobe: { new(): Wardrobe };
  171. }
  172. export interface ActFlags{
  173. /**
  174. * Overwrite the label in the action bar
  175. * @type {?string}
  176. */
  177. ab_label?:string;
  178. /**
  179. * What's that again?
  180. * @todo
  181. * @type {?string}
  182. */
  183. action?:string;
  184. /**
  185. * Minimum required arousal
  186. * @type {?number}
  187. */
  188. arousal?:number;
  189. /**
  190. * Overwrite contents
  191. * @type {?string}
  192. */
  193. contents?:string;
  194. contents_header?:string;
  195. contents_footer?:string;
  196. /**
  197. * Captured vars-array (e.g. ['_npcID'])
  198. * @type {?string[]}
  199. */
  200. capture?:string[];
  201. cost?:{both?:number;cash?:number;bank?:number};
  202. /**
  203. * The action is disabled. Show the value as tooltip.
  204. * @type {?string}
  205. */
  206. disabled?:string;
  207. // 'fetish': The action can't be done if you're appalled by this fetish (string or array of strings)
  208. /**
  209. * Don't show this action?
  210. * @type {boolean}
  211. */
  212. hidden?:boolean;
  213. image?:string;
  214. /**
  215. * Label (if not set as arg[0])
  216. * @type {?string}
  217. */
  218. label?:string;
  219. /**
  220. * minium required mood
  221. * @type {?number}
  222. */
  223. mood?:number;
  224. moodlet?:string;
  225. priority?:number;
  226. repeatReset?:{
  227. days?:number;
  228. }
  229. /**
  230. * (e.g. '{intelligence:50}')
  231. * @type {?{[skillId:string]:number}}
  232. */
  233. skillRequirment?:{[skillId:string]:number};
  234. /**
  235. * Added time in minutes. Display the time but don't really add it if negative.
  236. * @type {?number}
  237. */
  238. time?:number;
  239. willpower?:number;
  240. }
  241. export interface AppearanceModificatorDefinition{
  242. label:string;
  243. desc:string;
  244. /**
  245. * High comes first.
  246. * @type {number}
  247. */
  248. priority?:number;
  249. /**
  250. * Sets the appearance value. Use sparingly.
  251. *
  252. * @type {?number}
  253. */
  254. set?:number;
  255. /**
  256. * Sets the max number the appearance can reach.
  257. * @type {?number}
  258. */
  259. max?:number;
  260. /**
  261. * Sets the min number the appearance can reach.
  262. * @type {?number}
  263. */
  264. min?:number;
  265. /**
  266. * Decreases the appearance by the given number;
  267. * @type {?number}
  268. */
  269. dec?:number;
  270. /**
  271. * Increases the appearance by the given number;
  272. * @type {?number}
  273. */
  274. inc?:number;
  275. }
  276. export interface StartCharacterDefinition{
  277. hidden?:boolean;
  278. /**
  279. * The description that's displayed to the player
  280. * @type {?string}
  281. */
  282. desc?:string
  283. finances?:{
  284. /**
  285. * The starting cash of the character.
  286. * @type {?number}
  287. */
  288. cash?:number
  289. },
  290. housing?:{
  291. home?: string
  292. },
  293. /**
  294. * Obvious things are obvious
  295. * @type {?string}
  296. */
  297. image?:string
  298. /**
  299. * Used internally in `setup.getStartingCharacter`. Don't overwrite.
  300. * @type {?string[]}
  301. */
  302. inheritance?:string[]
  303. items?:{
  304. [key: string]: number | {
  305. generateFunction:string,
  306. generateParameters?:any[]
  307. }
  308. }
  309. /**
  310. * What is displayed to the player
  311. * @type {?string}
  312. */
  313. label?:string
  314. location?:{
  315. [key: string]:{
  316. [key: string]:any
  317. }
  318. }
  319. locationTags?:{
  320. [key: string]:{
  321. [key: string]:any
  322. }
  323. }
  324. npcs?:{
  325. bulk?:{
  326. [key: string]:{
  327. values?:{
  328. rel?:number,
  329. fam?:number
  330. },
  331. filters?:{
  332. [key: string]:any
  333. }
  334. }
  335. }
  336. [key: string]: any
  337. }
  338. /**
  339. * Another character defintion that is to be inherited.
  340. * @type {?string}
  341. */
  342. parent?:string
  343. /**
  344. * Starting values of the PlayerCharacter. Every field of this class can be overwritten.
  345. * @type {?{ [key: string]: any; }}
  346. */
  347. pc?:{ [key: string]: any; }
  348. personality?:{ [key: string]: number; }
  349. quests?:{
  350. [key: string]: boolean;
  351. }
  352. school?:{
  353. [key: string]: any;
  354. }
  355. skills?:{
  356. [key: string]: number;
  357. }
  358. /**
  359. * Categories of the starting character.
  360. * @type {string[]}
  361. */
  362. tags?:string[]
  363. time?: any;
  364. traits?:{
  365. [key: string]: number;
  366. }
  367. wardrobe?:{
  368. itemsByFilter?:{
  369. [key: string]:{
  370. filters?:{
  371. [key: string]:any;
  372. };
  373. count?: number;
  374. action?: 'add'|'wear';
  375. }
  376. },
  377. items?:{
  378. [key: string]:'add'|'wear';
  379. }
  380. };
  381. }
  382. export interface BodypartDefinition{
  383. id?:string;
  384. /**
  385. * Name of another bodypart this bodypart is a synonym for.
  386. * @type {?string}
  387. */
  388. synonymFor?:string;
  389. /**
  390. * Is this bodypart inside the body? Default: false.
  391. * @type {?boolean}
  392. */
  393. inside?:boolean;
  394. covered?:boolean|((pc:PlayerCharacter) => boolean);
  395. /**
  396. * Which activities clean this bodypart.
  397. * @type {string[]}
  398. */
  399. clean?:string[];
  400. cumDisabled?:boolean;
  401. painDisabled?:boolean;
  402. label?:string;
  403. painDesc?:string;
  404. }
  405. export interface ConnectedLocation{
  406. forPassage : string,
  407. targetPassage: string,
  408. targetArguments: undefined,
  409. label: string,
  410. image: string,
  411. duration: number,
  412. class: string,
  413. priority: number,
  414. content: string,
  415. hotkeys: any,
  416. indecencyBlocked?:boolean,
  417. capturedVars: {[key:string]:any};
  418. }
  419. export interface ConsumableDefinition{
  420. alcohol?:number;
  421. costItems?:string[];
  422. desc?:string;
  423. /**
  424. * Relative calories with 1 being an healthy amount.
  425. * @type {?number}
  426. */
  427. energy?:number;
  428. hunger?: number;
  429. image?: string;
  430. imageRand?: ImageRand;
  431. label?:string;
  432. moodletIds?:string[];
  433. price?: number;
  434. thirst?:number;
  435. /**
  436. * The time it takes to consume.
  437. * @type {number}
  438. */
  439. time:number;
  440. type: 'drink'|'meal'|'candy';
  441. }
  442. export interface ConsumableMenuDefinition{
  443. payment:'cash'|'bank'|'both';
  444. categories:{
  445. [key:string] : {
  446. label:string;
  447. items:{
  448. [key:string] : {
  449. /**
  450. * Overwrites the original items price with a flat number. In case of a function, the original price is taken as input. `Math.round()` is always applied to the result then.
  451. * @type {(number|((n:number)=>number))}
  452. */
  453. price?:number|((n:number)=>number);
  454. }
  455. }
  456. }
  457. }
  458. }
  459. export interface DrugDefinition{
  460. deterioration: number;
  461. effects:{[key: string]:{condition:any; effect:string;}};
  462. byproduct?:DrugByproductDefinition;
  463. /*{
  464. buildup: 1.5,
  465. deterioration: 0.0017,
  466. effects:{
  467. hangover:{
  468. condition:{mainEffectsInactive:true},
  469. effect: 'hangover'
  470. }
  471. }
  472. }*/
  473. }
  474. export interface DrugByproductDefinition extends DrugDefinition{
  475. buildup: number;
  476. }
  477. export interface DrugInCharacter{
  478. vol:number;byproduct?:number;
  479. }
  480. export interface Effect{
  481. /**
  482. * If true, an icon will be displayed in the sidebar. Make sure to specify `desc` and `image` in this case.
  483. * @type {?boolean}
  484. */
  485. sidebar?:boolean;
  486. desc?:string;
  487. image?: string;
  488. /**
  489. * ID of a moodlet that should automatically be enabled while the effect is active.
  490. * @type {string}
  491. */
  492. moodlet?: string;
  493. /**
  494. * Influences variables such as cerebral skill learning. 1 is the default value.
  495. *
  496. * Multiplicative
  497. * @type {number}
  498. */
  499. consciousness?: number;
  500. /**
  501. * Plain reduction of overall pain.
  502. * @type {?number}
  503. */
  504. painReduction?: number;
  505. /**
  506. * Plain increase in pain in bodypart for given reason.
  507. * @type {?{[bodypartId:string]:{[painReasonId:string]:number}}}
  508. */
  509. pain?:{[bodypartId:string]:{[painReasonId:string]:number}};
  510. painGain?:{
  511. [bodypartId:string]:
  512. number
  513. }
  514. /**
  515. * Plain increase in skill.
  516. * @type {?{[skillId:string]:number}}
  517. */
  518. skills?:{[skillId:string]:number};
  519. /**
  520. * Percentage of skill gain. 1 is default. 0.9 would be a 10% decrease in skill gain.
  521. * @type {{
  522. * [skillId:string]:number
  523. * }}
  524. */
  525. skillGain?:{
  526. [skillId:string]:number
  527. }
  528. skillTagGain?:{
  529. [tag:string]:number
  530. }
  531. }
  532. export interface ExpiringVar<T>{
  533. val:T;
  534. til:Date;
  535. }
  536. export interface Filter{
  537. }
  538. export interface ImageRand{
  539. }
  540. export interface ItemDefinition{
  541. /**
  542. * An optional description to be displayed to the player.
  543. * @type {?string}
  544. */
  545. desc?: string;
  546. /**
  547. * Information on how the item behaves if used as furniture.
  548. * @type {?object}
  549. */
  550. furniture?:object;
  551. /**
  552. * Path to the image of the item.
  553. * @type {string}
  554. */
  555. image:string;
  556. /**
  557. * The label that's displayed to the player. Defaults to the id of the item.
  558. * @type {?string}
  559. */
  560. label?:string;
  561. /**
  562. * How many items of the same type fit into a purse.
  563. * @type {?number}
  564. */
  565. limit?:number;
  566. /**
  567. * A passage the player is sent to when he clicks the item in the inventory.
  568. * @type {?string}
  569. */
  570. passage?:string;
  571. /**
  572. * Default price.
  573. * @type {?number}
  574. */
  575. price?: number;
  576. }
  577. export interface JobDefinition{
  578. }
  579. export interface LocationDefinition{
  580. openTimes?:TimespanIdentifier;
  581. }
  582. export interface NPCActivity{
  583. location:string;
  584. activity:string[];
  585. }
  586. export interface NPCDefinition{
  587. passage?:string;
  588. image?:string;
  589. rel?:number;
  590. dna?:string;
  591. firstname?:string;
  592. nickname?:string;
  593. lastname?:string;
  594. usedname?:string;
  595. dob?:number;
  596. gender: EGender;
  597. haircol?:number;
  598. height?:number;
  599. notes?:string;
  600. thdick?:string;
  601. dick?:number;
  602. bust?:number;
  603. spermpot?:number;
  604. sexskill?:number;
  605. rep?:number;
  606. intel?:number;
  607. hotcat_rating?:number;
  608. preference?:{[key:string]:number|number[]};
  609. defaults?:string[];
  610. /**
  611. * Information on where the NPC is and what they do there at a given time.
  612. * @type {?Timetable<NPCActivity>}
  613. */
  614. timetable?:Timetable<NPCActivity>;
  615. }
  616. export interface NPCDefaultDefinition{
  617. }
  618. export interface NPCPreferenceDefinition{
  619. }
  620. export type OutfitDefinition = OutfitDefinitionBodysuit | OutfitDefinitionBra | OutfitDefinitionClothes | OutfitDefinitionCoat | OutfitDefinitionPanties | OutfitDefinitionPurse | OutfitDefinitionShoes | OutfitDefinitionSwimwear;
  621. export interface OutfitDefinitionRaw{
  622. quality: number;
  623. vendor:string;
  624. index: number;
  625. description?: string;
  626. }
  627. export interface OutfitDefinitionBodysuit extends OutfitDefinitionRaw{
  628. type:'bodysuit';
  629. subtype?:number;
  630. material?:number;
  631. fun?:number;
  632. thinness?:number;
  633. cover?:number;
  634. coverFront?:number;
  635. coverBack?:number;
  636. }
  637. export interface OutfitDefinitionBra extends OutfitDefinitionRaw{
  638. type:'bra';
  639. subtype?: number;
  640. fun?: number;
  641. thinness?: number;
  642. material?: number;
  643. cover?: number;
  644. }
  645. export interface OutfitDefinitionClothes extends OutfitDefinitionRaw{
  646. type:'clothes';
  647. subtype:string;
  648. thinness: number;
  649. topcut?: number;
  650. includesBra?: number;
  651. includesPanties?: number;
  652. isDress?:number;
  653. isOnepiece?: number;
  654. inhib?: number;
  655. pantsShortness?:number;
  656. skirtShortness?:number;
  657. coverTop?:number;
  658. coverBack?:number;
  659. coverFront?:number;
  660. /**
  661. * 4 seems to be prostitution.
  662. * @type {number}
  663. */
  664. style?: number;
  665. style2?: number;
  666. style3?:number;
  667. bimbo?:number;
  668. }
  669. export interface OutfitDefinitionCoat extends OutfitDefinitionRaw{
  670. type:'coat';
  671. warm:number;
  672. }
  673. export interface OutfitDefinitionPanties extends OutfitDefinitionRaw{
  674. type:'panties';
  675. subtype?: number;
  676. fun?: number;
  677. thinness?: number;
  678. material?: number;
  679. coverBack?:number;
  680. coverFront?:number;
  681. }
  682. export interface OutfitDefinitionPurse extends OutfitDefinitionRaw{
  683. type:'purse';
  684. }
  685. export interface OutfitDefinitionShoes extends OutfitDefinitionRaw{
  686. type:'shoes';
  687. style?:number;
  688. cut?:number;
  689. heels?:number;
  690. }
  691. export interface OutfitDefinitionSwimwear extends OutfitDefinitionRaw{
  692. type:'swimwear';
  693. subtype?:string;
  694. thinness:number;
  695. topcut?:number;
  696. coverTop?:number;
  697. coverFront?:number;
  698. coverBack?:number;
  699. includesBra?:number;
  700. includesPanties:number;
  701. isOnepiece?:number;
  702. bimbo?:number;
  703. inhib:number;
  704. }
  705. export type OutfitOwned = OutfitDefinition & OutfitOwnerShipData;
  706. export interface OutfitOwnerShipData{
  707. h?:number;
  708. l?:number;
  709. bmi?:number;
  710. }
  711. export interface PainReasonDefinition{
  712. /**
  713. * How much the pain deteriorats each hour.
  714. * @type {number}
  715. */
  716. deterioration: number;
  717. label: string;
  718. description:string;
  719. }
  720. export interface PersonalityScaleDefinition{
  721. /**
  722. * Hide this from the player if true. Will not appear in lists and won't be mentioned in dialogs.
  723. * @type {?boolean}
  724. */
  725. hidden?:boolean;
  726. start: number;
  727. interval: number[];
  728. label: string | string[];
  729. desc?: string;
  730. image?:string;
  731. msg_tooHigh?:string;
  732. msg_tooLow?:string;
  733. functions?:{[key:string]:(any:any) => any}
  734. }
  735. export interface SkillDefinition{
  736. label ?: string;
  737. description?:string;
  738. descibtionByLevel?:{[key:number]: string};
  739. image?:string;
  740. dailyExpLimit?:number|((levelAtStartOfDay:number)=>number);
  741. /**
  742. * If true, the amount of gained experience depends on the difficulty of a task.
  743. * @type {?boolean}
  744. */
  745. isDifficultyBased?:boolean;
  746. /**
  747. * Hide this skill from players in overviews when set to true.
  748. * @type {?boolean}
  749. */
  750. hidden?: boolean;
  751. /**
  752. * A function that provides a skill level.
  753. * @type {(skillLevel:number)=>number} Experience
  754. */
  755. e2s?: (skillLevel:number)=>number;
  756. /**
  757. * A function that provides a number of required skillpoints.
  758. * @type {(skillLevel:number)=>number} Skill Level
  759. */
  760. s2e?: (skillLevel:number)=>number;
  761. functions?: {[functionId:string]:(any:any) => any};
  762. }
  763. export interface SkillOfCharacter{
  764. /**
  765. * The maximum number the experience can reach. 0 if disabled.
  766. * @type {number}
  767. */
  768. ceil:number;
  769. /**
  770. * Current number of experience points.
  771. * @type {number}
  772. */
  773. experience:number;
  774. /**
  775. * History of this skill for the last days.
  776. * @type {number[]}
  777. */
  778. experienceHistory:number[];
  779. /**
  780. * The minimum number the experience can reach.
  781. * @type {number}
  782. */
  783. floor: number;
  784. /**
  785. * The last daystart this skill has been used.
  786. * @type {number}
  787. */
  788. lastUsed: number;
  789. }
  790. export interface TimespanIdentifier{
  791. days?: ('MO'|'TU'|'WE'|'TH'|'FR'|'SA'|'SU'|'work')[];
  792. daysBL?: ('MO'|'TU'|'WE'|'TH'|'FR'|'SA'|'SU'|'work')[];
  793. /**
  794. * True: The day needs to be a school holiday. False: The day needs to be
  795. * @type {?boolean}
  796. */
  797. holiday?:EDayVacationState;
  798. /*vacation?:boolean;*/
  799. begin?:number[];
  800. end?:number[];
  801. }
  802. export interface Timetable<T>{
  803. [key:string]:{
  804. time: TimespanIdentifier;
  805. result?: T;
  806. subtable?:Timetable<T>;
  807. either?:T[];
  808. }
  809. }
  810. export interface WardrobeSettings{
  811. /**
  812. * Maximum difference of the bmi-value of bought and worn clothes.
  813. * @type {number}
  814. */
  815. bmiSizeMaxDifference: number;
  816. }
  817. export interface WornOutfitDefinition{
  818. bra: string,
  819. coat: string,
  820. clothes: string,
  821. panties: string,
  822. purse: string,
  823. shoes: string
  824. }
  825. }
  826. export { };