diff --git a/core/src/mindustry/core/NetServer.java b/core/src/mindustry/core/NetServer.java index 1e91e6a6b0..098002d523 100644 --- a/core/src/mindustry/core/NetServer.java +++ b/core/src/mindustry/core/NetServer.java @@ -729,7 +729,7 @@ public class NetServer implements ApplicationListener{ long elapsed = Math.min(Time.timeSinceMillis(con.lastReceivedClientTime), 1500); float maxSpeed = unit.speed(); - float maxMove = elapsed / 1000f * 60f * maxSpeed * 1.2f; + float maxMove = elapsed / 1000f * 60f * maxSpeed * 1.1f; //ignore the position if the player thinks they're dead, or the unit is wrong boolean ignorePosition = dead || unit.id != unitID; diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index a7aa8e1ea8..a74c13edce 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -636,6 +636,12 @@ public class BulletType extends Content implements Cloneable{ if(trailLength > 0 && b.trail != null && b.trail.size() > 0){ Fx.trailFade.at(b.x, b.y, trailWidth, trailColor, b.trail.copy()); } + + //if the bullet never created any frags and is removed (probably by hitting something), it needs to spawn those + //TODO: disabled for now as this makes vanquish significantly more powerful + if(b.frags == 0 && !fragOnHit && fragBullet != null){ + // createFrags(b, b.x, b.y); + } } public float buildingDamage(Bullet b){ diff --git a/core/src/mindustry/game/Waves.java b/core/src/mindustry/game/Waves.java index 563d809f77..1b951d3220 100644 --- a/core/src/mindustry/game/Waves.java +++ b/core/src/mindustry/game/Waves.java @@ -274,7 +274,7 @@ public class Waves{ {nova, pulsar, quasar, vela, corvus}, {crawler, atrax, spiroct, arkyid, toxopid}, {risso, minke, bryde, sei, omura}, - {risso, oxynoe, cyerce, aegires, navanax}, //retusa intentionally left out as it cannot damage the core properly + {retusa, oxynoe, cyerce, aegires, navanax}, {flare, horizon, zenith, rand.chance(0.5) ? quad : antumbra, rand.chance(0.1) ? quad : eclipse} }; diff --git a/core/src/mindustry/mod/ModListing.java b/core/src/mindustry/mod/ModListing.java index ccdb88b717..a39d12985b 100644 --- a/core/src/mindustry/mod/ModListing.java +++ b/core/src/mindustry/mod/ModListing.java @@ -3,7 +3,7 @@ package mindustry.mod; /** Mod listing as a data class. */ public class ModListing{ public String repo, name, internalName, subtitle, author, lastUpdated, description, minGameVersion; - public boolean hasScripts, hasJava; + public boolean hasScripts, hasJava, iosCompatible; public String[] contentTypes = {}; public int stars; diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index aef65e50ec..78b82e0faa 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -1419,6 +1419,8 @@ public class Mods implements Loadable{ public boolean hidden; /** If true, this mod should be loaded as a Java class mod. This is technically optional, but highly recommended. */ public boolean java; + /** If true, this script mod is compatible with iOS. Only set this to true if you don't use extend()/JavaAdapter. */ + public boolean iosCompatible; /** To rescale textures with a different size. Represents the size in pixels of the sprite of a 1x1 block. */ public float texturescale = 1.0f; /** If true, bleeding is skipped and no content icons are generated. */ diff --git a/core/src/mindustry/ui/dialogs/ModsDialog.java b/core/src/mindustry/ui/dialogs/ModsDialog.java index 3e7a2e2448..b234ce3d08 100644 --- a/core/src/mindustry/ui/dialogs/ModsDialog.java +++ b/core/src/mindustry/ui/dialogs/ModsDialog.java @@ -486,7 +486,7 @@ public class ModsDialog extends BaseDialog{ } for(ModListing mod : listings){ - if(((mod.hasJava || mod.hasScripts) && Vars.ios) || + if(((mod.hasJava || mod.hasScripts && !mod.iosCompatible) && Vars.ios) || (!Strings.matches(searchtxt, mod.name) && !Strings.matches(searchtxt, mod.repo)) ) continue; diff --git a/ios/src/mindustry/ios/IOSLauncher.java b/ios/src/mindustry/ios/IOSLauncher.java index 776a2ec3e0..82a1200623 100644 --- a/ios/src/mindustry/ios/IOSLauncher.java +++ b/ios/src/mindustry/ios/IOSLauncher.java @@ -18,6 +18,7 @@ import org.robovm.apple.coregraphics.*; import org.robovm.apple.foundation.*; import org.robovm.apple.uikit.*; import org.robovm.objc.block.*; +import rhino.*; import java.io.*; import java.util.*; @@ -137,6 +138,14 @@ public class IOSLauncher extends IOSApplication.Delegate{ UIApplication.getSharedApplication().getKeyWindow().getRootViewController().presentViewController(cont, true, () -> {}); } + @Override + public Context getScriptContext(){ + Context context = Context.getCurrentContext(); + if(context == null) context = Context.enter(); + context.setOptimizationLevel(-1); + return context; + } + @Override public void shareFile(Fi file){ try{