Ground zero tutorial from #7532
This commit is contained in:
@@ -1503,6 +1503,7 @@ public class Blocks{
|
||||
copperWall = new Wall("copper-wall"){{
|
||||
requirements(Category.defense, with(Items.copper, 6));
|
||||
health = 80 * wallHealthMultiplier;
|
||||
researchCostMultiplier = 0.1f;
|
||||
envDisabled |= Env.scorching;
|
||||
}};
|
||||
|
||||
@@ -1886,11 +1887,12 @@ public class Blocks{
|
||||
//region distribution
|
||||
|
||||
conveyor = new Conveyor("conveyor"){{
|
||||
requirements(Category.distribution, with(Items.copper, 1), true);
|
||||
requirements(Category.distribution, with(Items.copper, 1));
|
||||
health = 45;
|
||||
speed = 0.03f;
|
||||
displayedSpeed = 4.2f;
|
||||
buildCostMultiplier = 2f;
|
||||
researchCost = with(Items.copper, 5);
|
||||
}};
|
||||
|
||||
titaniumConveyor = new Conveyor("titanium-conveyor"){{
|
||||
@@ -1915,7 +1917,7 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
junction = new Junction("junction"){{
|
||||
requirements(Category.distribution, with(Items.copper, 2), true);
|
||||
requirements(Category.distribution, with(Items.copper, 2));
|
||||
speed = 26;
|
||||
capacity = 6;
|
||||
health = 30;
|
||||
@@ -2639,12 +2641,13 @@ public class Blocks{
|
||||
//region production
|
||||
|
||||
mechanicalDrill = new Drill("mechanical-drill"){{
|
||||
requirements(Category.production, with(Items.copper, 12), true);
|
||||
requirements(Category.production, with(Items.copper, 12));
|
||||
tier = 2;
|
||||
drillTime = 600;
|
||||
size = 2;
|
||||
//mechanical drill doesn't work in space
|
||||
envEnabled ^= Env.space;
|
||||
researchCost = with(Items.copper, 10);
|
||||
|
||||
consumeLiquid(Liquids.water, 0.05f).boost();
|
||||
}};
|
||||
@@ -3002,7 +3005,7 @@ public class Blocks{
|
||||
//region turrets
|
||||
|
||||
duo = new ItemTurret("duo"){{
|
||||
requirements(Category.turret, with(Items.copper, 35), true);
|
||||
requirements(Category.turret, with(Items.copper, 35));
|
||||
ammo(
|
||||
Items.copper, new BasicBulletType(2.5f, 9){{
|
||||
width = 7f;
|
||||
@@ -3038,6 +3041,7 @@ public class Blocks{
|
||||
inaccuracy = 2f;
|
||||
rotateSpeed = 10f;
|
||||
coolant = consumeCoolant(0.1f);
|
||||
researchCostMultiplier = 0.05f;
|
||||
|
||||
limitRange();
|
||||
}};
|
||||
@@ -3105,6 +3109,7 @@ public class Blocks{
|
||||
scaledHealth = 200;
|
||||
shootSound = Sounds.shootSnap;
|
||||
coolant = consumeCoolant(0.2f);
|
||||
researchCostMultiplier = 0.05f;
|
||||
|
||||
limitRange(2);
|
||||
}};
|
||||
|
||||
@@ -23,7 +23,6 @@ public class Items{
|
||||
lead = new Item("lead", Color.valueOf("8c7fa9")){{
|
||||
hardness = 1;
|
||||
cost = 0.7f;
|
||||
alwaysUnlocked = true;
|
||||
}};
|
||||
|
||||
metaglass = new Item("metaglass", Color.valueOf("ebeef5")){{
|
||||
@@ -36,8 +35,9 @@ public class Items{
|
||||
|
||||
sand = new Item("sand", Color.valueOf("f7cba4")){{
|
||||
lowPriority = true;
|
||||
alwaysUnlocked = true;
|
||||
buildable = false;
|
||||
//needed to show up as requirement
|
||||
alwaysUnlocked = true;
|
||||
}};
|
||||
|
||||
coal = new Item("coal", Color.valueOf("272727")){{
|
||||
|
||||
@@ -22,6 +22,7 @@ public class SectorPresets{
|
||||
addStartingItems = true;
|
||||
captureWave = 10;
|
||||
difficulty = 1;
|
||||
overrideLaunchDefaults = true;
|
||||
startWaveTimeMultiplier = 3f;
|
||||
}};
|
||||
|
||||
|
||||
@@ -680,7 +680,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
||||
fetchedText = fetchText(text);
|
||||
}
|
||||
|
||||
WorldLabel.drawAt(text, pos.x, pos.y + radius + textHeight, Draw.z(), flags, fontSize);
|
||||
WorldLabel.drawAt(fetchedText, pos.x, pos.y + radius + textHeight, Draw.z(), flags, fontSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ public class Planet extends UnlockableContent{
|
||||
|
||||
this.radius = radius;
|
||||
this.parent = parent;
|
||||
this.orbitOffset = Mathf.randomSeed(id, 360);
|
||||
this.orbitOffset = Mathf.randomSeed(id + 1, 360);
|
||||
|
||||
//total radius is initially just the radius
|
||||
totalRadius = radius;
|
||||
|
||||
@@ -221,6 +221,9 @@ public class Weapon implements Cloneable{
|
||||
|
||||
Draw.xscl = -Mathf.sign(flipSprite);
|
||||
|
||||
//fix color
|
||||
unit.type.applyColor(unit);
|
||||
|
||||
if(region.found()) Draw.rect(region, wx, wy, weaponRotation);
|
||||
|
||||
if(cellRegion.found()){
|
||||
|
||||
@@ -157,19 +157,15 @@ public class HintsFragment{
|
||||
public enum DefaultHint implements Hint{
|
||||
desktopMove(visibleDesktop, () -> Core.input.axis(Binding.move_x) != 0 || Core.input.axis(Binding.move_y) != 0),
|
||||
zoom(visibleDesktop, () -> Core.input.axis(KeyCode.scroll) != 0),
|
||||
mine(() -> player.unit().canMine() && isTutorial.get(), () -> player.unit().mining()),
|
||||
placeDrill(isTutorial, () -> ui.hints.placedBlocks.contains(Blocks.mechanicalDrill)),
|
||||
placeConveyor(isTutorial, () -> ui.hints.placedBlocks.contains(Blocks.conveyor)),
|
||||
placeTurret(isTutorial, () -> ui.hints.placedBlocks.contains(Blocks.duo)),
|
||||
breaking(isTutorial, () -> ui.hints.events.contains("break")),
|
||||
breaking(() -> isTutorial.get() && state.rules.defaultTeam.data().getCount(Blocks.conveyor) > 5, () -> ui.hints.events.contains("break")),
|
||||
desktopShoot(visibleDesktop, () -> isSerpulo() && Vars.state.enemies > 0, () -> player.shooting),
|
||||
depositItems(() -> player.unit().hasItem(), () -> !player.unit().hasItem()),
|
||||
desktopPause(visibleDesktop, () -> isTutorial.get() && !Vars.net.active(), () -> Core.input.keyTap(Binding.pause)),
|
||||
research(isTutorial, () -> ui.research.isShown()),
|
||||
desktopPause(visibleDesktop, () -> isTutorial.get() && !Vars.net.active() && state.wave >= 2, () -> Core.input.keyTap(Binding.pause)),
|
||||
unitControl(() -> isSerpulo() && state.rules.defaultTeam.data().units.size > 2 && !net.active() && !player.dead(), () -> !player.dead() && !player.unit().spawnedByCore),
|
||||
unitSelectControl(() -> isSerpulo() && state.rules.defaultTeam.data().units.size > 3 && !net.active() && !player.dead(), () -> control.input.commandMode && control.input.selectedUnits.size > 0),
|
||||
respawn(visibleMobile, () -> !player.dead() && !player.unit().spawnedByCore, () -> !player.dead() && player.unit().spawnedByCore),
|
||||
launch(() -> isTutorial.get() && state.rules.sector.isCaptured(), () -> ui.planet.isShown()),
|
||||
schematicSelect(visibleDesktop, () -> ui.hints.placedBlocks.contains(Blocks.router), () -> Core.input.keyRelease(Binding.schematic_select) || Core.input.keyTap(Binding.pick)),
|
||||
schematicSelect(visibleDesktop, () -> ui.hints.placedBlocks.contains(Blocks.router) || ui.hints.placedBlocks.contains(Blocks.ductRouter), () -> Core.input.keyRelease(Binding.schematic_select) || Core.input.keyTap(Binding.pick)),
|
||||
conveyorPathfind(() -> control.input.block == Blocks.titaniumConveyor, () -> Core.input.keyRelease(Binding.diagonal_placement) || (mobile && Core.settings.getBool("swapdiagonal"))),
|
||||
boost(visibleDesktop, () -> !player.dead() && player.unit().type.canBoost, () -> Core.input.keyDown(Binding.boost)),
|
||||
blockInfo(() -> !(state.isCampaign() && state.rules.sector == SectorPresets.groundZero.sector && state.wave < 3), () -> ui.content.isShown()),
|
||||
|
||||
Reference in New Issue
Block a user