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

ResourceInfo Class Reference

#include <unittype.h>

List of all members.


Public Member Functions

 ResourceInfo ()

Public Attributes

std::string FileWhenLoaded
std::string FileWhenEmpty
 Change the graphic when the unit is loaded.
unsigned WaitAtResource
 Change the graphic when the unit is empty.
unsigned ResourceStep
 Cycles the unit waits while mining.
int ResourceCapacity
 Resources the unit gains per mining cycle.
unsigned WaitAtDepot
 Max amount of resources to carry.
unsigned ResourceId
 Cycles the unit waits while returning.
unsigned FinalResource
 Id of the resource harvested. Redundant.
unsigned char TerrainHarvester
 Convert resource when delivered.
unsigned char LoseResources
 Unit will harvest terrain(wood only for now).
unsigned char HarvestFromOutside
 The unit will lose it's resource when distracted.
unsigned char RefineryHarvester
 Unit harvests without entering the building.
CPlayerColorGraphicSpriteWhenLoaded
 Unit have to build Refinery buildings for harvesting.
CPlayerColorGraphicSpriteWhenEmpty
 The graphic corresponding to FileWhenLoaded.

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. Usefull 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 (  )  [inline]


Member Data Documentation

Change the graphic when the unit is loaded.

Change the graphic when the unit is empty.

Cycles the unit waits while mining.

Resources the unit gains per mining cycle.

Max amount of resources to carry.

Cycles the unit waits while returning.

Id of the resource harvested. Redundant.

Convert resource when delivered.

Unit will harvest terrain(wood only for now).

The unit will lose it's resource when distracted.

Unit harvests without entering the building.

Unit have to build Refinery buildings for harvesting.

The graphic corresponding to FileWhenLoaded.


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.