_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <unittype.h>
Public Member Functions | |
ResourceInfo () | |
Public Attributes | |
std::string | FileWhenLoaded |
std::string | FileWhenEmpty |
Change the graphic when the unit is loaded. More... | |
unsigned | WaitAtResource |
Change the graphic when the unit is empty. More... | |
unsigned | ResourceStep |
Cycles the unit waits while mining. More... | |
int | ResourceCapacity |
Resources the unit gains per mining cycle. More... | |
unsigned | WaitAtDepot |
Max amount of resources to carry. More... | |
unsigned | ResourceId |
Cycles the unit waits while returning. More... | |
unsigned | FinalResource |
Id of the resource harvested. Redundant. More... | |
unsigned char | TerrainHarvester |
Convert resource when delivered. More... | |
unsigned char | LoseResources |
Unit will harvest terrain. More... | |
unsigned char | HarvestFromOutside |
The unit will lose it's resource when distracted. More... | |
unsigned char | RefineryHarvester |
Unit harvests without entering the building. More... | |
CPlayerColorGraphic * | SpriteWhenLoaded |
Unit have to build Refinery buildings for harvesting. More... | |
CPlayerColorGraphic * | SpriteWhenEmpty |
The graphic corresponding to FileWhenLoaded. More... | |
#include "unittype.h"
This class contains information about how a unit will harvest a resource.
The harvester's animation file will change when it's loaded.
The harvester's animation file will change when it's empty. The standard animation is used only when building/repairing.
ResourceInfo::HarvestFromOutside
Unit will harvest from the outside. The unit will use it's Attack animation (seems it turned into a generic Action anim.)
The resource this is for. Mostly redundant.
The resource is converted to this at the depot. Useful for a fisherman who harvests fish, but it all turns to food at the depot.
Cycles the unit waits while inside a resource.
The unit makes so-caled mining cycles. Each mining cycle it does some sort of animation and gains ResourceStep resources. You can stop after any number of steps. when the quantity in the harvester reaches the maximum (ResourceCapacity) it will return home. I this is 0 then it's considered infinity, and ResourceCapacity will now be the limit.
ResourceInfo::ResourceCapacity
Maximum amount of resources a harvester can carry. The actual amount can be modified while unloading.
Special lossy behaviour for loaded harvesters. Harvesters with loads other than 0 and ResourceCapacity will lose their cargo on any new order.
Cycles the unit waits while inside the depot to unload.
ResourceInfo::TerrainHarvester
The unit will harvest terrain. For now this only works for wood. maybe it could be made to work for rocks, but more than that requires a tileset rewrite.
|
inline |
std::string ResourceInfo::FileWhenEmpty |
Change the graphic when the unit is loaded.
std::string ResourceInfo::FileWhenLoaded |
unsigned ResourceInfo::FinalResource |
Id of the resource harvested. Redundant.
unsigned char ResourceInfo::HarvestFromOutside |
The unit will lose it's resource when distracted.
unsigned char ResourceInfo::LoseResources |
Unit will harvest terrain.
unsigned char ResourceInfo::RefineryHarvester |
Unit harvests without entering the building.
int ResourceInfo::ResourceCapacity |
Resources the unit gains per mining cycle.
unsigned ResourceInfo::ResourceId |
Cycles the unit waits while returning.
unsigned ResourceInfo::ResourceStep |
Cycles the unit waits while mining.
CPlayerColorGraphic* ResourceInfo::SpriteWhenEmpty |
The graphic corresponding to FileWhenLoaded.
CPlayerColorGraphic* ResourceInfo::SpriteWhenLoaded |
Unit have to build Refinery buildings for harvesting.
unsigned char ResourceInfo::TerrainHarvester |
Convert resource when delivered.
unsigned ResourceInfo::WaitAtDepot |
Max amount of resources to carry.
unsigned ResourceInfo::WaitAtResource |
Change the graphic when the unit is empty.