Skip to content

Commit e810480

Browse files
author
=
committed
tanks that dont shoot properly and i dont know why
1 parent 83630d6 commit e810480

File tree

8 files changed

+88
-10
lines changed

8 files changed

+88
-10
lines changed

assets/bundles/bundle.properties

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ block.sw-nickel-forge.name = Nickel Forge
3333
block.sw-nickel-forge.description = A crafter able to create Nickel where it is less abundant.
3434
block.sw-batch-press.name = Batch Press
3535
block.sw-batch-press.description = An advanced form of a multi press, consumes materials slowly for a big batch of graphite.
36-
block.sw-batch-press.details = Behold! The amazing batch furn- i mean press!
36+
block.sw-batch-press.details = Behold! The amazing batch furn- I mean press!
3737

3838
block.sw-stirling-generator.name = Stirling Generator
3939
block.sw-stirling-generator.description = An efficient steam generator that doesn't boil water directly.
@@ -74,6 +74,13 @@ unit.sw-retreat.description = A unit with short range artillery, is invisible to
7474
unit.sw-evade.name = Evade
7575
unit.sw-evade.description = A moderately sized submarine that has a torpedo launcher and short range fuse-like mounts.
7676

77+
unit.sw-sentry.name = Sentry
78+
unit.sw-sentry.description = A small Tank with a fuse like shot and an energy ball afterwards.
79+
unit.sw-tower.name = Tower
80+
unit.sw-tower.description = A tank with a laser-shotgun mix in a weapon.
81+
unit.sw-castle.name = Castle
82+
unit.sw-castle.description = An armoured tank with an electrified laser beam.
83+
7784
unit.sw-bakler.name = Bakler
7885
unit.sw-bakler.description = A small Silicon crucible inside a unit.
7986

636 Bytes
Loading
2.44 KB
Loading
434 Bytes
Loading
1.98 KB
Loading
1.08 KB
Loading

src/sw/content/SWTechTree.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static void load() {
3434
// crafting
3535
node(nickelForge, () -> {
3636
node(rebuilder, () -> node(burner));
37-
node(boiler, with(new Research(burner)), () -> node(thermalBoiler));
37+
node(boiler, with(new Research(burner), new SectorComplete(SectorPresets.extractionOutpost)), () -> node(thermalBoiler));
3838
nodeObj(batchPress, with(new Research(Blocks.multiPress)));
3939
});
4040

@@ -63,6 +63,11 @@ public static void load() {
6363
});
6464
node(crafterFactory, with(new Research(Blocks.siliconCrucible)), () -> node(bakler));
6565
node(swarm, with(new Produce(compound), new Research(Blocks.airFactory)), () -> {
66+
node(sentry, () -> {
67+
node(tower, with(new Research(Blocks.additiveReconstructor)), () -> {
68+
nodeObj(castle, with(new Research(Blocks.multiplicativeReconstructor)));
69+
});
70+
});
6671
node(ambush, with(new Research(Blocks.additiveReconstructor)), () -> {
6772
nodeObj(trap, with(new Research(Blocks.multiplicativeReconstructor)));
6873
});

src/sw/content/SWUnitTypes.java

Lines changed: 74 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public static void load() {
251251
range = maxRange = 160f;
252252
hitSize = 8f;
253253
rotateSpeed = 4;
254-
outlines = false;
254+
outlines = faceTarget = false;
255255
treadRects = new Rect[]{new Rect(11f - 32f, 8f - 32f, 14, 53)};
256256
ammoType = new ItemAmmoType(Items.copper);
257257
constructor = TankUnit::create;
@@ -261,7 +261,9 @@ public static void load() {
261261
y = 0.25f;
262262
reload = 120f;
263263
recoil = 0f;
264+
range = 160f;
264265
rotate = true;
266+
rotateSpeed = 7f;
265267
mirror = false;
266268
shootY = 4;
267269
shootSound = Sounds.pulseBlast;
@@ -274,7 +276,8 @@ public static void load() {
274276
new ShrapnelBulletType() {{
275277
damage = 36;
276278
length = 160f;
277-
toColor = Pal.accent;
279+
fromColor = Pal.accent;
280+
toColor = Color.gray;
278281
}},
279282
new BasicBulletType(2f, 0, "circle-bullet") {{
280283
lifetime = 80f;
@@ -283,7 +286,7 @@ public static void load() {
283286
intervalBullets = 10;
284287
intervalBullet = new LightningBulletType() {{
285288
damage = 1;
286-
lightningColor = this.hitColor = Pal.accent;
289+
lightningColor = hitColor = Pal.accent;
287290
lightningLength = 5;
288291
lightningLengthRand = 3;
289292
lightningType = new BulletType(1.0E-4f, 0.0f) {{
@@ -303,8 +306,7 @@ public static void load() {
303306
range = maxRange = 160f;
304307
hitSize = 10f;
305308
rotateSpeed = 3;
306-
outlineColor = Pal.darkerMetal;
307-
outlines = false;
309+
outlines = faceTarget = false;
308310
treadRects = new Rect[]{new Rect(-25, -36, 13, 71)};
309311
ammoType = new ItemAmmoType(Items.copper);
310312
constructor = TankUnit::create;
@@ -313,10 +315,13 @@ public static void load() {
313315
x = 0f;
314316
y = 0.5f;
315317
reload = 60f;
318+
range = 160f;
316319
mirror = false;
317320
rotate = true;
321+
rotateSpeed = 5f;
318322
shootSound = Sounds.shootAltLong;
319323
bullet = new MultiBulletType() {{
324+
range = 160f;
320325
shake = 3f;
321326
shootEffect = Fx.shootBigColor;
322327
smokeEffect = Fx.shootSmokeSquareSparse;
@@ -338,7 +343,59 @@ public static void load() {
338343
new LaserBulletType(30) {{
339344
length = 160;
340345
width = 7.5f;
341-
colors = new Color[]{Pal.accent, Color.white, Color.white};
346+
colors = new Color[]{Pal.accent, Pal.accent, Color.white};
347+
}}
348+
);
349+
}};
350+
}});
351+
}};
352+
castle = new TankUnitType("castle") {{
353+
health = 1400;
354+
speed = 0.7f;
355+
range = maxRange = 220f;
356+
hitSize = 14f;
357+
rotateSpeed = 2.5f;
358+
outlines = false;
359+
treadFrames = 20;
360+
treadRects = new Rect[]{new Rect(-8f, -49, 16, 95), new Rect(-34, -40, 13, 88)};
361+
ammoType = new ItemAmmoType(Items.copper);
362+
constructor = TankUnit::create;
363+
364+
weapons.add(new Weapon("sw-castle-gun") {{
365+
x = y = 0f;
366+
reload = 120f;
367+
range = 220f;
368+
shake = 5f;
369+
shootY = 8f;
370+
mirror = false;
371+
rotate = true;
372+
rotateSpeed = 3f;
373+
shootSound = Sounds.pulseBlast;
374+
bullet = new MultiBulletType() {{
375+
range = 220f;
376+
shootEffect = smokeEffect = Fx.sparkShoot;
377+
bullets.add(
378+
new BulletType(10f, 0) {{
379+
lifetime = 22f;
380+
bulletInterval = 1;
381+
intervalBullets = 10;
382+
hitEffect = despawnEffect = Fx.none;
383+
intervalBullet = new LightningBulletType() {{
384+
damage = 5;
385+
lightningColor = hitColor = Pal.accent;
386+
lightningLength = 5;
387+
lightningLengthRand = 3;
388+
lightningType = new BulletType(1.0E-4f, 0.0f) {{
389+
lifetime = Fx.lightning.lifetime;
390+
despawnEffect = Fx.none;
391+
hittable = false;
392+
}};
393+
}};
394+
}},
395+
new LaserBulletType(300) {{
396+
length = 220f;
397+
lifetime = 22f;
398+
colors = new Color[]{Pal.accent, Pal.accent, Color.white};
342399
}}
343400
);
344401
}};
@@ -368,8 +425,17 @@ public static void load() {
368425
constructor = CrafterUnit::new;
369426
}};
370427

428+
((UnitFactory) Blocks.groundFactory).plans.add(new UnitPlan(sentry, 60f * 40f, with(SWItems.compound, 16, Items.silicon, 7, Items.titanium, 7)));
371429
((UnitFactory) Blocks.airFactory).plans.add(new UnitPlan(swarm, 60f * 10f, with(SWItems.compound, 12, Items.silicon, 7)));
372-
((Reconstructor) Blocks.additiveReconstructor).upgrades.add(new UnitType[]{swarm, ambush}, new UnitType[]{recluse, retreat});
373-
((Reconstructor) Blocks.multiplicativeReconstructor).upgrades.add(new UnitType[]{ambush, trap}, new UnitType[]{retreat, evade});
430+
((Reconstructor) Blocks.additiveReconstructor).upgrades.addAll(
431+
new UnitType[]{swarm, ambush},
432+
new UnitType[]{recluse, retreat},
433+
new UnitType[]{sentry, tower}
434+
);
435+
((Reconstructor) Blocks.multiplicativeReconstructor).upgrades.addAll(
436+
new UnitType[]{ambush, trap},
437+
new UnitType[]{retreat, evade},
438+
new UnitType[]{tower, castle}
439+
);
374440
}
375441
}

0 commit comments

Comments
 (0)