src/ai/api/ai_object.hpp
author truebrain
Mon, 25 Feb 2008 14:03:14 +0000
branchnoai
changeset 9760 265fdd2130c3
parent 9695 708f1e3cc4c4
child 9814 be51ea0adc29
permissions -rw-r--r--
(svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
[NoAI] -Codechange: minor comment/code update in ai_threads.cpp
9361
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
     1
/* $Id$ */
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
     2
9416
432e904ce0e1 (svn r9214) [NoAI] -Documentation: wrong @file flag
truelight
parents: 9414
diff changeset
     3
/** @file ai_object.hpp declaration of class for AIObject class */
9361
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
     4
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
     5
#ifndef AI_OBJECT_HPP
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
     6
#define AI_OBJECT_HPP
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
     7
9441
03da911c8d5f (svn r9255) [NoAI] -Add: each AI now runs in a seperate thread. The main thread is suspended if any AI thread is running, only one AI thread runs at the time.
truelight
parents: 9427
diff changeset
     8
#include "../../stdafx.h"
03da911c8d5f (svn r9255) [NoAI] -Add: each AI now runs in a seperate thread. The main thread is suspended if any AI thread is running, only one AI thread runs at the time.
truelight
parents: 9427
diff changeset
     9
#include "../../functions.h"
9679
788e083db48b (svn r10625) [NoAI] -Fix: returning C++ classes, by creating a temp SQ class, had its problems, this should fix them all (double-frees, wrong scope, ..)
truelight
parents: 9629
diff changeset
    10
#include "../../misc/countedptr.hpp"
9361
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
    11
9475
58c20c0e394f (svn r9320) [NoAI] -Fix: added some doxygen comments to make doxygen happy
truelight
parents: 9473
diff changeset
    12
/**
58c20c0e394f (svn r9320) [NoAI] -Fix: added some doxygen comments to make doxygen happy
truelight
parents: 9473
diff changeset
    13
 * The callback function for Mode-classes.
58c20c0e394f (svn r9320) [NoAI] -Fix: added some doxygen comments to make doxygen happy
truelight
parents: 9473
diff changeset
    14
 */
9629
66dde6412125 (svn r10350) [NoAI] -Sync with trunk r10194:10349
glx
parents: 9511
diff changeset
    15
typedef bool (AIModeProc)(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs);
9450
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    16
9448
2a4c4340233d (svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents: 9441
diff changeset
    17
/**
2a4c4340233d (svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents: 9441
diff changeset
    18
 * Uper-parent object of all API classes. You should never use this class in
2a4c4340233d (svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents: 9441
diff changeset
    19
 *   your AI, as it doesn't publish any public functions. It is used
2a4c4340233d (svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents: 9441
diff changeset
    20
 *   internally to have a common place to handle general things, like internal
2a4c4340233d (svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents: 9441
diff changeset
    21
 *   command processing, and command-validation checks.
2a4c4340233d (svn r9273) [NoAI] -Documentation: finished documenting the last few files; they should now be readable for any non-programmer.
truelight
parents: 9441
diff changeset
    22
 */
9679
788e083db48b (svn r10625) [NoAI] -Fix: returning C++ classes, by creating a temp SQ class, had its problems, this should fix them all (double-frees, wrong scope, ..)
truelight
parents: 9629
diff changeset
    23
class AIObject : public SimpleCountedObject {
9450
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    24
private:
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    25
	struct AIDoCommandStruct {
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    26
		AIModeProc *mode;
9473
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    27
		AIObject *mode_instance;
9450
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    28
		uint delay;
9629
66dde6412125 (svn r10350) [NoAI] -Sync with trunk r10194:10349
glx
parents: 9511
diff changeset
    29
		CommandCost costs;
9760
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
    30
		bool last_command_res;
9496
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
    31
		VehicleID new_vehicle_id;
9511
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
    32
		SignID new_sign_id;
9680
5ed7bbfd51c7 (svn r10629) [NoAI] -Fix: on returning a class instance which is NULL, do not make a wrapper SQ, but return a NULL pointer too
truelight
parents: 9679
diff changeset
    33
		void *event_data;
9450
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    34
	};
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    35
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    36
	/**
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    37
	 * The current mode of the AI players.
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    38
	 */
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    39
	static AIDoCommandStruct *GetDoCommandStruct(PlayerID player);
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    40
9361
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
    41
protected:
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
    42
	/**
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
    43
	 * Executes a raw DoCommand for the AI.
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
    44
	 */
9695
708f1e3cc4c4 (svn r10936) [NoAI] -Fix: allow water_protection for non-water-building in DoCommand
truelight
parents: 9682
diff changeset
    45
	static bool DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint procc, bool water_protection = true);
9414
a7f7bbec08da (svn r9212) [NoAI] -Add: added CmdFailed and CmdSucceeded in AIObject() and used it
truelight
parents: 9388
diff changeset
    46
a7f7bbec08da (svn r9212) [NoAI] -Add: added CmdFailed and CmdSucceeded in AIObject() and used it
truelight
parents: 9388
diff changeset
    47
	/**
9452
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents: 9450
diff changeset
    48
	 * Sets the DoCommand costs counter to a value.
9414
a7f7bbec08da (svn r9212) [NoAI] -Add: added CmdFailed and CmdSucceeded in AIObject() and used it
truelight
parents: 9388
diff changeset
    49
	 */
9629
66dde6412125 (svn r10350) [NoAI] -Sync with trunk r10194:10349
glx
parents: 9511
diff changeset
    50
	static void SetDoCommandCosts(Money value);
9414
a7f7bbec08da (svn r9212) [NoAI] -Add: added CmdFailed and CmdSucceeded in AIObject() and used it
truelight
parents: 9388
diff changeset
    51
a7f7bbec08da (svn r9212) [NoAI] -Add: added CmdFailed and CmdSucceeded in AIObject() and used it
truelight
parents: 9388
diff changeset
    52
	/**
9452
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents: 9450
diff changeset
    53
	 * Increase the current value of the DoCommand costs counter.
9414
a7f7bbec08da (svn r9212) [NoAI] -Add: added CmdFailed and CmdSucceeded in AIObject() and used it
truelight
parents: 9388
diff changeset
    54
	 */
9629
66dde6412125 (svn r10350) [NoAI] -Sync with trunk r10194:10349
glx
parents: 9511
diff changeset
    55
	static void IncreaseDoCommandCosts(Money value);
9452
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents: 9450
diff changeset
    56
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents: 9450
diff changeset
    57
	/**
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents: 9450
diff changeset
    58
	 * Get the current DoCommand costs counter.
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents: 9450
diff changeset
    59
	 */
9629
66dde6412125 (svn r10350) [NoAI] -Sync with trunk r10194:10349
glx
parents: 9511
diff changeset
    60
	static Money GetDoCommandCosts();
9450
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    61
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    62
	/**
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    63
	 * Set the current mode of your AI to this proc.
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    64
	 */
9473
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    65
	static void SetDoCommandMode(AIModeProc *proc, AIObject *instance);
9450
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    66
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    67
	/**
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    68
	 * Get the current mode your AI is currently under.
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    69
	 */
9473
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    70
	static AIModeProc *GetDoCommandMode();
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    71
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    72
	/**
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    73
	 * Get the instance of the current mode your AI is currently under.
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    74
	 */
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    75
	static AIObject *GetDoCommandModeInstance();
9450
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    76
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    77
	/**
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    78
	 * Set the delay of the DoCommand.
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    79
	 */
9473
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    80
	static void SetDoCommandDelay(uint ticks);
9450
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    81
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    82
	/**
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    83
	 * Get the delay of the DoCommand.
d675836e865c (svn r9278) [NoAI] -Add: added AISettings which adds the function to control the Delay-value on DoCommands
truelight
parents: 9448
diff changeset
    84
	 */
9473
dcbcd1c4496d (svn r9318) [NoAI] -Add: added new param in ModeCallback: costs
truelight
parents: 9454
diff changeset
    85
	static uint GetDoCommandDelay();
9454
ee6a65b37b82 (svn r9284) [NoAI] -Fix: reset internal static AIObject data per AI on AI startup
truelight
parents: 9452
diff changeset
    86
9496
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
    87
	/**
9760
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
    88
	 * Get the latest result of a DoCommand.
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
    89
	 */
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
    90
	static bool GetLastCommandRes();
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
    91
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
    92
	/**
9496
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
    93
	 * Get the latest stored new_vehicle_id.
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
    94
	 */
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
    95
	static VehicleID GetNewVehicleID();
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
    96
9511
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
    97
	/**
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
    98
	 * Get the latest stored new_sign_id.
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
    99
	 */
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
   100
	static SignID GetNewSignID();
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
   101
9680
5ed7bbfd51c7 (svn r10629) [NoAI] -Fix: on returning a class instance which is NULL, do not make a wrapper SQ, but return a NULL pointer too
truelight
parents: 9679
diff changeset
   102
	/**
5ed7bbfd51c7 (svn r10629) [NoAI] -Fix: on returning a class instance which is NULL, do not make a wrapper SQ, but return a NULL pointer too
truelight
parents: 9679
diff changeset
   103
	 * Get the pointer to store event data in.
5ed7bbfd51c7 (svn r10629) [NoAI] -Fix: on returning a class instance which is NULL, do not make a wrapper SQ, but return a NULL pointer too
truelight
parents: 9679
diff changeset
   104
	 */
9682
d031eb183733 (svn r10631) [NoAI] -Add: AIEvent, to take care of events; for now it only reports when vehicles are crashed
truelight
parents: 9680
diff changeset
   105
	static void *&GetEventPointer();
9680
5ed7bbfd51c7 (svn r10629) [NoAI] -Fix: on returning a class instance which is NULL, do not make a wrapper SQ, but return a NULL pointer too
truelight
parents: 9679
diff changeset
   106
9454
ee6a65b37b82 (svn r9284) [NoAI] -Fix: reset internal static AIObject data per AI on AI startup
truelight
parents: 9452
diff changeset
   107
public:
ee6a65b37b82 (svn r9284) [NoAI] -Fix: reset internal static AIObject data per AI on AI startup
truelight
parents: 9452
diff changeset
   108
	/**
9760
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
   109
	 * Store the latest result of a DoCommand per player.
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
   110
	 * @note NEVER use this yourself in your AI!
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
   111
	 */
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
   112
	static void SetLastCommandRes(bool res);
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
   113
265fdd2130c3 (svn r12248) [NoAI] -Codechange: last_command_res was in AIThread, while it should be in AIObject, like all other variables like it
truebrain
parents: 9695
diff changeset
   114
	/**
9496
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
   115
	 * Store a new_vehicle_id per player.
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
   116
	 * @note NEVER use this yourself in your AI!
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
   117
	 */
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
   118
	static void SetNewVehicleID(VehicleID vehicle);
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
   119
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
   120
	/**
9511
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
   121
	 * Store a new_sign_id per player.
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
   122
	 * @note NEVER use this yourself in your AI!
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
   123
	 */
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
   124
	static void SetNewSignID(SignID vehicle);
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
   125
f767ad06e86b (svn r9407) [NoAI] -Add: placing of signs.
rubidium
parents: 9496
diff changeset
   126
	/**
9454
ee6a65b37b82 (svn r9284) [NoAI] -Fix: reset internal static AIObject data per AI on AI startup
truelight
parents: 9452
diff changeset
   127
	 * If an AI starts, some internals needs to be resetted. This function
ee6a65b37b82 (svn r9284) [NoAI] -Fix: reset internal static AIObject data per AI on AI startup
truelight
parents: 9452
diff changeset
   128
	 *   takes care of that.
9496
05ebee9884b3 (svn r9368) [NoAI] -Fix: store _new_vehicle_id directly after successful handling the command in a per-AI-player-safe piece of memory, so we can restore the value when ever we want later in the process
truelight
parents: 9486
diff changeset
   129
	 * @note NEVER use this yourself in your AI!
9454
ee6a65b37b82 (svn r9284) [NoAI] -Fix: reset internal static AIObject data per AI on AI startup
truelight
parents: 9452
diff changeset
   130
	 */
ee6a65b37b82 (svn r9284) [NoAI] -Fix: reset internal static AIObject data per AI on AI startup
truelight
parents: 9452
diff changeset
   131
	static void ResetInternalPlayerData();
9361
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
   132
};
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
   133
7bb2bd22b16e (svn r9144) [NoAI] -Change: moved command functions to AIObject, and made AIBase depend on AIObject
truelight
parents:
diff changeset
   134
#endif /* AI_OBJECT_HPP */