Quell missile weapons
This commit is contained in:
@@ -2509,7 +2509,7 @@ public class UnitTypes{
|
||||
flying = true;
|
||||
drag = 0.06f;
|
||||
speed = 1.1f;
|
||||
rotateSpeed = 3.5f;
|
||||
rotateSpeed = 3.2f;
|
||||
accel = 0.1f;
|
||||
health = 3000f;
|
||||
armor = 5f;
|
||||
@@ -2524,6 +2524,40 @@ public class UnitTypes{
|
||||
y = 1f;
|
||||
}});
|
||||
|
||||
weapons.add(new Weapon("quell-weapon"){{
|
||||
x = 51 / 4f;
|
||||
y = 5 / 4f;
|
||||
rotate = true;
|
||||
rotateSpeed = 2f;
|
||||
reload = 60f;
|
||||
layerOffset = -0.001f;
|
||||
recoil = 1f;
|
||||
rotationLimit = 60f;
|
||||
|
||||
bullet = new BulletType(){{
|
||||
shootEffect = Fx.shootBig;
|
||||
smokeEffect = Fx.shootBigSmoke2;
|
||||
shake = 1f;
|
||||
}};
|
||||
|
||||
unitSpawned = new MissileUnitType("quell-missile"){{
|
||||
speed = 4f;
|
||||
maxRange = 80f;
|
||||
|
||||
weapons.add(new Weapon(){{
|
||||
shootOnDeath = true;
|
||||
bullet = new BulletType(){{
|
||||
rangeOverride = 20f;
|
||||
despawnEffect = Fx.blastExplosion;
|
||||
killShooter = true;
|
||||
//TODO status?
|
||||
splashDamageRadius = 60f;
|
||||
splashDamage = 230f;
|
||||
}};
|
||||
}});
|
||||
}};
|
||||
}});
|
||||
|
||||
setEnginesMirror(
|
||||
new UnitEngine(62 / 4f, -60 / 4f, 3.9f, 315f),
|
||||
new UnitEngine(72 / 4f, -29 / 4f, 3f, 315f)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package mindustry.core;
|
||||
|
||||
import arc.*;
|
||||
import arc.assets.*;
|
||||
import arc.assets.loaders.*;
|
||||
import arc.assets.loaders.MusicLoader.*;
|
||||
import arc.assets.loaders.SoundLoader.*;
|
||||
@@ -18,7 +17,7 @@ public class FileTree implements FileHandleResolver{
|
||||
private ObjectMap<String, Music> loadedMusic = new ObjectMap<>();
|
||||
|
||||
public void addFile(String path, Fi f){
|
||||
files.put(path, f);
|
||||
files.put(path.replace('\\', '/'), f);
|
||||
}
|
||||
|
||||
/** Gets an asset file.*/
|
||||
@@ -61,7 +60,7 @@ public class FileTree implements FileHandleResolver{
|
||||
String path = Vars.tree.get(name + ".ogg").exists() ? name + ".ogg" : name + ".mp3";
|
||||
|
||||
var sound = new Sound();
|
||||
AssetDescriptor<?> desc = Core.assets.load(path, Sound.class, new SoundParameter(sound));
|
||||
var desc = Core.assets.load(path, Sound.class, new SoundParameter(sound));
|
||||
desc.errored = Throwable::printStackTrace;
|
||||
|
||||
return sound;
|
||||
@@ -80,7 +79,7 @@ public class FileTree implements FileHandleResolver{
|
||||
String path = Vars.tree.get(name + ".ogg").exists() ? name + ".ogg" : name + ".mp3";
|
||||
|
||||
var music = new Music();
|
||||
AssetDescriptor<?> desc = Core.assets.load(path, Music.class, new MusicParameter(music));
|
||||
var desc = Core.assets.load(path, Music.class, new MusicParameter(music));
|
||||
desc.errored = Throwable::printStackTrace;
|
||||
|
||||
return music;
|
||||
|
||||
@@ -112,8 +112,10 @@ public class BulletType extends Content implements Cloneable{
|
||||
/** Whether to move the bullet back depending on delta to fix some delta-time related issues.
|
||||
* Do not change unless you know what you're doing. */
|
||||
public boolean backMove = true;
|
||||
/** Bullet range override. */
|
||||
/** Bullet range positive override. */
|
||||
public float maxRange = -1f;
|
||||
/** When > 0, overrides range even if smaller than base range. */
|
||||
public float rangeOverride = -1f;
|
||||
/** When used in a turret with multiple ammo types, this can be set to a non-zero value to influence range. */
|
||||
public float rangeChange = 0f;
|
||||
/** % of block health healed **/
|
||||
@@ -215,6 +217,7 @@ public class BulletType extends Content implements Cloneable{
|
||||
|
||||
/** Returns maximum distance the bullet this bullet type has can travel. */
|
||||
public float range(){
|
||||
if(rangeOverride > 0) return rangeOverride;
|
||||
return Mathf.zero(drag) ? speed * lifetime : Math.max(speed * (1f - Mathf.pow(1f - drag, lifetime)) / drag, maxRange);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,8 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
|
||||
if(ice < 0.6){
|
||||
if(result == Blocks.rhyolite || result == Blocks.yellowStone || result == Blocks.regolith){
|
||||
return Blocks.dacite; //TODO perhaps something else
|
||||
//TODO bio(?) luminescent stuff
|
||||
return Blocks.ferricStone; //TODO perhaps something else
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +137,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
erase(endX, endY, 15);
|
||||
|
||||
//arkycite
|
||||
//TODO arkycite biome
|
||||
pass((x, y) -> {
|
||||
if(nearWall(x, y)) return;
|
||||
|
||||
@@ -148,7 +150,6 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
|
||||
median(2, 0.6, Blocks.arkyciteFloor);
|
||||
|
||||
//TODO arkycite walls
|
||||
blend(Blocks.arkyciteFloor, Blocks.arkyicStone, 4);
|
||||
|
||||
distort(10f, 12f);
|
||||
|
||||
@@ -25,7 +25,9 @@ public class MissileUnitType extends UnitType{
|
||||
physics = false;
|
||||
trailLength = 7;
|
||||
hidden = true;
|
||||
rotateSpeed = 2f;
|
||||
speed = 4f;
|
||||
lifetime = 60f * 3f;
|
||||
rotateSpeed = 3f;
|
||||
range = 30f;
|
||||
//TODO weapons, etc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user