This commit is contained in:
Anuken 2026-02-04 13:19:17 -05:00
parent 4497e34bbb
commit 14fe0a4c85
5 changed files with 24 additions and 23 deletions

View file

@ -312,31 +312,32 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
@Override
public void fileDropped(Fi file){
if(!OS.isIos){
if(file.extension().equalsIgnoreCase(saveExtension)){ //open save
try{
if(SaveIO.isSaveValid(file)){
SaveMeta meta = SaveIO.getMeta(new DataInputStream(new InflaterInputStream(file.read(Streams.defaultBufferSize))));
if(meta.tags.containsKey("name")){
//is map
if(!ui.editor.isShown()){
ui.editor.show();
}
if(OS.isIos) return;
ui.editor.beginEditMap(file);
}else if(meta.rules.sector == null){ //don't allow importing campaign saves, they are broken
SaveSlot slot = control.saves.importSave(file);
ui.load.runLoadSave(slot);
}else{
ui.showErrorMessage("@save.nocampaign");
if(file.extension().equalsIgnoreCase(saveExtension)){ //open save
try{
if(SaveIO.isSaveValid(file)){
SaveMeta meta = SaveIO.getMeta(new DataInputStream(new InflaterInputStream(file.read(Streams.defaultBufferSize))));
if(meta.tags.containsKey("name")){
//is map
if(!ui.editor.isShown()){
ui.editor.show();
}
ui.editor.beginEditMap(file);
}else if(meta.rules.sector == null){ //don't allow importing campaign saves, they are broken
SaveSlot slot = control.saves.importSave(file);
ui.load.runLoadSave(slot);
}else{
ui.showErrorMessage("@save.import.invalid");
ui.showErrorMessage("@save.nocampaign");
}
}catch(Throwable e){
ui.showException("@save.import.fail", e);
}else{
ui.showErrorMessage("@save.import.invalid");
}
}catch(Throwable e){
ui.showException("@save.import.fail", e);
}
}
}
}

View file

@ -198,7 +198,7 @@ public class NetClient implements ApplicationListener{
public static void sound(Sound sound, float volume, float pitch, float pan){
if(sound == null || headless) return;
sound.play(Mathf.clamp(volume, 0, 8f) * Core.settings.getInt("sfxvol") / 100f, Mathf.clamp(pitch, 0f, 20f), pan, false, false);
sound.play(Mathf.clamp(volume, 0, 8f) * Core.audio.sfxVolume, Mathf.clamp(pitch, 0f, 20f), pan, false, false);
}
@Remote(variants = Variant.both, unreliable = true, called = Loc.server)

View file

@ -2033,7 +2033,7 @@ public class LExecutor{
if(positional){
sound.at(World.unconv(x.numf()), World.unconv(y.numf()), pitch.numf(), Math.min(volume.numf(), 2f), limit.bool());
}else{
sound.play(Math.min(volume.numf() * (Core.settings.getInt("sfxvol") / 100f), 2f), pitch.numf(), pan.numf(), false, limit.bool());
sound.play(Math.min(volume.numf() * Core.audio.sfxVolume, 2f), pitch.numf(), pan.numf(), false, limit.bool());
}
}
}

View file

@ -658,7 +658,7 @@ public class CoreBlock extends StorageBlock{
public void playDestroySound(){
if(team.data().cores.size <= 1 && player != null && player.team() == team && state.rules.canGameOver){
//play at full volume when doing a game over
block.destroySound.play(block.destroySoundVolume, Mathf.random(block.destroyPitchMin, block.destroyPitchMax), 0f);
block.destroySound.play(block.destroySoundVolume * Core.audio.sfxVolume, Mathf.random(block.destroyPitchMin, block.destroyPitchMax), 0f);
}else{
super.playDestroySound();
}

View file

@ -26,4 +26,4 @@ org.gradle.caching=true
org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000
android.enableR8.fullMode=false
archash=3e5d2eb442
archash=039b13f434