Skip to main content

flatland_client_lib/
lib.rs

1//! Shared gameplay session state for TUI, bots, and third-party clients.
2
3mod assets;
4mod asset_backend;
5mod bot;
6mod character_sheet;
7mod client_config;
8mod connect;
9pub mod content_pack;
10pub mod currency;
11mod publish_packs;
12mod game;
13mod worker_route_editor;
14pub mod harvest_debug;
15pub mod navigation;
16mod remote;
17mod session;
18mod settings;
19mod social;
20mod update;
21mod use_world;
22mod world_zones;
23
24pub use asset_backend::{
25    mime_for_path, store_from_config, AssetBackendConfig, AssetBackendKind, AssetStore,
26    GcsAssetStore, LocalAssetStore, S3AssetStore,
27};
28pub use assets::{
29    assets_index_url, build_bundle_index, build_client_bundle_index, firebase_download_url,
30    firebase_object_path, find_repo_paperdoll_dir, needs_asset_sync,
31    paperdoll_has_keyframe_animations, read_local_state, read_repo_publish_rev,
32    resolve_bundle_file_path, resolve_paperdoll_dir, resolve_sprites_dir, should_prefer_repo_assets,
33    sync_assets, synced_rev_dir, urlencoding_encode_path, AssetBundleIndex, AssetFileEntry,
34    AssetSyncKind, AssetSyncOptions, AssetSyncResult, ClientBundleSources, LocalAssetState,
35    DEFAULT_FIREBASE_BUCKET, ASSETS_INDEX_OBJECT,
36};
37pub use content_pack::{
38    build_sim_pack_index, download_sim_pack, ensure_sim_pack_cached, resolve_sim_pack_file,
39    sim_pack_cache_dir, upload_sim_pack, SIM_PACK_ASSET_DIRS,
40};
41pub use publish_packs::{publish_content_packs, publish_content_packs_opts, PublishPacksResult};
42pub use bot::{BotClient, BotConfig, BotStats};
43pub use character_sheet::{
44    build_character_sheet, format_pool_xp, format_progress_pct, format_xp_band,
45    format_xp_band_compact, format_xp_delta, format_xp_value, AttributeRow, CharacterSheet,
46    PoolRow, SheetSync, SkillRow,
47};
48pub use client_config::{
49    api_base_url_for_host, apply_host_override, default_api_base_url, default_game_server_addr,
50    host_override_active, normalize_host_input, resolve_game_host_addr, ClientConfig,
51    FloatingChatPrefs, GfxWindowPrefs, DEFAULT_API_PORT, DEFAULT_GAME_PORT,
52};
53pub use connect::{connect, connect_tcp, default_server_addr, ConnectOptions};
54pub use flatland_protocol::AuthCredential;
55pub use game::{
56    body_slot_label, equip_paperdoll_rows, format_binding_mode, format_binding_ttl,
57    format_status_bindings_suffix, inventory_category_group, category_default_listable,
58    list_label_matches, page_list_index,
59    worker_error_is_transient, worker_error_is_hud_noise, worker_attention_line, BankUiMode, CharacterSheetTab, ContextLine, DEFAULT_TICK_HZ, EquipPaperdollRow,
60    FarmAccessRow, GameClient, GameState, GrantTargetOption, GrantTargetPicker, InventoryBrowserLine, InventoryRow,
61    InventoryRowView, InventorySection, InventoryTab, LedgerPeriod, LIST_PAGE_SIZE, LoadoutHotbarChoice, MarketListSourceKind,
62    MarketUiMode, MoveOption,
63    MoveOptionKind, MovePicker, NearbyContainer, RotationEditorMode, RotationEditorState, ShopTab,
64    StoragePickOption, StorageUiMode, WorkerGiveOption, WorkerGivePicker, WorkerGiveTargetOption,
65    WorkerGiveTargetPicker, WorkerTakePicker, WorkerTeachOption, WorkerTeachPicker, ClaimModeState, RelocateModeState, CONTAINER_RANGE_M,
66    WORKER_GIVE_RANGE_M, resource_node_near_action_suffix, resource_node_near_display_label,
67};
68pub use worker_route_editor::{
69    node_candidates, node_candidates_stable, owned_container_candidates, owned_container_candidates_with_occupants,
70    owned_container_candidates_with_occupants_and_buildings,
71    owned_lodging_container_ids, owned_lodging_container_ids_with_occupants,
72    owned_storage_template_ids, pick_lodging_container_at, pick_resource_node_at,
73    route_editor_lodging_anchor,
74    pick_storage_container_at, pick_trade_npc_at, route_item_template_candidates,
75    summarize_contents, trade_npc_candidates, worker_craft_blueprint_ids, ContainerCandidate,
76    NodeCandidate, RouteEditorClick, RouteEditorSheet, TradeNpcCandidate, WithdrawLineDraft,
77    WithdrawLineMode, WorkerRouteEditorState, WorkerRouteStop, WorkerRouteWaypoint,
78    WorkerRouteWithdrawItem, ADD_MENU, WAYPOINT_MENU, FarmPlotAction, harvest_picker_row_count,
79    harvest_picker_row_matches, list_filter_row_matches, ROUTE_PICKER_DONE_ROW,
80    SELL_ITEM_TOGGLE_ROW, sell_item_picker_row_count,
81};
82pub use harvest_debug::{verbose as harvest_debug_verbose, TARGET as HARVEST_LOG_TARGET};
83pub use navigation::AutoNavigator;
84pub use remote::RemoteSession;
85pub use session::{PlayConnection, SessionEvent};
86pub use settings::{load_client_settings, ClientKeyBindings, ClientSettings};
87pub use update::{
88    apply_update, check_for_update, check_updates_enabled, cleanup_old_binaries,
89    default_latest_url, fetch_latest_manifest, is_newer, local_version, platform_tag, update_dir,
90    AppliedUpdate, Artifact, UpdateAvailable, UpdateManifest,
91};
92pub use social::{
93    contacts_from_stacks, self_chat_rgb, speaker_chat_rgb, AudioCue, ChatLogEntry, ChatThreadKind,
94    PendingTradeRequest, PlayerVerbState, SocialChatState, SpeakingBubble, TradeUiState,
95    WhisperContact, WhisperPouchUi,
96};
97pub use use_world::{UseWorldCandidate, UseWorldKind, UseWorldProbe, USE_WORLD_NEARBY_SCAN_M};
98pub use world_zones::{zone_friendly_label, WorldZoneChip, WorldZoneLayer};