mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-02 04:13:44 +07:00
Fixed #5684
This commit is contained in:
parent
e64cd905d6
commit
9c1f897fff
@ -193,8 +193,14 @@ public class PayloadBlock extends Block{
|
||||
}
|
||||
|
||||
public void dumpPayload(){
|
||||
//translate payload forward slightly
|
||||
float tx = Angles.trnsx(payload.rotation(), 0.1f), ty = Angles.trnsy(payload.rotation(), 0.1f);
|
||||
payload.set(payload.x() + tx, payload.y() + ty, payload.rotation());
|
||||
|
||||
if(payload.dump()){
|
||||
payload = null;
|
||||
}else{
|
||||
payload.set(payload.x() - tx, payload.y() - ty, payload.rotation());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,9 +100,6 @@ public class DesktopLauncher extends ClientLauncher{
|
||||
if(SteamAPI.restartAppIfNecessary(SVars.steamID)){
|
||||
System.exit(0);
|
||||
}
|
||||
}catch(NullPointerException ignored){
|
||||
steam = false;
|
||||
Log.info("Running in offline mode.");
|
||||
}catch(Throwable e){
|
||||
steam = false;
|
||||
Log.err("Failed to load Steam native libraries.");
|
||||
|
@ -33,10 +33,9 @@ public class SWorkshop implements SteamUGCCallback{
|
||||
ItemInstallInfo info = new ItemInstallInfo();
|
||||
ugc.getSubscribedItems(ids);
|
||||
|
||||
Seq<Fi> folders = Seq.with(ids).map(f -> {
|
||||
ugc.getItemInstallInfo(f, info);
|
||||
return new Fi(info.getFolder());
|
||||
}).select(f -> f != null && f.list().length > 0);
|
||||
Seq<Fi> folders = Seq.with(ids)
|
||||
.map(f -> !ugc.getItemInstallInfo(f, info) || info.getFolder() == null ? null : new Fi(info.getFolder()))
|
||||
.select(f -> f != null && f.list().length > 0);
|
||||
|
||||
workshopFiles.put(Map.class, folders.select(f -> f.list().length == 1 && f.list()[0].extension().equals(mapExtension)).map(f -> f.list()[0]));
|
||||
workshopFiles.put(Schematic.class, folders.select(f -> f.list().length == 1 && f.list()[0].extension().equals(schematicExtension)).map(f -> f.list()[0]));
|
||||
|
Loading…
Reference in New Issue
Block a user