we ball I guess

This commit is contained in:
2026-06-07 19:51:54 -05:00
parent f8c9d33df2
commit 51388c90d5
42 changed files with 2233 additions and 30 deletions
+39
View File
@@ -0,0 +1,39 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
/** Opaque type alias for item identifier constants. */
type ItemId = number;
/** Opaque type alias for item type constants. */
type ItemType = number;
/** Item data lookup. */
interface ItemNamespace {
/**
* Returns the string name for the given item ID.
* @param itemId - An `ITEM_ID_*` constant.
*/
getName(itemId: ItemId): string;
/**
* Returns the type constant for the given item ID.
* @param itemId - An `ITEM_ID_*` constant.
* @returns An `ITEM_TYPE_*` constant.
*/
getType(itemId: ItemId): ItemType;
}
declare var Item: ItemNamespace;
// Item ID constants — injected as globals by the engine at startup.
declare var ITEM_ID_POTION: ItemId;
declare var ITEM_ID_POTATO: ItemId;
declare var ITEM_ID_APPLE: ItemId;
// Item type constants — injected as globals by the engine at startup.
declare var ITEM_TYPE_MEDICINE: ItemType;
declare var ITEM_TYPE_FOOD: ItemType;