Disperse turret mostly done
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 904 B |
After Width: | Height: | Size: 599 B |
After Width: | Height: | Size: 892 B |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 858 B |
After Width: | Height: | Size: 1.7 KiB |
BIN
core/assets-raw/sprites/blocks/payload/payload-mass-driver.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
@ -535,3 +535,4 @@
|
||||
63168=reinforced-payload-router|block-reinforced-payload-router-ui
|
||||
63167=disperse|block-disperse-ui
|
||||
63166=large-shield-projector|block-large-shield-projector-ui
|
||||
63165=payload-mass-driver|block-payload-mass-driver-ui
|
||||
|
@ -3345,7 +3345,7 @@ public class Blocks{
|
||||
}});
|
||||
parts.add(new RegionPart("-mid"){{
|
||||
under = true;
|
||||
moveY = -1f;
|
||||
moveY = -1.5f;
|
||||
progress = PartProgress.reload;
|
||||
heatProgress = PartProgress.reload.add(0.25f).min(PartProgress.warmup);
|
||||
heatColor = Color.sky.cpy().a(0.9f);
|
||||
@ -3384,7 +3384,7 @@ public class Blocks{
|
||||
range = 270f;
|
||||
size = 4;
|
||||
|
||||
limitRange(4f);
|
||||
limitRange(0f);
|
||||
}};
|
||||
|
||||
//endregion
|
||||
@ -3541,7 +3541,6 @@ public class Blocks{
|
||||
tankAssembler = new UnitAssembler("tank-assembler"){{
|
||||
requirements(Category.units, with(Items.graphite, 600, Items.beryllium, 600, Items.oxide, 200, Items.tungsten, 500));
|
||||
size = 5;
|
||||
//TODO requirements?
|
||||
plans.add(new AssemblerUnitPlan(UnitTypes.vanquish, 60f * 50f, BlockStack.list(Blocks.tungstenWallLarge, 6, Blocks.duct, 14, Blocks.cliffCrusher, 12)));
|
||||
consumes.power(3f);
|
||||
areaSize = 13;
|
||||
@ -3619,7 +3618,6 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
//TODO
|
||||
if(false)
|
||||
payloadMassDriver = new PayloadMassDriver("payload-mass-driver"){{
|
||||
requirements(Category.units, with(Items.tungsten, 120, Items.silicon, 120, Items.oxide, 60));
|
||||
size = 3;
|
||||
|
@ -3126,7 +3126,7 @@ public class UnitTypes{
|
||||
|
||||
//TODO bad name
|
||||
evoke = new ErekirUnitType("evoke"){{
|
||||
coreUnitDock = false;
|
||||
coreUnitDock = true;
|
||||
defaultController = BuilderAI::new;
|
||||
isCounted = false;
|
||||
envDisabled = 0;
|
||||
@ -3183,7 +3183,7 @@ public class UnitTypes{
|
||||
}};
|
||||
|
||||
incite = new ErekirUnitType("incite"){{
|
||||
coreUnitDock = false;
|
||||
coreUnitDock = true;
|
||||
defaultController = BuilderAI::new;
|
||||
isCounted = false;
|
||||
envDisabled = 0;
|
||||
@ -3252,7 +3252,7 @@ public class UnitTypes{
|
||||
}};
|
||||
|
||||
emanate = new ErekirUnitType("emanate"){{
|
||||
coreUnitDock = false;
|
||||
coreUnitDock = true;
|
||||
defaultController = BuilderAI::new;
|
||||
isCounted = false;
|
||||
envDisabled = 0;
|
||||
|
@ -462,16 +462,15 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
player.justSwitchTo = unit;
|
||||
}
|
||||
|
||||
//TODO range check for docking
|
||||
//TODO range check for docking?
|
||||
var before = player.unit();
|
||||
|
||||
player.unit(unit);
|
||||
|
||||
//TODO test this in multiplayer
|
||||
if(unit.type.coreUnitDock && before != null && !before.isNull()){
|
||||
if(before != null && !before.isNull()){
|
||||
if(before.spawnedByCore){
|
||||
unit.dockedType = before.type;
|
||||
}else if(before.dockedType != null){
|
||||
}else if(before.dockedType != null && before.dockedType.coreUnitDock){
|
||||
//direct dock transfer???
|
||||
unit.dockedType = before.dockedType;
|
||||
}
|
||||
@ -494,7 +493,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
if(player == null) return;
|
||||
|
||||
//TODO test this in multiplayer
|
||||
if(!player.dead() && player.unit().type.coreUnitDock && !player.unit().spawnedByCore){
|
||||
if(!player.dead() && !player.unit().spawnedByCore && player.unit().dockedType != null && player.unit().dockedType.coreUnitDock){
|
||||
//TODO respawn ON the unit, with an animation?
|
||||
var docked = player.unit().dockedType;
|
||||
if(docked == null){
|
||||
|
@ -69,7 +69,7 @@ public class UnitType extends UnlockableContent{
|
||||
public boolean logicControllable = true;
|
||||
public boolean playerControllable = true;
|
||||
public boolean allowedInPayloads = true;
|
||||
/** TODO If true, core units need to "dock" to this unit to work, and can un-dock at the unit instead of respawning at core. */
|
||||
/** TODO If true, core units will re-appear on this unit when respawning. */
|
||||
public boolean coreUnitDock = false;
|
||||
public boolean createWreck = true;
|
||||
public boolean createScorch = true;
|
||||
|
@ -13,7 +13,6 @@ public class ErekirUnitType extends UnitType{
|
||||
commandLimit = 0;
|
||||
outlineColor = Pal.darkOutline;
|
||||
envDisabled = Env.space;
|
||||
coreUnitDock = true;
|
||||
unitBasedDefaultController = u -> !playerControllable || u.team.isAI() ? defaultController.get() : new CommandAI();
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,7 @@ public class Stats{
|
||||
/** Production time period in ticks. Used for crafters. **/
|
||||
public float timePeriod = -1;
|
||||
|
||||
@Nullable
|
||||
private OrderedMap<StatCat, OrderedMap<Stat, Seq<StatValue>>> map;
|
||||
private @Nullable OrderedMap<StatCat, OrderedMap<Stat, Seq<StatValue>>> map;
|
||||
private boolean dirty;
|
||||
|
||||
/** Adds a single float value with this stat, formatted to 2 decimal places. */
|
||||
@ -91,8 +90,8 @@ public class Stats{
|
||||
public void remove(Stat stat){
|
||||
if(map == null) map = new OrderedMap<>();
|
||||
|
||||
if(!map.containsKey(stat.category) || !map.get(stat.category).containsKey(stat)){
|
||||
throw new RuntimeException("No stat entry found: \"" + stat + "\" in block.");
|
||||
if(!map.containsKey(stat.category)){
|
||||
return;
|
||||
}
|
||||
|
||||
map.get(stat.category).remove(stat);
|
||||
|