@wayward/types 2.12.0-beta.dev.20221005.1 → 2.12.1-beta.dev.20221007.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.
@@ -25,13 +25,17 @@ export default class World extends EventEmitter.Host<IWorldEvents> implements IS
25
25
  layers: Record<number, WorldLayer>;
26
26
  _loaded: boolean;
27
27
  private batchTileUpdate;
28
+ private layerUpdatesSuspended;
28
29
  constructor(island: Island, width: number, height: number);
29
30
  delete(): void;
30
31
  get loaded(): boolean;
31
32
  toLocal(world: number, local: number): number;
32
33
  addLayer(level: WorldZ): void;
33
34
  load(): void;
35
+ suspendLayerUpdates(): void;
36
+ resumeLayerUpdates(): void;
34
37
  updateTile(x: number, y: number, z: number, tile: ITile, tileUpdateType: TileUpdateType, updateNeighbors?: boolean, flush?: boolean): void;
38
+ updateTileLayer(x: number, y: number, z: number, tile: ITile, updateNeighbors?: boolean, flush?: boolean): void;
35
39
  startUpdateTileBatch(): void;
36
40
  endUpdateTileBatch(): void;
37
41
  serializeObject(_serializer: ISerializer): undefined;
@@ -31,8 +31,8 @@ export default class ChoiceList<C extends Choice = Choice, OPTIONAL extends bool
31
31
  setChoices(...choices: ArrayOfIterablesOr<C>): this;
32
32
  refresh(): this;
33
33
  setRefreshMethod(refreshMethod: (choiceList: this) => OPTIONAL extends true ? C | undefined : C): this;
34
- choose(chosen?: C): this;
35
- choose(filter?: (choice: C, index: number) => any): this;
34
+ choose(chosen?: C, emitEvent?: boolean): this;
35
+ choose(filter?: (choice: C, index: number) => any, emitEvent?: boolean): this;
36
36
  choices(filter?: (choice: C, index: number) => any): import("@wayward/goodstream").default<Exclude<C, never>>;
37
37
  private onChoiceChange;
38
38
  }
@@ -8,6 +8,7 @@
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 Stream from "@wayward/goodstream/Stream";
11
12
  import type { Events, IEventEmitter } from "event/EventEmitter";
12
13
  import type { IActionApi } from "game/entity/action/IAction";
13
14
  import type { IUsableActionPossibleUsing, IUsableActionRequirements, ReturnableUsableActionUsability } from "game/entity/action/usable/IUsableAction";
@@ -43,9 +44,13 @@ export declare enum ActionBarClasses {
43
44
  SlotSlottedContainerCopyingFrom = "game-action-slot-slotted-container-copying-from",
44
45
  SlotConfiguring = "game-action-slot-configuring",
45
46
  SlotDisabled = "game-action-slot-disabled",
46
- SlotAddButton = "game-action-slot-add-button",
47
- SlotAddButtonIcon = "game-action-slot-add-button-icon",
48
- SlotUseOnMove = "game-action-slot-use-on-move"
47
+ SlotUseOnMove = "game-action-slot-use-on-move",
48
+ MetaButtons = "game-action-bar-meta-buttons-container",
49
+ MetaButton = "game-action-bar-meta-button",
50
+ MetaButtonAdd = "game-action-bar-meta-button-add",
51
+ MetaButtonAddIcon = "game-action-bar-meta-button-add-icon",
52
+ MetaButtonRemove = "game-action-bar-meta-button-remove",
53
+ MetaButtonRemoveIcon = "game-action-bar-meta-button-remove-icon"
49
54
  }
50
55
  export interface IActionBarEvents extends Events<QuadrantComponent> {
51
56
  configure(number: number): any;
@@ -59,14 +64,15 @@ export default class ActionBar extends QuadrantComponent {
59
64
  protected slots: IActionBarSlotData[];
60
65
  showBindings?: boolean;
61
66
  readonly slotsContainer: Component<HTMLElement>;
62
- readonly lastSlotsContainer: Component<HTMLElement>;
67
+ readonly metaButtons: Component<HTMLElement>;
68
+ readonly removeSlotButton: Button;
63
69
  readonly addSlotButton: Button;
64
70
  readonly configurationDrawer: ActionsConfigurationDrawer;
65
71
  get configuringNumber(): number | undefined;
66
72
  readonly actionSlotTooltipHandler: ActionSlotTooltipHandler;
67
73
  constructor();
68
74
  addSlot(): this;
69
- removeSlot(slot?: number): this;
75
+ removeSlot(): this;
70
76
  generateSlots(): this;
71
77
  getSlottedIn(item: Item): ReadonlySet<number> | undefined;
72
78
  private onMoveSlot;
@@ -81,7 +87,7 @@ export default class ActionBar extends QuadrantComponent {
81
87
  protected onToggleUseWhileMoving(api: IBindHandlerApi): boolean;
82
88
  protected onMenuCancel(): boolean;
83
89
  protected onChangeWhetherCopying(api: IBindHandlerApi): boolean;
84
- getSlots(): Generator<ActionSlot, void, unknown>;
90
+ getSlots(): Stream<ActionSlot>;
85
91
  private toggleShowingBindings;
86
92
  private focus;
87
93
  private refreshSlots;
@@ -22,6 +22,9 @@ declare enum Classes {
22
22
  Header = "game-action-configuration-drawer-header",
23
23
  HeaderTitle = "game-action-configuration-drawer-header-title",
24
24
  ButtonClose = "game-action-configuration-drawer-button-close",
25
+ ButtonCloseNoAction = "game-action-configuration-drawer-button-close-no-action",
26
+ Footer = "game-action-configuration-drawer-footer",
27
+ DiscoveryHint = "game-action-configuration-drawer-footer-discovery-hint",
25
28
  Column = "game-action-configuration-drawer-column",
26
29
  ColumnContent = "game-action-configuration-drawer-column-content",
27
30
  ColumnsContainer = "game-action-configuration-drawer-columns-container",
@@ -47,7 +50,6 @@ declare enum ItemMethod {
47
50
  export interface IActionsConfigurationDrawerEvents extends Events<Component> {
48
51
  update(): any;
49
52
  endConfiguration(): any;
50
- removeSlot(slot: number): any;
51
53
  }
52
54
  export default class ActionsConfigurationDrawer extends Component implements IRefreshable {
53
55
  readonly event: IEventEmitter<this, IActionsConfigurationDrawerEvents>;
@@ -55,6 +57,8 @@ export default class ActionsConfigurationDrawer extends Component implements IRe
55
57
  readonly headerTitle: Text;
56
58
  readonly acceptButton: Button;
57
59
  readonly columnsContainer: Component<HTMLElement>;
60
+ readonly footer: Component<HTMLElement>;
61
+ readonly discoveryHint: Text;
58
62
  readonly actionsColumn: Component<HTMLElement>;
59
63
  readonly actionsColumnContent: Component<HTMLElement>;
60
64
  readonly itemActionsColumn: Component<HTMLElement>;
@@ -64,7 +68,7 @@ export default class ActionsConfigurationDrawer extends Component implements IRe
64
68
  readonly itemOrTypeChoiceList: ChoiceList<Choice<ItemMethod>, false>;
65
69
  readonly useOnMoveCheckButton: CheckButton;
66
70
  readonly hr1: HorizontalLine;
67
- readonly removeSlotButton: Button;
71
+ readonly clearSlotButton: Button;
68
72
  readonly hr2: HorizontalLine;
69
73
  readonly editBindingsButton: Button;
70
74
  readonly hints: Component<HTMLElement>;
@@ -82,8 +86,10 @@ export default class ActionsConfigurationDrawer extends Component implements IRe
82
86
  private editBindings;
83
87
  private setMethod;
84
88
  private setUseOnMove;
85
- private removeSlot;
89
+ private clearSlot;
90
+ protected postExecuteAction(): void;
86
91
  private generateActionLists;
92
+ private getRenderInfo;
87
93
  private appendActionButton;
88
94
  private createActionButton;
89
95
  private slottedActionButton?;
@@ -19,6 +19,8 @@ export interface IVersionInfo {
19
19
  date?: Date;
20
20
  }
21
21
  declare module Version {
22
+ const versionInfoRegExp: RegExp;
23
+ const versionInfoRegExpSemver: RegExp;
22
24
  /**
23
25
  * Returns whether the given version is compatible with the game's version. This is used to check, for example,
24
26
  * if a mod is compatible with the game's version.
@@ -8,7 +8,7 @@
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
- export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 12, gameVersionPatch = 0, gameVersionName = "Wheels & Wetlands";
11
+ export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 12, gameVersionPatch = 1, gameVersionName = "Wheels & Wetlands";
12
12
  export declare const gameVersion: string;
13
13
  export declare const gameVersionTitleMajor: string;
14
14
  export declare const gameVersionTitleMinor: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.12.0-beta.dev.20221005.1",
4
+ "version": "2.12.1-beta.dev.20221007.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",