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::{
54    connect, connect_reject_message, connect_tcp, default_server_addr,
55    is_character_busy_connect_error, ConnectOptions, CHARACTER_ALREADY_CONNECTED,
56};
57pub use flatland_protocol::AuthCredential;
58pub use game::{
59    body_slot_label, equip_paperdoll_rows, format_binding_mode, format_binding_ttl,
60    format_status_bindings_suffix, inventory_category_group, category_default_listable,
61    list_label_matches, page_list_index,
62    worker_error_is_transient, worker_error_is_hud_noise, worker_attention_line, BankUiMode, CharacterSheetTab, ContextLine, DEFAULT_TICK_HZ, EquipPaperdollRow,
63    FarmAccessRow, GameClient, GameState, GrantTargetOption, GrantTargetPicker, InventoryBrowserLine, InventoryRow,
64    InventoryRowView, InventorySection, InventoryTab, LedgerPeriod, LIST_PAGE_SIZE, LoadoutHotbarChoice, MarketListSourceKind,
65    MarketUiMode, MoveOption,
66    MoveOptionKind, MovePicker, NearbyContainer, RotationEditorMode, RotationEditorState, ShopTab,
67    StoragePickOption, StorageUiMode, WorkerGiveOption, WorkerGivePicker, WorkerGiveTargetOption,
68    WorkerGiveTargetPicker, WorkerTakePicker, WorkerTeachOption, WorkerTeachPicker, ClaimModeState, RelocateModeState, CONTAINER_RANGE_M,
69    WORKER_GIVE_RANGE_M, resource_node_near_action_suffix, resource_node_near_display_label,
70};
71pub use worker_route_editor::{
72    node_candidates, node_candidates_stable, owned_container_candidates, owned_container_candidates_with_occupants,
73    owned_container_candidates_with_occupants_and_buildings,
74    owned_lodging_container_ids, owned_lodging_container_ids_with_occupants,
75    owned_storage_template_ids, pick_lodging_container_at, pick_resource_node_at,
76    route_editor_lodging_anchor,
77    pick_storage_container_at, pick_trade_npc_at, route_item_template_candidates,
78    summarize_contents, trade_npc_candidates, worker_craft_blueprint_ids, ContainerCandidate,
79    NodeCandidate, RouteEditorClick, RouteEditorSheet, TradeNpcCandidate, WithdrawLineDraft,
80    WithdrawLineMode, WorkerRouteEditorState, WorkerRouteStop, WorkerRouteWaypoint,
81    WorkerRouteWithdrawItem, ADD_MENU, WAYPOINT_MENU, FarmPlotAction, harvest_picker_row_count,
82    harvest_picker_row_matches, list_filter_row_matches, ROUTE_PICKER_DONE_ROW,
83    SELL_ITEM_TOGGLE_ROW, sell_item_picker_row_count,
84};
85pub use harvest_debug::{verbose as harvest_debug_verbose, TARGET as HARVEST_LOG_TARGET};
86pub use navigation::AutoNavigator;
87pub use remote::RemoteSession;
88pub use session::{PlayConnection, SessionEvent};
89pub use settings::{load_client_settings, ClientKeyBindings, ClientSettings};
90pub use update::{
91    apply_update, check_for_update, check_updates_enabled, cleanup_old_binaries,
92    default_latest_url, fetch_latest_manifest, is_newer, local_version, platform_tag, update_dir,
93    AppliedUpdate, Artifact, UpdateAvailable, UpdateManifest,
94};
95pub use social::{
96    chat_slash_help_text, contacts_from_stacks, is_chat_slash_line, parse_chat_slash,
97    self_chat_rgb, speaker_chat_rgb, AudioCue, ChatLogEntry, ChatSlashCommand, ChatThreadKind,
98    LastWhisperPeer, PendingTradeRequest, PlayerVerbState, SocialChatState, SpeakingBubble,
99    TradeUiState, WhisperContact, WhisperPouchUi,
100};
101pub use use_world::{UseWorldCandidate, UseWorldKind, UseWorldProbe, USE_WORLD_NEARBY_SCAN_M};
102pub use world_zones::{zone_friendly_label, WorldZoneChip, WorldZoneLayer};