Difference between revisions of "Script/Sector"

From SF3
Jump to: navigation, search
(Class Methods)
Line 64: Line 64:
 
|
 
|
 
| style = 'color: #505050; line-height: 0.5;' |''get all buildings in the given sector (may include buildings not controlled by the current sector owner!)''
 
| style = 'color: #505050; line-height: 0.5;' |''get all buildings in the given sector (may include buildings not controlled by the current sector owner!)''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''CreateMainBuilding''' (const [[../BasicDataTypes|uint8]] ''_uOwner'', const [[../BasicDataTypes|string]]&in ''_sDescriptionName'', const [[../BasicDataTypes|bool]] ''_bCompleteInstant'' = false, const [[../BasicDataTypes|bool]] ''_bFailIfExisting'' = true)
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''create a specific main building in the center of this sector. returns true if the building was created successfully.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''CreateCapital''' (const [[../BasicDataTypes|uint8]] ''_uOwner'', const [[../BasicDataTypes|bool]] ''_bCompleteInstant'' = false, const [[../BasicDataTypes|bool]] ''_bFailIfExisting'' = true)
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''create the faction's default town center in the center of this sector. returns true if the building was created successfully.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''CreateExpansion''' (const [[../BasicDataTypes|uint8]] ''_uOwner'', const [[../BasicDataTypes|bool]] ''_bCompleteInstant'' = false, const [[../BasicDataTypes|bool]] ''_bFailIfExisting'' = true)
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''create the faction's default expansion building in the center of this sector. returns true if the building was created successfully.''
 
|-
 
|-
 
| 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]]  

Revision as of 12:02, 7 December 2016

class Sector

Represents an RTS sector in the game world.

Class Methods

LevelReference@ GetLevel ()
get level in which the sector is located
uint GetIndex () const
get index of the sector
uint8 GetOwner () const
get current owner of the sector
void SetOwner (const uint8 _Faction)
set current owner of the sector
uint GetBaseSupply () const
get the supply (unit limit) provided by this sector
void SetBaseSupply (const uint _uBaseSupply)
set the supply (unit limit) provided by this sector
bool IsBlocked () const
check whether the sector can(not) be conquered
void SetBlocked (const bool _bBlocked)
set whether the sector is blocked from being conquered
Building GetMainBuilding () const
get current main building of the sector
Building[]@ GetBuildings () const
get all buildings in the given sector (may include buildings not controlled by the current sector owner!)
bool CreateMainBuilding (const uint8 _uOwner, const string&in _sDescriptionName, const bool _bCompleteInstant = false, const bool _bFailIfExisting = true)
create a specific main building in the center of this sector. returns true if the building was created successfully.
bool CreateCapital (const uint8 _uOwner, const bool _bCompleteInstant = false, const bool _bFailIfExisting = true)
create the faction's default town center in the center of this sector. returns true if the building was created successfully.
bool CreateExpansion (const uint8 _uOwner, const bool _bCompleteInstant = false, const bool _bFailIfExisting = true)
create the faction's default expansion building in the center of this sector. returns true if the building was created successfully.
uint GetTotalResourceAmount () const
get total amount of resources in this sector
uint GetResourceAmount (const string&in _sType) const
get amount of the given resource in this sector

class Sector

Represents an RTS sector in the game world.

Class Methods

LevelReference@ GetLevel ()
get level in which the sector is located
uint GetIndex () const
get index of the sector
uint8 GetOwner () const
get current owner of the sector
void SetOwner (const uint8 _Faction)
set current owner of the sector
uint GetBaseSupply () const
get the supply (unit limit) provided by this sector
void SetBaseSupply (const uint _uBaseSupply)
set the supply (unit limit) provided by this sector
bool IsBlocked () const
check whether the sector can(not) be conquered
void SetBlocked (const bool _bBlocked)
set whether the sector is blocked from being conquered
Building GetMainBuilding () const
get current main building of the sector
Building[]@ GetBuildings () const
get all buildings in the given sector (may include buildings not controlled by the current sector owner!)
uint GetTotalResourceAmount () const
get total amount of resources in this sector
uint GetResourceAmount (const string&in _sType) const
get amount of the given resource in this sector