kolmafia 4.0.1 → 26745.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.
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ // Generated by KoLmafia r26745
1
2
  export function abort(string: string): never;
2
3
  export function abort(): never;
3
4
  export function absorbedMonsters(): { [monster: string]: boolean };
@@ -55,7 +56,7 @@ export function buysItem(master: Coinmaster, item: Item): boolean;
55
56
  export function canAdventure(arg: Location): boolean;
56
57
  export function canDrink(): boolean;
57
58
  export function canEat(): boolean;
58
- export function canEquip(itemOrFamiliar: Item): boolean;
59
+ export function canEquip(equipment: Item): boolean;
59
60
  export function canEquip(familiar: Familiar): boolean;
60
61
  export function canEquip(familiar: Familiar, item: Item): boolean;
61
62
  export function canFaxbot(arg: Monster): boolean;
@@ -487,6 +488,7 @@ export function prepareForAdventure(arg: Location): boolean;
487
488
  export function print(): void;
488
489
  export function print(string: string): void;
489
490
  export function print(string: string, color: string): void;
491
+ export function printHtml(string: string, logToSession: boolean): void;
490
492
  export function printHtml(string: string): void;
491
493
  export function propertyDefaultValue(nameValue: string): string;
492
494
  export function propertyExists(nameValue: string): boolean;
package/package.json CHANGED
@@ -1,23 +1,14 @@
1
1
  {
2
- "name": "kolmafia",
3
- "version": "4.0.1",
4
- "description": "Typings and stubs for the KoLmafia JS standard library",
5
- "main": "index",
6
- "types": "index",
7
- "repository": "https://github.com/Loathing-Associates-Scripting-Society/kolmafia-js",
8
- "author": "Sam Gaus",
9
- "license": "MIT",
10
- "private": false,
11
- "devDependencies": {
12
- "prettier": "^2.3.0",
13
- "ts-expect": "^1.3.0",
14
- "typescript": "^4.1.2"
15
- },
16
- "scripts": {
17
- "test": "tsc"
18
- },
19
- "files": [
20
- "index.d.ts",
21
- "contrib/*.d.ts"
22
- ]
23
- }
2
+ "name": "kolmafia",
3
+ "version": "26745.0.0",
4
+ "description": "Typings for the KoLmafia JS standard library",
5
+ "main": "index",
6
+ "types": "index",
7
+ "repository": "https://github.com/kolmafia/kolmafia",
8
+ "author": "KoLmafia Team",
9
+ "license": "MIT",
10
+ "private": false,
11
+ "files": [
12
+ "index.d.ts"
13
+ ]
14
+ }
package/README.md DELETED
@@ -1,14 +0,0 @@
1
- kolmafia-js
2
- =======
3
-
4
- Install this dependency to your mafia JS script to get TypeScript typings for the mafia standard library!
5
-
6
- If you are using a bundler (which you probably are) you will need to mark this as an external module so that the `require("kolmafia")` is kept in tact.
7
-
8
- For example, in `webpack` you would add the following to your config
9
-
10
- ```
11
- externals: {
12
- kolmafia: 'commonjs kolmafia',
13
- }
14
- ```
@@ -1,32 +0,0 @@
1
- /**
2
- * @file Type definition for EatDrink, made by dj_d.
3
- *
4
- * - ASH script name: EatDrink
5
- * - ASH script version: 3.2
6
- * - ASH script authors: dj_d
7
- *
8
- * Links:
9
- * - ASH script forum thread: https://kolmafia.us/threads/eatdrink-ash-optimize-your-daily-diet-and-see-how-your-old-diet-stacks-up.1519/
10
- */
11
-
12
- /**
13
- * @return Net number of adventures gained
14
- */
15
- export function eatdrink(
16
- foodMax: number,
17
- drinkMax: number,
18
- spleenMax: number,
19
- overdrink: boolean
20
- ): number;
21
-
22
- export function eatdrink(
23
- foodMax: number,
24
- drinkMax: number,
25
- spleenMax: number,
26
- overdrink: boolean,
27
- advmeat: number,
28
- primemeat: number,
29
- offmeat: number,
30
- pullmeat: number,
31
- sim: boolean
32
- ): void;
@@ -1,43 +0,0 @@
1
- /**
2
- * @file Type definition for PriceAdvisor, made by aqualectrix.
3
- *
4
- * - ASH script name: PriceAdvisor
5
- * - ASH script version: 1.62
6
- * - ASH script authors: aqualectrix
7
- *
8
- * Links:
9
- * - ASH script forum thread: https://kolmafia.us/threads/priceadvisor-maximize-your-profits.3110/
10
- */
11
-
12
- import { Item } from "..";
13
-
14
- export interface PriceAdvice {
15
- /** Action command that can be executed in the gCLI */
16
- action: string;
17
- /** Expected meat gain from the action. A floating-point number. */
18
- price: number;
19
- }
20
-
21
- /**
22
- * Calculates the most profitable advice for `item`.
23
- * @param item
24
- * @param considerMore
25
- * @return Most profitable advice with respect to `considerMore`
26
- */
27
- export function bestAdvice(it: Item, considerMore: boolean): PriceAdvice;
28
-
29
- /**
30
- * Calculates all possible advices which have a positive profit.
31
- * @param item
32
- * @param considerMore
33
- * @return All profitable advices for `item`, sorted from best to worst
34
- */
35
- export function priceAdvisor(
36
- it: Item,
37
- considerMore: boolean
38
- ): {[key: number]: PriceAdvice};
39
-
40
- /**
41
- * Resets the internal price advice cache.
42
- */
43
- export function clearAdviceCache(): void;
@@ -1,20 +0,0 @@
1
- /**
2
- * @file Type definition for CanAdv, made by dj_d.
3
- *
4
- * - ASH script name: CanAdv
5
- * - ASH script version: r109
6
- * - ASH script authors: zarqon, Theraze
7
- *
8
- * Links:
9
- * - ASH script forum thread: https://kolmafia.us/threads/canadv-check-whether-you-can-adventure-at-a-given-location.2027/
10
- */
11
-
12
- import { Location } from "..";
13
-
14
- /**
15
- * Checks if the player can adventure at `location`.
16
- * @param location
17
- * @param prep If `true`, will equip items, use potions, etc. to meet
18
- * requirements for visiting the location. Default is `false`
19
- */
20
- export function canAdv(where: Location, prep?: boolean): boolean;
@@ -1,65 +0,0 @@
1
- /**
2
- * @file Type definition for Zlib, made by zarqon.
3
- *
4
- * - ASH script name: Zlib
5
- * - ASH script version: r49
6
- * - ASH script authors: zarqon
7
- *
8
- * Links:
9
- * - ASH script forum thread: https://kolmafia.us/threads/zlib-zarqons-useful-function-library.2072/
10
- * - Wiki page: https://wiki.kolmafia.us/index.php?title=Zlib
11
- */
12
-
13
- import { Bounty, Class, Coinmaster, Effect, Element, Familiar, Item, Location, Monster, Phylum, Servant, Skill, Stat, Thrall, Vykea } from "..";
14
-
15
- export function kmail(to: string, message: string, meat: number): boolean;
16
-
17
- export function setvar(
18
- varname: string,
19
- defaultValue: string,
20
- type:
21
- | 'string'
22
- | 'boolean'
23
- | 'bounty'
24
- | 'class'
25
- | 'coinmaster'
26
- | 'effect'
27
- | 'element'
28
- | 'familiar'
29
- | 'float'
30
- | 'int'
31
- | 'item'
32
- | 'location'
33
- | 'monster'
34
- | 'phylum'
35
- | 'servant'
36
- | 'skill'
37
- | 'stat'
38
- | 'thrall'
39
- | 'vykea'
40
- ): void;
41
-
42
- export function setvar(
43
- varname: string,
44
- defaultValue:
45
- | string
46
- | boolean
47
- | Bounty
48
- | Class
49
- | Coinmaster
50
- | Effect
51
- | Element
52
- | Familiar
53
- | number
54
- | Item
55
- | Location
56
- | Monster
57
- | Phylum
58
- | Servant
59
- | Skill
60
- | Stat
61
- | Thrall
62
- | Vykea
63
- ): void;
64
-
65
- export function getvar(varname: string): string;