Skip to main content

GameState

Struct GameState 

Source
pub struct GameState {
Show 152 fields pub session_id: SessionId, pub entity_id: EntityId, pub character_id: Option<Uuid>, pub tick: Tick, pub chunk_rev: u64, pub content_rev: u64, pub publish_rev: u64, pub entities: Vec<EntityState>, pub player: Option<EntityState>, pub resource_nodes: Vec<ResourceNodeView>, pub ground_drops: Vec<GroundDropView>, pub placed_containers: Vec<PlacedContainerView>, pub buildings: Vec<BuildingView>, pub doors: Vec<DoorView>, pub interior_map: Option<InteriorMapView>, pub npcs: Vec<NpcView>, pub blueprints: Vec<BlueprintView>, pub world_width_m: f32, pub world_height_m: f32, pub terrain_zones: Vec<TerrainZoneView>, pub z_platforms: Vec<ZPlatformView>, pub z_transitions: Vec<ZTransitionView>, pub world_clock: WorldClock, pub inventory: HashMap<String, u32>, pub inventory_hints: HashMap<String, InventoryHint>, pub logs: VecDeque<String>, pub intents_sent: u64, pub ticks_received: u64, pub connected: bool, pub disconnect_reason: Option<String>, pub show_stats: bool, pub hud_log_hidden: bool, pub show_equip_menu: bool, pub equip_menu_index: usize, pub show_craft_menu: bool, pub craft_menu_index: usize, pub craft_batch_quantity: u32, pub show_shop_menu: bool, pub shop_catalog: Option<ShopCatalog>, pub bank_panel: Option<BankPanel>, pub bank_menu_index: usize, pub bank_ui_mode: BankUiMode, pub storage_panel: Option<StoragePanel>, pub storage_menu_index: usize, pub storage_ui_mode: StorageUiMode, pub shop_tab: ShopTab, pub shop_menu_index: usize, pub shop_quantity: u32, pub shop_trade_log: VecDeque<String>, pub show_npc_verb_menu: bool, pub npc_verb_target: Option<String>, pub npc_verb_index: usize, pub player_verbs: PlayerVerbState, pub social_chat: SocialChatState, pub trade_ui: TradeUiState, pub whisper_pouch_ui: WhisperPouchUi, pub show_npc_chat: bool, pub npc_chat: Option<NpcChatState>, pub show_inventory_menu: bool, pub inventory_menu_index: usize, pub inventory_tab: InventoryTab, pub inventory_filter: String, pub inventory_filter_focused: bool, pub show_move_picker: bool, pub move_picker_index: usize, pub move_picker: Option<MovePicker>, pub show_grant_picker: bool, pub grant_picker_index: usize, pub grant_picker: Option<GrantTargetPicker>, pub show_destroy_picker: bool, pub destroy_confirm_pending: bool, pub destroy_picker: Option<DestroyPicker>, pub show_rename_prompt: bool, pub show_worker_rename: bool, pub rename_buffer: String, pub combat_target: Option<EntityId>, pub combat_target_label: Option<String>, pub combat_fx: Vec<CombatFx>, pub in_combat: bool, pub auto_attack: bool, pub combat_has_los: bool, pub attack_cd_ticks: u64, pub gcd_ticks: u64, pub weapon_ability_id: String, pub mainhand_template_id: Option<String>, pub mainhand_label: Option<String>, pub offhand_template_id: Option<String>, pub offhand_label: Option<String>, pub mainhand_hand_slots: u8, pub defense: Option<DefenseHud>, pub worn: BTreeMap<BodySlot, ItemStack>, pub carry_mass: f32, pub carry_mass_max: f32, pub encumbrance: EncumbranceState, pub inventory_stacks: Vec<ItemStack>, pub keychain_stacks: Vec<ItemStack>, pub whisper_pouch_stacks: Vec<ItemStack>, pub statuses: Vec<StatusEffectHud>, pub combat_target_detail: Option<CombatTargetHud>, pub cast_progress: Option<CastProgressHud>, pub ability_cooldowns: Vec<AbilityCooldownHud>, pub blocking_active: bool, pub max_target_slots: u8, pub combat_slots: Vec<CombatSlotHud>, pub rotation_presets: Vec<RotationPreset>, pub known_abilities: Vec<String>, pub hotbar: Vec<Option<String>>, pub max_abilities_per_rotation: u8, pub show_loadout_menu: bool, pub show_keychain_menu: bool, pub keychain_menu_index: usize, pub show_rotation_editor: bool, pub loadout_menu_index: usize, pub loadout_hotbar_slot: u8, pub loadout_ability_index: usize, pub loadout_focus_presets: bool, pub rotation_editor: RotationEditorState, pub harvest_in_progress: bool, pub harvest_started_at: Option<Instant>, pub pending_craft_ack: Option<(u32, String, u32)>, pub quest_log: Vec<QuestLogEntry>, pub interactables: Vec<InteractableView>, pub ledger: Option<PlayerLedgerView>, pub career: Option<PlayerCareerView>, pub character_sheet_tab: CharacterSheetTab, pub ledger_period: LedgerPeriod, pub show_quest_offer: bool, pub pending_quest_offer: Option<QuestOffer>, pub show_quest_menu: bool, pub quest_menu_index: usize, pub quest_withdraw_confirm: bool, pub hired_workers: Vec<HiredWorkerView>, pub show_workers_menu: bool, pub workers_menu_index: usize, pub workers_menu_compact: bool, pub worker_step_display: BTreeMap<String, StickyWorkerStep>, pub worker_error_display: BTreeMap<String, StickyWorkerError>, pub show_worker_give_picker: bool, pub worker_give_picker_index: usize, pub worker_give_picker: Option<WorkerGivePicker>, pub show_worker_give_target_picker: bool, pub worker_give_target_picker_index: usize, pub worker_give_target_picker: Option<WorkerGiveTargetPicker>, pub show_worker_take_picker: bool, pub worker_take_picker_index: usize, pub worker_take_picker: Option<WorkerTakePicker>, pub show_worker_teach_picker: bool, pub worker_teach_picker_index: usize, pub worker_teach_picker: Option<WorkerTeachPicker>, pub worker_route_editor: Option<WorkerRouteEditorState>, pub pending_worker_job_ack: Option<PendingWorkerJobAck>, pub progression_curve: Option<ProgressionCurve>,
}

Fields§

§session_id: SessionId§entity_id: EntityId§character_id: Option<Uuid>

Logged-in character — used to show owner-only container labels.

§tick: Tick§chunk_rev: u64§content_rev: u64§publish_rev: u64§entities: Vec<EntityState>§player: Option<EntityState>§resource_nodes: Vec<ResourceNodeView>§ground_drops: Vec<GroundDropView>§placed_containers: Vec<PlacedContainerView>§buildings: Vec<BuildingView>§doors: Vec<DoorView>§interior_map: Option<InteriorMapView>§npcs: Vec<NpcView>§blueprints: Vec<BlueprintView>§world_width_m: f32§world_height_m: f32§terrain_zones: Vec<TerrainZoneView>§z_platforms: Vec<ZPlatformView>§z_transitions: Vec<ZTransitionView>§world_clock: WorldClock§inventory: HashMap<String, u32>§inventory_hints: HashMap<String, InventoryHint>§logs: VecDeque<String>§intents_sent: u64§ticks_received: u64§connected: bool§disconnect_reason: Option<String>§show_stats: bool§hud_log_hidden: bool

When true, the bottom system LOG dock is collapsed (sidebar gains the space).

§show_equip_menu: bool§equip_menu_index: usize§show_craft_menu: bool§craft_menu_index: usize§craft_batch_quantity: u32

How many timed crafts to queue when confirming the craft menu.

§show_shop_menu: bool§shop_catalog: Option<ShopCatalog>§bank_panel: Option<BankPanel>§bank_menu_index: usize§bank_ui_mode: BankUiMode§storage_panel: Option<StoragePanel>§storage_menu_index: usize§storage_ui_mode: StorageUiMode§shop_tab: ShopTab§shop_menu_index: usize§shop_quantity: u32§shop_trade_log: VecDeque<String>

Recent buy/sell lines while the shop panel is open (gfx dock).

§show_npc_verb_menu: bool§npc_verb_target: Option<String>§npc_verb_index: usize§player_verbs: PlayerVerbState

Nearby player Speak / Whisper / Trade dock.

§social_chat: SocialChatState§trade_ui: TradeUiState§whisper_pouch_ui: WhisperPouchUi§show_npc_chat: bool§npc_chat: Option<NpcChatState>§show_inventory_menu: bool§inventory_menu_index: usize§inventory_tab: InventoryTab§inventory_filter: String§inventory_filter_focused: bool§show_move_picker: bool§move_picker_index: usize§move_picker: Option<MovePicker>§show_grant_picker: bool§grant_picker_index: usize§grant_picker: Option<GrantTargetPicker>§show_destroy_picker: bool§destroy_confirm_pending: bool§destroy_picker: Option<DestroyPicker>§show_rename_prompt: bool

Rename prompt for a selected container (n in inventory).

§show_worker_rename: bool

Rename prompt for a hired worker (n in workers menu).

§rename_buffer: String§combat_target: Option<EntityId>

Slot-1 combat target (mirrors server after SetTarget).

§combat_target_label: Option<String>§combat_fx: Vec<CombatFx>

Active combat footprints from the server (plans/39).

§in_combat: bool§auto_attack: bool§combat_has_los: bool§attack_cd_ticks: u64§gcd_ticks: u64§weapon_ability_id: String§mainhand_template_id: Option<String>§mainhand_label: Option<String>§offhand_template_id: Option<String>§offhand_label: Option<String>§mainhand_hand_slots: u8§defense: Option<DefenseHud>§worn: BTreeMap<BodySlot, ItemStack>

Worn body-slot items — armor, cloak, jewelry, backpack, belt.

§carry_mass: f32§carry_mass_max: f32§encumbrance: EncumbranceState§inventory_stacks: Vec<ItemStack>

Full nested inventory stacks from the server (root only; worn are separate).

§keychain_stacks: Vec<ItemStack>

Keys stowed on the virtual keychain (zero carry mass).

§whisper_pouch_stacks: Vec<ItemStack>

Whisper stones in the pouch (zero carry mass).

§statuses: Vec<StatusEffectHud>

Active status effects on the local player (buff/debuff strip).

§combat_target_detail: Option<CombatTargetHud>§cast_progress: Option<CastProgressHud>§ability_cooldowns: Vec<AbilityCooldownHud>§blocking_active: bool§max_target_slots: u8§combat_slots: Vec<CombatSlotHud>§rotation_presets: Vec<RotationPreset>§known_abilities: Vec<String>

Learned abilities from combat HUD (usable casts).

§hotbar: Vec<Option<String>>

Server-persisted hotbar bindings (index 0 = key 1).

§max_abilities_per_rotation: u8

Max abilities allowed in one rotation (mind score).

§show_loadout_menu: bool§show_keychain_menu: bool§keychain_menu_index: usize§show_rotation_editor: bool§loadout_menu_index: usize

Selected rotation preset in the loadout menu.

§loadout_hotbar_slot: u8

Selected hotbar slot (19) for bind/clear in the loadout menu.

§loadout_ability_index: usize

Selected known-ability row in the loadout menu.

§loadout_focus_presets: bool

When true, ↑/↓ navigate presets; when false, navigate known abilities.

§rotation_editor: RotationEditorState§harvest_in_progress: bool

True after a harvest intent is accepted until result/reject/disconnect.

§harvest_started_at: Option<Instant>

Wall-clock start of the current harvest; clears stale client state on timeout.

§pending_craft_ack: Option<(u32, String, u32)>

Craft log deferred until the server acks the craft intent.

§quest_log: Vec<QuestLogEntry>§interactables: Vec<InteractableView>§ledger: Option<PlayerLedgerView>§career: Option<PlayerCareerView>§character_sheet_tab: CharacterSheetTab§ledger_period: LedgerPeriod§show_quest_offer: bool§pending_quest_offer: Option<QuestOffer>§show_quest_menu: bool§quest_menu_index: usize§quest_withdraw_confirm: bool§hired_workers: Vec<HiredWorkerView>§show_workers_menu: bool§workers_menu_index: usize§workers_menu_compact: bool

Workers panel: one-line rows instead of full cards (more on screen).

§worker_step_display: BTreeMap<String, StickyWorkerStep>

Coarse step: line held per worker so AOI ticks cannot thrash the menu. Public so out-of-crate tests can construct GameState.

§worker_error_display: BTreeMap<String, StickyWorkerError>

Held worker route errors (readable when server clears last_error each tick).

§show_worker_give_picker: bool

Give-item sheet opened from the workers menu (g) — pick which item to give.

§worker_give_picker_index: usize§worker_give_picker: Option<WorkerGivePicker>§show_worker_give_target_picker: bool

Inventory g — pick which nearby worker receives the selected stack.

§worker_give_target_picker_index: usize§worker_give_target_picker: Option<WorkerGiveTargetPicker>§show_worker_take_picker: bool

Take-item sheet opened from the workers menu (i) — pick which worker stack to take.

§worker_take_picker_index: usize§worker_take_picker: Option<WorkerTakePicker>§show_worker_teach_picker: bool

Teach-blueprint sheet opened from the workers menu (t).

§worker_teach_picker_index: usize§worker_teach_picker: Option<WorkerTeachPicker>§worker_route_editor: Option<WorkerRouteEditorState>

Active harvest-route editor (he on a worker).

§pending_worker_job_ack: Option<PendingWorkerJobAck>

Awaiting IntentAck for the last route save (SetWorkerJob).

§progression_curve: Option<ProgressionCurve>

Server progression curve from the latest combat HUD (matches server-settings.yaml).

Implementations§

Source§

impl GameState

Source

pub fn push_log(&mut self, line: impl Into<String>)

Source

pub fn push_shop_trade_log(&mut self, line: impl Into<String>)

Source

pub fn clear_shop_trade_log(&mut self)

Source

pub fn is_alive(&self) -> bool

Source

pub fn npc_verb_options(&self) -> Vec<&'static str>

Verb menu entries for the current npc_verb_target.

Source

pub fn bank_menu_options(&self) -> Vec<&'static str>

Source

pub fn storage_menu_options(&self) -> Vec<String>

Source

pub fn storage_store_options(&self) -> Vec<StoragePickOption>

Loose on-person stacks eligible for town-storage store.

Source

pub fn storage_vault_options(&self) -> Vec<StoragePickOption>

Vault stacks eligible for take / ship.

Source

pub fn clear_harvest_state(&mut self)

Source

pub fn vitals(&self) -> Option<PlayerVitals>

Source

pub fn can_craft_blueprint(&self, blueprint: &BlueprintView) -> bool

Source

pub fn max_craft_batches(&self, blueprint: &BlueprintView) -> u32

Source

pub fn clamp_craft_batch_quantity(&mut self)

Source

pub fn craft_batch_adjust_quantity(&mut self, delta: i32)

Source

pub fn craft_batch_set_max(&mut self)

Source

pub fn apply_shop_catalog(&mut self, catalog: ShopCatalog)

Source

pub fn apply_bank_panel(&mut self, panel: BankPanel)

Source

pub fn apply_storage_panel(&mut self, panel: StoragePanel)

Source

pub fn clear_bank_panel(&mut self)

Source

pub fn clear_storage_panel(&mut self)

Source

pub fn shop_list_len(&self) -> usize

Source

pub fn shop_menu_move(&mut self, delta: i32)

Source

pub fn shop_quantity_adjust(&mut self, delta: i32)

Source

pub fn shop_quantity_set_max(&mut self)

Source

pub fn player_at_station_tag(&self, tag: &str) -> bool

Source

pub fn craft_missing_hint(&self, blueprint: &BlueprintView) -> Option<String>

Short hint for UI when a recipe cannot be started.

Source

pub fn player_entity(&self) -> Option<&EntityState>

Source

pub fn player_position(&self) -> (f32, f32)

Source

pub fn player_position_with_z(&self) -> (f32, f32, f32)

Source

pub fn sorted_inventory(&self) -> Vec<(String, u32, String)>

Source

pub fn inventory_item_category(&self, template_id: &str) -> Option<&str>

Source

pub fn stack_is_item_grant(stack: &ItemStack) -> bool

Source

pub fn grant_effect_id(stack: &ItemStack) -> Option<&str>

Source

pub fn grant_mode(stack: &ItemStack) -> &str

Source

pub fn grant_target_options(&self, grant: &ItemStack) -> Vec<GrantTargetOption>

Candidate gear for a grant consumable (inventory + worn).

Source

pub fn item_base_mass(&self, template_id: &str) -> f32

Source

pub fn item_base_volume(&self, template_id: &str) -> f32

Source

pub fn stack_mass(&self, stack: &ItemStack) -> f32

Source

pub fn container_volume_label(&self, row: &InventoryRow) -> String

Volume used / capacity / free space label for storage containers in the inventory UI.

Source

pub fn row_is_renameable_container(&self, row: &InventoryRow) -> bool

Source

pub fn max_movable_to( &self, template_id: &str, stack_qty: u32, from: &InventoryLocation, to: &InventoryLocation, parent_instance_id: Option<Uuid>, ) -> u32

Client-side estimate of how many units can move to to (server clamps authoritatively).

Source

pub fn move_picker_max_at_selection(&self) -> u32

Source

pub fn clamp_move_picker_quantity(&mut self)

Source

pub fn move_picker_adjust_quantity(&mut self, delta: i32)

Source

pub fn move_picker_set_quantity_max(&mut self)

Source

pub fn destroy_picker_adjust_quantity(&mut self, delta: i32)

Source

pub fn destroy_picker_set_quantity_max(&mut self)

Source

pub fn ingredient_status(&self, template_id: &str, need: u32) -> (u32, bool)

Source

pub fn currency_display(&self) -> String

Source

pub fn in_shallow_water(&self) -> bool

True when standing in a shallow-water terrain zone from the segment snapshot.

Source

pub fn terrain_at(&self, x: f32, y: f32) -> Option<TerrainKindView>

Source

pub fn terrain_zone_at(&self, x: f32, y: f32) -> Option<&TerrainZoneView>

First terrain zone containing (x, y) — highest z_order wins.

Source

pub fn elevation_at(&self, x: f32, y: f32) -> f32

Ground elevation from terrain zones (m).

Source

pub fn walkable_levels_at(&self, x: f32, y: f32) -> Vec<f32>

Walkable z levels at a map column (terrain + platforms).

Source

pub fn is_walkable_at_z(&self, x: f32, y: f32, z: f32) -> bool

Source

pub fn surface_elevation_at(&self, x: f32, y: f32) -> f32

Source

pub fn effective_inside_building(&self) -> Option<String>

Authoritative interior context from the server (inside_building flag).

Source

pub fn sync_inventory_from_stacks(&mut self, stacks: &[ItemStack])

Source

pub fn apply_interaction_notice(&mut self, notice: &InteractionNotice)

Apply server interaction deltas immediately (quest rewards, shop, etc.) so the inventory UI updates before the next tick snapshot arrives.

Source

pub fn worn_rows(&self) -> Vec<InventoryRow>

Worn body-slot items — each shown as a shell row (unequip via Enter) followed by its nested contents (e.g. pouches clipped onto a worn belt). BodySlot derives Ord in display order (Head/Body/Arms/Legs/Feet/Back/Waist), so BTreeMap iteration alone gives a stable row order.

Source

pub fn giveable_inventory_options(&self) -> Vec<WorkerGiveOption>

Root on-person stacks that can be handed to a hired worker.

Source

pub fn teachable_blueprint_options( &self, worker: &HiredWorkerView, ) -> Vec<WorkerTeachOption>

Employer-known blueprints the selected worker does not yet know.

Source

pub fn person_rows(&self) -> Vec<InventoryRow>

Loose on-person inventory (not worn, not inside a placed chest). Root stacks are ordered by category group; nested contents stay under their parent.

Source

pub fn person_rows_filtered(&self, filter: &str) -> Vec<InventoryRow>

Source

pub fn worn_rows_filtered(&self, filter: &str) -> Vec<InventoryRow>

Source

pub fn inventory_tree_rows(&self) -> Vec<(usize, ItemStack)>

Legacy alias used by the HUD sidebar summary (worn + on-person, unchanged).

Source

pub fn nearby_containers(&self) -> Vec<NearbyContainer>

Placed chests within CONTAINER_RANGE_M, nearest first. Contents are only populated when accessible — this is what makes a chest’s contents disappear the moment you walk away or it’s locked without your key.

Source

pub fn nearest_placed_container( &self, max_dist: f32, ) -> Option<PlacedContainerView>

Nearest placed chest within max_dist, regardless of accessibility.

Source

pub fn inventory_selectable_rows(&self) -> Vec<InventoryRow>

Selectable rows for the active inventory tab (and current filter). Index into this with inventory_menu_index; browser lines must use the same order.

Source

pub fn inventory_selected_row(&self) -> Option<InventoryRow>

Source

pub fn format_inventory_row(&self, row: &InventoryRow) -> InventoryRowView

Format one selectable inventory row for TUI/gfx (label + hints + mass/volume).

Source

pub fn inventory_browser_lines(&self) -> Vec<InventoryBrowserLine>

Sectioned inventory browser lines for the active tab. Selectable rows carry selectable_index matching inventory_menu_index.

Source

pub fn chest_pickup_destinations(&self, container_id: &str) -> Vec<MoveOption>

Destinations for picking up a placed chest/crate into inventory.

Source

pub fn move_destinations_for( &self, from: &InventoryLocation, from_parent_instance_id: Option<Uuid>, moving_instance_id: Option<Uuid>, moving_template_id: &str, ) -> Vec<MoveOption>

Build the “move to…” destination list for an item currently at from.

Source

pub fn worker_step_display_label(&self, worker_instance_id: &str) -> &str

Held coarse step label for the workers menu (step: line).

Source

pub fn worker_error_display_label( &self, worker_instance_id: &str, ) -> Option<&str>

Held error line for workers UI (detail + compact).

Source

pub fn target_for_slot(&self, slot: u8) -> Option<EntityId>

Entity id assigned to a combat slot (from server HUD).

Source

pub fn hotbar_ability(&self, slot_1_to_9: u8) -> Option<&str>

Ability bound to hotbar key 19 from server-persisted state. May be an ability id or item:<template_id> consumable binding.

Source

pub fn hotbar_slot_label(&self, slot_1_to_9: u8) -> Option<String>

Short label for a hotbar slot (ability id, or consumable name × qty).

Source

pub fn loadout_ability_choices(&self) -> Vec<String>

Known abilities plus current weapon ability (for loadout / rotation pickers).

Source

pub fn loadout_hotbar_choices(&self) -> Vec<LoadoutHotbarChoice>

Hotbar bind candidates: learned abilities, then on-person consumables.

Source

pub fn t1_candidates(&self) -> Vec<(EntityId, String)>

Hostile wildlife / monsters for T1 (Tab).

Source

pub fn t2_candidates(&self) -> Vec<(EntityId, String)>

Allies first, then monsters, for T2 (Shift+Tab). Includes self for heals.

Source

pub fn pick_combat_target_at( &self, wx: f32, wy: f32, slot_index: u8, radius_m: f32, ) -> Option<(EntityId, String)>

Nearest combat candidate within radius_m of world click (gfx click-to-target).

Source

pub fn combat_candidates(&self) -> Vec<(EntityId, String)>

Wildlife and other combat targets visible in AOI (NpcView.entity_id).

Source

pub fn refresh_combat_target_label(&mut self)

Source

pub fn active_quest_entries(&self) -> Vec<&QuestLogEntry>

Source

pub fn has_worker_lodging(&self) -> bool

True when the observer has at least one free lodging slot (max workers = beds).

Source

pub fn free_worker_lodging_slots(&self) -> i64

Owned lodging capacity minus currently hired workers.

Source

pub fn lodging_occupant_labels(&self, container_id: &str) -> Vec<String>

Display names of hired workers assigned to this lodging container.

Source

pub fn lodging_occupancy_label(&self, container_id: &str) -> Option<String>

Compact lodging occupancy for labels: "Elda, Ana", "vacant", or "" if not lodging.

Source

pub fn tracked_quest(&self) -> Option<&QuestLogEntry>

Source

pub fn nearest_interact_target(&self) -> Option<String>

Nearest interactable target for f (doors, NPCs, well, shallow water).

Source

pub fn nearest_quest_board(&self) -> Option<(String, f32)>

Nearest quest board and distance (any distance), for out-of-range feedback.

Source

pub fn template_display_name(&self, template_id: &str) -> String

Human-readable template name from synced catalog hints.

Source

pub fn placed_container_public_label(&self, c: &PlacedContainerView) -> String

Chest label for the location panel — generic type unless this player owns it.

Source

pub fn keychain_entries(&self) -> Vec<KeychainEntry>

Keys on person and stowed on the keychain for the keychain overlay.

Source

pub fn key_pair_chest_label(&self, stack: &ItemStack) -> Option<String>

Display name of the chest a container_key opens, when known on the client.

Source

pub fn key_inventory_label(&self, stack: &ItemStack) -> String

Keys always show the catalog name — never a chest rename or stray custom_name.

Source

pub fn key_inventory_hint(&self, stack: &ItemStack) -> String

Hint suffix for a key row ([key for …] or [key — unpaired]).

Source

pub fn container_name_for_lock_id(&self, lock: &str) -> Option<String>

Resolve a lock id to a container label (placed chest or one still on your person).

Source

pub fn key_drop_blocked(&self, stack: &ItemStack) -> bool

Keys cannot be dropped while their paired chest is locked.

Source

pub fn location_context_lines(&self) -> Vec<ContextLine>

Terrain, interactables, and map objects near the player for the HUD location panel.

Source§

impl GameState

Source

pub fn probe_use_world(&self) -> UseWorldProbe

Analyze AOI for f presentation (rings, HUD hint). Does not submit intents.

Trait Implementations§

Source§

impl Clone for GameState

Source§

fn clone(&self) -> GameState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GameState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more