Bugfixes / Testing reaper sprite

This commit is contained in:
Anuken 2020-04-10 12:55:58 -04:00
parent 00f3353976
commit 2395bc9308
9 changed files with 847 additions and 803 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -111,6 +111,7 @@ mod.display = [gray]Mod:[orange] {0}
mod.enabled = [lightgray]Enabled mod.enabled = [lightgray]Enabled
mod.disabled = [scarlet]Disabled mod.disabled = [scarlet]Disabled
mod.disable = Disable mod.disable = Disable
mod.content = Content:
mod.delete.error = Unable to delete mod. File may be in use. mod.delete.error = Unable to delete mod. File may be in use.
mod.requiresversion = [scarlet]Requires min game version: [accent]{0} mod.requiresversion = [scarlet]Requires min game version: [accent]{0}
mod.missingdependencies = [scarlet]Missing dependencies: {0} mod.missingdependencies = [scarlet]Missing dependencies: {0}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 KiB

After

Width:  |  Height:  |  Size: 727 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -7,15 +7,16 @@ import mindustry.gen.*;
import mindustry.type.*; import mindustry.type.*;
public class UnitTypes implements ContentList{ public class UnitTypes implements ContentList{
//TODO reimplement //TODO reimplement - DO NOT USE
public static UnitType public static UnitType
ghoul, revenant, lich, reaper, ghoul, revenant, lich,
crawler, titan, fortress, eruptor, chaosArray, eradicator; crawler, titan, fortress, eruptor, chaosArray, eradicator;
public static @EntityDef({Unitc.class, Legsc.class}) UnitType dagger; public static @EntityDef({Unitc.class, Legsc.class}) UnitType dagger;
public static @EntityDef({Unitc.class, WaterMovec.class}) UnitType vanguard; public static @EntityDef({Unitc.class, WaterMovec.class}) UnitType vanguard;
public static @EntityDef({Unitc.class, Minerc.class}) UnitType draug; public static @EntityDef({Unitc.class, Minerc.class}) UnitType draug;
public static @EntityDef({Unitc.class}) UnitType wraith; public static @EntityDef({Unitc.class}) UnitType wraith;
public static @EntityDef({Unitc.class}) UnitType reaper;
public static @EntityDef({Unitc.class}) UnitType spirit; public static @EntityDef({Unitc.class}) UnitType spirit;
public static @EntityDef({Unitc.class, Builderc.class}) UnitType phantom; public static @EntityDef({Unitc.class, Builderc.class}) UnitType phantom;
@ -61,6 +62,27 @@ public class UnitTypes implements ContentList{
}}); }});
}}; }};
reaper = new UnitType("reaper"){{
speed = 1f;
accel = 0.08f;
drag = 0f;
mass = 2f;
flying = true;
health = 75000;
engineOffset = 40;
engineSize = 7.3f;
weapons.add(new Weapon(){{
y = 1.5f;
reload = 28f;
alternate = true;
ejectEffect = Fx.shellEjectSmall;
bullet = Bullets.standardCopper;
shootSound = Sounds.shoot;
}});
}};
vanguard = new UnitType("vanguard"){{ vanguard = new UnitType("vanguard"){{
speed = 1.3f; speed = 1.3f;
drag = 0.1f; drag = 0.1f;

View File

@ -133,14 +133,14 @@ abstract class UnitComp implements Healthc, Velc, Statusc, Teamc, Itemsc, Hitbox
Tile tile = tileOn(); Tile tile = tileOn();
Floor floor = floorOn(); Floor floor = floorOn();
if(tile != null){ if(tile != null && isGrounded()){
//unit block update //unit block update
if(tile.entity != null && isGrounded()){ if(tile.entity != null){
tile.entity.unitOn(this); tile.entity.unitOn(this);
} }
//kill when stuck in wall //kill when stuck in wall
if(isGrounded() && tile.solid()){ if(tile.solid()){
kill(); kill();
} }

View File

@ -52,8 +52,8 @@ public class ModsDialog extends FloatingDialog{
} }
void setup(){ void setup(){
float h = 120f; float h = 110f;
float w = mobile ? 430f : 500f; float w = mobile ? 430f : 524f;
cont.clear(); cont.clear();
cont.defaults().width(mobile ? 500 : 560f).pad(4); cont.defaults().width(mobile ? 500 : 560f).pad(4);
@ -273,8 +273,28 @@ public class ModsDialog extends FloatingDialog{
desc.row(); desc.row();
desc.add(mod.meta.description).growX().wrap().padTop(2); desc.add(mod.meta.description).growX().wrap().padTop(2);
} }
//TODO add this when mods work properly
/*
Array<UnlockableContent> all = Array.with(content.getContentMap()).<Content>flatten().select(c -> c.minfo.mod == mod && c instanceof UnlockableContent).as(UnlockableContent.class);
if(all.any()){
desc.add("$mod.content").padRight(10).color(Color.gray).top();
desc.row();
desc.pane(cs -> {
int i = 0;
for(UnlockableContent c : all){
cs.addImageButton(new TextureRegionDrawable(c.icon(Cicon.medium)), () -> {
ui.content.show(c);
});
if(++i % 8 == 0) cs.row();
}
}).growX().minHeight(60f);
}*/
}).width(400f); }).width(400f);
dialog.show(); dialog.show();
} }
} }

View File

@ -231,9 +231,10 @@ public class Floor extends Block{
} }
protected boolean doEdge(Floor other, boolean sameLayer){ protected boolean doEdge(Floor other, boolean sameLayer){
boolean dir = !((other instanceof ShallowLiquid && ((ShallowLiquid)other).floorBase == this) || (this instanceof ShallowLiquid && ((ShallowLiquid)this).floorBase == other)); //TODO this is awful and should not exist.
return ((other.blendGroup.id > blendGroup.id == dir) || edges() == null) && boolean normal = ((other instanceof ShallowLiquid) == (this instanceof ShallowLiquid)) || (cacheLayer == other.cacheLayer);
other.edgeOnto(this) && (other.cacheLayer.ordinal() > this.cacheLayer.ordinal() || !sameLayer); return (((other.blendGroup.id > blendGroup.id) || edges() == null) &&
other.edgeOnto(this) && (other.cacheLayer.ordinal() > this.cacheLayer.ordinal() || !sameLayer)) == normal;
} }
protected boolean edgeOnto(Floor other){ protected boolean edgeOnto(Floor other){