Skip to content

Commit

Permalink
Assets organisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Eschatologue committed Jun 7, 2023
1 parent 9c3e37f commit 9517404
Show file tree
Hide file tree
Showing 85 changed files with 502 additions and 191 deletions.
4 changes: 2 additions & 2 deletions assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ unit.uaw-medea.description = Fires high-velocity shell that shatters into a cone
unit.uaw-medea.details = The Medea-class monitor, born out of necessity and resourcefulness.\n\nThough its construction may have been constrained, its resilience and capability remain intact.

unit.uaw-melpomene.name = Melpomene
unit.uaw-melpomene.description = Fires a salvo of shells at enemy defences.
unit.uaw-melpomene.details = [Lore needed]
unit.uaw-melpomene.description = Launches low-velocity cruise missile towards structures, dealing increased damage and causing additional explosions.
unit.uaw-melpomene.details = The Melpomene cruise missiles are meticulously engineered to operate at lower speeds, a deliberate design choice influenced by their immense mass. Unlike traditional missiles that rely heavily on the explosive power of their warheads, the primary focus of the Melpomene missile is on its crushing capabilities.

unit.uaw-falconet.name = Falconet
unit.uaw-falconet.description = Armed with more point defence weapon along with even more devastating artillery.\n\nThe main artillery causes [white]repeating aftershocks[] in its affected area, [white]denying any building to be built[] while its still in effect.
Expand Down
Binary file modified assets/sprites/units/full/melpomene-full.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/units/naval/monitor/melpomene-cell.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/units/naval/monitor/melpomene.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
51 changes: 0 additions & 51 deletions src/UAW/Vars.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,57 +14,6 @@ public class Vars implements Loadable {
public static final String modName = "uaw-";
public static final String modTurretBase = "armored-";

// Weapon - Point Defense - PD
public static final String pointDefense_Red = modName + "point-defense-red";
public static final String pointDefense_Red_2 = modName + "point-defense-red-2";
public static final String pointDefense_Purple = modName + "point-defense-purple";

// Weapon - Artillery - ART / LNCH
public static final String artillery_small_red = modName + "artillery-small-red";
public static final String artillery_small_purple = modName + "artillery-small-purple";

public static final String artillery_medium_red = modName + "artillery-medium-red";

public static final String artillery_large_purple = modName + "artillery-large-purple";

// Weapon - Machine Gun - MG
public static final String machineGun_small_red = modName + "machine-gun-small-red";
public static final String machineGun_small_purple = modName + "machine-gun-small-purple";

public static final String machineGun_medium_1_red = modName + "machine-gun-medium-1-red";
public static final String machineGun_medium_1_red_mirrored = modName + "machine-gun-medium-1-red-r";
public static final String machineGun_medium_2_red = modName + "machine-gun-medium-2-red";
public static final String machineGun_medium_2_cryo = modName + "machine-gun-medium-2-cryo";
public static final String machineGun_medium_purple = modName + "machine-gun-medium-purple";

public static final String machineGun_medium_red_single = modName + "machine-gun-medium-single-red";

// Weapon - Missile - MSL
public static final String missile_small_red_1 = modName + "missile-small-red-1";
public static final String missile_small_red_2 = modName + "missile-small-red-2";

public static final String missile_medium_red_1 = modName + "missile-medium-red-1";
public static final String missile_medium_red_2 = modName + "missile-medium-red-2";
public static final String missile_medium_red_3 = modName + "missile-medium-red-3";

public static final String missile_medium_cryo_3 = modName + "missile-medium-cryo-3";

public static final String missile_large_purple_1 = modName + "missile-large-purple-1";
public static final String missile_large_red_2 = modName + "missile-large-red-2";

public static final String cruiseMissileMount_1 = modName + "cruise-missile-mount-1";
public static final String cruiseMissileMount_2 = modName + "cruise-missile-mount-2";
public static final String cruiseMissileMount_3_purple = modName + "cruise-missile-mount-3-purple";

// Cruise Missile Type
public static final String cruisemissile_small_red = modName + "cruisemissile-small-red";
public static final String cruisemissile_small_cryo = modName + "cruisemissile-small-cryo";

public static final String cruisemissile_medium_basic = modName + "cruisemissile-medium-basic";
public static final String cruisemissile_medium_cryo = modName + "cruisemissile-medium-cryo";
public static final String cruisemissile_medium_surge = modName + "cruisemissile-medium-surge";
public static final String cruisemissile_medium_phlog = modName + "cruisemissile-medium-phlog";

// Multicrafter mode
public static final String transform = "transform";
public static final String simple = "simple";
Expand Down
60 changes: 60 additions & 0 deletions src/UAW/audiovisual/Assets.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package UAW.audiovisual;

import arc.assets.Loadable;

import static UAW.Vars.modName;

@SuppressWarnings("SpellCheckingInspection")
public class Assets implements Loadable {

// Weapon - Point Defense - PD
public static final String U_WP_pointdefense_01_red = modName + "U_WP_pointdefense_01_red";
public static final String U_WP_pointdefense_02_red = modName + "U_WP_pointdefense_02_red";
public static final String U_WP_pointdefense_01_purple = modName + "U_WP_pointdefense_01_purple";

// Weapon - Artillery - ART / LNCH
public static final String U_WP_artillery_S_01_red = modName + "U_WP_artillery_S_01_red";
public static final String U_WP_artillery_S_02_red = modName + "U_WP_artillery_S_02_red";
public static final String U_WP_artillery_S_02_purple = modName + "U_WP_artillery_S_01_purple";

public static final String U_WP_artillery_L_01_purple = modName + "U_WP_artillery_L_01_purple";

// Weapon - Machine Gun - MG
public static final String U_WP_machinegun_S_01_red = modName + "U_WP_machinegun_S_01_red";
public static final String U_WP_machinegun_S_01_purple = modName + "U_WP_machinegun_S_01_purple";

public static final String U_WP_machinegun_M_01_red = modName + "U_WP_machinegun_M_01_red";
public static final String U_WP_machinegun_M_02_red = modName + "U_WP_machinegun_M_02_red";
public static final String U_WP_machinegun_M_02_cryo = modName + "U_WP_machinegun_M_02_cryo";
public static final String U_WP_machinegun_M_01_purple = modName + "U_WP_machinegun_M_01_purple";

// Weapon - Missile - MSL
public static final String U_WP_missile_S_01_red = modName + "U_WP_missile_S_01_red";
public static final String U_WP_missile_S_02_red = modName + "U_WP_missile_S_02_red";

public static final String U_WP_missile_M_01_red = modName + "U_WP_missile_M_01_red";
public static final String U_WP_missile_M_02_red = modName + "U_WP_missile_M_02_red";
public static final String U_WP_missile_M_03_red = modName + "U_WP_missile_M_03_red";
public static final String U_WP_missile_M_03_cryo = modName + "U_WP_missile_M_03_cryo";

public static final String U_WP_missile_L_01_purple = modName + "U_WP_missile_L_01_purple";
public static final String U_WP_missile_L_01_red = modName + "U_WP_missile_L_01_red";

public static final String U_WP_crsmissile_M_01_red = modName + "U_WP_crsmissile_M_01_red";
public static final String U_WP_crsmissile_M_02_red = modName + "U_WP_crsmissile_M_02_red";
public static final String U_WP_crsmissile_M_03_red = modName + "U_WP_crsmissile_M_03_purple";
public static final String U_WP_crsmissile_M_03D_phlog = modName + "U_WP_crsmissile_M_03D_phlog";

public static final String U_WP_crsmissile_L_01_phlog = modName + "U_WP_crsmissile_L_01_phlog";

// Cruise Missile Type
public static final String U_MSL_crsmissile_S_01_red = modName + "U_MSL_crsmissile_S_01_red";
public static final String U_MSL_crsmissile_S_01_cryo = modName + "U_MSL_crsmissile_S_01_cryo";

public static final String U_MSL_crsmissile_M_01_red = modName + "U_MSL_crsmissile_M_01_red";
public static final String U_MSL_crsmissile_M_01_cryo = modName + "U_MSL_crsmissile_M_01_cryo";
public static final String U_MSL_crsmissile_M_01_phlog = modName + "U_MSL_crsmissile_M_01_phlog";

public static final String U_MSL_crsmissile_L_01_phlog = modName + "U_MSL_crsmissile_L_01_phlog";
public static final String U_MSL_crsmissile_L_01h_phlog = modName + "U_MSL_crsmissile_L_01h_phlog";
}
23 changes: 14 additions & 9 deletions src/UAW/audiovisual/UAWFx.java
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ public static Effect missileTrailSmoke(float lifetime, float size, float spread)

color(b.color, 0.5f);
for (int i = 0; i < 4; i++) {
rand.setSeed(b.id * 2 + i);
rand.setSeed(b.id * 2L + i);
float lenScl = rand.random(0.5f, 1f);
int fi = i;
b.scaled(b.lifetime * lenScl, e -> {
Expand Down Expand Up @@ -738,7 +738,7 @@ public static Effect dynamicExplosion(float size, Color frontColor, Color backCo

b.scaled(baseLifetime, e -> {
e.scaled(5 + intensity * 2.5f, i -> {
stroke((3.1f + intensity/5f) * i.fout());
stroke((3.1f + intensity / 5f) * i.fout());
Lines.circle(e.x, e.y, (3f + i.fin() * 14f) * intensity);
Drawf.light(e.x, e.y, i.fin() * 14f * 2f * intensity, Color.white, 0.9f * e.fout());
});
Expand All @@ -747,7 +747,7 @@ public static Effect dynamicExplosion(float size, Color frontColor, Color backCo
stroke((1.7f * e.fout()) * (1f + (intensity - 1f) / 2f));

Draw.z(Layer.effect + 0.001f);
randLenVectors(e.id + 1, e.finpow() + 0.001f, (int)(9 * intensity), 40f * intensity, (x, y, in, out) -> {
randLenVectors(e.id + 1, e.finpow() + 0.001f, (int) (9 * intensity), 40f * intensity, (x, y, in, out) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + out * 4 * (3f + intensity));
Drawf.light(e.x + x, e.y + y, (out * 4 * (3f + intensity)) * 3.5f, Draw.getColor(), 0.8f);
});
Expand Down Expand Up @@ -849,11 +849,16 @@ public static Effect massiveExplosion(Color frontColor, Color backColor) {
});
}

/** Refer to {@link UAWFx#crossBomb(float size, float rotation, Color color)} */
/** Refer to {@link UAWFx#crossBomb(float size, Color color)} */
public static Effect crossBomb(float size, Color color) {
return crossBomb(size, 90, color);
}

/** Refer to {@link UAWFx#crossBomb(float lifetime, float size, float rotation, Color color)} */
public static Effect crossBomb(float size, float rotation, Color color) {
return crossBomb(size * 0.58f, size, rotation, color);
}

/**
* Based on {@link Fx#greenBomb}
* @param size
Expand All @@ -863,9 +868,9 @@ public static Effect crossBomb(float size, Color color) {
* @param color
* color of the explosion
*/
public static Effect crossBomb(float size, float rotation, Color color) {
float lifetime = size * 0.58f;
float w1 = size * 0.08f, w2 = w1 / 2;
public static Effect crossBomb(float lifetime, float size, float rotation, Color color) {
float w1 = size * 0.08f, w2 = w1 * 0.5f;
float l1 = size * 1.47f, l2 = size * 0.514f;
float circ = size * 0.95f;
return new Effect(lifetime, lifetime * 1.45f, e -> {
color(color);
Expand All @@ -875,12 +880,12 @@ public static Effect crossBomb(float size, float rotation, Color color) {

color(color);
for (int i = 0; i < 4; i++) {
Drawf.tri(e.x, e.y, w1, 100f * e.fout(), i * rotation);
Drawf.tri(e.x, e.y, w1, l1 * e.fout(), i * rotation);
}

color();
for (int i = 0; i < 4; i++) {
Drawf.tri(e.x, e.y, w2, 35f * e.fout(), i * rotation);
Drawf.tri(e.x, e.y, w2, l2 * e.fout(), i * rotation);
}

light(e.x, e.y, circleRad * 1.6f, color, e.fout());
Expand Down
10 changes: 6 additions & 4 deletions src/UAW/audiovisual/UAWPal.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package UAW.audiovisual;

import arc.graphics.Color;
import mindustry.graphics.Pal;

public class UAWPal {
// front = light, back = dark
public static Color placeHolder,

heat = new Color(1f, 0.22f, 0.22f, 0.8f),
missileSmoke = Color.grays(0.3f).cpy().lerp(Pal.bulletYellow, 0.5f).cpy().a(0.4f),

cryoFront = Color.valueOf("c0ecff"),
cryoMiddle = Color.valueOf("87ceeb"),
Expand Down Expand Up @@ -39,10 +41,10 @@ public class UAWPal {
stoutSteelMiddle = Color.valueOf("636a78"),
stoutsteelBack = Color.valueOf("444858"),

phlogiston = Color.valueOf("00aea2").cpy(),
phlogistonFront = Color.valueOf("82e9de").cpy(),
phlogistonMid = Color.valueOf("4db6ac").cpy(),
phlogistonBack = Color.valueOf("00867d").cpy(),
phlogiston = Color.valueOf("00aea2"),
phlogistonFront = Color.valueOf("82e9de"),
phlogistonMid = Color.valueOf("4db6ac"),
phlogistonBack = Color.valueOf("00867d"),

coalFront = Color.valueOf("404040"),
coalBack = Color.valueOf("2a2a2a"),
Expand Down
49 changes: 49 additions & 0 deletions src/UAW/audiovisual/effects/CrossbombEffect.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package UAW.audiovisual.effects;

import UAW.audiovisual.UAWPal;
import arc.graphics.Color;
import arc.graphics.g2d.*;
import arc.util.Tmp;
import mindustry.entities.Effect;
import mindustry.graphics.*;

import static arc.graphics.g2d.Draw.color;
import static arc.graphics.g2d.Lines.stroke;

public class CrossbombEffect extends Effect {
public Color color = UAWPal.phlogistonFront.cpy(), bottomColor = UAWPal.phlogistonBack;
public float waveSize = 65, waveSizeBase = 4f;
public float waveStroke = 2;

public int crossCount = 4;
public float crossWidth = 6f, crossLength = 100f;
public float crossRotOffset = 0;

@Override
public void render(EffectContainer e) {

color(color);
stroke(e.fout() * waveStroke);
float circleRad = waveSizeBase + e.finpow() * waveSize;
Lines.circle(e.x, e.y, circleRad);

color(color);
float crossRot = 360f / crossCount;
for (int i = 0; i < crossCount; i++) {
Drawf.tri(e.x, e.y, crossWidth, crossLength * e.fout(), i * crossRot + crossRotOffset);
}

color(color.cpy().lerp(Color.white, 0.5f));
for (int i = 0; i < crossCount; i++) {
Drawf.tri(e.x, e.y, crossWidth * 0.5f, crossLength * 0.35f * e.fout(), i * crossRot + crossRotOffset);
}

Drawf.light(e.x, e.y, circleRad * 1.6f, color, e.fout());

float lightcirc = waveSizeBase + e.finpow() * waveSize;
Draw.z(Layer.debris);
Fill.light(e.x, e.y, Lines.circleVertices(lightcirc / 2), lightcirc, Color.white.cpy().a(0f), Tmp.c4.set(bottomColor).cpy().a(e.fout()));
Draw.reset();
Drawf.light(e.x, e.y, lightcirc * 1.6f, bottomColor.cpy(), e.fout());
}
}
54 changes: 54 additions & 0 deletions src/UAW/audiovisual/effects/ExplodeEffect.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package UAW.audiovisual.effects;

import arc.graphics.Color;
import arc.graphics.g2d.*;
import arc.math.Mathf;
import mindustry.entities.Effect;
import mindustry.graphics.*;

import static arc.graphics.g2d.Draw.color;
import static arc.graphics.g2d.Lines.*;
import static arc.math.Angles.randLenVectors;

public class ExplodeEffect extends Effect {
public Color waveColor = Pal.missileYellow, smokeColor = Color.gray, sparkColor = Pal.missileYellowBack;
public float waveLife = 6f, waveStroke = 3f, waveRad = 15f, waveRadBase = 2f;
public float sparkStroke = 1f, sparkRad = 23f, sparkLen = 3f;
public float smokeLife = 6f, smokeSize = 4f, smokeSizeBase = 0.25f, smokeRad = 23f;
public int smokes = 5, sparks = 4;

@Override
public void init() {
super.init();
clip = waveRad * 1.5f;
lifetime = Math.max(waveLife, smokeLife) * 1.5f;
}

@Override
public void render(EffectContainer e) {
color(waveColor);

e.scaled(waveLife, i -> {
stroke(waveStroke * i.fout());
Lines.circle(e.x, e.y, waveRadBase + i.fin() * waveRad);
});

color(smokeColor);

if (smokeSize > 0) {
e.scaled(smokeLife, s -> {
randLenVectors(e.id, smokes, 2f + smokeRad * s.finpow(), (x, y) -> {
Fill.circle(e.x + x, e.y + y, s.fout() * smokeSize + smokeSizeBase);
});
});
}

color(sparkColor);
stroke(e.fout() * sparkStroke);

randLenVectors(e.id + 1, sparks, 1f + sparkRad * e.finpow(), (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * sparkLen);
Drawf.light(e.x + x, e.y + y, e.fout() * sparkLen * 4f, sparkColor, 0.7f);
});
}
}
59 changes: 59 additions & 0 deletions src/UAW/audiovisual/effects/ScatheExplosionEffect.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package UAW.audiovisual.effects;

import arc.graphics.Color;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.util.Tmp;
import mindustry.entities.Effect;
import mindustry.graphics.*;

import static arc.graphics.g2d.Draw.color;
import static arc.graphics.g2d.Lines.stroke;

public class ScatheExplosionEffect extends Effect {
public static final Rand rand = new Rand();

public Color color = Pal.missileYellow, color1 = Pal.missileYellowBack;
public float size = 60, life = 60f;
public float strokeMin = 0.5f, stroke = 5f;
public float slashAmount = -1, slashWidth = 40f, slashLength = 30f;

@Override
public void init() {
super.init();
lifetime = life;
clip = size * 1.5f;
}

@Override
public void render(EffectContainer e) {
explosion(e);
light(e);
}

public void explosion(EffectContainer e) {
color(color);
stroke(strokeMin + e.fout() * stroke);
float circleRad = 6f + e.finpow() * size;
Lines.circle(e.x, e.y, circleRad);

rand.setSeed(e.id);
for (int i = 0; i < (slashAmount > 0 ? slashAmount : ((int) (size * 0.26f))); i++) {
float angle = rand.random(360f);
float lenRand = rand.random(0.5f, 1f);
Tmp.v1.trns(angle, circleRad);

for (int s : Mathf.signs) {
Drawf.tri(e.x + Tmp.v1.x, e.y + Tmp.v1.y, e.foutpow() * slashWidth, e.fout() * slashLength * lenRand + 6f, angle + 90f + s * 90f);
}
}
}

public void light(EffectContainer e) {
float circleRad = 6f + e.finpow() * size;
Draw.z(Layer.debris);
Fill.light(e.x, e.y, Lines.circleVertices(circleRad / 2), circleRad, Color.white.cpy().a(0f), Tmp.c4.set(color).a(e.fout()));
Draw.reset();
Drawf.light(e.x, e.y, circleRad * 1.6f, color1, e.fout());
}
}

0 comments on commit 9517404

Please sign in to comment.