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

Public Member Functions | Public Attributes | List of all members
ResourceInfo Class Reference

#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...
 
CPlayerColorGraphicSpriteWhenLoaded
 Unit have to build Refinery buildings for harvesting. More...
 
CPlayerColorGraphicSpriteWhenEmpty
 The graphic corresponding to FileWhenLoaded. More...
 

Detailed Description

#include "unittype.h"

This class contains information about how a unit will harvest a resource.

ResourceInfo::FileWhenLoaded

The harvester's animation file will change when it's loaded.

ResourceInfo::FileWhenEmpty;

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.)

ResourceInfo::ResourceId

The resource this is for. Mostly redundant.

ResourceInfo::FinalResource

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.

ResourceInfo::WaitAtResource

Cycles the unit waits while inside a resource.

ResourceInfo::ResourceStep

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.

ResourceInfo::LoseResources

Special lossy behaviour for loaded harvesters. Harvesters with loads other than 0 and ResourceCapacity will lose their cargo on any new order.

ResourceInfo::WaitAtDepot

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.

Todo:
more configurable.

Constructor & Destructor Documentation

◆ ResourceInfo()

ResourceInfo::ResourceInfo ( )
inline

Member Data Documentation

◆ FileWhenEmpty

std::string ResourceInfo::FileWhenEmpty

Change the graphic when the unit is loaded.

◆ FileWhenLoaded

std::string ResourceInfo::FileWhenLoaded

◆ FinalResource

unsigned ResourceInfo::FinalResource

Id of the resource harvested. Redundant.

◆ HarvestFromOutside

unsigned char ResourceInfo::HarvestFromOutside

The unit will lose it's resource when distracted.

◆ LoseResources

unsigned char ResourceInfo::LoseResources

Unit will harvest terrain.

◆ RefineryHarvester

unsigned char ResourceInfo::RefineryHarvester

Unit harvests without entering the building.

◆ ResourceCapacity

int ResourceInfo::ResourceCapacity

Resources the unit gains per mining cycle.

◆ ResourceId

unsigned ResourceInfo::ResourceId

Cycles the unit waits while returning.

◆ ResourceStep

unsigned ResourceInfo::ResourceStep

Cycles the unit waits while mining.

◆ SpriteWhenEmpty

CPlayerColorGraphic* ResourceInfo::SpriteWhenEmpty

The graphic corresponding to FileWhenLoaded.

◆ SpriteWhenLoaded

CPlayerColorGraphic* ResourceInfo::SpriteWhenLoaded

Unit have to build Refinery buildings for harvesting.

◆ TerrainHarvester

unsigned char ResourceInfo::TerrainHarvester

Convert resource when delivered.

◆ WaitAtDepot

unsigned ResourceInfo::WaitAtDepot

Max amount of resources to carry.

◆ WaitAtResource

unsigned ResourceInfo::WaitAtResource

Change the graphic when the unit is empty.


The documentation for this class was generated from the following file:
(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.