AI tweaks / Control tweaks / Plastanium conveyor tweaks / Unit factories

This commit is contained in:
Anuken
2020-04-30 14:46:22 -04:00
parent 5887169f90
commit 2dbb099d79
22 changed files with 4261 additions and 4003 deletions

View File

@@ -77,7 +77,7 @@ public class Blocks implements ContentList{
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
//units
groundFactory, repairPoint,
groundFactory, airFactory, navalFactory, repairPoint,
//misc experimental
@@ -1669,14 +1669,40 @@ public class Blocks implements ContentList{
//region units
//for testing only.
groundFactory = new UnitFactory("ground-factory"){{
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.dagger, 60f, ItemStack.with(Items.silicon, 10)),
new UnitPlan(UnitTypes.wraith, 60f, ItemStack.with(Items.silicon, 10)),
new UnitPlan(UnitTypes.dagger, 200f, ItemStack.with(Items.silicon, 10)),
new UnitPlan(UnitTypes.titan, 400f, ItemStack.with(Items.silicon, 10)),
};
size = 3;
consumes.power(1.2f);
//TODO this is incorrect
consumes.items(new ItemStack(Items.silicon, 10));
}};
airFactory = new UnitFactory("air-factory"){{
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.wraith, 200f, ItemStack.with(Items.silicon, 10)),
//new UnitPlan(UnitTypes.ghoul, 200f, ItemStack.with(Items.silicon, 10)),
};
size = 3;
consumes.power(1.2f);
//TODO
consumes.items(new ItemStack(Items.silicon, 10));
}};
navalFactory = new UnitFactory("naval-factory"){{
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.vanguard, 200f, ItemStack.with(Items.silicon, 10)),
};
size = 3;
requiresWater = true;
consumes.power(1.2f);
//TODO
consumes.items(new ItemStack(Items.silicon, 10));
}};

View File

@@ -10,8 +10,10 @@ public class UnitTypes implements ContentList{
//TODO reimplement - DO NOT USE
public static UnitType
ghoul, revenant, lich,
crawler, titan, fortress, eruptor, chaosArray, eradicator;
crawler, fortress, eruptor, chaosArray, eradicator;
//TODO this is awful
public static @EntityDef({Unitc.class, Legsc.class}) UnitType titan;
public static @EntityDef({Unitc.class, Legsc.class}) UnitType dagger;
public static @EntityDef({Unitc.class, WaterMovec.class}) UnitType vanguard;
public static @EntityDef({Unitc.class, Minerc.class}) UnitType draug;
@@ -42,10 +44,32 @@ public class UnitTypes implements ContentList{
}});
}};
titan = new UnitType("titan"){{
speed = 0.4f;
drag = 0.3f;
mass = 3.5f;
hitsize = 9f;
range = 10f;
health = 460;
immunities.add(StatusEffects.burning);
weapons.add(new Weapon("flamethrower"){{
shootSound = Sounds.flame;
shootY = 2f;
reload = 14f;
alternate = true;
recoil = 1f;
ejectEffect = Fx.none;
bullet = Bullets.basicFlame;
}});
}};
wraith = new UnitType("wraith"){{
speed = 3f;
accel = 0.08f;
drag = 0f;
drag = 0.01f;
mass = 1.5f;
flying = true;
health = 75;
@@ -137,8 +161,8 @@ public class UnitTypes implements ContentList{
flying = true;
drag = 0.05f;
mass = 2f;
speed = 4f;
rotateSpeed = 12f;
speed = 3f;
rotateSpeed = 15f;
accel = 0.3f;
range = 70f;
itemCapacity = 70;