Bugfixes / Removed tile unit multi-mining
This commit is contained in:
@@ -82,13 +82,13 @@ public class SectorDamage{
|
||||
/** Applies wave damage based on sector parameters. */
|
||||
public static void applyCalculatedDamage(){
|
||||
//calculate base damage fraction
|
||||
float damage = getDamage(state.secinfo);
|
||||
float damage = getDamage(state.rules.sector.info);
|
||||
|
||||
//scaled damage has a power component to make it seem a little more realistic (as systems fail, enemy capturing gets easier and easier)
|
||||
float scaled = Mathf.pow(damage, 1.5f);
|
||||
|
||||
//apply damage to units
|
||||
float unitDamage = damage * state.secinfo.sumHealth;
|
||||
float unitDamage = damage * state.rules.sector.info.sumHealth;
|
||||
Tile spawn = spawner.getFirstSpawn();
|
||||
|
||||
//damage only units near the spawn point
|
||||
@@ -114,7 +114,7 @@ public class SectorDamage{
|
||||
}
|
||||
}
|
||||
|
||||
if(state.secinfo.wavesPassed > 0){
|
||||
if(state.rules.sector.info.wavesPassed > 0){
|
||||
//simply remove each block in the spawner range if a wave passed
|
||||
for(Tile spawner : spawner.getSpawns()){
|
||||
spawner.circle((int)(state.rules.dropZoneRadius / tilesize), tile -> {
|
||||
|
||||
@@ -14,9 +14,11 @@ import static mindustry.Vars.*;
|
||||
|
||||
public class FileMapGenerator implements WorldGenerator{
|
||||
public final Map map;
|
||||
public final SectorPreset preset;
|
||||
|
||||
public FileMapGenerator(String mapName){
|
||||
public FileMapGenerator(String mapName, SectorPreset preset){
|
||||
this.map = maps != null ? maps.loadInternalMap(mapName) : null;
|
||||
this.preset = preset;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,6 +58,10 @@ public class FileMapGenerator implements WorldGenerator{
|
||||
if(tile.isCenter() && tile.block() instanceof CoreBlock && tile.team() == state.rules.defaultTeam && !anyCores){
|
||||
Schematics.placeLaunchLoadout(tile.x, tile.y);
|
||||
anyCores = true;
|
||||
|
||||
if(preset.addStartingItems){
|
||||
tile.build.items.add(state.rules.loadout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user