Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfd742e89b | ||
|
|
d6e408267e | ||
|
|
dbe67b056f | ||
|
|
6d2c0c3863 | ||
|
|
f8d86ac840 | ||
|
|
20a96a9c5d |
@@ -30,8 +30,8 @@ task deploy(type: Copy){
|
|||||||
|
|
||||||
android{
|
android{
|
||||||
namespace = "io.anuke.mindustry"
|
namespace = "io.anuke.mindustry"
|
||||||
buildToolsVersion = '34.0.0'
|
buildToolsVersion = '36.0.0'
|
||||||
compileSdk = 34
|
compileSdk = 36
|
||||||
sourceSets{
|
sourceSets{
|
||||||
main{
|
main{
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
@@ -57,7 +57,7 @@ android{
|
|||||||
|
|
||||||
applicationId "io.anuke.mindustry"
|
applicationId "io.anuke.mindustry"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 34
|
targetSdkVersion 36
|
||||||
|
|
||||||
versionName versionNameResult
|
versionName versionNameResult
|
||||||
versionCode = vcode
|
versionCode = vcode
|
||||||
|
|||||||
Binary file not shown.
@@ -16,7 +16,6 @@ public class SerpuloTechTree{
|
|||||||
Planets.serpulo.techTree = nodeRoot("serpulo", coreShard, () -> {
|
Planets.serpulo.techTree = nodeRoot("serpulo", coreShard, () -> {
|
||||||
|
|
||||||
node(conveyor, () -> {
|
node(conveyor, () -> {
|
||||||
|
|
||||||
node(junction, () -> {
|
node(junction, () -> {
|
||||||
node(router, () -> {
|
node(router, () -> {
|
||||||
node(advancedLaunchPad, Seq.with(new SectorComplete(extractionOutpost)), () -> {
|
node(advancedLaunchPad, Seq.with(new SectorComplete(extractionOutpost)), () -> {
|
||||||
@@ -73,7 +72,6 @@ public class SerpuloTechTree{
|
|||||||
});
|
});
|
||||||
|
|
||||||
node(mechanicalDrill, () -> {
|
node(mechanicalDrill, () -> {
|
||||||
|
|
||||||
node(mechanicalPump, () -> {
|
node(mechanicalPump, () -> {
|
||||||
node(conduit, () -> {
|
node(conduit, () -> {
|
||||||
node(liquidJunction, () -> {
|
node(liquidJunction, () -> {
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ public class Logic implements ApplicationListener{
|
|||||||
//enable building AI on campaign unless the preset disables it
|
//enable building AI on campaign unless the preset disables it
|
||||||
|
|
||||||
state.rules.coreIncinerates = true;
|
state.rules.coreIncinerates = true;
|
||||||
|
state.rules.infiniteResources = false;
|
||||||
state.rules.allowEditRules = false;
|
state.rules.allowEditRules = false;
|
||||||
state.rules.allowEditWorldProcessors = false;
|
state.rules.allowEditWorldProcessors = false;
|
||||||
state.rules.waveTeam.rules().infiniteResources = true;
|
state.rules.waveTeam.rules().infiniteResources = true;
|
||||||
|
|||||||
@@ -90,6 +90,9 @@ public class EditorRenderer implements Disposable{
|
|||||||
boolean prev = renderer.animateWater;
|
boolean prev = renderer.animateWater;
|
||||||
renderer.animateWater = false;
|
renderer.animateWater = false;
|
||||||
|
|
||||||
|
Tmp.m4.set(Draw.trans());
|
||||||
|
Draw.trans().idt();
|
||||||
|
|
||||||
Tmp.v3.set(Core.camera.position);
|
Tmp.v3.set(Core.camera.position);
|
||||||
Core.camera.position.set(world.width()/2f * tilesize, world.height()/2f * tilesize);
|
Core.camera.position.set(world.width()/2f * tilesize, world.height()/2f * tilesize);
|
||||||
Core.camera.width = 999999f;
|
Core.camera.width = 999999f;
|
||||||
@@ -144,7 +147,9 @@ public class EditorRenderer implements Disposable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Core.camera.position.set(Tmp.v3);
|
Core.camera.position.set(Tmp.v3);
|
||||||
|
Draw.trans(Tmp.m4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateStatic(int x, int y){
|
void updateStatic(int x, int y){
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class ShieldArcAbility extends Ability{
|
|||||||
paramField.data -= unit.health() * paramField.missileUnitMultiplier * Vars.state.rules.unitDamage(unit.team);
|
paramField.data -= unit.health() * paramField.missileUnitMultiplier * Vars.state.rules.unitDamage(unit.team);
|
||||||
paramField.alpha = 1f;
|
paramField.alpha = 1f;
|
||||||
|
|
||||||
}else{
|
}else if(paramField.pushUnits && !(!unit.isFlying() && paramUnit.isFlying())){
|
||||||
|
|
||||||
float reach = paramField.radius + paramField.width;
|
float reach = paramField.radius + paramField.width;
|
||||||
float overlapDst = reach - unit.dst(paramPos.x,paramPos.y);
|
float overlapDst = reach - unit.dst(paramPos.x,paramPos.y);
|
||||||
@@ -132,6 +132,8 @@ public class ShieldArcAbility extends Ability{
|
|||||||
public @Nullable Color color;
|
public @Nullable Color color;
|
||||||
/** If true, sprite position will be influenced by x/y. */
|
/** If true, sprite position will be influenced by x/y. */
|
||||||
public boolean offsetRegion = false;
|
public boolean offsetRegion = false;
|
||||||
|
/** If true, enemy units are pushed out. */
|
||||||
|
public boolean pushUnits = true;
|
||||||
|
|
||||||
/** State. */
|
/** State. */
|
||||||
protected float widthScale, alpha;
|
protected float widthScale, alpha;
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ public class Build{
|
|||||||
tile.build.changeTeam(team);
|
tile.build.changeTeam(team);
|
||||||
tile.build.enabled = true;
|
tile.build.enabled = true;
|
||||||
tile.build.checkAllowUpdate();
|
tile.build.checkAllowUpdate();
|
||||||
|
tile.build.updateProximity();
|
||||||
tile.build.onRepaired();
|
tile.build.onRepaired();
|
||||||
|
|
||||||
if(unit != null && unit.getControllerName() != null) tile.build.lastAccessed = unit.getControllerName();
|
if(unit != null && unit.getControllerName() != null) tile.build.lastAccessed = unit.getControllerName();
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ public class ConstructBlock extends Block{
|
|||||||
Shaders.blockbuild.time = Time.time;
|
Shaders.blockbuild.time = Time.time;
|
||||||
Shaders.blockbuild.progress = progress;
|
Shaders.blockbuild.progress = progress;
|
||||||
|
|
||||||
Draw.rect(region, x, y, current.rotate && (noOverrides || current.regionRotated2 == i || current.regionRotated1 == i) ? rotdeg() : 0);
|
Draw.rect(region, x, y, current.rotate && (noOverrides || current.regionRotated2 == i || current.regionRotated1 == i) ? rotdeg() + current.visualRotationOffset : 0);
|
||||||
Draw.flush();
|
Draw.flush();
|
||||||
i ++;
|
i ++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import mindustry.graphics.*;
|
|||||||
import mindustry.logic.*;
|
import mindustry.logic.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.*;
|
import mindustry.world.blocks.*;
|
||||||
import mindustry.world.draw.*;
|
import mindustry.world.draw.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
@@ -161,6 +162,8 @@ public class Turret extends ReloadTurret{
|
|||||||
drawArrow = false;
|
drawArrow = false;
|
||||||
rotateDrawEditor = false;
|
rotateDrawEditor = false;
|
||||||
visualRotationOffset = -90f;
|
visualRotationOffset = -90f;
|
||||||
|
regionRotated1 = 1;
|
||||||
|
regionRotated2 = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -252,6 +255,14 @@ public class Turret extends ReloadTurret{
|
|||||||
public abstract BulletType type();
|
public abstract BulletType type();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void placeEnded(Tile tile, @Nullable Unit builder, int rotation, @Nullable Object config){
|
||||||
|
super.placeEnded(tile, builder, rotation, config);
|
||||||
|
if(rotate && tile.build instanceof TurretBuild turret){
|
||||||
|
turret.rotation = tile.build.rotdeg();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class TurretBuild extends ReloadTurretBuild implements ControlBlock{
|
public class TurretBuild extends ReloadTurretBuild implements ControlBlock{
|
||||||
//TODO storing these as instance variables is horrible design
|
//TODO storing these as instance variables is horrible design
|
||||||
/** Turret sprite offset, based on recoil. Updated every frame. */
|
/** Turret sprite offset, based on recoil. Updated every frame. */
|
||||||
@@ -277,20 +288,6 @@ public class Turret extends ReloadTurret{
|
|||||||
|
|
||||||
float lastRangeChange;
|
float lastRangeChange;
|
||||||
|
|
||||||
@Override
|
|
||||||
public void placed(){
|
|
||||||
super.placed();
|
|
||||||
if(rotate){
|
|
||||||
rotation = rotdeg();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//overridden so that the rotation isn't affected during repairs (standard placed() code isn't called)
|
|
||||||
@Override
|
|
||||||
public void onRepaired(){
|
|
||||||
super.placed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(){
|
public void remove(){
|
||||||
super.remove();
|
super.remove();
|
||||||
@@ -505,6 +502,11 @@ public class Turret extends ReloadTurret{
|
|||||||
heatReq = calculateHeat(sideHeat);
|
heatReq = calculateHeat(sideHeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(rotate){
|
||||||
|
//sync underlying rotation; 0-3 rotation is a shadowed field
|
||||||
|
((Building)this).rotation = Mathf.mod(Mathf.round(rotation / 90f), 4);
|
||||||
|
}
|
||||||
|
|
||||||
//turret always reloads regardless of whether it's targeting something
|
//turret always reloads regardless of whether it's targeting something
|
||||||
if(reloadWhileCharging || !charging()){
|
if(reloadWhileCharging || !charging()){
|
||||||
updateReload();
|
updateReload();
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ public class Junction extends Block{
|
|||||||
underBullets = true;
|
underBullets = true;
|
||||||
group = BlockGroup.transportation;
|
group = BlockGroup.transportation;
|
||||||
unloadable = false;
|
unloadable = false;
|
||||||
floating = true;
|
|
||||||
noUpdateDisabled = true;
|
noUpdateDisabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,12 @@ public class StackConveyor extends Block implements Autotiler{
|
|||||||
public void dropped(){
|
public void dropped(){
|
||||||
super.dropped();
|
super.dropped();
|
||||||
var prev = Geometry.d4[(rotation + 2) % 4];
|
var prev = Geometry.d4[(rotation + 2) % 4];
|
||||||
|
if(items.any()){
|
||||||
link = Point2.pack(tile.x + prev.x, tile.y + prev.y);
|
link = Point2.pack(tile.x + prev.x, tile.y + prev.y);
|
||||||
|
cooldown = 0f;
|
||||||
|
}else{
|
||||||
|
link = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -293,9 +298,7 @@ public class StackConveyor extends Block implements Autotiler{
|
|||||||
}
|
}
|
||||||
}else{ //transfer
|
}else{ //transfer
|
||||||
if(state != stateLoad || (items.total() >= getMaximumAccepted(lastItem))){
|
if(state != stateLoad || (items.total() >= getMaximumAccepted(lastItem))){
|
||||||
if(front() instanceof StackConveyorBuild e && e.team == team){
|
if(front() instanceof StackConveyorBuild e && e.team == team && e.link == -1){
|
||||||
//sleep if its occupied
|
|
||||||
if(e.link == -1){
|
|
||||||
e.items.add(items);
|
e.items.add(items);
|
||||||
e.lastItem = lastItem;
|
e.lastItem = lastItem;
|
||||||
e.link = tile.pos();
|
e.link = tile.pos();
|
||||||
@@ -309,7 +312,6 @@ public class StackConveyor extends Block implements Autotiler{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void overwrote(Seq<Building> builds){
|
public void overwrote(Seq<Building> builds){
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ public class LiquidJunction extends LiquidBlock{
|
|||||||
|
|
||||||
public LiquidJunction(String name){
|
public LiquidJunction(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
floating = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=caf89c8fee
|
archash=cde6d76804
|
||||||
|
|||||||
@@ -897,6 +897,9 @@ public class ApplicationTests{
|
|||||||
ObjectSet<Item> resources = new ObjectSet<>();
|
ObjectSet<Item> resources = new ObjectSet<>();
|
||||||
boolean hasSpawnPoint = false;
|
boolean hasSpawnPoint = false;
|
||||||
|
|
||||||
|
assertFalse(state.rules.infiniteResources, "Sector " + zone.name + " must not have infinite resources.");
|
||||||
|
assertFalse(state.rules.allowEditRules, "Sector " + zone.name + " must not have rule editing enabled.");
|
||||||
|
|
||||||
for(Tile tile : world.tiles){
|
for(Tile tile : world.tiles){
|
||||||
if(tile.drop() != null){
|
if(tile.drop() != null){
|
||||||
resources.add(tile.drop());
|
resources.add(tile.drop());
|
||||||
|
|||||||
Reference in New Issue
Block a user