From d78bcac15035ddd096df6187a36e630071cba5c4 Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Thu, 8 Apr 2021 12:18:18 +0200 Subject: Obsidian pillars, end fountain, not Ender dragon spawning (#4993) * added generator for obsidian pillars and central fountain which then is used for the exit portal * checkstyle * checkstyle the second * fixed clang removed magic number added Clamp * make the pillars configurable * fixed clang added warning if there was a unknown value if the tower should have a cage or not * forgot to cancel on unkwon value * fixed clang this time maybe * added new generator to generator test * fixed test * added prefab generation for end fountain * fixed checkstyle and updated the prefab * added ender dragon spawning made the fountain positioning dynamic removed fountain placement functions * added enderdragon stuff to testing * pls compile * added changes suggested by @peterbell10 * fixed clang * added debug for further research on the ARM build * ok - it wasn't my tower placement * checking in setup * readded the fountain schematic * removed finisher * readded generator * removed generator trigger - kept ini file access * using cChunkDef function to calculate abs pos of endercrystal * yes, I know it's unused... * commented everything in the ComposableGenerator.cpp - so only the new class in compiled in but not called at all * don't compile in the new generator at all (removed from CMakeLists.txt) * readded the new generator * readded the new generator * removed debug output * made the towers generate acrocc chunk borders * fixed bad merge * fixed clang * fixed clang * generate the dragon 20 blocks above terrain * trying to fixed weird undefined reference * maybe this fixes the weird behaviour * takes chunk width as parameter now * added new comments with info to generated structures removed ender dragon spawning removed chunkwidth from parameter * fixed linker * maybe fixed linking. tried with gc and clang * fixed ender crystal * fixed test * updated output strings * fixed build * fixed up test * fixed test compile * fixed test - cant get the tests to show up * removed the semicolon * maybe this is the fix? * at this point i have no idea - in MVSC it works * removed the ender dragon Co-authored-by: 12xx12 <12xx12100@gmail.com> --- src/Generating/ComposableGenerator.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index d5c64e4c4..9b170ecc8 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -23,6 +23,7 @@ #include "DistortedHeightmap.h" #include "DungeonRoomsFinisher.h" #include "EndGen.h" +#include "EnderDragonFightStructuresGen.h" #include "MineShafts.h" #include "Noise3DGenerator.h" #include "Ravines.h" @@ -262,7 +263,7 @@ void cComposableGenerator::InitializeGeneratorDefaults(cIniFile & a_IniFile, eDi a_IniFile.GetValueSet("Generator", "ConstantBiome", "End"); a_IniFile.GetValueSet("Generator", "ShapeGen", "End"); a_IniFile.GetValueSet("Generator", "CompositionGen", "End"); - a_IniFile.GetValueSet("Generator", "Finishers", ""); + a_IniFile.GetValueSet("Generator", "Finishers", "EnderDragonFightStructures"); break; } // dimEnd @@ -450,6 +451,19 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) AString HeightDistrib = a_IniFile.GetValueSet ("Generator", "DungeonRoomsHeightDistrib", "0, 0; 10, 10; 11, 500; 40, 500; 60, 40; 90, 1"); m_FinishGens.push_back(std::make_unique(*m_ShapeGen, m_Seed, GridSize, MaxSize, MinSize, HeightDistrib)); } + else if (NoCaseCompare(finisher, "EnderDragonFightStructures") == 0) + { + AString Pillars = a_IniFile.GetValueSet("Generator", "ObsidianPillars", + "76|3|false; 79|3|true; 82|3|true; " + "85|4|false; 88|4|false; 91|4|false; " + "94|5|false; 97|5|false; 100|5|false; " + "103|6|false"); + int Radius = a_IniFile.GetValueSetI("Generator", "ObsidianPillarsRadius", 43); + // The init method is called manually because the linker can't access the cChunkDef::Width in the constructor + auto Gen = new cEnderDragonFightStructuresGen(m_Seed); + Gen->Init(Pillars, Radius); + m_FinishGens.push_back(cFinishGenPtr(Gen)); + } else if (NoCaseCompare(finisher, "GlowStone") == 0) { m_FinishGens.push_back(std::make_unique(m_Seed)); -- cgit v1.2.3