Advertisement
Guest User

Untitled

a guest
Feb 16th, 2023
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.74 KB | None | 0 0
  1.    void set_town_growth_tile(Town *town, TileIndex tile, TownGrowthTileState state);
  2.     bool check_build_station_command(CommandPacket *cp, const NetworkClientInfo *ci);;
  3.     // Called before accepting client connection
  4.     virtual bool pre_client_connected(CompanyID playas);
  5.  
  6.     // For every client_connected client_disconnected is called
  7.     virtual void on_client_connected(NetworkClientSocket *cs, NetworkClientInfo *ci);
  8.     virtual void on_client_disconnected(NetworkClientSocket *cs);
  9.  
  10.     // For every client_joined client_left is called
  11.     virtual void on_client_joined(NetworkClientSocket *cs);
  12.     virtual void on_client_left(NetworkClientSocket *cs);
  13.  
  14.     // Called in appropriate situations (before client_left and client_disconnected)
  15.     virtual void on_client_lost(NetworkClientSocket *cs);
  16.     virtual void on_client_quit(NetworkClientSocket *cs);
  17.     virtual void on_client_error(NetworkClientSocket *cs, NetworkErrorCode errorno, std::string_view error);
  18.  
  19.     virtual bool pre_client_changed_company(const NetworkClientInfo *ci, const Company *company);
  20.     virtual void do_client_set_name(NetworkClientInfo *ci, std::string_view name);
  21.  
  22.     virtual void on_company_announced(const Company *company, NetworkClientInfo *ci);
  23.     // Called for every company close except scenario editor reset
  24.     virtual bool pre_company_password_change(const Company *company, const NetworkClientInfo *ci, std::string_view new_password);
  25.     virtual void on_company_password_change(Company *company);
  26.  
  27.     virtual void on_chat_broadcast(NetworkClientInfo *from_ci, NetworkAction action,
  28.                                    std::string_view message, bool from_admin);
  29.  
  30.     virtual void on_station_built(Company *company, Station *station);
  31.  
  32.     virtual void on_new_game();
  33.     virtual void on_network_initialized();
  34.  
  35.     virtual void do_restart();
  36.     virtual void on_land_terraformed(const Company *company);
  37.  
  38.     virtual void on_industry_funded(Company *company, Industry *industry);
  39.     virtual void on_industry_opened(Industry *industry) { this->controller->on_industry_opened(industry); };
  40.     virtual void on_industry_tick(Industry *industry);
  41.     virtual void on_industry_production_changed(Industry *industry);
  42.     virtual void on_industry_closed(Industry *industry);
  43.  
  44.     virtual void on_subsidy_awarded(Company *company, Subsidy *subsidy);
  45.     virtual bool pre_autoclean_companies();
  46.     virtual bool pre_command_accepted(const cmd::Container &cc, NetworkClientInfo *ci);
  47.     virtual void on_command_executed(const CommandCost &res, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, const std::string_view text, ::ClientID client_id);
  48.     // virtual void on_company_money_changed(const Company *company) {
  49.     //     this->on_company_balance_changed(company);
  50.     // };
  51.     virtual void set_error();
  52.     // virtual bool can_client_join_company(CompanyID company_id,
  53.     //  const char *client_name, const NetworkAddress &client_address) { return false; }
  54.  
  55.     virtual void on_vehicle_crashed(Vehicle *vehicle, uint people_died);
  56.  
  57.     virtual void end_game(bool instant=false);
  58.     virtual void update_db_companies();
  59.     void calc_exp();
  60.     int8 calc_user_rexp(const Company *company, db::UserID user_id, GoalValue score,
  61.                         double score_factor);
  62.     std::string calc_company_exp(const Company *company, bool game_end);
  63.  
  64. protected:
  65.     TTDState ttd;
  66.     bool rules_disabled[10] = {true, true};
  67.  
  68.     virtual void init_strings(LanguageStrings *ls);
  69.     virtual void init_story_book(LanguageStrings *ls);
  70.     virtual void init_chat_commands();
  71.     void make_savegame(SavegameType type, db::CompanyID company_id=0, uint objective_id=0);
  72.     Company *create_server_company(Colours colour);
  73.     void send_console_welcome(const ChatClient &client) {};
  74.     void show_company_locked_popup(const Company *company);
  75.     void move_client_to_company(const ChatClient &client, const NetworkClientInfo *ci, CompanyID company_id);
  76.     CompanyAutocleanReason get_company_autoclean_reson(const Company *company);
  77.     bool pre_area_clear(Company *company, CommandPacket *cp, const NetworkClientInfo *ci);
  78.  
  79.     cmd::text::StringRef select_space_padding(int64 value, uint8 size, bool use_comma=false);
  80.     void init_goal_types();
  81.     void on_new_day();
  82.     void on_new_month();
  83.     void on_client_changed_company(NetworkClientInfo *ci, Company *company);
  84.  
  85.     void chat_cmd_restart(bool mod_mode,  ChatClient &client, std::string_view gm_desc);
  86.     void on_map_initialized();
  87.     TypedValue get_time_left();
  88.     void update_story_game_duration();
  89.  
  90.     virtual void on_company_created(Company *company, NetworkClientInfo *ci);
  91.     virtual void on_company_closed(Company *company, CompanyRemoveReason reason);
  92.     virtual void on_realtime_tick();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement