Skip to content

Commit

Permalink
team sept
Browse files Browse the repository at this point in the history
  • Loading branch information
xjamiex committed Oct 15, 2024
1 parent ff0b73e commit 959df08
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 12 deletions.
4 changes: 4 additions & 0 deletions assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ unit.biotech-strider.name = Strider
unit.biotech-strider.description = Fires semi-homing missiles. Capable of being mass-produced
unit.biotech-seer.name = Seer
unit.biotech-seer.description = A tier two assult air unit. Shoots 4 homing missiles that is devastating for conveyor belts.
unit.biotech-nomad.name = Nomad
unit.biotech-nomad.description = A tier two assult specialty unit. Shoots two melting lasers and one bullet that causes burning to the buildings hit. Pierces two times.

team.septaris.name = Septaris

planet.biotech-andori.name = Andori
sector.biotech-ankle.name = Ankle
Expand Down
Binary file added assets/sprites/blocks/drills/drill-upgrader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/teams/bio-team-septaris.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/biotech/BioTech.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ public void loadContent(){
Planets.erekir.hiddenItems.addAll(BioItems.andoriItems);
Planets.serpulo.hiddenItems.addAll(BioItems.andoriItems);
}

@Override
public void init() {
super.init();
BioTeams.load();
}
}
17 changes: 11 additions & 6 deletions src/biotech/content/BioFx.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package biotech.content;

import arc.graphics.Color;
import arc.graphics.g2d.Draw;
import arc.graphics.g2d.Fill;
import arc.graphics.g2d.Lines;
import arc.util.Tmp;
import mindustry.Vars;
import mindustry.entities.Effect;
import mindustry.graphics.Drawf;
import mindustry.graphics.Pal;

import java.util.Random;
Expand All @@ -30,12 +32,15 @@ public class BioFx {
Lines.endLine();
}),

needleSpike = new Effect(50f, e -> {
float offset = 4;
color(BioPal.magnesiumPurple, Color.clear.add(0, 0, 0, 100), e.fin());
Fill.tri(e.x, e.y,
e.x + getRandomNum(offset, -offset), e.y + getRandomNum(offset, -offset),
e.x + getRandomNum(offset, -offset), e.y + getRandomNum(offset, -offset));
fourSpike = new Effect(60, e -> {
color(Color.white);
for(int i = 0; i <= 4; i++) {
Drawf.tri(e.x, e.y, 3, 40f * e.fout(), i * 90);
}
color(BioPal.bloodRedLight);
for(int i = 0; i <= 4; i++) {
Drawf.tri(e.x, e.y, 6, 40f * e.fout(), i * 90);
}
});

public static float getRandomNum(float c, float f){
Expand Down
72 changes: 72 additions & 0 deletions src/biotech/content/BioTeams.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package biotech.content;

import arc.Core;
import arc.graphics.Color;
import arc.graphics.g2d.Font;
import arc.graphics.g2d.TextureRegion;
import arc.math.geom.Vec2;
import arc.struct.ObjectIntMap;
import arc.struct.ObjectMap;
import arc.struct.Seq;
import arc.util.Reflect;
import arc.util.Scaling;
import mindustry.game.Team;
import mindustry.ui.Fonts;

public class BioTeams {
public static Team
septaris;

public static void load() {
septaris = newTeam(5, "septaris", Color.valueOf("6082b6"));
}

private static Team newTeam(int id, String name, Color color) {
Team team = Team.get(id);
team.name = name;
team.color.set(color);

team.palette[0] = color;
team.palette[1] = color.cpy().mul(0.75f);
team.palette[2] = color.cpy().mul(0.5f);

for(int i = 0; i < 3; i++){
team.palettei[i] = team.palette[i].rgba();
}

Seq<Font> fonts = Seq.with(Fonts.def, Fonts.outline);

var ch = 65000 + id;
Reflect.<ObjectIntMap<String>>get(Fonts.class, "unicodeIcons").put(name, ch);
var stringIcons = Reflect.<ObjectMap<String, String>>get(Fonts.class, "stringIcons");
stringIcons.put(name, ((char)ch) + "");

int size = (int)(Fonts.def.getData().lineHeight/Fonts.def.getData().scaleY);
TextureRegion region = Core.atlas.find("bio-team-" + name);
Vec2 out = Scaling.fit.apply(region.width, region.height, size, size);
Font.Glyph glyph = new Font.Glyph(){{
id = ch;
srcX = 0;
srcY = 0;
width = (int)out.x;
height = (int)out.y;
u = region.u;
v = region.v2;
u2 = region.u2;
v2 = region.v;
xoffset = 0;
yoffset = -size;
xadvance = size;
kerning = null;
fixedWidth = true;
page = 0;
}};
fonts.each(f -> f.getData().setGlyph(ch, glyph));

//now put whatever the heck we get for an emoji
team.emoji = stringIcons.get(team.name, "");


return team;
}
}
14 changes: 8 additions & 6 deletions src/biotech/content/BioUnits.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import mindustry.entities.part.RegionPart;
import mindustry.entities.pattern.ShootHelix;
import mindustry.entities.pattern.ShootSpread;
import mindustry.game.Team;
import mindustry.gen.*;
import mindustry.graphics.Layer;
import mindustry.graphics.Pal;
Expand Down Expand Up @@ -496,7 +497,7 @@ public static void load() {
damageInterval = 10;

flareColor = BioPal.bloodRedLight;
flareLength = 15f;
flareLength = 10f;
flareRotSpeed = 0.3f;
flareWidth = 7f;

Expand Down Expand Up @@ -524,15 +525,14 @@ public static void load() {

shootSound = Sounds.missile;
inaccuracy = 2f;
bullet = new BasicBulletType(10, 165){{
bullet = new BasicBulletType(10, 85){{
sprite = "circle";

frontColor = BioPal.bloodRedLight;
backColor = BioPal.bloodRed;
width = 10;
height = 12;
shrinkX = shrinkY = 0;
shootEffect = Fx.none;
pierce = pierceBuilding = true;
pierceCap = 3;
lifetime = 20;
Expand All @@ -541,7 +541,8 @@ public static void load() {
trailWidth = 4;
trailColor = BioPal.bloodRedLight;

hitEffect = Fx.none;
shootEffect = BioFx.fourSpike;
hitEffect = despawnEffect = Fx.none;
trailEffect = hitEffect = new ParticleEffect(){{
colorFrom = BioPal.bloodRedLight;
colorTo = BioPal.bloodRed;
Expand All @@ -561,10 +562,11 @@ public static void load() {

drawFlare = true;
flareLength = 15f;
flareWidth = 10;
flareColor = BioPal.bloodRedLight;

length = 30f;
width = 3;
length = 2f;
width = 2;

lifetime = 40f;
trailEffect = hitEffect = new ParticleEffect(){{
Expand Down

0 comments on commit 959df08

Please sign in to comment.