Difference between revisions of "Script/Building"
From SF3
(→Production Assignments) |
|||
(11 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
'''Inherits from:''' [[../Entity|Entity]] | '''Inherits from:''' [[../Entity|Entity]] | ||
=== Class Methods === | === Class Methods === | ||
+ | ==== Basic Information ==== | ||
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
|- | |- | ||
Line 22: | Line 23: | ||
| | | | ||
| style = 'color: #505050; line-height: 0.5;' |''get building type'' | | style = 'color: #505050; line-height: 0.5;' |''get building type'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint16]] | ||
+ | | style='color: black; width: 90%; line-height: 0.8;' | '''GetSectorIndex''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get index of the sector in which the building is located.'' | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ==== Status ==== | ||
+ | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../LogicEnums#EBuildingStage|EBuildingStage]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../LogicEnums#EBuildingStage|EBuildingStage]] | ||
Line 28: | Line 40: | ||
| | | | ||
| style = 'color: #505050; line-height: 0.5;' |''get current building stage'' | | style = 'color: #505050; line-height: 0.5;' |''get current building stage'' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|int]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|int]] | ||
Line 46: | Line 52: | ||
| | | | ||
| style = 'color: #505050; line-height: 0.5;' |''get maximum building health'' | | style = 'color: #505050; line-height: 0.5;' |''get maximum building health'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | ||
+ | | style='color: black; width: 90%; line-height: 0.8;' | '''Damage''' (const [[../LogicEnums#EDamageType|EDamageType]] ''_DamageType'', const [[../BasicDataTypes|uint]] ''_uAmount'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''damage the building for _uAmount HP of the given damage type, returns true if destroyed'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''AutoConstruct''' () | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''automatically construct the building, without requiring resources or workers'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 0.8;' | '''Destroy''' () | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''immediately destroy the building'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint8]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint8]] | ||
Line 59: | Line 83: | ||
| style = 'color: #505050; line-height: 0.5;' |''assign the given number of workers to this building'' | | style = 'color: #505050; line-height: 0.5;' |''assign the given number of workers to this building'' | ||
|- | |- | ||
− | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes| | + | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] |
− | | style='color: black; width: 90%; line-height: 1.0;' | ''' | + | | style='color: black; width: 90%; line-height: 1.0;' | '''HasCondition''' (const [[../BasicDataTypes|uint]] ''_uDescriptionId'') const |
|- | |- | ||
| | | | ||
− | | style = 'color: #505050; line-height: 0.5;' |'' | + | | style = 'color: #505050; line-height: 0.5;' |''check if building has condition with given _uDescriptionId'' |
|- | |- | ||
− | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes| | + | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] |
− | | style='color: black; width: 90%; line-height: 1.0;' | ''' | + | | style='color: black; width: 90%; line-height: 1.0;' | '''ApplyCondition''' (const [[../BasicDataTypes|uint]] ''_uDescriptionId'', const [[../BasicDataTypes|int]] ''_iDuration'', const [[../BasicDataTypes|uint8]] ''_Faction'' = kMaxFactions, const [[../BasicDataTypes|uint]] ''_uScalingPercentage'' = 100) |
|- | |- | ||
| | | | ||
− | | style = 'color: #505050; line-height: 0.5;' |'' | + | | style = 'color: #505050; line-height: 0.5;' |''try to apply condition with given _uDescriptionId to building for the defined _uDuration in seconds (-1 for infinite) - returns true if applied'' |
|- | |- | ||
− | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes| | + | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] |
− | | style='color: black; width: 90%; line-height: 0 | + | | style='color: black; width: 90%; line-height: 1.0;' | '''RemoveCondition''' (const [[../BasicDataTypes|uint]] ''_uDescriptionId'') |
|- | |- | ||
| | | | ||
− | | style = 'color: #505050; line-height: 0.5;' |'' | + | | style = 'color: #505050; line-height: 0.5;' |''try to remove condition with given _uDescriptionId from building - returns true if removed'' |
+ | |- | ||
+ | |} | ||
+ | |||
+ | ==== Flags ==== | ||
+ | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | ||
Line 114: | Line 143: | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | ||
− | | style='color: black; width: 90%; line-height: 0 | + | | style='color: black; width: 90%; line-height: 1.0;' | '''IsRuin''' () const |
|- | |- | ||
| | | | ||
− | | style = 'color: #505050; line-height: 0.5;' |'' | + | | style = 'color: #505050; line-height: 0.5;' |''is this building a "cold" ruin (this may be used to hide some visual details on damaged buildings, e.g. burning fires)'' |
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
− | | style='color: black; width: 90%; line-height: 0 | + | | style='color: black; width: 90%; line-height: 1.0;' | '''SetRuin''' (const [[../BasicDataTypes|bool]] ''_bRuin'') |
|- | |- | ||
| | | | ||
− | | style = 'color: #505050; line-height: 0 | + | | style = 'color: #505050; line-height: 1.0;' |''mark this building as a "cold" ruin (this may be used to hide some visual details on damaged buildings, e.g. burning fires). this state is automatically reset once the building is repaired to full health.'' |
+ | |- | ||
+ | |} | ||
+ | |||
+ | ==== Resources ==== | ||
+ | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
Line 148: | Line 182: | ||
| | | | ||
| style = 'color: #505050; line-height: 0.5;' |''remove _uAmount resources of _Type from the building's production store. returns the actual amount of resources removed.'' | | style = 'color: #505050; line-height: 0.5;' |''remove _uAmount resources of _Type from the building's production store. returns the actual amount of resources removed.'' | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ==== Production Assignments ==== | ||
+ | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint16]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''AddProductionAssignment''' (const [[../BasicDataTypes|EBuildingProduction]] ''_Type'', const [[../BasicDataTypes|string]]&in ''_sDescription'', const [[../Entity|Entity]]&in ''_Target'' = Entity ( )) | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''add production assignment for the given building production (if the building provides a matching option).'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''CancelProductionAssignment''' (const [[../BasicDataTypes|uint16]] ''_uAssignmentId'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''cancel the production assignment with the given id'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''CancelProductionAssignments''' (const [[../BasicDataTypes|EBuildingProduction]] ''_Type'', const [[../BasicDataTypes|string]]&in ''_sDescription'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''cancel all production assignments matching the given type and description.'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''CancelAllProductionAssignments''' () | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''cancel all current production assignments'' | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ==== Special Behaviors ==== | ||
+ | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetCharge''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get the building's current charge (returns 0 if the building does not have a charge behavior)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetMaxCharge''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get the building's maximum charge (returns 0 if the building does not have a charge behavior)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 0.8;' | '''Charge''' (const [[../BasicDataTypes|int]] ''_iChargePoints'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''modify charge value of a charge type building'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Building|Building]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetConnectedGodstone''' () | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get connected godstone (may be invalid if the godstone is not connected or if this building is not a godstone)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|string]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetConnectedGodstoneName''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get name of the connected godstone (may be empty if the godstone is not connected or if this building is not a godstone)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''ConnectGodstone''' (const [[../Building|Building]]&in ''_TargetGodstone'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''connect this godstone to another one (both buildings must be godstones!)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''ReviveAtGodstone''' (const [[../Creature|Creature]]&in ''_Creature'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''revives creature at this godstone (may fail if the building is not a godstone)'' | ||
+ | |- | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | ==== Miscellaneous ==== | ||
+ | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
Line 154: | Line 270: | ||
| | | | ||
| style = 'color: #505050; line-height: 0.5;' |''upgrade the building to the given description'' | | style = 'color: #505050; line-height: 0.5;' |''upgrade the building to the given description'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''ProhibitProduction''' (const [[../LogicEnums#EBuildingProduction|EBuildingProduction]] ''_Type'', const [[../BasicDataTypes|string]]&in ''_sDescription'', const [[../BasicDataTypes|bool]] ''_bProhibit'' = true) | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''prohibit production of a certain assignment available in this building'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''ClearProhibitions''' () | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''clear all prohibited production options'' | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ==== Operators ==== | ||
+ | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Building|Building]]& | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Building|Building]]& | ||
Line 162: | Line 295: | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''operator==''' (const [[../Building|Building]]&in) | | style='color: black; width: 90%; line-height: 0.8;' | '''operator==''' (const [[../Building|Building]]&in) | ||
|- | |- | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ==== Inherited Functions ==== | ||
+ | Functions inherited from [[../Entity|Entity]]. | ||
+ | {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | ||
Line 245: | Line 384: | ||
| | | | ||
| style = 'color: #505050; line-height: 0.5;' |''mark the entity as busy'' | | style = 'color: #505050; line-height: 0.5;' |''mark the entity as busy'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''HasInspectionText''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''check whether the entity currently has an inspection text'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] |
Latest revision as of 16:07, 14 May 2020
Contents
class Building
Represents a reference to a building in the game world. An instance of this class acts like a weak pointer to an existing building in the game world and provides an interface to interact with it. Before interacting with the building, you should call Exists() in order to check if the building actually (still) exists. IMPORTANT: This class must NOT be stored as a class member. If you want to store the building for later reference, store the id obtained by GetId instead. You can then later retrieve the building from the LevelReference class by calling GetBuildingById.
Inherits from: Entity
Class Methods
Basic Information
string | GetDescriptionName () const |
get building description name | |
EBuildingType | GetBuildingType () const |
get building type | |
uint16 | GetSectorIndex () const |
get index of the sector in which the building is located. |
Status
EBuildingStage | GetStage () const |
get current building stage | |
int | GetCurrentHP () const |
get current building health | |
int | GetMaxHP () const |
get maximum building health | |
bool | Damage (const EDamageType _DamageType, const uint _uAmount) |
damage the building for _uAmount HP of the given damage type, returns true if destroyed | |
void | AutoConstruct () |
automatically construct the building, without requiring resources or workers | |
void | Destroy () |
immediately destroy the building | |
uint8 | GetAssignedWorkers () const |
get number of workers currently assigned to this building | |
void | AssignWorkers (const uint8 _uNumWorkers) |
assign the given number of workers to this building | |
bool | HasCondition (const uint _uDescriptionId) const |
check if building has condition with given _uDescriptionId | |
bool | ApplyCondition (const uint _uDescriptionId, const int _iDuration, const uint8 _Faction = kMaxFactions, const uint _uScalingPercentage = 100) |
try to apply condition with given _uDescriptionId to building for the defined _uDuration in seconds (-1 for infinite) - returns true if applied | |
bool | RemoveCondition (const uint _uDescriptionId) |
try to remove condition with given _uDescriptionId from building - returns true if removed |
Flags
bool | IsActive () const |
is the building currently active? (assignments can be given by the player) | |
void | SetActive (const bool _bActive) |
set whether the player can give assignments to the building | |
bool | CanBeUsedByAllFactions () const |
can the building be used by all factions? | |
void | SetUsableByAllFactions (const bool _bUsable) |
set whether the building is allowed to be used by all factions | |
bool | CheckCustomState (const EBuildingCustomState _State) const |
check whether the given custom building state is currently active | |
void | SetCustomState (const EBuildingCustomState _State, const bool _bValue) |
set the given custom building state | |
bool | IsRuin () const |
is this building a "cold" ruin (this may be used to hide some visual details on damaged buildings, e.g. burning fires) | |
void | SetRuin (const bool _bRuin) |
mark this building as a "cold" ruin (this may be used to hide some visual details on damaged buildings, e.g. burning fires). this state is automatically reset once the building is repaired to full health. |
Resources
uint | GetResources (const EResource _Type) const |
get the amount of resources of _Type currently in the building's production store. | |
uint | GetResourceCapacity (const EResource _Type) const |
get the maximum amount of resources of _Type which the building can store in its production store. | |
uint | AddResources (const EResource _Type, const uint _uAmount) |
add _uAmount resources of _Type to the building's production store. returns the actual amount of resources added. | |
uint | RemoveResources (const EResource _Type, const uint _uAmount) |
remove _uAmount resources of _Type from the building's production store. returns the actual amount of resources removed. |
Production Assignments
uint16 | AddProductionAssignment (const EBuildingProduction _Type, const string&in _sDescription, const Entity&in _Target = Entity ( )) |
add production assignment for the given building production (if the building provides a matching option). | |
void | CancelProductionAssignment (const uint16 _uAssignmentId) |
cancel the production assignment with the given id | |
void | CancelProductionAssignments (const EBuildingProduction _Type, const string&in _sDescription) |
cancel all production assignments matching the given type and description. | |
void | CancelAllProductionAssignments () |
cancel all current production assignments |
Special Behaviors
uint | GetCharge () const |
get the building's current charge (returns 0 if the building does not have a charge behavior) | |
uint | GetMaxCharge () const |
get the building's maximum charge (returns 0 if the building does not have a charge behavior) | |
void | Charge (const int _iChargePoints) |
modify charge value of a charge type building | |
Building | GetConnectedGodstone () |
get connected godstone (may be invalid if the godstone is not connected or if this building is not a godstone) | |
string | GetConnectedGodstoneName () const |
get name of the connected godstone (may be empty if the godstone is not connected or if this building is not a godstone) | |
void | ConnectGodstone (const Building&in _TargetGodstone) |
connect this godstone to another one (both buildings must be godstones!) | |
void | ReviveAtGodstone (const Creature&in _Creature) |
revives creature at this godstone (may fail if the building is not a godstone) | |
Miscellaneous
uint | Upgrade (const LevelReference@ _Level, const string&in _sDescriptionName, const bool _bInstant = false) |
upgrade the building to the given description | |
void | ProhibitProduction (const EBuildingProduction _Type, const string&in _sDescription, const bool _bProhibit = true) |
prohibit production of a certain assignment available in this building | |
void | ClearProhibitions () |
clear all prohibited production options |
Operators
Building& | operator= (const Building&in) |
bool | operator== (const Building&in) |
Inherited Functions
Functions inherited from Entity.
bool | operator== (const Entity&in) |
bool | Exists () const |
does the entity actually exist? (always check this before doing anything with the entity!) | |
uint | GetId () const |
get persistent entity id, use this to save the entity for later reference. | |
uint8 | GetFaction () const |
get owner faction | |
void | SetFaction (const uint8 _Faction) |
set owner faction | |
EEntityType | GetEntityType () const |
get entity type | |
bool | IsEnabled () const |
whether the entity is currently enabled (i.e. is visible in the game world) | |
void | Enable (const bool _bEnabled) |
enabled or disable the entity | |
bool | IsInteractive () const |
can the entity be interacted with? | |
void | SetInteractive (const bool _bInteractive) |
set whether the entity can be interacted with | |
bool | IsSelectable () const |
can the entity (theoretically) be selected by the player? | |
void | SetSelectable (const bool _bSelectable) |
set whether the entity can be selected by the player
(note that depending on the type of entity, there may be additional checks preventing the entity from being selected) | |
bool | IsBusy () const |
is the entity currently marked as busy? | |
void | SetBusy (const bool _bBusy) |
mark the entity as busy | |
bool | HasInspectionText () const |
check whether the entity currently has an inspection text | |
void | SetInspectionText (const uint _uTextId) |
make the entity inspectable and set the text to be displayed upon inspection | |
bool | CanBeAttacked () const |
can the entity be attacked? | |
void | SetAttackable (const bool _bAttackable) |
set whether the entity can be attacked | |
Entity | opImplConv () const |