Skip to content

Commit

Permalink
Merge branch 'Anuken:master' into id_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
DaGamerFiles authored Jan 22, 2024
2 parents 4684d91 + e9d95c2 commit 9594937
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 23 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ allprojects{

tasks.withType(JavaCompile){
targetCompatibility = 8
sourceCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
options.encoding = "UTF-8"
options.compilerArgs += ["-Xlint:deprecation"]
dependsOn clearCache
Expand Down
10 changes: 8 additions & 2 deletions core/src/mindustry/audio/SoundControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/** Controls playback of multiple audio tracks.*/
public class SoundControl{
public float finTime = 120f, foutTime = 120f, musicInterval = 3f * Time.toMinutes, musicChance = 0.6f, musicWaveChance = 0.46f;
public float finTime = 120f, foutTime = 120f, musicInterval = 3f * Time.toMinutes, musicChance = 0.8f, musicWaveChance = 0.46f;

/** normal, ambient music, plays at any time */
public Seq<Music> ambientMusic = Seq.with();
Expand All @@ -28,6 +28,7 @@ public class SoundControl{

protected Music lastRandomPlayed;
protected Interval timer = new Interval(4);
protected long lastPlayed;
protected @Nullable Music current;
protected float fade;
protected boolean silenced;
Expand Down Expand Up @@ -55,6 +56,10 @@ public SoundControl(){
}));

setupFilters();

Events.on(ResetEvent.class, e -> {
lastPlayed = Time.millis();
});
}

protected void setupFilters(){
Expand Down Expand Up @@ -160,9 +165,10 @@ public void update(){
silence();

//play music at intervals
if(timer.get(musicInterval)){
if(Time.timeSinceMillis(lastPlayed) > 1000 * musicInterval / 60f){
//chance to play it per interval
if(Mathf.chance(musicChance)){
lastPlayed = Time.millis();
playRandom();
}
}
Expand Down
1 change: 1 addition & 0 deletions core/src/mindustry/content/Blocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,7 @@ public static void load(){
itemDuration = 140f;
ambientSound = Sounds.pulse;
ambientSoundVolume = 0.07f;
liquidCapacity = 60f;

consumePower(25f);
consumeItem(Items.blastCompound);
Expand Down
2 changes: 2 additions & 0 deletions core/src/mindustry/game/Rules.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ public class Rules{
public boolean coreDestroyClear = false;
/** If true, banned blocks are hidden from the build menu. */
public boolean hideBannedBlocks = false;
/** If true, most blocks (including environmental walls) can be deconstructed. This is only meant to be used internally in sandbox/test maps. */
public boolean allowEnvironmentDeconstruct = false;
/** If true, bannedBlocks becomes a whitelist. */
public boolean blockWhitelist = false;
/** If true, bannedUnits becomes a whitelist. */
Expand Down
5 changes: 0 additions & 5 deletions core/src/mindustry/logic/LExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,6 @@ public static class WaitI implements LInstruction{
public int value;

public float curTime;
public long frameId;

public WaitI(int value){
this.value = value;
Expand All @@ -1247,11 +1246,7 @@ public void run(LExecutor exec){
//skip back to self.
exec.var(varCounter).numval --;
exec.yield = true;
}

if(state.updateId != frameId){
curTime += Time.delta / 60f;
frameId = state.updateId;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/mindustry/type/UnitType.java
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ public void createIcons(MultiPacker packer){
getRegionsToOutline(toOutline);

for(var region : toOutline){
if(region instanceof AtlasRegion atlas){
if(region instanceof AtlasRegion atlas && !Core.atlas.has(atlas.name + "-outline")){
String regionName = atlas.name;
Pixmap outlined = Pixmaps.outline(Core.atlas.getPixmap(region), outlineColor, outlineRadius);

Expand Down
2 changes: 1 addition & 1 deletion core/src/mindustry/type/Weapon.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public void update(Unit unit, WeaponMount mount){
mount.bullet.set(bulletX, bulletY);
mount.reload = reload;
mount.recoil = 1f;
unit.vel.add(Tmp.v1.trns(unit.rotation + 180f, mount.bullet.type.recoil * Time.delta));
unit.vel.add(Tmp.v1.trns(mount.bullet.rotation() + 180f, mount.bullet.type.recoil * Time.delta));
if(shootSound != Sounds.none && !headless){
if(mount.sound == null) mount.sound = new SoundLoop(shootSound, 1f);
mount.sound.update(bulletX, bulletY, true);
Expand Down
4 changes: 2 additions & 2 deletions core/src/mindustry/world/Build.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ public static boolean contactsShallows(int x, int y, Block block){
return false;
}

/** Returns whether the tile at this position is breakable by this team */
/** @return whether the tile at this position is breakable by this team */
public static boolean validBreak(Team team, int x, int y){
Tile tile = world.tile(x, y);
return tile != null && tile.block().canBreak(tile) && tile.breakable() && tile.interactable(team);
return tile != null && tile.block() != Blocks.air && (tile.block().canBreak(tile) && (tile.breakable() || state.rules.allowEnvironmentDeconstruct)) && tile.interactable(team);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public DirectionBridge(String name){
priority = TargetPriority.transport;
envEnabled = Env.space | Env.terrestrial | Env.underwater;
drawArrow = false;
allowDiagonal = false;
regionRotated1 = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public ItemBridge(String name){
unloadable = false;
group = BlockGroup.transportation;
noUpdateDisabled = true;
allowDiagonal = false;
copyConfig = false;
//disabled as to not be annoying
allowConfigInventory = false;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ org.gradle.caching=true
#used for slow jitpack builds; TODO see if this actually works
org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000
archash=8fdcdbfccc
archash=137d14855f
24 changes: 14 additions & 10 deletions servers_v7.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
},
{
"name": "meiqiuMDT",
"address": ["cn1.meiqiumdy.top:7000","cn1.meiqiumdt.top:7002","cn1.meiqiumdt.top:7006","bj-1.lcf.icu:10240"]
"address": ["cn1.meiqiumdy.top:7000","cn1.meiqiumdt.top:7002","cn1.meiqiumdt.top:7006","cn1.meiqiumdt.top:7013"]
},
{
"name": "Crux's Revelations",
"address": ["de-free-01.hosts.optikservers.com:31528","de-prem-01.hosts.optikservers.com:35922"]
},
{
"name": "CMS Empire",
"address": ["195.2.84.144","178.20.45.250"]
"address": ["195.2.84.144","95.84.198.97"]
},
{
"name": "ShardDustry Eventos",
Expand Down Expand Up @@ -230,7 +230,7 @@
},
{
"name": "ABCXYZ Community",
"address": ["23.88.73.88:23591", "23.88.73.88:23539", "144.76.57.59:14996", "144.76.57.59:16881", "144.76.57.59:13885", "23.88.73.88:32113", "144.76.57.59:9269", "144.76.57.59:24235", "144.76.57.59:24133", "140.238.246.78:7000", "5.9.8.124:28848"]
"address": ["23.88.73.88:23591", "23.88.73.88:23539", "144.76.57.59:14996", "144.76.57.59:16881", "144.76.57.59:13885", "23.88.73.88:32113", "144.76.57.59:9269", "144.76.57.59:24235", "144.76.57.59:24133", "140.238.246.78:7000", "5.9.8.124:28848", "free2.titaniumhost.tech:25669"]
},
{
"name": "CroCraft Network",
Expand All @@ -242,7 +242,7 @@
},
{
"name": "Alex Multiverse",
"address": ["alexmindustryv7.servegame.com:25588", "172.234.80.96:6768", "139.162.41.78:6767", "172.245.187.143:6868", "172.245.187.143:6869" ]
"address": ["alexmindustryv7.servegame.com:25588", "172.234.80.96:6768", "139.162.41.78:6767", "172.245.187.143:6868", "172.245.187.143:6869", "92.119.127.171:6888" ]
},
{
"name": "Open PVP",
Expand All @@ -252,10 +252,6 @@
"name": "XuwenHost",
"address": ["mdt.xuwenblock.cn:6568","mdt.xuwenblock.cn:6567","106.14.14.210"]
},
{
"name": "MineCore",
"address": ["194.247.42.11:27792"]
},
{
"name": "Atomic",
"address": ["atomic-de.ddns.net:35199", "atomic-de.ddns.net:35176", "atomic-de.ddns.net:35845", "atomic-de.ddns.net:35313"]
Expand All @@ -266,14 +262,22 @@
},
{
"name": "Gadgetroch's Server",
"address": ["mindustry.gadgetroch.com", "mindustry.gadgetroch.com:6568"]
"address": ["mindustry.gadgetroch.com", "mindustry.gadgetroch.com:6568", "mindustry.gadgetroch.com:6569"]
},
{
"name": "Duel.Server",
"address":["160.251.41.148:6568","160.251.41.148:6569"]
"address":["160.251.41.148:6567","160.251.41.148:6568","160.251.41.148:6569","160.251.41.148:6570"]
},
{
"name": "AZDustry",
"address": ["118.127.8.162:25628"]
},
{
"name": "Erepulo",
"address": ["95.84.198.97:5401", "95.84.198.97:5402", "95.84.198.97:5403"]
},
{
"name": "MineCore",
"address": ["194.247.42.11:27792", "194.247.42.11:27977", "194.247.42.61:27989", "194.247.42.181:28514"]
}
]

0 comments on commit 9594937

Please sign in to comment.