Symphony Of Empires
UnitType Struct Reference

Defines a type of unit, it can be a tank, garrison, infantry, etc this is moddable via a lua script and new unit types can be added. More...

#include <unit.hpp>

Inheritance diagram for UnitType:
Collaboration diagram for UnitType:

Public Member Functions

std::string get_icon_path () const
 
- Public Member Functions inherited from Entity< T >
constexpr Entity () noexcept=default
 
constexpr Entity (Entity &&) noexcept=default
 
constexpr Entity (const Entity &) noexcept=default
 
constexpr Entityoperator= (const Entity &) noexcept=default
 
constexpr ~Entity () noexcept=default
 
constexpr bool is_invalid () const
 Checks if the current id is invalid. More...
 
constexpr bool is_valid () const
 Checks if the current id is valid. More...
 
constexpr operator Id () const noexcept
 
constexpr operator size_t () const noexcept
 
constexpr Id get_id () const
 

Public Attributes

Eng3D::StringRef name
 
float supply_consumption
 
float speed
 
float max_health
 
float defense
 
float attack
 
float capacity
 
bool is_ground
 
bool is_naval
 
std::vector< std::pair< CommodityId, float > > req_goods
 
- Public Attributes inherited from RefnameEntity< UnitTypeId >
Eng3D::StringRef ref_name
 
- Public Attributes inherited from Entity< T >
Id cached_id
 Id used to speed up Id lookups on any context. More...
 

Additional Inherited Members

- Public Types inherited from Entity< T >
using Id = T
 
- Static Public Member Functions inherited from Entity< T >
constexpr static Id invalid ()
 Returns an invalid id. More...
 
constexpr static bool is_invalid (Id id)
 Checks if the id is not valid. More...
 
constexpr static bool is_valid (Id id)
 Checks if the id is valid. More...
 

Detailed Description

Defines a type of unit, it can be a tank, garrison, infantry, etc this is moddable via a lua script and new unit types can be added.

Definition at line 44 of file unit.hpp.

Member Function Documentation

◆ get_icon_path()

std::string UnitType::get_icon_path ( ) const
inline

Definition at line 55 of file unit.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ attack

float UnitType::attack

Definition at line 50 of file unit.hpp.

◆ capacity

float UnitType::capacity

Definition at line 51 of file unit.hpp.

◆ defense

float UnitType::defense

Definition at line 49 of file unit.hpp.

◆ is_ground

bool UnitType::is_ground

Definition at line 52 of file unit.hpp.

◆ is_naval

bool UnitType::is_naval

Definition at line 53 of file unit.hpp.

◆ max_health

float UnitType::max_health

Definition at line 48 of file unit.hpp.

◆ name

Eng3D::StringRef UnitType::name

Definition at line 45 of file unit.hpp.

◆ req_goods

std::vector<std::pair<CommodityId, float> > UnitType::req_goods

Definition at line 54 of file unit.hpp.

◆ speed

float UnitType::speed

Definition at line 47 of file unit.hpp.

◆ supply_consumption

float UnitType::supply_consumption

Definition at line 46 of file unit.hpp.


The documentation for this struct was generated from the following file: