summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_admin.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-10-17 17:38:16 +0000
committerrubidium <rubidium@openttd.org>2010-10-17 17:38:16 +0000
commitca5d9f70024a513b4d5a6cfcddb3b250f591d630 (patch)
treed8b7f60f2b9315b0ee8fbfb8e2da267b172c58a0 /src/network/core/tcp_admin.h
parentae20cb4f3dff0f3a9478e918b90ef61279c8b33c (diff)
downloadopenttd-ca5d9f70024a513b4d5a6cfcddb3b250f591d630.tar.xz
(svn r20971) -Add: company economy updates at intervals to remote admins (dihedral)
Diffstat (limited to 'src/network/core/tcp_admin.h')
-rw-r--r--src/network/core/tcp_admin.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/network/core/tcp_admin.h b/src/network/core/tcp_admin.h
index fdd9cf81c..c13d37a1b 100644
--- a/src/network/core/tcp_admin.h
+++ b/src/network/core/tcp_admin.h
@@ -49,6 +49,7 @@ enum PacketAdminType {
ADMIN_PACKET_SERVER_COMPANY_INFO, ///< The server gives the admin information about a company.
ADMIN_PACKET_SERVER_COMPANY_UPDATE, ///< The server gives the admin an information update on a company.
ADMIN_PACKET_SERVER_COMPANY_REMOVE, ///< The server tells the admin that a company was removed.
+ ADMIN_PACKET_SERVER_COMPANY_ECONOMY, ///< The server gives the admin some economy related company information.
INVALID_ADMIN_PACKET = 0xFF, ///< An invalid marker for admin packets.
};
@@ -65,6 +66,7 @@ enum AdminUpdateType {
ADMIN_UPDATE_DATE, ///< Updates about the date of the game.
ADMIN_UPDATE_CLIENT_INFO, ///< Updates about the information of clients.
ADMIN_UPDATE_COMPANY_INFO, ///< Updates about the generic information of companies.
+ ADMIN_UPDATE_COMPANY_ECONOMY, ///< Updates about the economy of companies.
ADMIN_UPDATE_END ///< Must ALWAYS be on the end of this list!! (period)
};
@@ -259,6 +261,21 @@ protected:
*/
DECLARE_ADMIN_RECEIVE_COMMAND(ADMIN_PACKET_SERVER_COMPANY_REMOVE);
+ /**
+ * Economy update of a specific company:
+ * uint8 ID of the company.
+ * uint64 Money.
+ * uint64 Loan.
+ * uint64 Income.
+ * uint64 Company value (last quarter).
+ * uint16 Performance (last quarter).
+ * uint16 Delivered cargo (last quarter).
+ * uint64 Company value (previous quarter).
+ * uint16 Performance (previous quarter).
+ * uint16 Delivered cargo (previous quarter).
+ */
+ DECLARE_ADMIN_RECEIVE_COMMAND(ADMIN_PACKET_SERVER_COMPANY_ECONOMY);
+
NetworkRecvStatus HandlePacket(Packet *p);
public:
NetworkRecvStatus CloseConnection(bool error = true);