OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4SPlrStart Class Reference

#include <C4Scenario.h>

Collaboration diagram for C4SPlrStart:
[legend]

Public Member Functions

void Default ()
 
bool EquipmentEqual (C4SPlrStart &rhs)
 
bool operator== (const C4SPlrStart &rhs)
 
void CompileFunc (StdCompiler *pComp)
 

Public Attributes

C4SVal Wealth
 
int32_t Position [2]
 
int32_t EnforcePosition
 
C4IDList ReadyCrew
 
C4IDList ReadyBase
 
C4IDList ReadyVehic
 
C4IDList ReadyMaterial
 
C4IDList BuildKnowledge
 
C4IDList BaseMaterial
 
C4IDList BaseProduction
 

Detailed Description

Definition at line 139 of file C4Scenario.h.

Member Function Documentation

void C4SPlrStart::CompileFunc ( StdCompiler pComp)

Definition at line 268 of file C4Scenario.cpp.

References BaseMaterial, BaseProduction, BuildKnowledge, C4ID::Clonk, EnforcePosition, mkArrayAdaptDM, mkNamingAdapt(), Position, ReadyBase, ReadyCrew, ReadyMaterial, ReadyVehic, C4IDList::SetIDCount(), StdCompiler::Value(), and Wealth.

269 {
270  C4IDList crewDefault;
271  crewDefault.SetIDCount(C4ID::Clonk,1,true);
272  pComp->Value(mkNamingAdapt(Wealth, "Wealth", C4SVal(0, 0, 0,250), true));
273  pComp->Value(mkNamingAdapt(mkArrayAdaptDM(Position,-1), "Position" ));
274  pComp->Value(mkNamingAdapt(EnforcePosition, "EnforcePosition", 0));
275  pComp->Value(mkNamingAdapt(ReadyCrew, "Crew", crewDefault));
276  pComp->Value(mkNamingAdapt(ReadyBase, "Buildings", C4IDList()));
277  pComp->Value(mkNamingAdapt(ReadyVehic, "Vehicles", C4IDList()));
278  pComp->Value(mkNamingAdapt(ReadyMaterial, "Material", C4IDList()));
279  pComp->Value(mkNamingAdapt(BuildKnowledge, "Knowledge", C4IDList()));
280  pComp->Value(mkNamingAdapt(BaseMaterial, "BaseMaterial", C4IDList()));
281  pComp->Value(mkNamingAdapt(BaseProduction, "BaseProduction", C4IDList()));
282 }
C4IDList BuildKnowledge
Definition: C4Scenario.h:149
int32_t EnforcePosition
Definition: C4Scenario.h:144
C4IDList BaseProduction
Definition: C4Scenario.h:151
C4IDList ReadyCrew
Definition: C4Scenario.h:145
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:93
C4SVal Wealth
Definition: C4Scenario.h:142
void Value(const T &rStruct)
Definition: StdCompiler.h:171
#define mkArrayAdaptDM(A, D)
Definition: StdAdaptors.h:361
C4IDList ReadyBase
Definition: C4Scenario.h:146
C4IDList ReadyVehic
Definition: C4Scenario.h:147
static const C4ID Clonk
Definition: C4Id.h:45
bool SetIDCount(C4ID c_id, int32_t iCount, bool fAddNewID=false)
Definition: stub-handle.cpp:68
int32_t Position[2]
Definition: C4Scenario.h:143
C4IDList ReadyMaterial
Definition: C4Scenario.h:148
C4IDList BaseMaterial
Definition: C4Scenario.h:150

Here is the call graph for this function:

void C4SPlrStart::Default ( )

Definition at line 237 of file C4Scenario.cpp.

References BaseMaterial, BaseProduction, BuildKnowledge, C4IDList::Default(), EnforcePosition, Position, ReadyBase, ReadyCrew, ReadyMaterial, ReadyVehic, C4SVal::Set(), and Wealth.

238 {
239  Wealth.Set(0,0,0,250);
240  Position[0]=Position[1]=-1;
241  EnforcePosition=0;
242  ReadyCrew.Default();
243  ReadyBase.Default();
249 }
C4IDList BuildKnowledge
Definition: C4Scenario.h:149
int32_t EnforcePosition
Definition: C4Scenario.h:144
C4IDList BaseProduction
Definition: C4Scenario.h:151
C4IDList ReadyCrew
Definition: C4Scenario.h:145
void Set(int32_t std=0, int32_t rnd=0, int32_t min=0, int32_t max=100)
Definition: C4Scenario.cpp:36
void Default()
Definition: stub-handle.cpp:63
C4SVal Wealth
Definition: C4Scenario.h:142
C4IDList ReadyBase
Definition: C4Scenario.h:146
C4IDList ReadyVehic
Definition: C4Scenario.h:147
int32_t Position[2]
Definition: C4Scenario.h:143
C4IDList ReadyMaterial
Definition: C4Scenario.h:148
C4IDList BaseMaterial
Definition: C4Scenario.h:150

Here is the call graph for this function:

bool C4SPlrStart::EquipmentEqual ( C4SPlrStart rhs)

Definition at line 251 of file C4Scenario.cpp.

252 {
253  return *this == rhs;
254 }
bool C4SPlrStart::operator== ( const C4SPlrStart rhs)

Definition at line 256 of file C4Scenario.cpp.

References BaseMaterial, BaseProduction, BuildKnowledge, ReadyBase, ReadyCrew, ReadyMaterial, ReadyVehic, and Wealth.

257 {
258  return (Wealth == rhs.Wealth)
259  && (ReadyCrew == rhs.ReadyCrew)
260  && (ReadyBase == rhs.ReadyBase)
261  && (ReadyVehic == rhs.ReadyVehic)
262  && (ReadyMaterial == rhs.ReadyMaterial)
263  && (BuildKnowledge == rhs.BuildKnowledge)
264  && (BaseMaterial == rhs.BaseMaterial)
265  && (BaseProduction == rhs.BaseProduction);
266 }
C4IDList BuildKnowledge
Definition: C4Scenario.h:149
C4IDList BaseProduction
Definition: C4Scenario.h:151
C4IDList ReadyCrew
Definition: C4Scenario.h:145
C4SVal Wealth
Definition: C4Scenario.h:142
C4IDList ReadyBase
Definition: C4Scenario.h:146
C4IDList ReadyVehic
Definition: C4Scenario.h:147
C4IDList ReadyMaterial
Definition: C4Scenario.h:148
C4IDList BaseMaterial
Definition: C4Scenario.h:150

Member Data Documentation

C4IDList C4SPlrStart::BaseMaterial

Definition at line 150 of file C4Scenario.h.

Referenced by CompileFunc(), Default(), operator==(), and C4Player::ScenarioInit().

C4IDList C4SPlrStart::BaseProduction

Definition at line 151 of file C4Scenario.h.

Referenced by CompileFunc(), Default(), operator==(), and C4Player::ScenarioInit().

C4IDList C4SPlrStart::BuildKnowledge

Definition at line 149 of file C4Scenario.h.

Referenced by CompileFunc(), Default(), operator==(), and C4Player::ScenarioInit().

int32_t C4SPlrStart::Position[2]

Definition at line 143 of file C4Scenario.h.

Referenced by CompileFunc(), Default(), C4Player::Execute(), and C4Player::ScenarioInit().

C4IDList C4SPlrStart::ReadyBase

Definition at line 146 of file C4Scenario.h.

Referenced by CompileFunc(), Default(), operator==(), and C4Player::PlaceReadyBase().

C4IDList C4SPlrStart::ReadyCrew

Definition at line 145 of file C4Scenario.h.

Referenced by CompileFunc(), Default(), operator==(), and C4Player::PlaceReadyCrew().

C4IDList C4SPlrStart::ReadyMaterial

Definition at line 148 of file C4Scenario.h.

Referenced by CompileFunc(), Default(), operator==(), and C4Player::PlaceReadyMaterial().

C4IDList C4SPlrStart::ReadyVehic

Definition at line 147 of file C4Scenario.h.

Referenced by CompileFunc(), Default(), operator==(), and C4Player::PlaceReadyVehic().

C4SVal C4SPlrStart::Wealth

Definition at line 142 of file C4Scenario.h.

Referenced by CompileFunc(), Default(), operator==(), and C4Player::ScenarioInit().


The documentation for this class was generated from the following files: