Skip to content

Commit

Permalink
Multicrafter Intregations
Browse files Browse the repository at this point in the history
  • Loading branch information
Eschatologue committed Apr 1, 2023
1 parent ab384a1 commit 7d44e69
Show file tree
Hide file tree
Showing 25 changed files with 205 additions and 80 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![MadeWithJava](https://img.shields.io/badge/Made%20with-java-red?style=for-the-badge&logo=java)](https://en.wikipedia.org/wiki/Java_%28programming_language%29)
![License](https://img.shields.io/github/license/Eschatologue/Unlimited-Armament-Works?logo=github&style=for-the-badge)
[![Build](https://img.shields.io/github/workflow/status/Eschatologue/Unlimited-Armament-Works/Java%20CI?logo=Gradle&style=for-the-badge)](https://github.com/Eschatologue/Unlimited-Armament-Works/actions)
![Status](https://img.shields.io/github/actions/workflow/status/Eschatologue/Unlimited-Armament-Works/gradle.yml?logo=gradle&style=for-the-badge)
[![Discord](https://img.shields.io/discord/704355237246402721.svg?color=7289da&label=de_server&logo=discord&logoColor=ffffff&style=for-the-badge)](https://discord.gg/RCCVQFW)

</div>
Expand Down
60 changes: 31 additions & 29 deletions assets/bundles/bundle.properties

Large diffs are not rendered by default.

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.
Binary file not shown.
Binary file modified assets/sprites/blocks/defense/wall-healer-projector.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ dependencies {
compileOnly "com.github.Anuken.Arc:arc-core:$mindustryVersion"
compileOnly "com.github.anuken.mindustryjitpack:core:$mindustryVersion"

implementation "com.github.liplum:MultiCrafterLib:v1.7"

annotationProcessor "com.github.Anuken:jabel:$jabelVersion"

}
Expand Down
4 changes: 2 additions & 2 deletions mod.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ displayName: "Unlimited Armament Works"
name: "uaw"
author: "Eschatologue"
main: "UAW.UAWModLoader",
subtitle: "Helicopters, Tanks, Steam Engines"
subtitle: "Smokes and Thunder. Cordite and Steel"
description:
'''
UAW is a port and sequel to Heavy Armaments Industries, implementing new unique content to vanilla Mindustry, from more turrets, units, and crafters/factories.

A lot of work and improvements goes into UAW, if you want to show some support or like the content, please give the mod a star on GitHub, Thank you!
'''
minGameVersion: 138
version: v0.8.3
version: v0.8.4
repo: Eschatologue/Unlimited-Armament-Works
java: true
11 changes: 1 addition & 10 deletions src/UAW/UAWModLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import UAW.audiovisual.Sfx;
import UAW.content.*;
import UAW.content.blocks.*;
import arc.Events;
import mindustry.game.EventType.FileTreeInitEvent;
import mindustry.mod.Mod;
Expand All @@ -12,22 +11,14 @@ public UAWModLoader() {
Events.on(FileTreeInitEvent.class, e -> Sfx.load());
}

public void UAWBlockContent() {
UAWBlocksPower.load();
UAWBlocksDefense.load();
UAWBlocksLogistic.load();
UAWBlocksProduction.load();
UAWBlocksUnits.load();
}

@Override
public void loadContent() {
UAWStatusEffects.load();
UAWBullets.load();
UAWUnitTypes.load();
UAWItems.load();
UAWLiquids.load();
UAWBlockContent();
UAWBlocks.load();
UAWSerpuloTechTree.load();

}
Expand Down
9 changes: 8 additions & 1 deletion src/UAW/Vars.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class Vars implements Loadable {
public static final float px = 0.25f;

public static final float steamConversionScl = 3;
public static final float steamLoseScl= 0.5f;
public static final float steamLoseScl = 0.5f;

public static final String modName = "uaw-";
public static final String modTurretBase = "armored-";
Expand Down Expand Up @@ -61,4 +61,11 @@ public class Vars implements Loadable {
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";

// Multicrafter mode
public static final String transform = "transform";
public static final String simple = "simple";
public static final String number = "number";
public static final String detailed = "detailed";

}
14 changes: 14 additions & 0 deletions src/UAW/content/UAWBlocks.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package UAW.content;

import UAW.content.blocks.*;

public class UAWBlocks {
public static void load() {
UAWBlocksPower.load();
UAWBlocksDefence.load();
UAWBlocksLogistic.load();
UAWBlocksProduction.load();
UAWBlocksUnits.load();
}
}

24 changes: 23 additions & 1 deletion src/UAW/content/UAWItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class UAWItems {
sulphur, anthracite;

public static void load() {

cryogel = new Item("item-cryogel", Color.valueOf("87ceeb")) {{
flammability = -10f;
explosiveness = 0f;
Expand All @@ -31,6 +30,29 @@ public static void load() {
explosiveness = 0.25f;
hardness = 4;
}};
}

public class Munitions {
public static Item placeholder,

// Empties
emptyBulletCasing, emptyMineCanister,

// Bullets
standardBullet, incendiaryBullet, cryoBullet, armourPiercingBullet, spreadShotBullet, explosiveBullet, phaseBullet, arcBullet,

// Mine Canister
standardMineCanister, incendiaryMineCanister, cryoMineCanister, antiAirMineCanister, sporeMineCanister, empMineCanister, nukeMineCanister;

public static void load() {
emptyMineCanister = new Item("item-mine-empty", Color.valueOf("989aa4"));
standardMineCanister = new Item("item-mine-basic", Color.valueOf("eab678"));
incendiaryMineCanister = new Item("item-mine-incendiary", Color.valueOf("e48c57"));
cryoMineCanister = new Item("item-mine-cryo", Color.valueOf("87ceeb"));
antiAirMineCanister = new Item("item-mine-aa", Color.valueOf("cbd97f"));
sporeMineCanister = new Item("item-mine-spore", Color.valueOf("7457ce"));
empMineCanister = new Item("item-mine-emp", Color.valueOf("6974c4"));
nukeMineCanister = new Item("item-mine-nuke", Color.valueOf("706f74"));
}
}
}
4 changes: 2 additions & 2 deletions src/UAW/content/UAWSerpuloTechTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import static UAW.Vars.modName;
import static UAW.content.UAWItems.*;
import static UAW.content.UAWUnitTypes.*;
import static UAW.content.blocks.UAWBlocksDefense.*;
import static UAW.content.blocks.UAWBlocksDefence.*;
import static UAW.content.blocks.UAWBlocksLogistic.*;
import static UAW.content.blocks.UAWBlocksPower.*;
import static UAW.content.blocks.UAWBlocksProduction.*;
Expand Down Expand Up @@ -85,7 +85,7 @@ public static void load() {
});

node(ashlock, () -> {
node(longbow, () -> {
node(longsword, () -> {
node(deadeye);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import UAW.world.drawer.DrawPulses;
import arc.graphics.Color;
import arc.math.Interp;
import arc.struct.Seq;
import mindustry.content.*;
import mindustry.entities.UnitSorts;
import mindustry.entities.bullet.BasicBulletType;
Expand All @@ -24,20 +25,21 @@
import mindustry.world.blocks.defense.Wall;
import mindustry.world.blocks.defense.turrets.ItemTurret;
import mindustry.world.draw.*;
import multicraft.*;

import static UAW.Vars.*;
import static UAW.content.UAWBullets.*;
import static mindustry.Vars.tilesize;
import static mindustry.type.ItemStack.with;

/** Contains defense & support structures, such as Walls, Turrets, and booster */
public class UAWBlocksDefense {
public class UAWBlocksDefence {
public static Block placeholder,

// Tier 2
quadra, ashlock, buckshot, skeeter,
// Tier 3
spitfire, longbow, tempest, strikeforce, zounderkite, redeemer,
spitfire, longsword, tempest, strikeforce, zounderkite, redeemer,
// Tier 4
deadeye, skyhammer, hellseeker,
// Tier 5
Expand All @@ -49,7 +51,10 @@ public class UAWBlocksDefense {
shieldWall, stoutSteelWall, stoutSteelWallLarge,

// Projectors
statusFieldProjector, reviltalizationProjector, reviltalizationDome;
statusFieldProjector, wallHealerProjector, wallHealerDome,

// Ammunition Crafter
casingRoller, bulletAssembler, minesAssembler;

public static void load() {

Expand Down Expand Up @@ -424,7 +429,7 @@ Items.titanium, new TrailBulletType(11f, 70f) {{
);
}};
}};
longbow = new ItemTurret("longbow") {{
longsword = new ItemTurret("longsword") {{
requirements(Category.turret, with(
Items.thorium, 400,
Items.titanium, 275,
Expand Down Expand Up @@ -1360,7 +1365,7 @@ Items.surgeAlloy, new BuckshotBulletType(18, 6f, 60f) {{
}};

// Projectors
reviltalizationProjector = new SpecificRegenProjector("wall-healer-projector") {{
wallHealerProjector = new SpecificRegenProjector("wall-healer-projector") {{
requirements(Category.effect, with(
Items.lead, 150,
Items.titanium, 55,
Expand All @@ -1369,7 +1374,7 @@ Items.surgeAlloy, new BuckshotBulletType(18, 6f, 60f) {{
));
size = 2;
range = 11;
healPercent = 3f / tick;
healPercent = 3.5f / tick;
health = 50 * (int) (Math.pow(size, 3));
effect = new StatusHitEffect() {{
color1 = Pal.plastaniumFront;
Expand All @@ -1383,10 +1388,6 @@ Items.surgeAlloy, new BuckshotBulletType(18, 6f, 60f) {{
baseColor = UAWLiquids.petroleumGas.color;

drawer = new DrawMulti(
new DrawRegion("-bottom"),
new DrawLiquidTile(UAWLiquids.petroleumGas) {{
padding = 12 * px;
}},
new DrawDefault(),
new DrawPulses(false) {{
square = true;
Expand All @@ -1409,27 +1410,95 @@ Items.surgeAlloy, new BuckshotBulletType(18, 6f, 60f) {{
particles = 20;
}}
);
}};
wallHealerDome = new SpecificRegenProjector("wall-healer-dome") {{
requirements(Category.effect, with(
Items.lead, 150,
Items.titanium, 55,
Items.silicon, 35,
Items.metaglass, 35
));
size = 3;
range = 21;
healPercent = 5.5f / tick;
otherBlockHealMult = 0.4f;
health = 50 * (int) (Math.pow(size, 3));
effect = new StatusHitEffect() {{
color1 = Pal.plastaniumFront;
amount = 4;
}};

consumeItem(UAWItems.sulphur, 2).boost();
consumePower(2.4f);
consumeLiquid(UAWLiquids.petroleumGas, 1f);

baseColor = UAWLiquids.petroleumGas.color;

drawer = new DrawMulti(
new DrawDefault(),
new DrawPulses(false) {{
square = true;
pulseRad = (range / 2) * tilesize;
layer = Layer.effect;
color = UAWPal.lpgFront;
stroke = 3f;
timeScl = 400;
}},
new DrawGlowRegion("-glow-top") {{
color = UAWPal.lpgMid;
}},
new DrawGlowRegion("-glow-bottom") {{
color = Pal.turretHeat;
}},
new DrawSoftParticles() {{
color = UAWPal.lpgFront;
color2 = UAWPal.lpgMid;
alpha = 0.55f;
particleRad = 12f;
particleSize = 10f;
particleLife = 160f;
particles = 30;
}}
);
}};

//endregion Serpulo
minesAssembler = new MultiCrafter("blast-furnace") {{
requirements(Category.crafting, with(
Items.lead, 45,
Items.graphite, 30,
Items.thorium, 20
));
size = 3;

// rejuvinationDome = new SpecificRegenProjector("rejuvination-dome") {{
// requirements(Category.effect, with(
// Items.lead, 250,
// Items.titanium, 100,
// Items.silicon, 55,
// Items.metaglass, 55
// ));
// size = 3;
// reload = 15f;
// range = 25 * tilesize;
// healPercent = 1.2f;
// health = 75 * size * size;
// boostMultiplier = 6f;
// consumePower(3f);
// consumeLiquid(Liquids.oil, 1f);
// }};
hasItems = true;
hasLiquids = true;
menu = simple;
resolvedRecipes = Seq.with(
new Recipe() {{
input = new IOEntry(
Seq.with(with(Items.silicon, 4)),
Seq.with()
);
output = new IOEntry(
Seq.with(with(Items.metaglass, 4)),
Seq.with()
);
craftTime = 2 * tick;
}},
new Recipe() {{
input = new IOEntry(
Seq.with(with(Items.metaglass, 4)),
Seq.with(),
85f / tick
);
output = new IOEntry(
Seq.with(with(Items.surgeAlloy, 4)),
Seq.with()
);
craftTime = 4 * tick;
}}
);
}};
//endregion Serpulo
}
}

0 comments on commit 7d44e69

Please sign in to comment.