@adatechnology/game-items-goods 0.4.7 → 0.6.0

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/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ItemsOptions, ItemsCatalog, ItemPack, ArsenalItemRecord, CategoryDef, ContainerDef, PoolEntry, ItemDef, PlaceDef, RecipeDef, UseEffectDef, FindsProviderOptions, FindsProvider } from '@adatechnology/game-items';
2
- import { CategoryDef as CategoryDef$1, BodySlot, SealSpec, ContractChecker, CategoryRegistry, CategorizedReport, CategoryOptions } from '@adatechnology/game-contracts';
2
+ import { CategoryDef as CategoryDef$1, BodySlot, SealSpec, ContractChecker, CategoryRegistry, CategorizedReport, CategoryOptions, ModuleItemUse } from '@adatechnology/game-contracts';
3
+ import { LiquidDef } from '@adatechnology/game-fluids';
3
4
 
4
5
  /** The pack for `createItems({ packs })`: items, the three categories the game adds, 24 places, 17 containers, house pools, use effects and recipes. */
5
6
  declare const goodsPack: ItemPack;
@@ -222,4 +223,20 @@ declare const lootCategoriesOf: (kinds: CategoryRegistry, kind: string) => reado
222
223
  /** Runs the contracts of every item's kind over the catalog, and checks that `category` (read by the loot rolls) is one the kind declares. */
223
224
  declare const checkGoodsItems: (options?: CheckGoodsOptions) => CategorizedReport;
224
225
 
225
- export { BODY_SLOTS, type CheckGoodsOptions, DENSITY_KG_PER_LITRE, type DepletionRow, FLOORPLAN_PLACES, FLOORPLAN_POOL_ALIASES, FLOORPLAN_POOL_KEYS, GOODS_ARSENAL_RECORDS, GOODS_CATEGORIES, GOODS_CONTAINERS, GOODS_HOUSE_POOLS, GOODS_ITEMS, GOODS_KINDS, GOODS_KNOWN_GAPS, GOODS_PLACES, GOODS_PROVENANCE, GOODS_RECIPES, GOODS_STRINGS, GOODS_TABLES, GOODS_USE_EFFECTS, type GoodsLocale, type GoodsStrings, HEAT_RESISTANT_MATERIALS, type HousePools, IMPACT_RESPONSES, ITEM_CONTRACTS, type ItemContractOptions, type ItemImpact, type ItemLeftover, type ItemPart, type ItemProvenance, type KindedItem, type MeleeRow, POOL_PLACES, type RarityRow, type StorageRow, checkGoodsItems, createGoodsFindsProvider, createGoodsItems, createGoodsKinds, createItemContracts, goodsPack, goodsText, lootCategoriesOf, pickGoodsLocale };
226
+ interface GoodsItemUseOptions {
227
+ readonly kinds?: CategoryRegistry;
228
+ readonly effects?: readonly UseEffectDef[];
229
+ /** The liquids whose `drink.thirst` (per litre) sets what a drink quenches. Default game-fluids `LIQUIDS`. */
230
+ readonly liquids?: readonly LiquidDef[];
231
+ }
232
+ /** What one use of the item's liquid quenches: thirst per litre of the liquid times the litres of a use; undefined when it holds no drinkable liquid. */
233
+ declare const drinkHydrationOf: (item: ItemDef, liquids?: readonly LiquidDef[]) => number | undefined;
234
+ /** The use of an item, or undefined when its kind plays none. */
235
+ type GoodsItemUse = (item: ItemDef & {
236
+ readonly kind?: string;
237
+ }) => ModuleItemUse | undefined;
238
+ declare const createGoodsItemUse: (options?: GoodsItemUseOptions) => GoodsItemUse;
239
+ /** `createGoodsItemUse()` with the shipped kinds and effects. */
240
+ declare const goodsItemUse: GoodsItemUse;
241
+
242
+ export { BODY_SLOTS, type CheckGoodsOptions, DENSITY_KG_PER_LITRE, type DepletionRow, FLOORPLAN_PLACES, FLOORPLAN_POOL_ALIASES, FLOORPLAN_POOL_KEYS, GOODS_ARSENAL_RECORDS, GOODS_CATEGORIES, GOODS_CONTAINERS, GOODS_HOUSE_POOLS, GOODS_ITEMS, GOODS_KINDS, GOODS_KNOWN_GAPS, GOODS_PLACES, GOODS_PROVENANCE, GOODS_RECIPES, GOODS_STRINGS, GOODS_TABLES, GOODS_USE_EFFECTS, type GoodsItemUse, type GoodsItemUseOptions, type GoodsLocale, type GoodsStrings, HEAT_RESISTANT_MATERIALS, type HousePools, IMPACT_RESPONSES, ITEM_CONTRACTS, type ItemContractOptions, type ItemImpact, type ItemLeftover, type ItemPart, type ItemProvenance, type KindedItem, type MeleeRow, POOL_PLACES, type RarityRow, type StorageRow, checkGoodsItems, createGoodsFindsProvider, createGoodsItemUse, createGoodsItems, createGoodsKinds, createItemContracts, drinkHydrationOf, goodsItemUse, goodsPack, goodsText, lootCategoriesOf, pickGoodsLocale };