From 36e65eea97c5c5276bf8db866e1495017bfd3c61 Mon Sep 17 00:00:00 2001 From: NickName73 Date: Sun, 20 Feb 2022 17:43:09 +0300 Subject: [PATCH] V2 B35 --- assets/bundles/bundle.properties | 12 +- assets/bundles/bundle_ru.properties | 6 +- mod.hjson | 2 +- src/com/NiTiS/Gravillaso/GRMod.java | 5 +- .../NiTiS/Gravillaso/content/GRBlocks.java | 12 +- .../NiTiS/Gravillaso/content/GRLoadouts.java | 5 +- .../Gravillaso/GravillasoJavaMod.java | 20 +- .../Gravillaso/content/ModBlocks.java | 73 ------ .../Gravillaso/content/ModItems.java | 36 --- .../Gravillaso/content/ModTechTree.java | 219 ------------------ .../generators/GravilloPlanetGenerator.java | 7 +- 11 files changed, 34 insertions(+), 363 deletions(-) delete mode 100644 src/nitis/nickname73/Gravillaso/content/ModBlocks.java delete mode 100644 src/nitis/nickname73/Gravillaso/content/ModItems.java delete mode 100644 src/nitis/nickname73/Gravillaso/content/ModTechTree.java diff --git a/assets/bundles/bundle.properties b/assets/bundles/bundle.properties index 30ad07d..ad9d638 100644 --- a/assets/bundles/bundle.properties +++ b/assets/bundles/bundle.properties @@ -4,13 +4,13 @@ planet.gravillaso-gravillo.details = [orange]The best planet of all planets. ###Sectors sector.gravillaso-dried-fields.name = Dried Fields sector.gravillaso-dried-fields.description = Previously, there was an oil production station here, but by now nothing has survived here. \n\nTry to build and launch an oil generator. \n[red]WARNING: it is strongly recommended to put healing blocks next to the generator!!! -sector.gravillaso-dried-fields.details = Serpulo-156 +sector.gravillaso-dried-fields.details = Serpulo::156 sector.gravillaso-logical-center.name = Logical Center sector.gravillaso-logical-center.description = You landed in a place that used to be high-tech. There are processors here, but I'm afraid they will no longer be used for their intended purpose. \n\nDefend against enemies approaching from the south.\n\nFirst sector on Gravilo -sector.gravillaso-logical-center.details = Serpulo-224 +sector.gravillaso-logical-center.details = Serpulo::224 sector.gravillaso-caustic-gorge.name = Caustic Gorge sector.gravillaso-caustic-gorge.description = Huge cave. Some new ores can be mined in this place for example Quartz, a material that can be grind into sand. -sector.gravillaso-caustic-gorge.details = Gravilo-47 +sector.gravillaso-caustic-gorge.details = Gravilo::47 ###UI @content.planet.name = Planets @gravillaso-beta = It's beta version of Gravillaso Mod! @@ -114,9 +114,9 @@ block.gravillaso-fiery-spray.name = Fiery Spray block.gravillaso-fiery-spray.description = Splashes out a jet of any flammable liquid. ###Blocks-Factory block.gravillaso-advanced-pyratite-mixer.name = Advanced Pyrotite Mixer -block.gravillaso-advanced-pyratite-mixer.description = [orange]Without description. +block.gravillaso-advanced-pyratite-mixer.description = Advanced system for mixing.\nCreates pyrotite. block.gravillaso-advanced-blast-mixer.name = Advanced Blast Mixer -block.gravillaso-advanced-blast-mixer.description = [orange]Without description. +block.gravillaso-advanced-blast-mixer.description = More efficiency system for creating blast compound. block.gravillaso-gasoline-barrel.name = Gasoline Barrel block.gravillaso-gasoline-barrel.description = Uses oil to distill it into gasoline. block.gravillaso-cryofluid-chamber.name = Cryofluid Chamber @@ -167,6 +167,8 @@ block.gravillaso-advanced-naval-factory.name = Advanced Naval Factory block.gravillaso-advanced-naval-factory.description = Produces advanced naval units. Output units can be used directly, or moved into reconstructors for upgrading. block.gravillaso-additive-reassembler.name = Additive Reassembler block.gravillaso-additive-reassembler.description = Upgrades inputted advanced units to the second tier. +block.gravillaso-multiplicative-reassembler.name = Multiplicative Reassembler +block.gravillaso-multiplicative-reassembler.description = Upgrades inputted advanced units to the third tier. ###Block-Editor block.gravillaso-red-sand.name = Red Sand block.gravillaso-red-sand-wall.name = Red Sand Wall diff --git a/assets/bundles/bundle_ru.properties b/assets/bundles/bundle_ru.properties index 80c6ed5..bb4f071 100644 --- a/assets/bundles/bundle_ru.properties +++ b/assets/bundles/bundle_ru.properties @@ -106,9 +106,9 @@ block.gravillaso-fiery-spray.name = Пламенный спрэй block.gravillaso-fiery-spray.description = Выплёскивает струю горючей жидкости. ###Blocks-Factory block.gravillaso-advanced-pyratite-mixer.name = Продвинутая мешалка пиротита -block.gravillaso-advanced-pyratite-mixer.description = [orange]Описания нету. +block.gravillaso-advanced-pyratite-mixer.description = Улчучшенная система создания пиротита. block.gravillaso-advanced-blast-mixer.name = Продвинутая мешалка взрывной смеси -block.gravillaso-advanced-blast-mixer.description = [orange]Описания нету. +block.gravillaso-advanced-blast-mixer.description = Улучшенная система создания взрывчатой смеси. block.gravillaso-gasoline-barrel.name = Топливный барель block.gravillaso-gasoline-barrel.description = Устройство перегонки нефти в бензин. block.gravillaso-cryofluid-chamber.name = Криогенная камера @@ -157,6 +157,8 @@ block.gravillaso-advanced-naval-factory.name = Продвинутая морск block.gravillaso-advanced-naval-factory.description = Производит продвинутые морские единицы. Вывод единиц может быть осуществлён напрямую, либо перенаправлен в реконструкторы для улучшения. block.gravillaso-additive-reassembler.name = Добавляющий переспорщик block.gravillaso-additive-reassembler.description = Улучшает введённые продвинутые юниты до второго уровня. +block.gravillaso-multiplicative-reassembler.name = Умножающий пересборщик +block.gravillaso-multiplicative-reassembler.description = Улучшает введённые продвинутые юниты до третьего уровня. ###Block-Editor block.gravillaso-red-sand.name = Красный песок block.gravillaso-red-sand-wall.name = Стана красного песка diff --git a/mod.hjson b/mod.hjson index c867174..63b6689 100644 --- a/mod.hjson +++ b/mod.hjson @@ -3,6 +3,6 @@ name: "gravillaso" author: "NiTiS (NickName73)" main: "com.NiTiS.Gravillaso.GRMod" description: "GRMod" -version: "2 b34" +version: "2 b35" minGameVersion: 134 java: true diff --git a/src/com/NiTiS/Gravillaso/GRMod.java b/src/com/NiTiS/Gravillaso/GRMod.java index c291b31..6905706 100644 --- a/src/com/NiTiS/Gravillaso/GRMod.java +++ b/src/com/NiTiS/Gravillaso/GRMod.java @@ -2,8 +2,10 @@ import arc.util.Log; import com.NiTiS.Gravillaso.content.*; +import mindustry.Vars; import mindustry.ctype.ContentList; import mindustry.mod.Mod; +import mindustry.mod.Mods; public class GRMod extends Mod { @@ -25,7 +27,8 @@ public static String fullName(String name){ @Override public void loadContent() { - Log.info("GravillasoR loading"); + Mods.LoadedMod grmod = Vars.mods.getMod("gravillaso"); + Log.info("GRavillaso loading"); int loaded = 0; for (ContentList list : required){ try { diff --git a/src/com/NiTiS/Gravillaso/content/GRBlocks.java b/src/com/NiTiS/Gravillaso/content/GRBlocks.java index c2709a2..b8499ac 100644 --- a/src/com/NiTiS/Gravillaso/content/GRBlocks.java +++ b/src/com/NiTiS/Gravillaso/content/GRBlocks.java @@ -14,6 +14,7 @@ import mindustry.type.LiquidStack; import mindustry.type.UnitType; import mindustry.world.Block; +import mindustry.world.blocks.Attributes; import mindustry.world.blocks.defense.ForceProjector; import mindustry.world.blocks.defense.MendProjector; import mindustry.world.blocks.defense.Wall; @@ -84,6 +85,8 @@ public void load() { }}; redSand = new Floor("red-sand"){{ wall = redSandWall; + attributes.set(Attribute.heat, 0.05f); + attributes.set(Attribute.water, -0.05f); itemDrop = Items.sand; playerUnmineable = true; }}; @@ -101,6 +104,9 @@ public void load() { status = StatusEffects.melting; statusDuration = 247f; wall = burningGroundWall; + attributes.set(Attribute.heat, 2.75f); + attributes.set(Attribute.water, -3); + attributes.set(Attribute.oil, 0.25f); }}; burningGroundWall = new StaticWall("burning-ground-wall"){{ variants = 2; @@ -364,7 +370,7 @@ public void load() { health = 70 * size * size; itemCapacity = 240; range = 520; - rotateSpeed = 0.03f; + rotateSpeed = 0.1f; translation = 7f; minDistribute = 40; knockback = 4; @@ -491,7 +497,7 @@ public void load() { inaccuracy = 2; range = 180; powerUse = 7; - shootType = new LaserBulletType(45){{ + shootType = new LaserBulletType(75){{ lifetime = 40; length = 220; width = 10; @@ -780,6 +786,7 @@ Items.phaseFabric, new ShrapnelBulletType(){{ ); consumes.items(with(Items.silicon, 50, Items.graphite, 20, Items.titanium, 30)); consumes.power(4); + constructTime = 60 * 15; size = 3; }}; multiplicativeReassembler = new Reconstructor("multiplicative-reassembler"){{ @@ -789,6 +796,7 @@ Items.phaseFabric, new ShrapnelBulletType(){{ ); consumes.power(7.5f); consumes.items(with(Items.silicon, 140, Items.titanium, 120, GRItems.gravitium, 20)); + constructTime = 60 * 40; size = 5; }}; //endregion diff --git a/src/com/NiTiS/Gravillaso/content/GRLoadouts.java b/src/com/NiTiS/Gravillaso/content/GRLoadouts.java index fc3f905..b6484b6 100644 --- a/src/com/NiTiS/Gravillaso/content/GRLoadouts.java +++ b/src/com/NiTiS/Gravillaso/content/GRLoadouts.java @@ -1,6 +1,6 @@ package com.NiTiS.Gravillaso.content; -import mindustry.content.Loadouts; +import mindustry.Vars; import mindustry.ctype.ContentList; import mindustry.game.Schematic; import mindustry.game.Schematics; @@ -14,5 +14,8 @@ public class GRLoadouts implements ContentList { public void load() { basicMolecular = Schematics.readBase64("bXNjaAF4nDWOQQ7CIBREf6EtRU2MS5ceoDtv4DGMC2x/DAmFhtIm3l7KRBIYIG/mDx3oJKn2ZmJqHiHynY4jL0O0c7LBE1HrzJvdQuL5knRJNhlv16kfgt/4GyKdZ8/rZJId+jFa5+j6iWbLF7OEfgqOh9WZmPnIOe1GZVU4igiIhNSQ5k+JCtx+yMxmaeAqW+RXJbKrQ0YxSBgkDDIjYndVMJfPFj1ahClMU0AUEAVLB7LbU4g0ammU0iivMVGjvN7JH+toI+A="); basicColiseum = Schematics.readBase64("bXNjaAF4nD2MXQrCMBCEJz8tNRXEN/EOffQEHkN8iDVIIE1Kmha8vZsumCV8+zMz6HFU0NFODs09ZXdD/3bLmP1cfIoA2mBfLiyQj6fCufhio1+nYUxxc9+UcZqjWydb/Di8sw8Bl0+2GzV2SaQKfnG7PDsKu9KHoKInGYqh//sKyY1mnYaQaNDVleKLYkmzDwTBkAzFIJ9Ay4a2GkTNYOz2rkqAA4FmwymGUwynmHr7Aa+GI0A="); + + Vars.schematics.add(basicMolecular); + Vars.schematics.add(basicColiseum); } } diff --git a/src/nitis/nickname73/Gravillaso/GravillasoJavaMod.java b/src/nitis/nickname73/Gravillaso/GravillasoJavaMod.java index 1d61ca6..dd7c522 100644 --- a/src/nitis/nickname73/Gravillaso/GravillasoJavaMod.java +++ b/src/nitis/nickname73/Gravillaso/GravillasoJavaMod.java @@ -56,7 +56,7 @@ public static String fullName(String name){ @Override public void loadContent(){ try{ - LoadedMod mod = mods.locateMod("gravillaso"); + LoadedMod mod = mods.getMod("gravillaso"); mod.meta.displayName = "[#51158b]G[#4d2a97]r[#493fa3]a[#4554af]v[#4169bb]i[#3d7ec7]l[#3993d3]l[#35a8df]a[#31bdeb]s[#2dd2f7]o [#e5e5e5]Java"; mod.meta.author = "[#ffea96]NickName73[]\nCREAsTIVE\n[maroon]Spriters:[]\nRadmir Yakupov\nCat fat\nVeniamin Katyrev\n[salmon]Additional Content from:[]\nTheSkyFather/Minerals"; }catch (Exception e){ @@ -75,12 +75,6 @@ public void loadContent(){ Log.err("Gravillaso Liquid loading failed"); Log.err(e); } - try { - new ModItems().load(); - }catch (Exception e){ - Log.err("Gravillaso Items loading failed"); - Log.err(e); - } try { new ModStatuses().load(); }catch (Exception e){ @@ -93,12 +87,6 @@ public void loadContent(){ Log.err("Gravillaso Units loading failed"); Log.err(e); } - try { - new ModBlocks().load(); - }catch (Exception e){ - Log.err("Gravillaso Blocks loading failed"); - Log.err(e); - } try { new ModPlanets().load(); }catch (Exception e){ @@ -111,12 +99,6 @@ public void loadContent(){ Log.err("Gravillaso Sectors loading failed"); Log.err(e); } - try { - new ModTechTree().load(); - }catch (Exception e){ - Log.err("Gravillaso TechTree loading failed"); - Log.err(e); - } } } diff --git a/src/nitis/nickname73/Gravillaso/content/ModBlocks.java b/src/nitis/nickname73/Gravillaso/content/ModBlocks.java deleted file mode 100644 index 1a99baa..0000000 --- a/src/nitis/nickname73/Gravillaso/content/ModBlocks.java +++ /dev/null @@ -1,73 +0,0 @@ -package nitis.nickname73.Gravillaso.content; - -import arc.graphics.Color; -import arc.struct.ObjectMap; -import arc.struct.Seq; -import mindustry.content.*; -import mindustry.ctype.ContentList; -import mindustry.entities.bullet.*; -import mindustry.gen.Sounds; -import mindustry.graphics.CacheLayer; -import mindustry.type.Category; -import mindustry.type.ItemStack; -import mindustry.type.LiquidStack; -import mindustry.world.Block; -import mindustry.world.blocks.defense.MendProjector; -import mindustry.world.blocks.defense.Wall; -import mindustry.world.blocks.defense.turrets.ItemTurret; -import mindustry.world.blocks.defense.turrets.LiquidTurret; -import mindustry.world.blocks.defense.turrets.PowerTurret; -import mindustry.world.blocks.distribution.ArmoredConveyor; -import mindustry.world.blocks.distribution.MassDriver; -import mindustry.world.blocks.distribution.StackConveyor; -import mindustry.world.blocks.environment.Floor; -import mindustry.world.blocks.environment.OreBlock; -import mindustry.world.blocks.environment.StaticWall; -import mindustry.world.blocks.power.*; -import mindustry.world.blocks.production.AttributeCrafter; -import mindustry.world.blocks.production.GenericCrafter; -import mindustry.world.blocks.production.LiquidConverter; -import mindustry.world.blocks.production.SolidPump; -import mindustry.world.blocks.storage.CoreBlock; -import mindustry.world.blocks.units.RepairPoint; -import mindustry.world.blocks.units.UnitFactory; -import mindustry.world.draw.DrawMixer; -import mindustry.world.draw.DrawWeave; -import mindustry.world.meta.Attribute; -import mindustry.world.meta.BuildVisibility; -import nitis.nickname73.Gravillaso.content.Blocks.OverdriveDrill; - -public class ModBlocks implements ContentList { - - public static final int gravitiumDefence = 1280 ,magneturnDefence = 2300; - public static final Color baseHealColor = Color.valueOf("84f490"), phaseHealColor = Color.valueOf("B5ffbd"); - - public static Block - //Environment - redSand,redSandWall,burningGround,burningGroundWall,flammableLiquidBlock,metalFloorDamagedOrange, - //Defence - hyperMender,colossalHealingDome,gravitiumWall,gravitiumWallLarge,magneturnWall,magneturnWallLarge, - //Distribution - magneturnConveyor,electroConveyor,colossalDriver, - //Drills - deepOilPump,overdriveDrill, - //Power - gasolineGenerator,batteryBig,multiConnector,sporeGenerator,solarArray,sunshine, - //Production - advancedPyratiteMixer,advancedBlastMixer,gasolineBarrel,cryofluidChamber,flammableLiquidChamber,phaseCaldron,molecularConverter,molecularReconstructor,magneturnSmelter,electroSmelter,molecularPhaseWeaver,plastaniumMolecularPress, - //Turrets - destiny,arhiepiscop,fierySpray,renunciation,phaseFuse,slt,voltum,sunrise, - //Storages - molecularCore,coliseumCore, - //Units - repairLaser,advancedNavalFactory,additiveReassembler, multiplicativeReassembler, - //Ores - oreQuartz, - //PlanetUnlocks - _end; - - @Override - public void load() { - - } -} diff --git a/src/nitis/nickname73/Gravillaso/content/ModItems.java b/src/nitis/nickname73/Gravillaso/content/ModItems.java deleted file mode 100644 index 1e80108..0000000 --- a/src/nitis/nickname73/Gravillaso/content/ModItems.java +++ /dev/null @@ -1,36 +0,0 @@ -package nitis.nickname73.Gravillaso.content; - -import arc.graphics.Color; -import mindustry.ctype.ContentList; -import mindustry.type.Item; - -public class ModItems implements ContentList { - - public static Item - gravitium, magneturn, quartz, electroBrass; - - @Override - public void load() { - quartz = new Item("quartz"){{ - cost = 1; - color = Color.valueOf("ebf6f7"); - }}; - gravitium = new Item("gravitium"){{ - radioactivity = 0.09f; - cost = 2; - charge = 0.04f; - hardness = 5; - color = Color.valueOf("6497ac"); - }}; - magneturn = new Item("magneturn"){{ - cost = 4; - color = Color.valueOf("3d0a78"); - }}; - electroBrass = new Item("electro-brass"){{ - cost = 3; - hardness = 7; - charge = 0.85f; - color = Color.valueOf("f9ffb4"); - }}; - } -} diff --git a/src/nitis/nickname73/Gravillaso/content/ModTechTree.java b/src/nitis/nickname73/Gravillaso/content/ModTechTree.java deleted file mode 100644 index e05b297..0000000 --- a/src/nitis/nickname73/Gravillaso/content/ModTechTree.java +++ /dev/null @@ -1,219 +0,0 @@ -package nitis.nickname73.Gravillaso.content; - -import arc.struct.Seq; -import mindustry.content.*; -import mindustry.ctype.ContentList; -import mindustry.ctype.UnlockableContent; -import mindustry.game.Objectives; -import mindustry.game.Objectives.Objective; -import mindustry.game.Objectives.Produce; -import mindustry.game.Objectives.Research; -import mindustry.game.Objectives.SectorComplete; -import mindustry.type.ItemStack; -import mindustry.type.SectorPreset; - -import static mindustry.content.TechTree.TechNode; - -public class ModTechTree implements ContentList { - static TechNode context = null; - @Override - public void load(){ - margeNode(Items.titanium, ()->{ - nodeProduce(ModItems.gravitium, ()->{ - nodeProduce(ModItems.magneturn, ()->{ - nodeProduce(ModItems.electroBrass); - }); - }); - }); - Blocks.batteryLarge.node().remove(); - margeNode(Blocks.battery, () ->{ - node(ModBlocks.batteryBig, () ->{ - node(Blocks.batteryLarge); - }); - }); - margeNode(Blocks.blastMixer, () ->{ - node(ModBlocks.advancedBlastMixer); - }); - margeNode(Blocks.pyratiteMixer, () ->{ - node(ModBlocks.advancedPyratiteMixer); - }); - margeNode(Blocks.cryofluidMixer, () ->{ - node(ModBlocks.gasolineBarrel); - node(ModBlocks.cryofluidChamber); - node(ModBlocks.flammableLiquidChamber); - }); - margeNode(Blocks.kiln, () ->{ - node(ModBlocks.molecularConverter, () ->{ - nodeSector(ModBlocks.molecularReconstructor, ModSectorPresets.logicalCenter); - }); - //TODO: Advanced Kiln - }); - margeNode(Blocks.phaseWeaver, () ->{ - node(ModBlocks.phaseCaldron); - node(ModBlocks.molecularPhaseWeaver); - }); - margeNode(Blocks.plastaniumCompressor, () ->{ - node(ModBlocks.plastaniumMolecularPress); - }); - margeNode(Blocks.surgeSmelter, () ->{ - node(ModBlocks.magneturnSmelter, () ->{ - nodeSector(ModBlocks.electroSmelter, ModSectorPresets.logicalCenter); - }); - }); - margeNode(Blocks.oilExtractor, () ->{ - nodeSector(ModBlocks.deepOilPump,ModSectorPresets.logicalCenter); - }); - margeNode(Blocks.differentialGenerator, () ->{ - node(ModBlocks.gasolineGenerator, Seq.with(new Produce(ModLiquids.gasoline)), ()->{ - }); - }); - margeNode(Blocks.powerNodeLarge, () ->{ - node(ModBlocks.multiConnector); - }); - margeNode(Blocks.largeSolarPanel, () ->{ - node(ModBlocks.solarArray); - }); - margeNode(Blocks.blastDrill, () ->{ - nodeSector(ModBlocks.overdriveDrill,ModSectorPresets.logicalCenter, Seq.with(new Research(Blocks.coreNucleus), new Research(ModBlocks.colossalDriver))); - }); - margeNode(Liquids.oil, ()->{ - nodeProduce(ModLiquids.gasoline); - }); - margeNode(Blocks.fuse, () ->{ - node(ModBlocks.voltum); - node(ModBlocks.phaseFuse); - }); - margeNode(Blocks.titaniumWall, () ->{ - node(ModBlocks.gravitiumWall, () ->{ - node(ModBlocks.gravitiumWallLarge); - node(ModBlocks.magneturnWall, () ->{ - node(ModBlocks.magneturnWallLarge); - }); - }); - }); - margeNode(Blocks.spectre, () ->{ - //nodeSector(ModBlocks.saturn, ModSectorPresets.causticGorge); TODO: Saturn - }); - margeNode(Blocks.swarmer, () ->{ - node(ModBlocks.renunciation); - }); - margeNode(Blocks.tsunami, () ->{ - node(ModBlocks.fierySpray); - }); - margeNode(Blocks.armoredConveyor, () ->{ - node(ModBlocks.magneturnConveyor); - }); - margeNode(Blocks.plastaniumConveyor, () ->{ - node(ModBlocks.electroConveyor); - }); - margeNode(Blocks.massDriver, () ->{ - node(ModBlocks.colossalDriver); - }); - margeNode(Blocks.lancer, () ->{ - node(ModBlocks.destiny, () ->{ - node(ModBlocks.arhiepiscop, () ->{ - node(ModBlocks.sunrise); - }); - }); - }); - margeNode(Blocks.coreNucleus, () ->{ - node(ModBlocks.molecularCore, () ->{ - node(ModBlocks.coliseumCore); - }); - }); - margeNode(Blocks.mendProjector, ()->{ - nodeSector(ModBlocks.hyperMender,SectorPresets.overgrowth, ()->{ - nodeSector(ModBlocks.colossalHealingDome, SectorPresets.desolateRift); - }); - }); - margeNode(SectorPresets.coastline, ()->{ - nodeSector(ModSectorPresets.logicalCenter, SectorPresets.coastline); - node(ModSectorPresets.driedFields, Seq.with(new Research(ModBlocks.phaseFuse), new Research(ModBlocks.colossalHealingDome), new SectorComplete(SectorPresets.coastline)), ()->{ - - }); - }); - margeNode(Blocks.coreShard, () ->{ - nodeSector(ModPlanets.gravillo, SectorPresets.desolateRift, Seq.with(new Research(Blocks.interplanetaryAccelerator)) , () ->{ - //node(ModPlanets.sunCenter); In 2.4 or V8 - nodeSector(ModSectorPresets.causticGorge,SectorPresets.desolateRift, Seq.with(new Research(ModBlocks.colossalDriver), new Research(ModBlocks.molecularCore)), ()->{ - }); - }); - }); - margeNode(Blocks.repairTurret, () ->{ - node(ModBlocks.repairLaser); - }); - } - - - - - - - - - - /* - Methods - */ - private static void margeNode(UnlockableContent parent, Runnable children){ - context = TechTree.all.find(t -> t.content == parent); - children.run(); - } - - private static void node(UnlockableContent content, ItemStack[] requirements, Seq objectives, Runnable children){ - TechNode node = new TechNode(context, content, requirements); - if(objectives != null) node.objectives = objectives; - - TechNode prev = context; - context = node; - children.run(); - context = prev; - } - - private static void node(UnlockableContent content, ItemStack[] requirements, Runnable children){ - node(content, requirements, null, children); - } - - private static void node(UnlockableContent content, Seq objectives, Runnable children){ - node(content, content.researchRequirements(), objectives, children); - } - - private static void node(UnlockableContent content, Runnable children){ - node(content, content.researchRequirements(), children); - } - - private static void node(UnlockableContent block){ - node(block, () -> {}); - } - - private static void nodeProduce(UnlockableContent content, Seq objectives, Runnable children){ - node(content, content.researchRequirements(), objectives.and(new Produce(content)), children); - } - - private static void nodeProduce(UnlockableContent content, Runnable children){ - nodeProduce(content, Seq.with(), children); - } - - private static void nodeProduce(UnlockableContent content){ - nodeProduce(content, Seq.with(), () -> {}); - } - private static void nodeSector(UnlockableContent content, SectorPreset zone, Runnable children){ - node(content, Seq.with(new SectorComplete(zone)), children); - } - private static void nodeSector(UnlockableContent content, SectorPreset zone){ - node(content, content.researchRequirements(), Seq.with(new SectorComplete(zone)), ()->{}); - } - - private static void nodeSector(UnlockableContent content, Runnable children){ - node(content, Seq.with(new SectorComplete(SectorPresets.groundZero)), children); - } - private static void nodeSector(UnlockableContent content, SectorPreset sector,Seq objectives, Runnable runnable){ - node(content, objectives.and( new SectorComplete(sector)),runnable); - } - private static void nodeSector(UnlockableContent content, SectorPreset sector,Seq objectives){ - node(content, objectives.and( new SectorComplete(sector)), () ->{}); - } - private static void nodeSector(UnlockableContent content){ - nodeSector(content, () -> {}); - } -} diff --git a/src/nitis/nickname73/Gravillaso/maps/generators/GravilloPlanetGenerator.java b/src/nitis/nickname73/Gravillaso/maps/generators/GravilloPlanetGenerator.java index 16d4eab..fed5eb5 100644 --- a/src/nitis/nickname73/Gravillaso/maps/generators/GravilloPlanetGenerator.java +++ b/src/nitis/nickname73/Gravillaso/maps/generators/GravilloPlanetGenerator.java @@ -15,6 +15,7 @@ import arc.util.noise.Noise; import arc.util.noise.Ridged; import arc.util.noise.Simplex; +import com.NiTiS.Gravillaso.content.GRBlocks; import mindustry.ai.Astar; import mindustry.ai.BaseRegistry; import mindustry.content.Blocks; @@ -24,13 +25,11 @@ import mindustry.graphics.g3d.PlanetGrid; import mindustry.maps.generators.BaseGenerator; import mindustry.maps.generators.PlanetGenerator; -import mindustry.maps.planet.SerpuloPlanetGenerator; import mindustry.type.Sector; import mindustry.world.Block; import mindustry.world.Tile; import mindustry.world.TileGen; import mindustry.world.Tiles; -import nitis.nickname73.Gravillaso.content.ModBlocks; import static mindustry.Vars.*; @Deprecated @@ -140,7 +139,7 @@ Block getBlock(Vec3 position) { protected void generate(){ class Room{ - int x, y, radius; + final int x, y, radius; ObjectSet connected = new ObjectSet<>(); Room(int x, int y, int radius){ @@ -272,7 +271,7 @@ void connect(Room to){ } }); - Seq ores = Seq.with(Blocks.oreCopper, Blocks.oreCoal, Blocks.oreTitanium, ModBlocks.oreQuartz, Blocks.oreLead); + Seq ores = Seq.with(Blocks.oreCopper, Blocks.oreCoal, Blocks.oreTitanium, GRBlocks.oreQuartz, Blocks.oreLead); float poles = Math.abs(sector.tile.v.y); float nmag = 0.5f; float scl = 1f;