More achievement cleanup

This commit is contained in:
Anuken
2020-11-04 12:45:51 -05:00
parent caec96615f
commit e8a5e35f50
11 changed files with 161 additions and 54 deletions

View File

@@ -102,6 +102,14 @@ public class EventType{
}
}
public static class SchematicCreateEvent{
public final Schematic schematic;
public SchematicCreateEvent(Schematic schematic){
this.schematic = schematic;
}
}
public static class CommandIssueEvent{
public final Building tile;
public final UnitCommand command;
@@ -193,6 +201,34 @@ public class EventType{
}
}
public static class PickupEvent{
public final Unit carrier;
public final @Nullable Unit unit;
public final @Nullable Building build;
public PickupEvent(Unit carrier, Unit unit){
this.carrier = carrier;
this.unit = unit;
this.build = null;
}
public PickupEvent(Unit carrier, Building build){
this.carrier = carrier;
this.build = build;
this.unit = null;
}
}
public static class UnitControlEvent{
public final Player player;
public final @Nullable Unit unit;
public UnitControlEvent(Player player, @Nullable Unit unit){
this.player = player;
this.unit = unit;
}
}
public static class GameOverEvent{
public final Team winner;

View File

@@ -114,7 +114,7 @@ public class Schematics implements Loadable{
}
private void loadLoadouts(){
Seq.with(Loadouts.basicShard, Loadouts.basicFoundation, Loadouts.basicNucleus).each(s -> checkLoadout(s,false));
Seq.with(Loadouts.basicShard, Loadouts.basicFoundation, Loadouts.basicNucleus).each(s -> checkLoadout(s, false));
}
public void overwrite(Schematic target, Schematic newSchematic){
@@ -354,7 +354,7 @@ public class Schematics implements Loadable{
for(int cy = y; cy <= y2; cy++){
Building linked = world.build(cx, cy);
if(linked != null && linked.block.isVisible() && !(linked.block instanceof ConstructBlock)){
if(linked != null && (linked.block.isVisible() || linked.block() instanceof CoreBlock) && !(linked.block instanceof ConstructBlock)){
int top = linked.block.size/2;
int bot = linked.block.size % 2 == 1 ? -linked.block.size/2 : -(linked.block.size - 1)/2;
minx = Math.min(linked.tileX() + bot, minx);