Skip to content

Commit

Permalink
Mostly bug-related stuff. I don't remember at this point.
Browse files Browse the repository at this point in the history
  • Loading branch information
Slotterleet committed Nov 1, 2024
1 parent 61acc68 commit 131881a
Show file tree
Hide file tree
Showing 24 changed files with 353 additions and 188 deletions.
7 changes: 5 additions & 2 deletions res/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ accelerator.confirmtext = This core will be sent towards the nearest planet. Do

ability.hackfield = Hack Field
ability.unitresistance = Damage Resistance
ability.acidexplode = Corrosive Innards
ability.acidexplode.description = Releases acid on death.

bar.units = Units: {0}/{1}
bar.detectorreq = Ore Detector Required
Expand Down Expand Up @@ -159,8 +161,8 @@ block.fos-pumpjack.name = Pumpjack
block.fos-pumpjack.description = Pumps and outputs liquids at a faster rate.
block.fos-fluid-router.name = Fluid Router
block.fos-fluid-router.description = Accepts liquids and outputs them to up to 3 directions equally. Also stores a certain amount of fluid.
block.fos-fluid-barrel.name = Fluid Barrel
block.fos-fluid-barrel.description = Stores a sizeable amount of fluid. Outputs to all sides, similarly to a fluid router.
block.fos-fluid-container.name = Fluid Container
block.fos-fluid-container.description = Stores a sizeable amount of fluid. Outputs to all sides, similarly to a fluid router.
block.fos-fluid-tank.name = Fluid Tank
block.fos-fluid-tank.description = Stores a large amount of fluid. Outputs to all sides, similarly to a fluid router.
block.fos-tin-wire.name = Zinc Wire
Expand Down Expand Up @@ -352,6 +354,7 @@ status.fos-hacked.name = Hacked
status.fos-injected.name = Injected
status.fos-injected.description = [#8ae3df]Injectors[] will have increased chance of hacking targets.\n[accent]Non-Injectors[] will be more vulnerable to hack attacks.\nThese multipliers can stack with each other.
status.fos-tokicite-slowed.name = Tokicite Slowed
status.fos-dissolving.name = Dissolving

status.fos-standard1.name = Basic Rifle Mount
status.fos-standard1.description = A basic rifle with balanced stats.
Expand Down
7 changes: 5 additions & 2 deletions res/bundles/bundle_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ accelerator.confirmtext = Это ядро будет отправлено в б

ability.hackfield = Поле взлома
ability.unitresistance = Устойчивость к урону
ability.acidexplode = Кислотные внутренности
ability.acidexplode.description = Выпускает кислоту при смерти.

bar.units = Боевые единицы: {0}/{1}
bar.detectorreq = Требуется детектор руды
Expand Down Expand Up @@ -159,8 +161,8 @@ block.fos-pumpjack.name = Штанговый насос
block.fos-pumpjack.description = Перекачивает и выводит жидкости с большей скоростью.
block.fos-fluid-router.name = Жидкостный маршрутизатор
block.fos-fluid-router.description = Принимает жидкости и газы равномерно распределяет их до 3 сторон. Также может хранить определенное количество жидкости.
block.fos-fluid-barrel.name = Жидкостная бочка
block.fos-fluid-barrel.description = Хранит небольшое количество жидкости. Выводит во все стороны, подобно жидкостному маршрутизатору.
block.fos-fluid-container.name = Жидкостный контейнер
block.fos-fluid-container.description = Хранит небольшое количество жидкости. Выводит во все стороны, подобно жидкостному маршрутизатору.
block.fos-fluid-tank.name = Жидкостный бак
block.fos-fluid-tank.description = Хранит большое количество жидкости. Выводит во все стороны, подобно жидкостному маршрутизатору.
block.fos-tin-wire.name = Цинковый провод
Expand Down Expand Up @@ -352,6 +354,7 @@ status.fos-hacked.name = Взлом
status.fos-injected.name = Инъекция
status.fos-injected.description = [#8ae3df]Инжекторы[] получат увеличенный шанс взлома вражеских целей.\n[accent]Не-инжекторы[] станут более уязвимыми ко взлому.\nЭти множители могут складываться между собой.
status.fos-tokicite-slowed.name = Замедление токицитом
status.fos-dissolving.name = Растворение

status.fos-standard1.name = Базовая винтовка
status.fos-standard1.description = Базовая винтовка со сбалансированными характеристиками.
Expand Down
Binary file removed res/sprites/blocks/liquid/copper-pipe-bottom-0.png
Binary file not shown.
Binary file removed res/sprites/blocks/liquid/copper-pipe-bottom-1.png
Binary file not shown.
Binary file removed res/sprites/blocks/liquid/copper-pipe-bottom-2.png
Binary file not shown.
Binary file removed res/sprites/blocks/liquid/copper-pipe-bottom-3.png
Binary file not shown.
Binary file removed res/sprites/blocks/liquid/copper-pipe-bottom-4.png
Binary file not shown.
1 change: 1 addition & 0 deletions revisions/BugBurrowLegsUnit/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{version:1,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}
1 change: 1 addition & 0 deletions revisions/BugBurrowLegsUnit/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{version:2,fields:[{name:abilities,type:"mindustry.entities.abilities.Ability[]"},{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}
4 changes: 2 additions & 2 deletions src/fos/ai/FOSPathfinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FOSPathfinder implements Runnable{
(team, tile) -> {
int data = tiles[tile];
if (PathTile.legSolid(data)) return -1;
return 1 + (PathTile.deep(data) ? 6000 : 0) + //leg units can now drown
return 1 + (PathTile.deep(data) ? 6000 : 0) +
(PathTile.solid(data) ? 5 : 0) +
FOSVars.deathMapController.deathMap[tile]; //take into account recent unit deaths
},
Expand All @@ -56,7 +56,7 @@ public class FOSPathfinder implements Runnable{
(team, tile) -> {
int data = tiles[tile];
if (PathTile.legSolid(data)) return -1;
return 1 + (PathTile.deep(data) ? 6000 : 0) + //leg units can now drown
return 1 + (PathTile.deep(data) ? 6000 : 0) +
(PathTile.solid(data) ? 5 : 0);
}
);
Expand Down
4 changes: 2 additions & 2 deletions src/fos/ai/bugs/BugAI.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void updateMovement() {
var f = bug.following();
bug.invading(f instanceof Bugc bf && bf.invading());

moveTo(f, 12f + f.type.hitSize, 0, true, null);
moveTo(f, 12f + f.type.hitSize, 0, false, null);
return;
}

Expand Down Expand Up @@ -95,7 +95,7 @@ public void updateMovement() {

@Override
public Teamc target(float x, float y, float range, boolean air, boolean ground) {
var unitTarget = Units.closestTarget(unit.team, x, y, unit.range(), Unit::isValid, t -> false);
var unitTarget = Units.closestTarget(unit.team, x, y, unit.range(), u -> u.isValid() && bug.type().range > 0.01f, t -> false);
if (unitTarget != null) return unitTarget;

for (BlockFlag flag : unit.type.targetFlags) {
Expand Down
2 changes: 1 addition & 1 deletion src/fos/content/FOSBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import mindustry.type.*;
import mindustry.ui.*;
import mindustry.world.Block;
import mindustry.world.Tile;
import mindustry.world.blocks.defense.Wall;
import mindustry.world.blocks.defense.turrets.*;
import mindustry.world.blocks.distribution.*;
Expand Down Expand Up @@ -643,6 +642,7 @@ diamond, new StickyBulletType(8f, 60, 90){{

loopSound = Sounds.none;
shootSound = FOSSounds.sticky;
squareSprite = false;

ammo(
tokicite, new LiquidBulletType(tokicite){
Expand Down
42 changes: 36 additions & 6 deletions src/fos/content/FOSFx.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import arc.Core;
import arc.graphics.Color;
import arc.graphics.g2d.*;
import arc.math.Mathf;
import arc.math.*;
import arc.math.geom.*;
import arc.util.Tmp;
import fos.graphics.FOSPal;
import fos.type.bullets.OhioBeamBulletType;
import mindustry.content.Fx;
import mindustry.entities.Effect;
import mindustry.gen.*;
import mindustry.graphics.*;
Expand Down Expand Up @@ -215,16 +216,16 @@ public class FOSFx {

burrowDustSingle = new Effect(40f, e -> {
Draw.color(e.color);
Draw.alpha(0.4f);
Draw.alpha(0.6f);

randLenVectors(e.id, 1, e.fin() * 40f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout() * 8f);
randLenVectors(e.id, 1, e.fin() * 160f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout() * 24f);
});

Draw.reset();
}).layer(Layer.groundUnit + 1f),

burrowDust = new Effect(180f, e -> {
burrowDust = new Effect(120f, e -> {
burrowDustSingle.at(e.x, e.y, e.color);
}),

Expand All @@ -244,5 +245,34 @@ public class FOSFx {
if (Mathf.chance(0.08f) && e.time < 220f) {
bruntChargeSmoke.at(e.x, e.y);
}
}).followParent(true);
}).followParent(true),

bugDeath1 = new Effect(600f, e -> {
float intensity = 4f;

color(Color.valueOf("51c7d8"), 0.6f);
for (int i = 0; i < 4; i++) {
Fx.rand.setSeed(e.id* 2L + i);
float lenScl = Fx.rand.random(0.5f, 1f);
int fi = i;
e.scaled(e.lifetime * lenScl, e2 -> {
randLenVectors(e2.id + fi - 1, e2.fin(Interp.pow10Out), (int)(2.9f * intensity), 1.8f * intensity, (x, y, in, out) -> {
float fout = e2.fout(Interp.pow5Out) * Fx.rand.random(0.5f, 1f);
float rad = fout * ((intensity - 1f));

Fill.circle(e2.x + x, e2.y + y, rad);
//Drawf.light(e2.x + x, e2.y + y, rad * 2.5f, e.color, 0.5f);
});
});
}
}).layer(Layer.floor + 1),

bugDeath2 = new Effect(90f, e -> {
color(Color.valueOf("51c7d8"), 0.6f);

randLenVectors(e.id, 4, e.fin() * 28f, (x, y) -> {
Fill.circle(x, y, 5f);
if (e.fin() >= 0.99f) bugDeath1.at(x, y);
});
}).layer(Layer.legUnit + 1);
}
30 changes: 8 additions & 22 deletions src/fos/content/FOSStatuses.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import arc.graphics.Color;
import arc.graphics.g2d.*;
import arc.math.Angles;
import arc.math.Mathf;
import arc.util.Time;
import fos.graphics.FOSPal;
import fos.type.draw.FOSStats;
Expand All @@ -17,28 +15,13 @@
import static arc.math.Angles.randLenVectors;

public class FOSStatuses {
public static StatusEffect hacked, acid, injected, tokiciteSlowed, buildBoost, dissolving;
public static StatusEffect hacked, injected, tokiciteSlowed, buildBoost, dissolving;

public static void load() {
hacked = new HackedEffect("hacked"){{
color = FOSPal.hackedBack;
}};

acid = new StatusEffect("acid"){{
color = Color.valueOf("85E323");
healthMultiplier = 0.7f;
damage = 2.5f;
speedMultiplier = 0.5f;
effect = new Effect(180f, e -> {
color(color);

randLenVectors(e.id, 2, 3f + e.fin() * 24f, (x, y) -> {
// float a = Mathf.randomSeed(e.id+2, 0, Mathf.pi*2f) + 3 * e.fin() * Mathf.pi;
// Fill.circle(e.x + x + Mathf.cos(a)*2, e.y + y + Mathf.sin(a)*2, 1.3f*e.finpow());
Fill.circle(e.x + x, e.y + y, 1.3f*e.finpow());
});
});
}};
injected = new StatusEffect("injected"){
@Override
public void setStats() {
Expand All @@ -65,11 +48,14 @@ public void draw(Unit unit) {
dissolving = new StatusEffect("dissolving"){{
healthMultiplier = 0.8f;
damage = 1.5f;
effect = new Effect(42f, e -> {
color(Color.valueOf("6abe30"));
color = Color.valueOf("b3db81");
effect = new Effect(180f, e -> {
color(color);

randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout());
randLenVectors(e.id, 2, 3f + e.fin() * 24f, (x, y) -> {
// float a = Mathf.randomSeed(e.id+2, 0, Mathf.pi*2f) + 3 * e.fin() * Mathf.pi;
// Fill.circle(e.x + x + Mathf.cos(a)*2, e.y + y + Mathf.sin(a)*2, 1.3f*e.finpow());
Fill.circle(e.x + x, e.y + y, 1.3f*e.finpow());
});
});
}};
Expand Down
21 changes: 16 additions & 5 deletions src/fos/content/FOSUnitTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import fos.audio.FOSSounds;
import fos.gen.*;
import fos.graphics.*;
import fos.type.abilities.UnitResistanceAbility;
import fos.type.abilities.*;
import fos.type.bullets.*;
import fos.type.content.WeaponSet;
import fos.type.units.types.*;
Expand Down Expand Up @@ -100,7 +100,7 @@ public class FOSUnitTypes {

public static @EntityDef({Unitc.class, Legsc.class, Bugc.class}) UnitType
// LEGS BUGS
bugSmallSpitter;
spewer;

public static @EntityDef({Unitc.class, Bugc.class}) UnitType
// FLYING INSECTS
Expand Down Expand Up @@ -1315,15 +1315,23 @@ public static void load(){
segmentMag = 6f;
}};

bugSmallSpitter = new BugUnitType("bug-small-spitter", BugLegsUnit.class, false){{
health = 600;
armor = 0;
spewer = new BugUnitType("spewer", BugLegsUnit.class, false){{
health = 130;
armor = 5;
absorption = 0;
speed = 0.6f;
hitSize = 8;

legCount = 6;

abilities.add(
new AcidExplodeAbility(){{
radius = 3;
damage = 5f;
lifetime = 30f * 60;
}}
);

weapons.add(
new Weapon(){{
x = 0; y = 6;
Expand Down Expand Up @@ -1463,6 +1471,8 @@ public static void load(){
targetGround = true;
targetFlags = new BlockFlag[]{BlockFlag.unitCargoUnloadPoint, BlockFlag.core, null};

deathExplosionEffect = FOSFx.bugDeath2;

legCount = 4;
legLength = 24;
legBaseOffset = 12;
Expand Down Expand Up @@ -1514,6 +1524,7 @@ public static void load(){
despawnEffect = Fx.none;
smokeEffect = Fx.none;
shootSound = Sounds.largeExplosion;

splashDamage = 600f;
splashDamageRadius = 4f;
splashDamagePierce = true;
Expand Down
2 changes: 1 addition & 1 deletion src/fos/content/LumoniTechTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static void load() {
node(copperPipe, () -> {
node(brassPipe);
node(fluidRouter, () -> {
node(fluidBarrel, () -> {
node(fluidContainer, () -> {
node(fluidTank);
});
});
Expand Down
Loading

0 comments on commit 131881a

Please sign in to comment.