syntax = "proto3";
package proto;

option go_package = "/csproto";

import "options.proto";

enum FACTORY_FORMULA_VISIBLE_REASON {
    VISIBLE_REASON_GET_NEW_ITEM = 0;
    VISIBLE_REASON_UNLOCK = 1;
    VISIBLE_REASON_ITEM_VISIBLE = 2;
    VISIBLE_REASON_NEW_BUILDING = 3;
    VISIBLE_REASON_NEW_BUILDING_MODE = 4;
    VISIBLE_REASON_NEW_FORMULA_DONE = 5;
}
message SCD_FACTORY_STT_NODE {
    string id = 1;
    int32 state = 2;
    map<string, int32> values = 3;
    map<string, bool> flags = 4;
    bool hidden = 5;
}
message SCD_FACTORY_STT_PACKAGE {
    string id = 1;
    int32 state = 2;
    map<string, int32> values = 3;
    map<string, bool> flags = 4;
    bool hidden = 5;
}
message SCD_FACTORY_STT_LAYER {
    string id = 1;
    int32 state = 2;
}
message SCD_FACTORY_STT_CATEGORY {
    string id = 1;
    bool hidden = 2;
}
message SCD_FACTORY_SYNC_STT {
    repeated SCD_FACTORY_STT_NODE nodes = 1;
    repeated SCD_FACTORY_STT_PACKAGE packages = 2;
    repeated SCD_FACTORY_STT_LAYER layers = 3;
    repeated SCD_FACTORY_STT_CATEGORY categories = 4;
}
message SCD_FACTORY_SYNC_FORMULA_MAN {
    repeated string unlocked = 1;
    repeated string visible = 2;
    map<string, SCD_FACTORY_SYNC_FORMULA_MODE> modes = 3;
    repeated string level_up = 4;
    repeated string product_manual = 5;
}
message SCD_FACTORY_SYNC_FORMULA_MODE {
    repeated string building_ids = 1;
}
message SCD_FACTORY_BUS_FREE_CNT_LIMIT {
    int32 bus_start_limit = 1;
    int32 bus_free_limit = 2;
}
message SCD_FACTORY_PANEL_BUS_FREE_LIMIT {
    map<int32, SCD_FACTORY_BUS_FREE_CNT_LIMIT> bus_free_panel_limit = 1;
}
message SCD_FACTORY_SYNC_PROGRESS_STATUS {
    repeated string building_power_diffuser_enable = 1;
    repeated string building_power_can_be_wire_start = 2;
    map<string, SCD_FACTORY_PANEL_BUS_FREE_LIMIT> bus_free_limit = 3;
    map<string, SCD_FACTORY_BUILDING_DOMAIN_PLACE_LIMIT> domain_place_limit = 4;
}
message SC_FACTORY_SYNC {
    SCD_FACTORY_SYNC_FORMULA_MAN formula_man = 1;
    SCD_FACTORY_SYNC_STT stt = 2;
    SCD_FACTORY_SYNC_PROGRESS_STATUS progress_status = 3;
}
message SC_FACTORY_MODIFY_FORMULA_MAN {
    repeated string new_unlocked = 1;
    repeated string new_product_manual = 2;
    repeated string new_level_up = 3;
}
message SC_FACTORY_MODIFY_STT {
    repeated SCD_FACTORY_STT_NODE nodes = 1;
    repeated SCD_FACTORY_STT_PACKAGE packages = 2;
    repeated SCD_FACTORY_STT_LAYER layers = 3;
    repeated SCD_FACTORY_STT_CATEGORY categories = 4;
}
message FACTORY_FORMULA_VISIABLE {
    repeated string formula_list = 1;
    repeated string output_list = 2;
    repeated string source = 3;
    FACTORY_FORMULA_VISIBLE_REASON reason = 4;
}
message SC_FACTORY_MODIFY_VISIBLE_FORMULA {
    FACTORY_FORMULA_VISIABLE new_visible = 1;
}
message SC_FACTORY_MODIFY_FORMULA_MODE {
    string mode = 1;
    repeated string new_building_ids = 2;
}
message SCD_FACTORY_BUILDING_DOMAIN_PLACE_LIMIT {
    map<string, int32> building_limit = 1;
}
message SC_FACTORY_MODIFY_PROGRESS_STATUS {
    repeated string add_building_power_diffuser_enable = 1;
    repeated string add_building_power_can_be_wire_start = 3;
    map<string, SCD_FACTORY_PANEL_BUS_FREE_LIMIT> bus_free_limit = 4;
    map<string, SCD_FACTORY_BUILDING_DOMAIN_PLACE_LIMIT> domain_place_limit = 5;
}
message SC_FACTORY_SYNC_SCOPE {
    int32 scope_name = 1;
    string current_chapter_id = 2;
    repeated string active_chapter_ids = 3;
    SCD_FACTORY_SYNC_HUB_TRANSPORT_ROUTE_MANAGER transport_route = 5;
    SCD_FACTORY_STATISTIC_BOOKMARK book_mark = 6;
    SCD_FACTORY_SYNC_PANEL_STORE panel_store = 7;
    SCD_FACTORY_SYNC_SIGN_MGR sign_mgr = 8;
    SCD_FACTORY_SYNC_SHARED_MGR shared_mgr = 9;
}
message CS_FACTORY_STATISTIC_SET_BOOKMARK_ITEM_IDS {
    repeated string item_ids = 1;
    bool is_remove = 2;
    int32 scope_name = 11;
}
message SC_FACTORY_MODIFY_STATISTIC_BOOKMARK {
    SCD_FACTORY_STATISTIC_BOOKMARK book_mark = 1;
    int32 scope_name = 11;
}
message SCD_FACTORY_STATISTIC_BOOKMARK {
    repeated string bookmark_item_ids = 1;
}
message SCD_FACTORY_SYNC_HUB_TRANSPORT_ROUTE_MANAGER {
    int64 update_ts = 1;
    repeated SCD_FACTORY_HUB_TRANSPORT_ROUTE routes = 2;
}
message SCD_FACTORY_HUB_TRANSPORT_ROUTE {
    string chapter_id = 1;
    int32 index = 2;
    string target_chapter_id = 3;
    string item_id = 4;
    int32 item_num = 5;
    int32 item_num_max = 6;
    int32 status = 7;
    int64 progress = 8;
    bool lossless = 9;
}
message CS_FACTORY_HUB_TRANSPORT_ROUTE_SET {
    int32 scope_name = 1;
    string chapter_id = 2;
    int32 index = 3;
    string target_chapter_id = 4;
    string item_id = 5;
    int32 item_num_max = 6;
    bool lossless = 7;
}
message CS_FACTORY_HUB_TRANSPORT_ROUTE_RESET {
    int32 scope_name = 1;
    string chapter_id = 2;
    int32 index = 3;
}
message CS_FACTORY_HUB_TRANSPORT_ROUTE_RESTART {
    int32 scope_name = 1;
    string chapter_id = 2;
    int32 index = 3;
}
message SC_FACTORY_HUB_TRANSPORT_ROUTE_MODIFY {
    SCD_FACTORY_SYNC_HUB_TRANSPORT_ROUTE_MANAGER transport_route_modified = 1;
}
message SC_FACTORY_RELEASE_SCOPE {
    int32 scope_name = 1;
    repeated string delete_chapter_id_list = 11;
}
message SC_FACTORY_MODIFY_SCOPE {
    int32 scope_name = 1;
    string current_chapter_id = 2;
    repeated string delete_chapter_id_list = 11;
}
message SC_FACTORY_SOIL_RECLAIM {
    int32 scope_name = 1;
    string chapter_id = 2;
    uint32 node_id = 3;
    bool result = 4;
}
message SC_FACTORY_SOIL_WATER {
    int32 scope_name = 1;
    string chapter_id = 2;
    uint32 node_id = 3;
    bool result = 4;
}
message SC_FACTORY_SOIL_HARVEST {
    int32 scope_name = 1;
    string chapter_id = 2;
    uint32 node_id = 3;
    bool result = 4;
}
message CS_FACTORY_SOIL_FERTILIZE {
    int32 scope_name = 1;
    string chapter_id = 2;
    uint32 node_id = 3;
    string item_id = 4;
}
message SC_FACTORY_SOIL_FERTILIZE {
    int32 scope_name = 1;
    string chapter_id = 2;
    uint32 node_id = 3;
    string item_id = 4;
    bool result = 5;
}
message CS_FACTORY_STT_UNLOCK_LAYER {
    string layer_id = 1;
}
message CS_FACTORY_STT_UNLOCK_NODE {
    string node_id = 1;
}
message CS_FACTORY_SOIL_RECLAIM {
    int32 scope_name = 1;
    string chapter_id = 2;
    uint32 node_id = 3;
    uint64 char_object_id = 4;
}
message CS_FACTORY_SOIL_WATER {
    int32 scope_name = 1;
    string chapter_id = 2;
    uint32 node_id = 3;
    uint64 char_object_id = 4;
}
message CS_FACTORY_SOIL_HARVEST {
    int32 scope_name = 1;
    string chapter_id = 2;
    uint32 node_id = 3;
    uint64 char_object_id = 4;
}
message SC_FACTORY_SYNC_OFFLINE_INFO {
    int64 max_offline_calc_sec = 1;
    int64 end_offline_calc_ts = 2;
    int64 offline_sec = 3;
    int64 miss_offline_sec = 4;
}
message CS_FACTORY_HUB_WORKSHOP_MAKE {
    int32 scope_name = 1;
    uint32 node_id = 2;
    string formula_id = 3;
    int32 multi = 4;
}
message SC_FACTORY_HUB_WORKSHOP_MAKE {
    bool success = 1;
}
message CS_FACTORY_PRODUCT_MANUAL_UNLOCK {
    int32 scope_name = 1;
    repeated string id_list = 2;
}
message SC_FACTORY_PRODUCT_MANUAL_UNLOCK {
    int32 scope_name = 1;
    repeated string id_list = 2;
}
message CS_FACTORY_MANUALLY_WORK_EXEC {
    int32 scope_name = 1;
    string formula_id = 2;
    int32 count = 3;
}
message SC_FACTORY_MANUALLY_WORK_EXEC {
    int32 scope_name = 1;
    string formula_id = 2;
    int32 count = 3;
}
message CS_FACTORY_PANEL_STORE_BUY {
    string id = 1;
}
message SC_FACTORY_MODIFY_PANEL_STORE {
    repeated SCD_FACTORY_PANEL_STORE_GOOD goods = 1;
}
message SCD_FACTORY_SYNC_PANEL_STORE {
    repeated SCD_FACTORY_PANEL_STORE_GOOD goods = 1;
}
message SCD_FACTORY_PANEL_STORE_GOOD {
    string id = 1;
    int32 state = 2;
}
message SCD_FACTORY_SYNC_SIGN_MGR {
    repeated SCD_FACTORY_SIGN_NODE_INFO sign_node = 1;
}
message SCD_FACTORY_SIGN_NODE_INFO {
    string chapter_id = 1;
    uint32 node_id = 2;
    repeated int32 sign_id = 3;
}
message SC_FACTORY_MODIFY_SIGN_MGR {
    int32 scope_name = 1;
    SCD_FACTORY_SYNC_SIGN_MGR sign_mgr = 2;
}
message SCD_FACTORY_SYNC_SHARED_MGR {
    repeated SCD_FACTORY_SHARED_NODE_INFO recevie_shared_nodes = 1;
}
message SCD_FACTORY_SHARED_NODE_INFO {
    int32 scene_num_id = 1;
    uint32 node_id = 2;
    uint64 owner_id = 3;
    uint64 shared_role_id = 4;
    int64 create_timestamp = 5;
}
message SC_FACTORY_MODIFY_SHARED_MGR {
    int32 scope_name = 1;
    SCD_FACTORY_SYNC_SHARED_MGR shared_mgr = 2;
    bool is_add = 3;
}
