Module content

Source
Expand description

Native content script-module dispatchers plus the per-ability ability_info(level) composition for the content_raw-style ability map.

These are pub Rust fns that the native script ports (behaviors::description_values, behaviors::expression’s chest_item_choose) call. The balance primitives they use (balance::ability_damage_from_id, balance::effect_duration, consts AOE_COEF/OT_COEF/HEAL_COEF) live in crate::mechanics::balance.

Structs§

AbilityInfo
The typed result of the per-ability ability_info(level) closures. Each struct holds every key that appears across the 18 bespoke ability infos, with None for keys a given ability does not set.

Functions§

ability_info
Native port of the content module’s get_ability_info(id, level): dispatch to the per-ability ability_info(level) closure baked into the ability map. Returns None for ability ids that have no ability_info
get_inventory_levels
Native port of content::get_inventory_levels(): the configured inventory levels (from_chapter_level, item_types). Borrowed from config rather than cloned; callers sort/filter a local view.
get_item_by_code
Native port of content::get_item_by_code(code): find the item template whose next_mimic_item_code equals code, via ContentLookups::item_id_by_mimic_code (built at init from ItemTemplate::next_mimic_item_code). Returns the matching config returns the content_raw item map (the chest script then reads item.id).

Type Aliases§

InventoryLevel
One entry of content_raw::inventory_levels, mirroring the fields the chest_item_choose_script reads (from_chapter_level, item_types). This is exactly essences::item_case::InventoryLevel.