Skip to main content

Crate flatland_client_lib

Crate flatland_client_lib 

Source
Expand description

Shared gameplay session state for TUI, bots, and third-party clients.

Re-exports§

pub use harvest_debug::verbose as harvest_debug_verbose;
pub use harvest_debug::TARGET as HARVEST_LOG_TARGET;
pub use navigation::AutoNavigator;

Modules§

currency
Client-side currency display from inventory stacks.
harvest_debug
Harvest / play-loop diagnostics.
navigation
Client-side pathfinding and auto-navigation toward a map target.

Macros§

harvest_trace
Log at info when verbose(), else debug — always uses TARGET.

Structs§

AttributeRow
BotClient
BotConfig
BotStats
CharacterSheet
ClientKeyBindings
ClientSettings
ConnectOptions
ContextLine
HUD line for the location / nearby panel.
GameClient
GameState
InventoryRow
One row in the inventory browser tree.
InventoryRowView
Formatted inventory row text shared by TUI and gfx browsers.
MoveOption
A destination the currently-picked item could be moved to.
MovePicker
Active “move to…” destination picker state for the selected inventory item.
NearbyContainer
A placed chest within CONTAINER_RANGE_M, with its contents pre-flattened for the browser (empty when locked without the matching key).
PoolRow
RemoteSession
RotationEditorState
Local rotation editor UI state (not persisted).
SkillRow
UseWorldCandidate
UseWorldProbe

Enums§

AuthCredential
How the client authenticates to the game gateway. Uses default serde enum encoding (postcard-compatible; not internally tagged).
InventoryBrowserLine
One line in the sectioned inventory browser (headers are non-selectable).
InventorySection
Broad section of the inventory browser a row belongs to (drives the grouped “Worn” / “On you” / “Nearby chest” headers in the UI).
MoveOptionKind
RotationEditorMode
Rotation editor overlay mode (plans/26 §C2.5).
SessionEvent
SheetSync
ShopTab
UseWorldKind
What kind of world-use target this is (drives tint + verb).

Constants§

CONTAINER_RANGE_M
Max distance (m) a placed chest can be browsed/moved-into from the inventory UI. Mirrors flatland_sim::interaction::CONTAINER_INTERACTION_RADIUS_M so the client only ever shows chests the server will actually let you use — this is what makes a chest disappear from the menu as soon as you walk away.
USE_WORLD_NEARBY_SCAN_M
Candidates beyond this are omitted from the probe list.

Traits§

PlayConnection
Gameplay session handle (remote TCP or in-process worker).

Functions§

body_slot_label
Short display label for a body slot (plans/08 §4.1) — shared by the inventory browser section headers and the move-destination picker.
build_character_sheet
connect
connect_tcp
default_server_addr
format_pool_xp
format_progress_pct
format_xp_band
format_xp_band_compact
format_xp_delta
Signed delta from baseline — always enough decimals to see harvest ticks.
format_xp_value
Adaptive precision so tiny harvest gains (0.08 XP) don’t display as 0.0.
load_client_settings