-
Notifications
You must be signed in to change notification settings - Fork 2
/
SkondEmpire.cpp
84 lines (67 loc) · 2.08 KB
/
SkondEmpire.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include "stdafx.h"
#include "SkondEmpire.h"
/// AUTOGENERATED METHODS ///
using namespace Simulator;
int SkondEmpire::AddRef() {
return Simulator::cStrategy::AddRef();
}
int SkondEmpire::Release() {
return Simulator::cStrategy::Release();
}
const char* SkondEmpire::GetName() const {
return "RattlerSpore::SkondEmpire";
}
bool SkondEmpire::Write(Simulator::ISerializerStream* stream)
{
return Simulator::ClassSerializer(this, ATTRIBUTES).Write(stream);
}
bool SkondEmpire::Read(Simulator::ISerializerStream* stream)
{
return Simulator::ClassSerializer(this, ATTRIBUTES).Read(stream);
}
/// END OF AUTOGENERATED METHODS ///
////////////////////////////////////
Simulator::Attribute SkondEmpire::ATTRIBUTES[] = {
// Add more attributes here
// This one must always be at the end
Simulator::Attribute()
};
void SkondEmpire::Initialize() {
sInstance = this;
Skond = nullptr;
Homeworld = nullptr;
}
void SkondEmpire::Dispose() {
}
void SkondEmpire::Update(int deltaTime, int deltaGameTime) {
if (Homeworld == nullptr) {
StarRequestFilter filter = StarRequestFilter();
filter.AddStarType(StarType::StarG);
filter.AddStarType(StarType::StarM);
filter.AddStarType(StarType::StarO);
filter.AddTechLevel(TechLevel::Creature);
filter.maxDistance = 999999;
filter.minDistance = 0;
Homeworld = StarManager.FindClosestStar(Vector3(9999, 9999, 0), filter); //Does not crash
App::ConsolePrintF("my fucking limit");
Skond = StarManager.GetEmpireForStar(Homeworld.get());
auto SkondSpecies = SpeciesManager.GetSpeciesProfile({ 0x23E33E31, TypeIDs::crt, GroupIDs::CreatureModels }); //Get Skond Models n shit
Skond->SetSpeciesProfile(SkondSpecies); //set Set the species to the selectedSpecies
//Skond->mArchetype = Archetypes::kArchetypePlayerKnight;
Skond->mArchetype = Archetypes::kArchetypeGrob;
}
Skond->mEmpireName = u"Skond Hive";
}
bool SkondEmpire::WriteToXML(Simulator::XmlSerializer* writexml)
{
return false;
}
SkondEmpire* SkondEmpire::Get()
{
return sInstance;
}
uint32_t SkondEmpire::GetEmpireID()
{
return Skond->GetEmpireID();
}
SkondEmpire* SkondEmpire::sInstance;