@wayward/types 2.14.0-beta.dev.20231213.1 → 2.14.0-beta.dev.20231214.1
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/definitions/game/game/entity/player/IPlayer.d.ts +12 -3
- package/definitions/game/game/entity/player/Player.d.ts +2 -8
- package/definitions/game/game/entity/skill/ISkills.d.ts +1 -0
- package/definitions/game/game/entity/skill/SkillManager.d.ts +2 -0
- package/definitions/game/language/dictionary/UiTranslation.d.ts +4 -4
- package/definitions/game/resource/IResourceLoader.d.ts +13 -12
- package/definitions/game/ui/component/Text.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/dialog/ISkillsDialog.d.ts +2 -1
- package/definitions/game/ui/screen/screens/game/dialog/MilestonesDialog.d.ts +22 -22
- package/definitions/game/ui/screen/screens/game/dialog/SkillsDialog.d.ts +26 -17
- package/definitions/game/ui/screen/screens/game/dialog/unlockables/UnlockablesDialog.d.ts +70 -0
- package/package.json +1 -1
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
import type { Events } from "@wayward/utilities/event/EventEmitter";
|
|
12
|
-
import type { TitleType } from "@wayward/game/game/entity/action/actions/SetTitle";
|
|
13
11
|
import type Human from "@wayward/game/game/entity/Human";
|
|
14
12
|
import type { HairColor, HairStyle, SkillType, SkinColor } from "@wayward/game/game/entity/IHuman";
|
|
13
|
+
import type { TitleType } from "@wayward/game/game/entity/action/actions/SetTitle";
|
|
15
14
|
import type { IMessage } from "@wayward/game/game/entity/player/IMessageManager";
|
|
16
15
|
import type MessageManager from "@wayward/game/game/entity/player/MessageManager";
|
|
17
|
-
import type { INote } from "@wayward/game/game/entity/player/note/NoteManager";
|
|
18
16
|
import type Player from "@wayward/game/game/entity/player/Player";
|
|
17
|
+
import type { INote } from "@wayward/game/game/entity/player/note/NoteManager";
|
|
19
18
|
import { ItemType } from "@wayward/game/game/item/IItem";
|
|
20
19
|
import type { Prompt } from "@wayward/game/game/meta/prompt/IPrompt";
|
|
21
20
|
import type { Milestone } from "@wayward/game/game/milestones/IMilestone";
|
|
22
21
|
import type InterruptChoice from "@wayward/game/language/dictionary/InterruptChoice";
|
|
23
22
|
import { Direction } from "@wayward/game/utilities/math/Direction";
|
|
24
23
|
import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
24
|
+
import type { Events } from "@wayward/utilities/event/EventEmitter";
|
|
25
25
|
export interface IPlayerEvents extends Events<Human> {
|
|
26
26
|
/**
|
|
27
27
|
* Called when a message is being displayed for a player
|
|
@@ -217,3 +217,12 @@ export interface IWalkPath {
|
|
|
217
217
|
path: IVector2[];
|
|
218
218
|
force?: boolean;
|
|
219
219
|
}
|
|
220
|
+
export interface IPlayerTitleMilestone {
|
|
221
|
+
milestone: Milestone;
|
|
222
|
+
skill?: undefined;
|
|
223
|
+
}
|
|
224
|
+
export interface IPlayerTitleSkill {
|
|
225
|
+
skill: SkillType;
|
|
226
|
+
milestone?: undefined;
|
|
227
|
+
}
|
|
228
|
+
export type PlayerTitle = IPlayerTitleMilestone | IPlayerTitleSkill;
|
|
@@ -15,7 +15,7 @@ import { SkillType } from "@wayward/game/game/entity/IHuman";
|
|
|
15
15
|
import type { IDamageInfo } from "@wayward/game/game/entity/creature/ICreature";
|
|
16
16
|
import { CreatureType } from "@wayward/game/game/entity/creature/ICreature";
|
|
17
17
|
import type NPC from "@wayward/game/game/entity/npc/NPC";
|
|
18
|
-
import type { IMovementIntent, IPlayerEvents } from "@wayward/game/game/entity/player/IPlayer";
|
|
18
|
+
import type { IMovementIntent, IPlayerEvents, PlayerTitle } from "@wayward/game/game/entity/player/IPlayer";
|
|
19
19
|
import MessageManager from "@wayward/game/game/entity/player/MessageManager";
|
|
20
20
|
import NoteManager from "@wayward/game/game/entity/player/note/NoteManager";
|
|
21
21
|
import QuestManager from "@wayward/game/game/entity/player/quest/QuestManager";
|
|
@@ -50,13 +50,7 @@ export default class Player extends Human<number, ReferenceType.Player> implemen
|
|
|
50
50
|
useActionsWhileMoving: boolean;
|
|
51
51
|
revealedItems: SaferNumberIndexedObject<boolean>;
|
|
52
52
|
milestoneModifiers: Set<Milestone>;
|
|
53
|
-
title?:
|
|
54
|
-
milestone: Milestone;
|
|
55
|
-
skill?: undefined;
|
|
56
|
-
} | {
|
|
57
|
-
skill: SkillType;
|
|
58
|
-
milestone?: undefined;
|
|
59
|
-
};
|
|
53
|
+
title?: PlayerTitle;
|
|
60
54
|
displayCreature?: CreatureType;
|
|
61
55
|
private updateTablesOnNoInput?;
|
|
62
56
|
private lastTableUpdateId?;
|
|
@@ -36,6 +36,7 @@ export type SkillSet = Record<SkillType, ISkillLevel>;
|
|
|
36
36
|
export interface ISkillHost extends EventEmitter.Host<ISkillEvents> {
|
|
37
37
|
readonly id: number;
|
|
38
38
|
readonly island: Island;
|
|
39
|
+
readonly turns: number;
|
|
39
40
|
}
|
|
40
41
|
export default class SkillManager {
|
|
41
42
|
private readonly configuration;
|
|
@@ -70,6 +71,7 @@ export default class SkillManager {
|
|
|
70
71
|
* @returns The total skill (combination of all other skills). Ignores skill bonuses.
|
|
71
72
|
*/
|
|
72
73
|
getTotal(): number;
|
|
74
|
+
getModificationTurn(skill: SkillType): number;
|
|
73
75
|
all(): Array<{
|
|
74
76
|
bonus: number;
|
|
75
77
|
core: number;
|
|
@@ -61,10 +61,10 @@ declare enum UiTranslation {
|
|
|
61
61
|
GameDialogMilestonesMilestone = 46,
|
|
62
62
|
GameDialogMilestonesTooltipMystery = 47,
|
|
63
63
|
GameDialogMilestonesTooltipInvisible = 48,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
GameDialogUnlockablesHeadingNotUnlockableInMode = 49,
|
|
65
|
+
GameDialogUnlockablesHeadingAlreadyUnlocked = 50,
|
|
66
|
+
GameDialogUnlockablesParagraphNoMoreUnlockable = 51,
|
|
67
|
+
GameDialogUnlockablesLabelPlusHidden = 52,
|
|
68
68
|
GameDialogSkillsSkill = 53,
|
|
69
69
|
GameDialogSkillsSkillHover = 54,
|
|
70
70
|
GameDialogMapDurability = 55,
|
|
@@ -38,16 +38,17 @@ export declare enum PathType {
|
|
|
38
38
|
Pin = 26,
|
|
39
39
|
Quality = 27,
|
|
40
40
|
RecipeLevel = 28,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
SkillIcon = 29,
|
|
42
|
+
Sleep = 30,
|
|
43
|
+
SoundEffect = 31,
|
|
44
|
+
StatIcon = 32,
|
|
45
|
+
StatusEffectIcon = 33,
|
|
46
|
+
StatusEffectOverlay = 34,
|
|
47
|
+
Terrain = 35,
|
|
48
|
+
TerrainDecoration = 36,
|
|
49
|
+
TerrainMound = 37,
|
|
50
|
+
TerrainTilled = 38,
|
|
51
|
+
TileEvent = 39,
|
|
52
|
+
Vehicle = 40,
|
|
53
|
+
Website = 41
|
|
53
54
|
}
|
|
@@ -54,7 +54,7 @@ export default class Text extends Component {
|
|
|
54
54
|
*/
|
|
55
55
|
hasText(): boolean;
|
|
56
56
|
isEmpty(): boolean;
|
|
57
|
-
refresh(): this
|
|
57
|
+
refresh(): this;
|
|
58
58
|
dump(filter?: (element: HTMLElement, component?: Component) => boolean): this;
|
|
59
59
|
private readonly refreshEvents;
|
|
60
60
|
/**
|
|
@@ -8,33 +8,33 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
import
|
|
11
|
+
import { TitleType } from "@wayward/game/game/entity/action/actions/SetTitle";
|
|
12
12
|
import { Milestone } from "@wayward/game/game/milestones/IMilestone";
|
|
13
|
+
import { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
|
|
14
|
+
import Translation from "@wayward/game/language/Translation";
|
|
15
|
+
import type Component from "@wayward/game/ui/component/Component";
|
|
13
16
|
import Bindable from "@wayward/game/ui/input/Bindable";
|
|
14
|
-
import
|
|
17
|
+
import { MilestoneSort } from "@wayward/game/ui/screen/screens/game/dialog/IMilestonesDialog";
|
|
18
|
+
import UnlockablesDialog, { UnlockablesSection } from "@wayward/game/ui/screen/screens/game/dialog/unlockables/UnlockablesDialog";
|
|
15
19
|
import { MenuBarButtonType } from "@wayward/game/ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
private readonly sectionUnlockableInMode;
|
|
21
|
-
private readonly sectionNotUnlockableInMode;
|
|
22
|
-
private readonly sectionHidden;
|
|
23
|
-
private readonly noticeMilestonesHidden;
|
|
24
|
-
private sortData;
|
|
20
|
+
export declare enum MilestonesDialogClasses {
|
|
21
|
+
Main = "game-dialog-milestones"
|
|
22
|
+
}
|
|
23
|
+
export default class MilestonesDialog extends UnlockablesDialog<Milestone, MilestoneSort> {
|
|
25
24
|
constructor();
|
|
26
|
-
private getHiddenMilestoneCount;
|
|
27
|
-
private getMilestoneSectionComponent;
|
|
28
25
|
getBindable(): Bindable;
|
|
29
26
|
getIcon(): MenuBarButtonType;
|
|
30
|
-
protected
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
protected getUnlockablesName(): Translation;
|
|
28
|
+
protected getPlayerTitleType(): TitleType;
|
|
29
|
+
protected getReferenceType(): ReferenceType;
|
|
30
|
+
protected getSortEnum(): typeof MilestoneSort;
|
|
31
|
+
protected getDefaultSort(): MilestoneSort;
|
|
32
|
+
protected getUnlockables(): Milestone[];
|
|
33
|
+
protected getUnlockableTranslator(milestone: Milestone): SupplierOr<Translation>;
|
|
34
|
+
protected translateSort(sort: MilestoneSort): Translation;
|
|
35
|
+
protected getUnlockableSection(milestone: Milestone): UnlockablesSection;
|
|
36
|
+
protected getProgress(milestone: Milestone): number;
|
|
37
|
+
protected sortUnlockables(sort: MilestoneSort): ([a]: [Milestone, Component], [b]: [Milestone, Component]) => number;
|
|
38
|
+
protected getFilterString(milestone: Milestone): string;
|
|
33
39
|
onMilestoneUpdate(_: any, milestone: Milestone): void;
|
|
34
|
-
protected onTickEnd(): void;
|
|
35
|
-
private sortHash?;
|
|
36
|
-
private sort;
|
|
37
|
-
private sortMilestones;
|
|
38
|
-
private filter;
|
|
39
|
-
private getFilterString;
|
|
40
40
|
}
|
|
@@ -8,27 +8,36 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
import
|
|
11
|
+
import { SkillType } from "@wayward/game/game/entity/IHuman";
|
|
12
|
+
import { TitleType } from "@wayward/game/game/entity/action/actions/SetTitle";
|
|
13
|
+
import { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
|
|
14
|
+
import Translation from "@wayward/game/language/Translation";
|
|
15
|
+
import type Component from "@wayward/game/ui/component/Component";
|
|
12
16
|
import Bindable from "@wayward/game/ui/input/Bindable";
|
|
13
|
-
import
|
|
17
|
+
import { SkillSort } from "@wayward/game/ui/screen/screens/game/dialog/ISkillsDialog";
|
|
18
|
+
import UnlockablesDialog, { UnlockablesSection } from "@wayward/game/ui/screen/screens/game/dialog/unlockables/UnlockablesDialog";
|
|
14
19
|
import { MenuBarButtonType } from "@wayward/game/ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private readonly inputFilter;
|
|
18
|
-
private readonly sortRow;
|
|
19
|
-
private sortData;
|
|
20
|
+
import type { HighlightSelector, IHighlight } from "@wayward/game/ui/util/IHighlight";
|
|
21
|
+
export default class SkillsDialog extends UnlockablesDialog<SkillType, SkillSort> {
|
|
20
22
|
constructor();
|
|
21
23
|
getBindable(): Bindable;
|
|
22
24
|
getIcon(): MenuBarButtonType;
|
|
23
|
-
protected
|
|
24
|
-
protected
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
protected getUnlockablesName(): Translation;
|
|
26
|
+
protected getUnlockableSection(skill: SkillType): UnlockablesSection;
|
|
27
|
+
protected getUnlockables(): readonly SkillType[];
|
|
28
|
+
protected getSortEnum(): typeof SkillSort;
|
|
29
|
+
protected translateSort(sort: SkillSort): Translation;
|
|
30
|
+
protected getPlayerTitleType(): TitleType;
|
|
31
|
+
protected getDefaultSort(): SkillSort;
|
|
32
|
+
protected getReferenceType(): ReferenceType;
|
|
33
|
+
protected canSetTitle(skill: SkillType): boolean;
|
|
34
|
+
protected getUnlockableTranslator(skill: SkillType): SupplierOr<Translation>;
|
|
35
|
+
protected getProgress(skill: SkillType): number;
|
|
36
|
+
protected getHighlightSelector(skill: SkillType): HighlightSelector | undefined;
|
|
37
|
+
protected getHighlight(skill: SkillType): IHighlight | undefined;
|
|
38
|
+
protected sortUnlockables(sort: SkillSort): ([a]: [SkillType, Component], [b]: [SkillType, Component]) => number;
|
|
39
|
+
protected shouldShowUnlockable(skill: SkillType, filterText: string): boolean;
|
|
40
|
+
protected getFilterString(skill: SkillType): string;
|
|
33
41
|
private getMagicalItems;
|
|
42
|
+
protected updateSkill(_: any, skill: SkillType): void;
|
|
34
43
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2023 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import { TitleType } from "@wayward/game/game/entity/action/actions/SetTitle";
|
|
12
|
+
import type Player from "@wayward/game/game/entity/player/Player";
|
|
13
|
+
import type { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
|
|
14
|
+
import Translation from "@wayward/game/language/Translation";
|
|
15
|
+
import Button from "@wayward/game/ui/component/Button";
|
|
16
|
+
import Component from "@wayward/game/ui/component/Component";
|
|
17
|
+
import { Paragraph } from "@wayward/game/ui/component/Text";
|
|
18
|
+
import { DialogId } from "@wayward/game/ui/screen/screens/game/Dialogs";
|
|
19
|
+
import Dialog from "@wayward/game/ui/screen/screens/game/component/Dialog";
|
|
20
|
+
import DialogSortFilter from "@wayward/game/ui/screen/screens/game/component/DialogSortFilter";
|
|
21
|
+
import type { HighlightSelector, IHighlight } from "@wayward/game/ui/util/IHighlight";
|
|
22
|
+
export declare enum UnlockablesDialogClasses {
|
|
23
|
+
Main = "game-dialog-unlockables",
|
|
24
|
+
Section = "game-dialog-unlockables-section",
|
|
25
|
+
SectionHeading = "game-dialog-unlockables-section-heading",
|
|
26
|
+
Row = "game-dialog-unlockables-row",
|
|
27
|
+
Notice = "game-dialog-unlockables-notice"
|
|
28
|
+
}
|
|
29
|
+
export declare enum UnlockablesSection {
|
|
30
|
+
Unlocked = 0,
|
|
31
|
+
UnlockableInMode = 1,
|
|
32
|
+
NotUnlockableInMode = 2,
|
|
33
|
+
Hidden = 3
|
|
34
|
+
}
|
|
35
|
+
export default abstract class UnlockablesDialog<UNLOCKABLE extends number, SORT extends number> extends Dialog {
|
|
36
|
+
readonly rows: Map<UNLOCKABLE, Button>;
|
|
37
|
+
readonly sectionUnlocked: Component;
|
|
38
|
+
readonly sectionUnlockableInMode: Component;
|
|
39
|
+
readonly sectionNotUnlockableInMode: Component;
|
|
40
|
+
readonly sectionHidden: Component;
|
|
41
|
+
readonly noticeRowsHidden: Paragraph;
|
|
42
|
+
readonly sortFilterRow: DialogSortFilter<SORT>;
|
|
43
|
+
constructor(id: DialogId);
|
|
44
|
+
protected abstract getUnlockablesName(): Translation;
|
|
45
|
+
protected abstract getSortEnum(): any;
|
|
46
|
+
protected abstract getDefaultSort(): SORT;
|
|
47
|
+
protected abstract translateSort(sort: SORT): Translation;
|
|
48
|
+
protected abstract getUnlockables(): readonly UNLOCKABLE[];
|
|
49
|
+
protected abstract getPlayerTitleType(): TitleType;
|
|
50
|
+
protected abstract getUnlockableSection(unlockable: UNLOCKABLE): UnlockablesSection;
|
|
51
|
+
protected abstract getProgress(unlockable: UNLOCKABLE): number;
|
|
52
|
+
protected abstract getReferenceType(): ReferenceType;
|
|
53
|
+
protected abstract getUnlockableTranslator(unlockable: UNLOCKABLE): SupplierOr<Translation>;
|
|
54
|
+
protected abstract sortUnlockables(sort: SORT): ([a]: [UNLOCKABLE, Component], [b]: [UNLOCKABLE, Component]) => number;
|
|
55
|
+
protected abstract getFilterString(unlockable: UNLOCKABLE): string;
|
|
56
|
+
protected getHighlight?(unlockable: UNLOCKABLE): IHighlight | undefined;
|
|
57
|
+
protected getHighlightSelector?(unlockable: UNLOCKABLE): HighlightSelector | undefined;
|
|
58
|
+
protected canSetTitle(unlockable: UNLOCKABLE): boolean;
|
|
59
|
+
protected shouldShowUnlockable(unlockable: UNLOCKABLE, filterText: string): boolean;
|
|
60
|
+
protected getSectionComponent(section: UnlockablesSection): Component;
|
|
61
|
+
protected getHiddenCount(): number;
|
|
62
|
+
onPlayerChangeTitle(player: Player): void;
|
|
63
|
+
private getTitleTypeName;
|
|
64
|
+
private hadUpdate;
|
|
65
|
+
protected refreshUnlockable(unlockable: UNLOCKABLE): void;
|
|
66
|
+
protected onTickEnd(): void;
|
|
67
|
+
private sortHash?;
|
|
68
|
+
private sort;
|
|
69
|
+
private filter;
|
|
70
|
+
}
|
package/package.json
CHANGED