_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Classes
action_resource.cpp File Reference
#include "stratagus.h"
#include "action/action_resource.h"
#include "ai.h"
#include "animation.h"
#include "interface.h"
#include "iolib.h"
#include "map.h"
#include "pathfinder.h"
#include "player.h"
#include "script.h"
#include "sound.h"
#include "tileset.h"
#include "translate.h"
#include "ui.h"
#include "unit.h"
#include "unit_find.h"
#include "unittype.h"
#include "video.h"
#include "../ai/ai_local.h"

Classes

class  NearReachableTerrainFinder
 

action_resource.cpp - The generic resource action.

#define SUB_START_RESOURCE   0
 
#define SUB_MOVE_TO_RESOURCE   5
 
#define SUB_UNREACHABLE_RESOURCE   31
 
#define SUB_START_GATHERING   55
 
#define SUB_GATHER_RESOURCE   60
 
#define SUB_STOP_GATHERING   65
 
#define SUB_MOVE_TO_DEPOT   70
 
#define SUB_UNREACHABLE_DEPOT   100
 
#define SUB_RETURN_RESOURCE   120
 
static bool FindNearestReachableTerrainType (int movemask, int resmask, int range, const CPlayer &player, const Vec2i &startPos, Vec2i *terrainPos)
 
static void AnimateActionHarvest (CUnit &unit)
 
int GetNumWaitingWorkers (const CUnit &mine)
 Hash calculated to find sync failures. More...
 

Macro Definition Documentation

◆ SUB_GATHER_RESOURCE

#define SUB_GATHER_RESOURCE   60

◆ SUB_MOVE_TO_DEPOT

#define SUB_MOVE_TO_DEPOT   70

◆ SUB_MOVE_TO_RESOURCE

#define SUB_MOVE_TO_RESOURCE   5

◆ SUB_RETURN_RESOURCE

#define SUB_RETURN_RESOURCE   120

◆ SUB_START_GATHERING

#define SUB_START_GATHERING   55

◆ SUB_START_RESOURCE

#define SUB_START_RESOURCE   0

◆ SUB_STOP_GATHERING

#define SUB_STOP_GATHERING   65

◆ SUB_UNREACHABLE_DEPOT

#define SUB_UNREACHABLE_DEPOT   100

◆ SUB_UNREACHABLE_RESOURCE

#define SUB_UNREACHABLE_RESOURCE   31

Function Documentation

◆ AnimateActionHarvest()

static void AnimateActionHarvest ( CUnit unit)
static

Animate a unit that is harvesting

Parameters
unitUnit to animate

◆ FindNearestReachableTerrainType()

static bool FindNearestReachableTerrainType ( int  movemask,
int  resmask,
int  range,
const CPlayer player,
const Vec2i startPos,
Vec2i terrainPos 
)
static

◆ GetNumWaitingWorkers()

int GetNumWaitingWorkers ( const CUnit mine)

Hash calculated to find sync failures.

(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.