@pma-network/redm-types 0.0.7 → 0.0.11
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/PMAPlayer.d.ts +0 -45
- package/PMAPlayer.js +0 -10
- package/package.json +1 -1
package/PMAPlayer.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ItemName, OptionalItem } from "./Inventory";
|
|
2
1
|
export type Source = number;
|
|
3
2
|
export type PlayerUID = number;
|
|
4
3
|
export type CallSign = string | undefined;
|
|
@@ -6,47 +5,3 @@ export type PlayerJob = {
|
|
|
6
5
|
name: string;
|
|
7
6
|
rank: number;
|
|
8
7
|
};
|
|
9
|
-
export declare abstract class AbstractPMAPlayer {
|
|
10
|
-
abstract get_sex(): number;
|
|
11
|
-
abstract get_height(): number;
|
|
12
|
-
abstract get_dob(): string;
|
|
13
|
-
abstract get_unique_id(): PlayerUID;
|
|
14
|
-
abstract get_call_sign(): CallSign;
|
|
15
|
-
abstract get_character_name(): string;
|
|
16
|
-
abstract get_log_name(): string;
|
|
17
|
-
abstract get_item(item_name: ItemName): OptionalItem;
|
|
18
|
-
/**
|
|
19
|
-
* Adds the item with {@param item_name} to the players next free slot
|
|
20
|
-
* @throws This will throw an error if {@param item_name} is invalid, or if {@param quantity} is negative
|
|
21
|
-
* @returns the {@link InventoryItem} that was created, or undefined if there wasn't a free slot to put the item into.
|
|
22
|
-
*/
|
|
23
|
-
abstract add_item(item_name: ItemName, quantity: number): OptionalItem;
|
|
24
|
-
/**
|
|
25
|
-
* Removes the item with {@param item_name} from the players inventory
|
|
26
|
-
* @throws This will throw an error if there wasn't enough {@param quantity} in the players inventory, you should use use has_enough_of_item to check before calling
|
|
27
|
-
*/
|
|
28
|
-
abstract remove_item(item_name: ItemName, quantity: number): void;
|
|
29
|
-
/**
|
|
30
|
-
* Checks if the player has enough of {@param item_name}
|
|
31
|
-
* @returns `true` if they had enough {@param quantity}, `false` otherwise
|
|
32
|
-
*/
|
|
33
|
-
abstract has_enough_of_item(item_name: ItemName, quantity: number): boolean;
|
|
34
|
-
abstract get_job(): PlayerJob;
|
|
35
|
-
/**
|
|
36
|
-
* Sets the players job to the specified {@param job_name} and {@param rank}
|
|
37
|
-
* @throws This will throw if the players job is invalid
|
|
38
|
-
*/
|
|
39
|
-
abstract set_job(job_name: string, rank: number): void;
|
|
40
|
-
abstract get_bank(): number;
|
|
41
|
-
/**
|
|
42
|
-
* Adds the {@param positive_amount} to the players bank.
|
|
43
|
-
* @throws if {@param positive_amount} is negative this will throw an error.
|
|
44
|
-
*/
|
|
45
|
-
abstract add_to_bank(positive_amount: number): void;
|
|
46
|
-
/**
|
|
47
|
-
* Removes the {@param negative_amount} to the players bank.
|
|
48
|
-
* @throws if {@param negative_amount} is positive this will throw an error.
|
|
49
|
-
*/
|
|
50
|
-
abstract remove_from_bank(negative_amount: number): void;
|
|
51
|
-
abstract save(): Promise<void>;
|
|
52
|
-
}
|
package/PMAPlayer.js
CHANGED