Cleanup, renaming

This commit is contained in:
Anuken 2020-06-08 21:03:29 -04:00
parent 6dd9369066
commit 6501071510
15 changed files with 571 additions and 605 deletions

View file

@ -4,6 +4,7 @@ alpha=0
block=1
cix=2
draug=3
mace=21
mindustry.entities.comp.BulletComp=4
mindustry.entities.comp.DecalComp=5
mindustry.entities.comp.EffectComp=6

View file

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 284 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 354 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 676 B

Before After
Before After

View file

@ -24,72 +24,72 @@ const extend = function(classType, params){
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
Call = Packages.mindustry.gen.Call
importPackage(Packages.mindustry.graphics.g3d)
importPackage(Packages.mindustry.ctype)
importPackage(Packages.mindustry.gen)
importPackage(Packages.arc.scene.actions)
importPackage(Packages.mindustry.editor)
importPackage(Packages.mindustry.type)
importPackage(Packages.arc.scene.ui)
importPackage(Packages.arc.math.geom)
importPackage(Packages.mindustry.game)
importPackage(Packages.mindustry.maps.filters)
importPackage(Packages.arc.struct)
importPackage(Packages.arc.scene.style)
importPackage(Packages.mindustry.ui.dialogs)
importPackage(Packages.mindustry.editor)
importPackage(Packages.mindustry.entities.comp)
importPackage(Packages.mindustry.world.blocks.defense.turrets)
importPackage(Packages.mindustry.async)
importPackage(Packages.mindustry.world.blocks.distribution)
importPackage(Packages.mindustry.world.blocks.environment)
importPackage(Packages.mindustry.world.blocks.campaign)
importPackage(Packages.mindustry.world.blocks.liquid)
importPackage(Packages.mindustry.ui)
importPackage(Packages.mindustry.world.blocks.production)
importPackage(Packages.mindustry.ai)
importPackage(Packages.mindustry.world.blocks.defense)
importPackage(Packages.mindustry.world.meta)
importPackage(Packages.mindustry.world.blocks.legacy)
importPackage(Packages.mindustry.world.blocks.units)
importPackage(Packages.arc.graphics)
importPackage(Packages.arc.func)
importPackage(Packages.mindustry.content)
importPackage(Packages.mindustry.world.blocks.power)
importPackage(Packages.mindustry.world.blocks)
importPackage(Packages.arc.scene.event)
importPackage(Packages.mindustry.logic)
importPackage(Packages.arc.math)
importPackage(Packages.mindustry.world)
importPackage(Packages.mindustry.maps)
importPackage(Packages.mindustry.maps.generators)
importPackage(Packages.mindustry.world.meta.values)
importPackage(Packages.mindustry.entities)
importPackage(Packages.arc.util)
importPackage(Packages.mindustry.graphics)
importPackage(Packages.mindustry.world.modules)
importPackage(Packages.mindustry.graphics.g3d)
importPackage(Packages.mindustry.world.blocks.sandbox)
importPackage(Packages.mindustry.input)
importPackage(Packages.mindustry.entities.units)
importPackage(Packages.arc.scene.ui.layout)
importPackage(Packages.mindustry.ai.types)
importPackage(Packages.mindustry.ai.formations.patterns)
importPackage(Packages.arc.scene.utils)
importPackage(Packages.mindustry.ai.formations)
importPackage(Packages.mindustry.game)
importPackage(Packages.mindustry.ui.dialogs)
importPackage(Packages.mindustry.ui.fragments)
importPackage(Packages.mindustry.world.blocks.experimental)
importPackage(Packages.mindustry.world.blocks.storage)
importPackage(Packages.mindustry.audio)
importPackage(Packages.mindustry.ui.layout)
importPackage(Packages.mindustry.entities.bullet)
importPackage(Packages.mindustry.world.consumers)
importPackage(Packages.mindustry.world.blocks.environment)
importPackage(Packages.arc.math)
importPackage(Packages.mindustry.world.blocks.power)
importPackage(Packages.mindustry.core)
importPackage(Packages.arc.scene)
importPackage(Packages.mindustry)
importPackage(Packages.arc)
importPackage(Packages.mindustry.world.blocks.payloads)
importPackage(Packages.mindustry.world.producers)
importPackage(Packages.arc.struct)
importPackage(Packages.mindustry.maps)
importPackage(Packages.arc.scene.actions)
importPackage(Packages.mindustry.ctype)
importPackage(Packages.mindustry.ai.formations)
importPackage(Packages.arc.scene.utils)
importPackage(Packages.mindustry.world.blocks.defense)
importPackage(Packages.mindustry.ai.types)
importPackage(Packages.mindustry.gen)
importPackage(Packages.mindustry.world.blocks.distribution)
importPackage(Packages.mindustry.world.meta)
importPackage(Packages.mindustry.maps.filters)
importPackage(Packages.mindustry.logic)
importPackage(Packages.arc.math.geom)
importPackage(Packages.mindustry.graphics)
importPackage(Packages.mindustry.entities.bullet)
importPackage(Packages.mindustry.world.meta.values)
importPackage(Packages.mindustry.input)
importPackage(Packages.mindustry.entities)
importPackage(Packages.arc.func)
importPackage(Packages.mindustry.world.blocks.experimental)
importPackage(Packages.mindustry.world.consumers)
importPackage(Packages.mindustry.ai)
importPackage(Packages.mindustry.world.blocks.legacy)
importPackage(Packages.mindustry.world.modules)
importPackage(Packages.mindustry.async)
importPackage(Packages.mindustry.content)
importPackage(Packages.arc.graphics.g2d)
importPackage(Packages.mindustry.ui)
importPackage(Packages.mindustry.ui.layout)
importPackage(Packages.mindustry.entities.units)
importPackage(Packages.mindustry.type)
importPackage(Packages.arc.scene)
importPackage(Packages.mindustry.world.blocks.production)
importPackage(Packages.mindustry)
importPackage(Packages.mindustry.world.blocks.storage)
importPackage(Packages.mindustry.world)
importPackage(Packages.mindustry.world.blocks.units)
importPackage(Packages.arc.scene.event)
importPackage(Packages.arc.scene.ui.layout)
importPackage(Packages.mindustry.world.blocks.defense.turrets)
importPackage(Packages.arc.scene.style)
importPackage(Packages.arc.graphics)
importPackage(Packages.mindustry.world.blocks.liquid)
importPackage(Packages.mindustry.world.blocks)
importPackage(Packages.mindustry.audio)
importPackage(Packages.mindustry.ai.formations.patterns)
importPackage(Packages.mindustry.world.blocks.payloads)
importPackage(Packages.mindustry.maps.planet)
importPackage(Packages.arc.util)
importPackage(Packages.mindustry.world.producers)
importPackage(Packages.arc)
importPackage(Packages.mindustry.maps.generators)
importPackage(Packages.mindustry.world.blocks.campaign)
const PlayerIpUnbanEvent = Packages.mindustry.game.EventType.PlayerIpUnbanEvent
const PlayerIpBanEvent = Packages.mindustry.game.EventType.PlayerIpBanEvent
const PlayerUnbanEvent = Packages.mindustry.game.EventType.PlayerUnbanEvent

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 KiB

After

Width:  |  Height:  |  Size: 852 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Before After
Before After

View file

@ -1767,7 +1767,7 @@ public class Blocks implements ContentList{
upgrades = new UnitType[][]{
{UnitTypes.tau, UnitTypes.oculon},
{UnitTypes.dagger, UnitTypes.titan},
{UnitTypes.dagger, UnitTypes.mace},
{UnitTypes.crawler, UnitTypes.eruptor},
{UnitTypes.wraith, UnitTypes.ghoul},
};
@ -1785,7 +1785,7 @@ public class Blocks implements ContentList{
upgrades = new UnitType[][]{
{UnitTypes.ghoul, UnitTypes.revenant},
{UnitTypes.titan, UnitTypes.fortress},
{UnitTypes.mace, UnitTypes.fortress},
};
}};

View file

@ -14,7 +14,7 @@ import mindustry.type.*;
public class UnitTypes implements ContentList{
//ground
public static @EntityDef({Unitc.class, Mechc.class}) UnitType titan, dagger, crawler, fortress, chaosArray, eradicator;
public static @EntityDef({Unitc.class, Mechc.class}) UnitType mace, dagger, crawler, fortress, chaosArray, eradicator;
//ground + builder
public static @EntityDef({Unitc.class, Mechc.class, Builderc.class}) UnitType tau;
@ -76,7 +76,7 @@ public class UnitTypes implements ContentList{
}});
}};
titan = new UnitType("titan"){{
mace = new UnitType("mace"){{
speed = 0.4f;
hitsize = 9f;
range = 10f;

View file

@ -52,6 +52,7 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
transient Block block;
transient Seq<Tilec> proximity = new Seq<>(8);
transient boolean updateFlow;
transient byte dump;
PowerModule power;
ItemModule items;
@ -413,8 +414,6 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
* @return whether the payload was moved successfully
*/
public boolean dumpPayload(@NonNull Payload todump){
int dump = tile.data;
if(proximity.size == 0) return false;
for(int i = 0; i < proximity.size; i++){
@ -449,8 +448,6 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
}
public void dumpLiquid(Liquid liquid){
int dump = tile.data;
for(int i = 0; i < proximity.size; i++){
incrementDump(proximity.size);
Tilec other = proximity.get((i + dump) % proximity.size);
@ -549,7 +546,6 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
*/
public void offload(Item item){
Seq<Tilec> proximity = proximity();
int dump = tile.data;
useContent(item);
for(int i = 0; i < proximity.size; i++){
@ -569,7 +565,6 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
*/
public boolean put(Item item){
Seq<Tilec> proximity = proximity();
int dump = tile.data;
useContent(item);
for(int i = 0; i < proximity.size; i++){
@ -597,7 +592,6 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
if(!block.hasItems || items.total() == 0 || (todump != null && !items.has(todump))) return false;
Seq<Tilec> proximity = proximity();
int dump = tile.data;
if(proximity.size == 0) return false;
@ -632,7 +626,7 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
}
public void incrementDump(int prox){
tile.data = (byte)((tile.data + 1) % prox);
dump = (byte)((dump + 1) % prox);
}
/** Used for dumping items. */

View file

@ -35,7 +35,7 @@ public class DefaultWaves{
max = 4;
}},
new SpawnGroup(UnitTypes.titan){{
new SpawnGroup(UnitTypes.mace){{
begin = 7;
spacing = 3;
unitScaling = 2;
@ -50,21 +50,21 @@ public class DefaultWaves{
spacing = 2;
}},
new SpawnGroup(UnitTypes.titan){{
new SpawnGroup(UnitTypes.mace){{
begin = 28;
spacing = 3;
unitScaling = 1;
end = 40;
}},
new SpawnGroup(UnitTypes.titan){{
new SpawnGroup(UnitTypes.mace){{
begin = 45;
spacing = 3;
unitScaling = 2;
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.titan){{
new SpawnGroup(UnitTypes.mace){{
begin = 120;
spacing = 2;
unitScaling = 3;

View file

@ -23,8 +23,6 @@ public class Tile implements Position, QuadTreeObject{
/** Tile entity, usually null. */
public @Nullable Tilec entity;
public short x, y;
/** Extra data. Used for dumping. */
public byte data;
protected @NonNull Block block;
protected @NonNull Floor floor;
protected @NonNull Floor overlay;

View file

@ -68,8 +68,16 @@ public class PayloadConveyor extends Block{
Tilec accept = nearby(Geometry.d4(rotation()).x * size, Geometry.d4(rotation()).y * size);
//next block must be aligned and of the same size
if(accept != null && accept.block().size == size &&
tileX() + Geometry.d4(rotation()).x * size == accept.tileX() && tileY() + Geometry.d4(rotation()).y * size == accept.tileY()){
if(accept != null && (
//same size
(accept.block().size == size && tileX() + Geometry.d4(rotation()).x * size == accept.tileX() && tileY() + Geometry.d4(rotation()).y * size == accept.tileY()) ||
//differing sizes
(accept.block().size > size &&
(rotation() % 2 == 0 ? //check orientation
Math.abs(accept.y() - y) <= accept.block().size * tilesize - size * tilesize : //check Y alignment
Math.abs(accept.x() - x) <= accept.block().size * tilesize - size * tilesize //check X alignment
)))){
next = accept;
}else{
next = null;