@wayward/types 2.13.3-beta.dev.20230617.1 → 2.13.3-beta.dev.20230618.2
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/doodad/IDoodad.d.ts +2 -2
- package/definitions/game/game/entity/player/note/NoteManager.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/creature/CreatureTamedInfo.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/item/ItemDetails.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/stat/AttackInfo.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/stat/FerocityInfo.d.ts +1 -1
- package/definitions/game/game/inspection/inspections/CorpseInspection.d.ts +1 -1
- package/definitions/game/game/island/IIsland.d.ts +6 -0
- package/definitions/game/game/island/Island.d.ts +2 -2
- package/definitions/game/game/meta/prompt/PromptDescriptions.d.ts +1 -1
- package/definitions/game/game/tile/Tile.d.ts +22 -13
- package/definitions/game/language/DictionaryMap.d.ts +1 -1
- package/definitions/game/language/dictionary/Misc.d.ts +41 -39
- package/definitions/game/language/dictionary/UiTranslation.d.ts +46 -44
- package/definitions/game/language/english/ui/HelpArticles.d.ts +1 -1
- package/definitions/game/language/impl/TranslationImpl.d.ts +1 -0
- package/definitions/game/language/segment/BindSegment.d.ts +2 -1
- package/definitions/game/mod/ModRegistry.d.ts +1 -1
- package/definitions/game/renderer/context/RendererContext.d.ts +1 -1
- package/definitions/game/ui/component/Bindings.d.ts +8 -5
- package/definitions/game/ui/component/Text.d.ts +2 -1
- package/definitions/game/ui/input/Bindings.d.ts +2 -4
- package/definitions/game/ui/input/IIInput.d.ts +2 -1
- package/definitions/game/ui/input/IInput.d.ts +6 -0
- package/definitions/game/ui/input/Macros.d.ts +9 -1
- package/definitions/game/ui/screen/screens/menu/menus/{HelpArticle.d.ts → HelpArticleMenu.d.ts} +1 -1
- package/definitions/game/ui/screen/screens/menu/menus/HelpMenu.d.ts +1 -1
- package/definitions/game/ui/screen/screens/menu/menus/help/HelpArticleDescriptions.d.ts +3 -43
- package/definitions/game/ui/screen/screens/menu/menus/help/IHelpArticle.d.ts +53 -0
- package/definitions/game/ui/tooltip/TooltipLocationHandler.d.ts +1 -0
- package/definitions/game/utilities/string/Interpolator.d.ts +0 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ import type { TranslationArg } from "language/ITranslation";
|
|
|
15
15
|
import Translation from "language/Translation";
|
|
16
16
|
import Note from "language/dictionary/Note";
|
|
17
17
|
import type { IModdable } from "mod/ModRegistry";
|
|
18
|
-
import { HelpArticle } from "ui/screen/screens/menu/menus/help/
|
|
18
|
+
import { HelpArticle } from "ui/screen/screens/menu/menus/help/IHelpArticle";
|
|
19
19
|
export interface INoteDescription extends IModdable {
|
|
20
20
|
learnMore?: HelpArticle;
|
|
21
21
|
}
|
|
@@ -22,6 +22,6 @@ export default class CreatureTamedInfoProvider extends InfoProvider {
|
|
|
22
22
|
constructor(creature: Creature);
|
|
23
23
|
getClass(): string[];
|
|
24
24
|
hasContent(): boolean;
|
|
25
|
-
get(): (import("game/inspection/InfoProvider").SimpleInfoProvider
|
|
25
|
+
get(): (LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
|
|
26
26
|
private getHappinessMessage;
|
|
27
27
|
}
|
|
@@ -19,7 +19,7 @@ export default class ItemDetailsInfoProvider extends InfoProvider {
|
|
|
19
19
|
private readonly description;
|
|
20
20
|
constructor(item: Item | ItemType);
|
|
21
21
|
getClass(): string[];
|
|
22
|
-
get(): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider |
|
|
22
|
+
get(): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider | ItemWorthInfoProvider)[];
|
|
23
23
|
private getInsulation;
|
|
24
24
|
private getPreservation;
|
|
25
25
|
private getGroupings;
|
|
@@ -12,7 +12,7 @@ import LabelledValue from "game/inspection/infoProviders/LabelledValue";
|
|
|
12
12
|
import { StatInfo } from "game/inspection/infoProviders/stat/StatInfo";
|
|
13
13
|
export default class AttackInfo extends StatInfo {
|
|
14
14
|
getClass(): string[];
|
|
15
|
-
get(): (import("game/inspection/InfoProvider").SimpleInfoProvider
|
|
15
|
+
get(): (LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
|
|
16
16
|
private getTactics;
|
|
17
17
|
private getMainHand;
|
|
18
18
|
private getOffHand;
|
|
@@ -24,5 +24,5 @@ export default class FerocityInfo extends StatInfo {
|
|
|
24
24
|
readonly ticks: InfoProvider.Observer<number>;
|
|
25
25
|
getTitle(stat: Stat): SimpleInfoProvider;
|
|
26
26
|
getClass(): string[];
|
|
27
|
-
get(): (
|
|
27
|
+
get(): (LabelledValue | SimpleInfoProvider)[];
|
|
28
28
|
}
|
|
@@ -19,7 +19,7 @@ export default class CorpseInspection extends Inspection<Corpse> {
|
|
|
19
19
|
static getFromTile(tile: Tile): CorpseInspection[];
|
|
20
20
|
static handles(type: InspectType, corpse: unknown): boolean;
|
|
21
21
|
constructor(corpse: Corpse);
|
|
22
|
-
get(context: InfoProviderContext): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider
|
|
22
|
+
get(context: InfoProviderContext): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
|
|
23
23
|
private getDecay;
|
|
24
24
|
private decay;
|
|
25
25
|
private shouldRefreshDecay;
|
|
@@ -96,6 +96,12 @@ export interface IIslandEvents {
|
|
|
96
96
|
portsChanged(addedPort?: Port, removedPort?: Port): any;
|
|
97
97
|
getDefense(defense: Defense | undefined, target: Human | Creature | CreatureType, damageType?: DamageType): Defense | undefined;
|
|
98
98
|
calculateAttackOutcome(damageOutcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Called when determining how many ticks to process when fast forwarding an island during traveling
|
|
101
|
+
* @param fastForwardAmount Fast forward amount
|
|
102
|
+
* @param travelTime Travel time
|
|
103
|
+
*/
|
|
104
|
+
getFastForwardAmount(fastForwardAmount: number, travelTime: number): number | undefined;
|
|
99
105
|
}
|
|
100
106
|
export interface ILegacySeeds {
|
|
101
107
|
type: SeedType.Legacy;
|
|
@@ -200,9 +200,9 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
200
200
|
getTileFromPoint(point: IVector3): Tile;
|
|
201
201
|
getTile(x: number, y: number, z: number, disableLog?: boolean): Tile;
|
|
202
202
|
getTileSafe(x: number, y: number, z: number): Tile | undefined;
|
|
203
|
-
createTile(x: number, y: number, z: number, index: number): Tile;
|
|
203
|
+
createTile(x: number, y: number, z: number, index: number, rendererData: number, quality: Quality): Tile;
|
|
204
204
|
setTile(x: number, y: number, z: number, tile: Tile): Tile;
|
|
205
|
-
getOrCreateTile(index: number, x: number, y: number, z: number): Tile;
|
|
205
|
+
getOrCreateTile(index: number, x: number, y: number, z: number, rendererData: number, quality: Quality): Tile;
|
|
206
206
|
updateFlowFieldTile(tile: Tile, tileUpdateType: TileUpdateType, updatedRenderer?: boolean): void;
|
|
207
207
|
/**
|
|
208
208
|
* Checks if island.tileData is synced with Tile.data
|
|
@@ -14,7 +14,7 @@ import type { ISerializedTranslation } from "language/ITranslation";
|
|
|
14
14
|
import type Translation from "language/Translation";
|
|
15
15
|
import type Bindable from "ui/input/Bindable";
|
|
16
16
|
import { MenuId } from "ui/screen/screens/menu/component/IMenu";
|
|
17
|
-
import type { HelpArticle } from "ui/screen/screens/menu/menus/help/
|
|
17
|
+
import type { HelpArticle } from "ui/screen/screens/menu/menus/help/IHelpArticle";
|
|
18
18
|
type Text = Translation | ISerializedTranslation | string;
|
|
19
19
|
export declare const promptGameDialogMessagesEditFiltersSaveOverExisting: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
20
20
|
export declare const promptGameDialogMessagesEditFiltersResetConfirm: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
@@ -54,11 +54,6 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
54
54
|
readonly x: number;
|
|
55
55
|
readonly y: number;
|
|
56
56
|
readonly z: WorldZ;
|
|
57
|
-
/**
|
|
58
|
-
* Data associated with the tile
|
|
59
|
-
*/
|
|
60
|
-
rendererData: number;
|
|
61
|
-
quality?: Quality;
|
|
62
57
|
/**
|
|
63
58
|
* Entities on the tile
|
|
64
59
|
*/
|
|
@@ -78,25 +73,30 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
78
73
|
*/
|
|
79
74
|
containedItems?: Item[];
|
|
80
75
|
private _description;
|
|
76
|
+
/**
|
|
77
|
+
* Data associated with the tile
|
|
78
|
+
*/
|
|
79
|
+
private _rendererData;
|
|
80
|
+
/**
|
|
81
|
+
* Tile quality that is linked to map gen / tileData
|
|
82
|
+
*/
|
|
83
|
+
private _quality?;
|
|
81
84
|
/**
|
|
82
85
|
* Creates a fake tile
|
|
83
86
|
*/
|
|
84
|
-
static createFake(island: Island): Tile;
|
|
87
|
+
static createFake(island: Island, x?: number, y?: number, z?: number): Tile;
|
|
85
88
|
/**
|
|
86
89
|
* Constructed during map gen
|
|
87
90
|
*/
|
|
88
|
-
constructor(island: Island, x: number, y: number, z: number, id: number);
|
|
91
|
+
constructor(island: Island, x: number, y: number, z: number, id: number, rendererData: number, quality: Quality);
|
|
89
92
|
get point(): IVector3;
|
|
90
93
|
get description(): ITerrainDescription | undefined;
|
|
91
94
|
toString(): string;
|
|
92
95
|
getName(includeCoordinates?: boolean): Translation;
|
|
93
96
|
get type(): TerrainType;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
* Otherwise the game state could get out of sync.
|
|
98
|
-
*/
|
|
99
|
-
set type(value: number);
|
|
97
|
+
private set type(value);
|
|
98
|
+
get quality(): Quality;
|
|
99
|
+
private set quality(value);
|
|
100
100
|
get isTilled(): boolean;
|
|
101
101
|
/**
|
|
102
102
|
* This should only be called if you know what you're doing
|
|
@@ -181,6 +181,15 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
181
181
|
};
|
|
182
182
|
getTileData(): ITileData[] | undefined;
|
|
183
183
|
getOrCreateTileData(): ITileData[];
|
|
184
|
+
/**
|
|
185
|
+
* Use game.changeTile or game.removeTopTile when modifying tiles.
|
|
186
|
+
* This should only be called if you know what you're doing.
|
|
187
|
+
* Otherwise the game state could get out of sync.
|
|
188
|
+
*/
|
|
189
|
+
forceChangeTile(type: TerrainType, quality: Quality): void;
|
|
190
|
+
/**
|
|
191
|
+
* Changes the tile
|
|
192
|
+
*/
|
|
184
193
|
changeTile(newTileInfo: TerrainType | ITileData, stackTiles: boolean, dropTiles?: boolean): void;
|
|
185
194
|
/**
|
|
186
195
|
* Removes the top tiledata (index 0) from the tile
|
|
@@ -81,7 +81,7 @@ import { SkillSort } from "ui/screen/screens/game/dialog/ISkillsDialog";
|
|
|
81
81
|
import { ActionSort } from "ui/screen/screens/game/static/actions/IActionsDrawer";
|
|
82
82
|
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
83
83
|
import { CharacterSort } from "ui/screen/screens/menu/menus/character/Character";
|
|
84
|
-
import { HelpArticle } from "ui/screen/screens/menu/menus/help/
|
|
84
|
+
import { HelpArticle } from "ui/screen/screens/menu/menus/help/IHelpArticle";
|
|
85
85
|
import { HighscoreSort } from "ui/screen/screens/menu/menus/highscores/IHighscoresMenu";
|
|
86
86
|
import { Responsibility } from "ui/screen/screens/menu/menus/main/IAbout";
|
|
87
87
|
import { Website } from "ui/screen/screens/menu/menus/main/component/IWebsite";
|
|
@@ -105,43 +105,45 @@ export declare enum MiscTranslation {
|
|
|
105
105
|
AListOrB = 3,
|
|
106
106
|
AOrB = 4,
|
|
107
107
|
Binding = 5,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
108
|
+
BindingInputModifierSeparator = 6,
|
|
109
|
+
BindingListSeparator = 7,
|
|
110
|
+
BindingMacroSeparator = 8,
|
|
111
|
+
BindingWhenHoveringItem = 9,
|
|
112
|
+
Classes = 10,
|
|
113
|
+
Colorize = 11,
|
|
114
|
+
ColorizeDamage = 12,
|
|
115
|
+
ColorizeMagical = 13,
|
|
116
|
+
ColorizeMessageType = 14,
|
|
117
|
+
ColorizePrimary = 15,
|
|
118
|
+
ColorizeQuality = 16,
|
|
119
|
+
ColorizeSecondary = 17,
|
|
120
|
+
ColorizeStat = 18,
|
|
121
|
+
ColorizeVulnerability = 19,
|
|
122
|
+
CorpseOf = 20,
|
|
123
|
+
CountThing = 21,
|
|
124
|
+
CreatureSubtitle = 22,
|
|
125
|
+
Dependency = 23,
|
|
126
|
+
Difference = 24,
|
|
127
|
+
EquipSlotEquipToYour = 25,
|
|
128
|
+
ExpressionSeparator = 26,
|
|
129
|
+
ItemMagicalProperty = 27,
|
|
130
|
+
ListItemSeparator = 28,
|
|
131
|
+
Merge = 29,
|
|
132
|
+
MergeSpaced = 30,
|
|
133
|
+
Multiply = 31,
|
|
134
|
+
NPCName = 32,
|
|
135
|
+
NPCNameUnmet = 33,
|
|
136
|
+
NumberSingleDecimal = 34,
|
|
137
|
+
OwnName = 35,
|
|
138
|
+
Percent = 36,
|
|
139
|
+
PercentRaw = 37,
|
|
140
|
+
PlayerName = 38,
|
|
141
|
+
Possession = 39,
|
|
142
|
+
Range = 40,
|
|
143
|
+
ReformatSingularNoun = 41,
|
|
144
|
+
Renamed = 42,
|
|
145
|
+
Tile = 43,
|
|
146
|
+
Tilled = 44,
|
|
147
|
+
Unknown = 45,
|
|
148
|
+
UnknownItem = 46
|
|
147
149
|
}
|
|
@@ -822,49 +822,51 @@ declare enum UiTranslation {
|
|
|
822
822
|
MiscError = 807,
|
|
823
823
|
MiscContextMenuCopyTooltip = 808,
|
|
824
824
|
MiscBindableNoBindings = 809,
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
825
|
+
MiscBindingIcon = 810,
|
|
826
|
+
MiscBindingIconThen = 811,
|
|
827
|
+
DifficultyOptionsPeaceful = 812,
|
|
828
|
+
DifficultyOptionsAberrantSpawnsDisabled = 813,
|
|
829
|
+
DifficultyOptionsAberrantSpawnsOnly = 814,
|
|
830
|
+
DifficultyOptionsCreatureSpawningDisabled = 815,
|
|
831
|
+
DifficultyOptionsCreatureAlwaysSpawns = 816,
|
|
832
|
+
DifficultyOptionsCreatureSpawnsDefault = 817,
|
|
833
|
+
DifficultyOptionsCreatureSpawnsAberrantOnly = 818,
|
|
834
|
+
DifficultyOptionsCreatureSpawnsNoAberrants = 819,
|
|
835
|
+
DifficultyOptionsSpawnLimit = 820,
|
|
836
|
+
DifficultyOptionsRespawn = 821,
|
|
837
|
+
DifficultyOptionsEternalNight = 822,
|
|
838
|
+
DifficultyOptionsEternalDay = 823,
|
|
839
|
+
DifficultyOptionsTimeInitial = 824,
|
|
840
|
+
DifficultyOptionsTimeFrozen = 825,
|
|
841
|
+
DifficultyOptionsTimeDayLength = 826,
|
|
842
|
+
DifficultyOptionsTimeDayPercent = 827,
|
|
843
|
+
DifficultyOptionsNoItems = 828,
|
|
844
|
+
DifficultyOptionsRecipes = 829,
|
|
845
|
+
DifficultyOptionsStartingIsland = 830,
|
|
846
|
+
DifficultyOptionsTravelingEffectsDisabled = 831,
|
|
847
|
+
DifficultyOptionsBenignityInitial = 832,
|
|
848
|
+
DifficultyOptionsBenignityMultiplier = 833,
|
|
849
|
+
DifficultyOptionsMalignityInitial = 834,
|
|
850
|
+
DifficultyOptionsMalignityMultiplier = 835,
|
|
851
|
+
DifficultyOptionsWeightBonus = 836,
|
|
852
|
+
DifficultyOptionsStatInitial = 837,
|
|
853
|
+
DifficultyOptionsStatMax = 838,
|
|
854
|
+
DifficultyOptionsStatMultiplier = 839,
|
|
855
|
+
DifficultyOptionsStatusEffectStartWith = 840,
|
|
856
|
+
DifficultyOptionsStatusEffectUntreatable = 841,
|
|
857
|
+
DifficultyOptionsStatusEffectPassChanceMultiplier = 842,
|
|
858
|
+
DifficultyOptionsNoRandomSkills = 843,
|
|
859
|
+
DifficultyOptionsSkillStartingCount = 844,
|
|
860
|
+
DifficultyOptionsSkillGainMultiplier = 845,
|
|
861
|
+
DifficultyOptionsSkillInitial = 846,
|
|
862
|
+
DifficultyOptionsStatusEffectPermanent = 847,
|
|
863
|
+
DifficultyOptionsStatusEffectRateMultiplier = 848,
|
|
864
|
+
DifficultyOptionsStatusEffectMultiplier = 849,
|
|
865
|
+
DifficultyOptionsItemDurabilityMultiplier = 850,
|
|
866
|
+
DifficultyOptionsItemDecayMultiplier = 851,
|
|
867
|
+
TabCrafting = 852,
|
|
868
|
+
TabDismantle = 853,
|
|
869
|
+
WindowTitleContainer = 854,
|
|
870
|
+
WindowTitleInventory = 855
|
|
869
871
|
}
|
|
870
872
|
export default UiTranslation;
|
|
@@ -8,6 +8,6 @@
|
|
|
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 { HelpArticle } from "ui/screen/screens/menu/menus/help/
|
|
11
|
+
import { HelpArticle } from "ui/screen/screens/menu/menus/help/IHelpArticle";
|
|
12
12
|
declare const articles: Descriptions<HelpArticle, [string, string, string, string]>;
|
|
13
13
|
export default articles;
|
|
@@ -95,6 +95,7 @@ export default class TranslationImpl implements Omit<ISerializable, "deserialize
|
|
|
95
95
|
*/
|
|
96
96
|
get(...args: any[]): IStringSection[];
|
|
97
97
|
private resolveSections;
|
|
98
|
+
static sectionStringRenderers: Array<((section: IStringSection) => string | undefined)>;
|
|
98
99
|
/**
|
|
99
100
|
* Returns the translation as a string
|
|
100
101
|
*/
|
|
@@ -14,9 +14,10 @@ export interface IBindingsSection extends IStringSection {
|
|
|
14
14
|
bindable: Bindable | null;
|
|
15
15
|
bindableNoBindingsFallback?: IStringSection[];
|
|
16
16
|
bindableSimplify?: true;
|
|
17
|
+
bindableContextless?: true;
|
|
17
18
|
}
|
|
18
19
|
export declare namespace IBindingsSection {
|
|
19
|
-
function create(bindable: Bindable | null, fallback?: IStringSection[], simplify?: boolean): IBindingsSection;
|
|
20
|
+
function create(bindable: Bindable | null, fallback?: IStringSection[], simplify?: boolean, contextless?: boolean): IBindingsSection;
|
|
20
21
|
}
|
|
21
22
|
declare const bindSegment: ISegment;
|
|
22
23
|
export default bindSegment;
|
|
@@ -65,7 +65,7 @@ import type { DialogId, IDialogDescription } from "ui/screen/screens/game/Dialog
|
|
|
65
65
|
import type { QuadrantComponentId } from "ui/screen/screens/game/IGameScreenApi";
|
|
66
66
|
import type { IMenuBarButtonDescription, MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
67
67
|
import type { IStatDisplayDescription } from "ui/screen/screens/game/static/stats/IStatDisplayDescription";
|
|
68
|
-
import type { HelpArticle, IHelpArticle } from "ui/screen/screens/menu/menus/help/
|
|
68
|
+
import type { HelpArticle, IHelpArticle } from "ui/screen/screens/menu/menus/help/IHelpArticle";
|
|
69
69
|
import type { ModOptionSectionInitializer } from "ui/screen/screens/menu/menus/options/TabMods";
|
|
70
70
|
export interface IModdable {
|
|
71
71
|
/**
|
|
@@ -25,6 +25,6 @@ export default class RendererContext {
|
|
|
25
25
|
get isWebGl2(): boolean;
|
|
26
26
|
get origin(): IRendererOrigin;
|
|
27
27
|
get viewport(): IVector2;
|
|
28
|
-
createSpriteBatch(capacity: number, depthOffset?: number, yOffset?: number, enableAlphaMultiplcation?: boolean, enforceBeginAndEnd?: boolean):
|
|
28
|
+
createSpriteBatch(capacity: number, depthOffset?: number, yOffset?: number, enableAlphaMultiplcation?: boolean, enforceBeginAndEnd?: boolean): SpriteBatch2 | SpriteBatch1;
|
|
29
29
|
createPersistantSpriteBatch(depthOffset?: number, yOffset?: number, enableAlphaMultiplcation?: boolean): PersistantSpriteBatch;
|
|
30
30
|
}
|
|
@@ -17,19 +17,22 @@ export declare enum BindingsClasses {
|
|
|
17
17
|
Main = "bindings",
|
|
18
18
|
Macro = "bindings-macro",
|
|
19
19
|
Input = "bindings-macro-input",
|
|
20
|
+
InputHoverItem = "bindings-macro-input-hover-item",
|
|
20
21
|
InputIcon = "bindings-macro-input-icon",
|
|
21
22
|
InputIconLabel = "bindings-macro-input-icon-label",
|
|
22
23
|
Modifier = "bindings-macro-input-modifier",
|
|
23
|
-
MacroSeparator = "bindings-macro-separator"
|
|
24
|
+
MacroSeparator = "bindings-macro-separator",
|
|
25
|
+
MacroSeparatorPadded = "bindings-macro-separator-padded"
|
|
24
26
|
}
|
|
25
27
|
export default class Bindings extends Component {
|
|
26
28
|
readonly bindable: Bindable | null;
|
|
27
29
|
private readonly noBindingsFallback?;
|
|
28
30
|
private readonly simplify?;
|
|
29
|
-
|
|
30
|
-
static
|
|
31
|
+
private readonly contextless?;
|
|
32
|
+
static createDisplays(bindable: Bindable | null, sortByComplexity?: true, simplify?: true, contextless?: true): MacroDisplay[];
|
|
33
|
+
static createMacroDisplay(macro: Macro, simplify?: true): MacroDisplay;
|
|
31
34
|
macroDisplays: MacroDisplay[];
|
|
32
|
-
constructor(bindable: Bindable | null, noBindingsFallback?: (() => Text) | undefined, simplify?: true | undefined);
|
|
35
|
+
constructor(bindable: Bindable | null, noBindingsFallback?: (() => Text) | undefined, simplify?: true | undefined, contextless?: true | undefined);
|
|
33
36
|
refresh(): this;
|
|
34
37
|
protected onAppend(): void;
|
|
35
38
|
protected onInvalidateBindings(): void;
|
|
@@ -41,7 +44,7 @@ declare class MacroDisplay extends Component {
|
|
|
41
44
|
readonly macro: Macro;
|
|
42
45
|
readonly inputDisplays: InputDisplay[];
|
|
43
46
|
readonly complexity: number;
|
|
44
|
-
constructor(bindable: Bindable, macro: Macro, simplify?: true);
|
|
47
|
+
constructor(bindable: Bindable, macro: Macro, simplify?: true, contextless?: true);
|
|
45
48
|
private addMacroSeparator;
|
|
46
49
|
}
|
|
47
50
|
declare class InputDisplay extends Component {
|
|
@@ -23,6 +23,7 @@ import Translation from "language/Translation";
|
|
|
23
23
|
import Component from "ui/component/Component";
|
|
24
24
|
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
25
25
|
import type { IInput, Modifier } from "ui/input/IInput";
|
|
26
|
+
import type { IMacroSection } from "ui/input/Macros";
|
|
26
27
|
import type Tooltip from "ui/tooltip/Tooltip";
|
|
27
28
|
import type { IReferenceSection, ISegment, IStringSection } from "utilities/string/Interpolator";
|
|
28
29
|
export default class Text extends Component {
|
|
@@ -94,7 +95,7 @@ export declare class BasicText extends Component {
|
|
|
94
95
|
protected inputModifier?: Modifier;
|
|
95
96
|
currentTooltip?: (tooltip: Tooltip) => any;
|
|
96
97
|
constructor(elementType?: string);
|
|
97
|
-
setText(text: IStringSection & Partial<IColorSection
|
|
98
|
+
setText(text: IStringSection & Partial<IColorSection & ILinkSection & IHeadingSection & ITooltipSection & IReferenceSection & IListItemSection & IBindingsSection & IMacroSection>, data?: IEntireTextData): this;
|
|
98
99
|
protected onRemove(): void;
|
|
99
100
|
private setTooltipLocation;
|
|
100
101
|
private onClick;
|
|
@@ -31,10 +31,8 @@ declare module Bindings {
|
|
|
31
31
|
function reset(bindable: Bindable): void;
|
|
32
32
|
function clear(bindable: Bindable): void;
|
|
33
33
|
function resetAll(): void;
|
|
34
|
-
function translate(bindable?: Bindable, noBindings?: TranslationImpl, simplify?: true): TranslationImpl;
|
|
35
|
-
function translate(bindable?: Bindable, noBindings?: TranslationImpl | null, simplify?: true): TranslationImpl | undefined;
|
|
36
|
-
function translateRaw(bindable?: Bindable, noBindings?: TranslationImpl): TranslationImpl;
|
|
37
|
-
function translateRaw(bindable?: Bindable, noBindings?: TranslationImpl | null): TranslationImpl | undefined;
|
|
34
|
+
function translate(bindable?: Bindable, noBindings?: TranslationImpl, simplify?: true, contextless?: true): TranslationImpl;
|
|
35
|
+
function translate(bindable?: Bindable, noBindings?: TranslationImpl | null, simplify?: true, contextless?: true): TranslationImpl | undefined;
|
|
38
36
|
function markCacheInvalid(updateBindableManagers?: boolean): void;
|
|
39
37
|
function getBoundTo(binding: Binding): Set<Bindable>;
|
|
40
38
|
}
|
|
@@ -86,6 +86,12 @@ export declare module IInput {
|
|
|
86
86
|
resolvedCatalyst: Modifier;
|
|
87
87
|
}
|
|
88
88
|
function modifiersResolvedHashes(input: IInput): [IModifierResolvedHash, IModifierResolvedHash?];
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated This function returns raw text translations.
|
|
91
|
+
*
|
|
92
|
+
* You might be looking for {@link Macro.translate} — you can call it with a single-`IInput` macro, ie, `[IInput]`,
|
|
93
|
+
* and it will result in the fancy iconography and stuff.
|
|
94
|
+
*/
|
|
89
95
|
function translate(input: IInput, resolvedModifierCatalyst?: Modifier): TranslationImpl;
|
|
90
96
|
}
|
|
91
97
|
export {};
|
|
@@ -13,12 +13,20 @@ import type { IBindHandlerApi } from "ui/input/Bind";
|
|
|
13
13
|
import type Bindable from "ui/input/Bindable";
|
|
14
14
|
import { Binding } from "ui/input/Bindings";
|
|
15
15
|
import { IInput } from "ui/input/IInput";
|
|
16
|
+
import type { IStringSection } from "utilities/string/Interpolator";
|
|
17
|
+
export interface IMacroSection extends IStringSection {
|
|
18
|
+
macro: Macro;
|
|
19
|
+
macroSimplify?: true;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace IMacroSection {
|
|
22
|
+
function create(macro: Macro, simplify?: boolean): IMacroSection;
|
|
23
|
+
}
|
|
16
24
|
export type Macro = IInput[];
|
|
17
25
|
export declare module Macro {
|
|
18
26
|
function is(value: unknown): value is Macro;
|
|
19
27
|
function of(inputOrMacro: IInput | Macro): Macro;
|
|
20
28
|
function hash(macro: Macro): string;
|
|
21
|
-
function translate(macro: Macro): TranslationImpl;
|
|
29
|
+
function translate(macro: Macro, simplify?: true): TranslationImpl;
|
|
22
30
|
}
|
|
23
31
|
declare module Macros {
|
|
24
32
|
interface IEvents {
|
package/definitions/game/ui/screen/screens/menu/menus/{HelpArticle.d.ts → HelpArticleMenu.d.ts}
RENAMED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import Menu from "ui/screen/screens/menu/component/Menu";
|
|
12
|
-
import { HelpArticle } from "ui/screen/screens/menu/menus/help/
|
|
12
|
+
import { HelpArticle } from "ui/screen/screens/menu/menus/help/IHelpArticle";
|
|
13
13
|
export default class HelpArticleMenu extends Menu {
|
|
14
14
|
constructor(article: HelpArticle);
|
|
15
15
|
protected onGoBackFrom(): Promise<void>;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import Menu from "ui/screen/screens/menu/component/Menu";
|
|
12
|
-
import { HelpArticle } from "ui/screen/screens/menu/menus/help/
|
|
12
|
+
import { HelpArticle } from "ui/screen/screens/menu/menus/help/IHelpArticle";
|
|
13
13
|
export default class HelpMenu extends Menu {
|
|
14
14
|
private readonly searchInput;
|
|
15
15
|
private readonly articles;
|
|
@@ -8,50 +8,10 @@
|
|
|
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 { IModdable } from "mod/ModRegistry";
|
|
12
11
|
import type { BasicText, BasicTextLink } from "ui/component/Text";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* with another article). If the last article doesn't have a partner to share a row with, it appears
|
|
17
|
-
* as though it's an important article as well.
|
|
18
|
-
*/
|
|
19
|
-
important?: true;
|
|
20
|
-
image?: true | string;
|
|
21
|
-
section?: string | number;
|
|
22
|
-
}
|
|
23
|
-
export declare enum HelpArticle {
|
|
24
|
-
Welcome = 0,
|
|
25
|
-
Controls = 1,
|
|
26
|
-
Interface = 2,
|
|
27
|
-
InventoryManagement = 3,
|
|
28
|
-
ActionSlots = 4,
|
|
29
|
-
FastPickUp = 5,
|
|
30
|
-
Actions = 6,
|
|
31
|
-
Stats = 7,
|
|
32
|
-
Doodads = 8,
|
|
33
|
-
ResourceGathering = 9,
|
|
34
|
-
AttackingDamage = 10,
|
|
35
|
-
Reputation = 11,
|
|
36
|
-
Milestones = 12,
|
|
37
|
-
HeldItems = 13,
|
|
38
|
-
Crafting = 14,
|
|
39
|
-
ItemQualities = 15,
|
|
40
|
-
Death = 16,
|
|
41
|
-
Taming = 17,
|
|
42
|
-
RestingSleeping = 18,
|
|
43
|
-
Overweight = 19,
|
|
44
|
-
Merchants = 20,
|
|
45
|
-
Gardening = 21,
|
|
46
|
-
GameModes = 22,
|
|
47
|
-
Multiplayer = 23,
|
|
48
|
-
Bugs = 24
|
|
49
|
-
}
|
|
50
|
-
export declare enum HelpArticleSection {
|
|
51
|
-
Interface = 0,
|
|
52
|
-
Gameplay = 1,
|
|
53
|
-
Other = 2
|
|
54
|
-
}
|
|
12
|
+
import type { IHelpArticle } from "ui/screen/screens/menu/menus/help/IHelpArticle";
|
|
13
|
+
import { HelpArticle, HelpArticleSection } from "ui/screen/screens/menu/menus/help/IHelpArticle";
|
|
14
|
+
export { HelpArticle, HelpArticleSection };
|
|
55
15
|
declare const descriptions: Descriptions<HelpArticle, IHelpArticle>;
|
|
56
16
|
export default descriptions;
|
|
57
17
|
export declare function HelpArticleLinkHandler(text: BasicText, link: BasicTextLink): true | void;
|
|
@@ -0,0 +1,53 @@
|
|
|
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 type { IModdable } from "mod/ModRegistry";
|
|
12
|
+
export interface IHelpArticle extends IModdable {
|
|
13
|
+
/**
|
|
14
|
+
* Whether this article is "important", which makes it take up the full row (instead of sharing
|
|
15
|
+
* with another article). If the last article doesn't have a partner to share a row with, it appears
|
|
16
|
+
* as though it's an important article as well.
|
|
17
|
+
*/
|
|
18
|
+
important?: true;
|
|
19
|
+
image?: true | string;
|
|
20
|
+
section?: string | number;
|
|
21
|
+
}
|
|
22
|
+
export declare enum HelpArticle {
|
|
23
|
+
Welcome = 0,
|
|
24
|
+
Controls = 1,
|
|
25
|
+
Interface = 2,
|
|
26
|
+
InventoryManagement = 3,
|
|
27
|
+
ActionSlots = 4,
|
|
28
|
+
FastPickUp = 5,
|
|
29
|
+
Actions = 6,
|
|
30
|
+
Stats = 7,
|
|
31
|
+
Doodads = 8,
|
|
32
|
+
ResourceGathering = 9,
|
|
33
|
+
AttackingDamage = 10,
|
|
34
|
+
Reputation = 11,
|
|
35
|
+
Milestones = 12,
|
|
36
|
+
HeldItems = 13,
|
|
37
|
+
Crafting = 14,
|
|
38
|
+
ItemQualities = 15,
|
|
39
|
+
Death = 16,
|
|
40
|
+
Taming = 17,
|
|
41
|
+
RestingSleeping = 18,
|
|
42
|
+
Overweight = 19,
|
|
43
|
+
Merchants = 20,
|
|
44
|
+
Gardening = 21,
|
|
45
|
+
GameModes = 22,
|
|
46
|
+
Multiplayer = 23,
|
|
47
|
+
Bugs = 24
|
|
48
|
+
}
|
|
49
|
+
export declare enum HelpArticleSection {
|
|
50
|
+
Interface = 0,
|
|
51
|
+
Gameplay = 1,
|
|
52
|
+
Other = 2
|
|
53
|
+
}
|
|
@@ -58,6 +58,7 @@ export interface ITooltipLocation extends IVector2 {
|
|
|
58
58
|
alignment?: Lowercase<keyof typeof TooltipLocationAlignment>;
|
|
59
59
|
}
|
|
60
60
|
export default class TooltipLocationHandler {
|
|
61
|
+
static make(handler: (location: TooltipLocationHandler) => TooltipLocationHandler): (location: TooltipLocationHandler) => TooltipLocationHandler;
|
|
61
62
|
readonly locationPreference: ITooltipLocationPreference[];
|
|
62
63
|
private readonly _tooltip;
|
|
63
64
|
get tooltip(): Tooltip | undefined;
|
package/package.json
CHANGED