-
Notifications
You must be signed in to change notification settings - Fork 0
/
Equipment.ts
103 lines (101 loc) · 2.98 KB
/
Equipment.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import type { Boots } from './items/Boots';
import type { Bracelets } from './items/Bracelets';
import type { Chestplate } from './items/Chestplate';
import type { Gloves } from './items/Gloves';
import type { Helmet } from './items/Helmet';
import type { Leggings } from './items/Leggings';
import type { Necklace } from './items/Necklace';
import type { Offhand } from './items/Offhand';
import type { Shirt } from './items/Shirt';
import type { Weapon } from './items/Weapon';
/**
* Creates equipment with the given parameters.
* @category Equipment
*/
export class Equipment {
/**
* Determines the helmet of the equipment.
* @see {@link Helmet | Helmet class} for more details.
*/
public helmet: Helmet | null;
/**
* Determines the necklace of the equipment.
* @see {@link Necklace | Necklace class} for more details.
*/
public necklace: Necklace | null;
/**
* Determines the shirt of the equipment.
* @see {@link Shirt | Shirt class} for more details.
*/
public shirt: Shirt | null;
/**
* Determines the chestplate of the equipment.
* @see {@link Chestplate | Chestplate class} for more details.
*/
public chestplate: Chestplate | null;
/**
* Determines the gloves of the equipment.
* @see {@link Gloves | Gloves class} for more details.
*/
public gloves: Gloves | null;
/**
* Determines the bracelets of the equipment.
* @see {@link Bracelets | Bracelets class} for more details.
*/
public bracelets: Bracelets | null;
/**
* Determines the leggings of the equipment.
* @see {@link Leggings | Leggings class} for more details.
*/
public leggings: Leggings | null;
/**
* Determines the boots of the equipment.
* @see {@link Boots | Boots class} for more details.
*/
public boots: Boots | null;
/**
* Determines the weapon of the equipment.
* @see {@link Weapon | Weapon class} for more details.
*/
public weapon: Weapon | null;
/**
* Determines the offhand of the equipment.
* @see {@link Offhand | Offhand class} for more details.
*/
public offhand: Offhand | null;
public constructor(
helmet: Helmet | null = null,
necklace: Necklace | null = null,
shirt: Shirt | null = null,
chestplate: Chestplate | null = null,
gloves: Gloves | null = null,
bracelets: Bracelets | null = null,
leggings: Leggings | null = null,
boots: Boots | null = null,
weapon: Weapon | null = null,
offhand: Offhand | null = null
) {
this.helmet = helmet;
this.necklace = necklace;
this.shirt = shirt;
this.chestplate = chestplate;
this.gloves = gloves;
this.bracelets = bracelets;
this.leggings = leggings;
this.boots = boots;
this.weapon = weapon;
this.offhand = offhand;
}
public *[Symbol.iterator]() {
yield this.necklace;
yield this.shirt;
yield this.chestplate;
yield this.gloves;
yield this.bracelets;
yield this.leggings;
yield this.helmet;
yield this.boots;
yield this.weapon;
yield this.offhand;
}
}