This commit is contained in:
J-VdS
2020-09-22 18:41:24 +02:00
249 changed files with 11578 additions and 10652 deletions

View File

@@ -35,6 +35,12 @@ public class DefaultWaves{
max = 4;
}},
new SpawnGroup(UnitTypes.pulsar){{
begin = 13;
spacing = 3;
unitScaling = 0.5f;
}},
new SpawnGroup(UnitTypes.mace){{
begin = 7;
spacing = 3;

View File

@@ -30,7 +30,12 @@ public class EventType{
openWiki,
teamCoreDamage,
socketConfigChanged,
update
update,
draw,
preDraw,
postDraw,
uiDrawBegin,
uiDrawEnd
}
public static class WinEvent{}
@@ -77,7 +82,6 @@ public class EventType{
}
}
public static class CommandIssueEvent{
public final Building tile;
public final UnitCommand command;
@@ -106,27 +110,6 @@ public class EventType{
}
}
/** Called when a zone's requirements are met. */
public static class ZoneRequireCompleteEvent{
public final SectorPreset zoneMet, zoneForMet;
public final Objectives.Objective objective;
public ZoneRequireCompleteEvent(SectorPreset zoneMet, SectorPreset zoneForMet, Objectives.Objective objective){
this.zoneMet = zoneMet;
this.zoneForMet = zoneForMet;
this.objective = objective;
}
}
/** Called when a zone's requirements are met. */
public static class ZoneConfigureCompleteEvent{
public final SectorPreset zone;
public ZoneConfigureCompleteEvent(SectorPreset zone){
this.zone = zone;
}
}
/** Called when a sector is conquered, e.g. a boss or base is defeated. */
public static class SectorCaptureEvent{
public final Sector sector;

View File

@@ -40,6 +40,15 @@ public class Rules{
public boolean reactorExplosions = true;
/** Whether schematics are allowed */
public boolean schematicAllowed = true;
<<<<<<< HEAD
=======
/** Whether copying is allowed */
public boolean copyAllowed = true;
/** Whether friendly explosions can occur and set fire/damage other blocks. */
public boolean damageExplosions = true;
/** Whether fire is enabled. */
public boolean fire = true;
>>>>>>> fee15caf7aa42f112eebe4c465885b6c37fd51a5
/** Whether units use and require ammo. */
public boolean unitAmmo = false;
/** How fast unit pads build units. */

View File

@@ -23,14 +23,14 @@ import java.util.*;
import static mindustry.Vars.*;
public class Saves{
private Seq<SaveSlot> saves = new Seq<>();
private @Nullable SaveSlot current;
Seq<SaveSlot> saves = new Seq<>();
@Nullable SaveSlot current;
private @Nullable SaveSlot lastSectorSave;
private AsyncExecutor previewExecutor = new AsyncExecutor(1);
AsyncExecutor previewExecutor = new AsyncExecutor(1);
private boolean saving;
private float time;
private long totalPlaytime;
long totalPlaytime;
private long lastTimestamp;
public Saves(){

View File

@@ -102,7 +102,7 @@ public class Teams{
}
public void registerCore(CoreBuild core){
TeamData data = get(core.team());
TeamData data = get(core.team);
//add core if not present
if(!data.cores.contains(core)){
data.cores.add(core);
@@ -117,7 +117,7 @@ public class Teams{
}
public void unregisterCore(CoreBuild entity){
TeamData data = get(entity.team());
TeamData data = get(entity.team);
//remove core
data.cores.remove(entity);
//unregister in active list
@@ -181,7 +181,7 @@ public class Teams{
/** @return whether this team is controlled by the AI and builds bases. */
public boolean hasAI(){
return state.rules.attackMode && team.rules().ai;
return team.rules().ai;
}
@Override

View File

@@ -23,9 +23,9 @@ public class Tutorial{
private static final int mineCopper = 18;
private static final int blocksToBreak = 3, blockOffset = -6;
private ObjectSet<String> events = new ObjectSet<>();
private ObjectIntMap<Block> blocksPlaced = new ObjectIntMap<>();
private int sentence;
ObjectSet<String> events = new ObjectSet<>();
ObjectIntMap<Block> blocksPlaced = new ObjectIntMap<>();
int sentence;
public TutorialStage stage = TutorialStage.values()[0];
public Tutorial(){

View File

@@ -140,7 +140,7 @@ public class Universe{
sector.setSecondsPassed(sector.getSecondsPassed() + actuallyPassed);
//check if the sector has been attacked too many times...
if(sector.hasBase() && sector.getSecondsPassed() * 60f > turnDuration * sectorDestructionTurns){
if(sector.hasBase() && sector.hasWaves() && sector.getSecondsPassed() * 60f > turnDuration * sectorDestructionTurns){
//fire event for losing the sector
Events.fire(new SectorLoseEvent(sector));