argh
This commit is contained in:
@@ -69,20 +69,20 @@ public class EventType{
|
||||
|
||||
|
||||
public static class CommandIssueEvent{
|
||||
public final Tilec tile;
|
||||
public final Building tile;
|
||||
public final UnitCommand command;
|
||||
|
||||
public CommandIssueEvent(Tilec tile, UnitCommand command){
|
||||
public CommandIssueEvent(Building tile, UnitCommand command){
|
||||
this.tile = tile;
|
||||
this.command = command;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlayerChatEvent{
|
||||
public final Playerc player;
|
||||
public final Player player;
|
||||
public final String message;
|
||||
|
||||
public PlayerChatEvent(Playerc player, String message){
|
||||
public PlayerChatEvent(Player player, String message){
|
||||
this.player = player;
|
||||
this.message = message;
|
||||
}
|
||||
@@ -120,12 +120,12 @@ public class EventType{
|
||||
|
||||
/** Called when the player withdraws items from a block. */
|
||||
public static class WithdrawEvent{
|
||||
public final Tilec tile;
|
||||
public final Playerc player;
|
||||
public final Building tile;
|
||||
public final Player player;
|
||||
public final Item item;
|
||||
public final int amount;
|
||||
|
||||
public WithdrawEvent(Tilec tile, Playerc player, Item item, int amount){
|
||||
public WithdrawEvent(Building tile, Player player, Item item, int amount){
|
||||
this.tile = tile;
|
||||
this.player = player;
|
||||
this.item = item;
|
||||
@@ -135,12 +135,12 @@ public class EventType{
|
||||
|
||||
/** Called when a player deposits items to a block.*/
|
||||
public static class DepositEvent{
|
||||
public final Tilec tile;
|
||||
public final Playerc player;
|
||||
public final Building tile;
|
||||
public final Player player;
|
||||
public final Item item;
|
||||
public final int amount;
|
||||
|
||||
public DepositEvent(Tilec tile, Playerc player, Item item, int amount){
|
||||
public DepositEvent(Building tile, Player player, Item item, int amount){
|
||||
this.tile = tile;
|
||||
this.player = player;
|
||||
this.item = item;
|
||||
@@ -150,10 +150,10 @@ public class EventType{
|
||||
|
||||
/** Called when the player taps a block. */
|
||||
public static class TapEvent{
|
||||
public final Tilec tile;
|
||||
public final Playerc player;
|
||||
public final Building tile;
|
||||
public final Player player;
|
||||
|
||||
public TapEvent(Tilec tile, Playerc player){
|
||||
public TapEvent(Building tile, Player player){
|
||||
this.tile = tile;
|
||||
this.player = player;
|
||||
}
|
||||
@@ -161,11 +161,11 @@ public class EventType{
|
||||
|
||||
/** Called when the player sets a specific block. */
|
||||
public static class TapConfigEvent{
|
||||
public final Tilec tile;
|
||||
public final Playerc player;
|
||||
public final Building tile;
|
||||
public final Player player;
|
||||
public final Object value;
|
||||
|
||||
public TapConfigEvent(Tilec tile, Playerc player, Object value){
|
||||
public TapConfigEvent(Building tile, Player player, Object value){
|
||||
this.tile = tile;
|
||||
this.player = player;
|
||||
this.value = value;
|
||||
@@ -181,10 +181,10 @@ public class EventType{
|
||||
}
|
||||
|
||||
/** Called from the logic thread. Do not access graphics here! */
|
||||
public static class TileChangeEvent{
|
||||
public static class BuildinghangeEvent{
|
||||
public final Tile tile;
|
||||
|
||||
public TileChangeEvent(Tile tile){
|
||||
public BuildinghangeEvent(Tile tile){
|
||||
this.tile = tile;
|
||||
}
|
||||
}
|
||||
@@ -233,10 +233,10 @@ public class EventType{
|
||||
public static class BlockBuildEndEvent{
|
||||
public final Tile tile;
|
||||
public final Team team;
|
||||
public final @Nullable Unitc unit;
|
||||
public final @Nullable Unit unit;
|
||||
public final boolean breaking;
|
||||
|
||||
public BlockBuildEndEvent(Tile tile, @Nullable Unitc unit, Team team, boolean breaking){
|
||||
public BlockBuildEndEvent(Tile tile, @Nullable Unit unit, Team team, boolean breaking){
|
||||
this.tile = tile;
|
||||
this.team = team;
|
||||
this.unit = unit;
|
||||
@@ -273,26 +273,26 @@ public class EventType{
|
||||
}
|
||||
|
||||
public static class UnitDestroyEvent{
|
||||
public final Unitc unit;
|
||||
public final Unit unit;
|
||||
|
||||
public UnitDestroyEvent(Unitc unit){
|
||||
public UnitDestroyEvent(Unit unit){
|
||||
this.unit = unit;
|
||||
}
|
||||
}
|
||||
|
||||
public static class UnitCreateEvent{
|
||||
public final Unitc unit;
|
||||
public final Unit unit;
|
||||
|
||||
public UnitCreateEvent(Unitc unit){
|
||||
public UnitCreateEvent(Unit unit){
|
||||
this.unit = unit;
|
||||
}
|
||||
}
|
||||
|
||||
public static class UnitChangeEvent{
|
||||
public final Playerc player;
|
||||
public final Unitc unit;
|
||||
public final Player player;
|
||||
public final Unit unit;
|
||||
|
||||
public UnitChangeEvent(Playerc player, Unitc unit){
|
||||
public UnitChangeEvent(Player player, Unit unit){
|
||||
this.player = player;
|
||||
this.unit = unit;
|
||||
}
|
||||
@@ -300,42 +300,42 @@ public class EventType{
|
||||
|
||||
/** Called after connecting; when a player recieves world data and is ready to play.*/
|
||||
public static class PlayerJoin{
|
||||
public final Playerc player;
|
||||
public final Player player;
|
||||
|
||||
public PlayerJoin(Playerc player){
|
||||
public PlayerJoin(Player player){
|
||||
this.player = player;
|
||||
}
|
||||
}
|
||||
|
||||
/** Called when a player connects, but has not joined the game yet.*/
|
||||
public static class PlayerConnect{
|
||||
public final Playerc player;
|
||||
public final Player player;
|
||||
|
||||
public PlayerConnect(Playerc player){
|
||||
public PlayerConnect(Player player){
|
||||
this.player = player;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlayerLeave{
|
||||
public final Playerc player;
|
||||
public final Player player;
|
||||
|
||||
public PlayerLeave(Playerc player){
|
||||
public PlayerLeave(Player player){
|
||||
this.player = player;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlayerBanEvent{
|
||||
public final Playerc player;
|
||||
public final Player player;
|
||||
|
||||
public PlayerBanEvent(Playerc player){
|
||||
public PlayerBanEvent(Player player){
|
||||
this.player = player;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlayerUnbanEvent{
|
||||
public final Playerc player;
|
||||
public final Player player;
|
||||
|
||||
public PlayerUnbanEvent(Playerc player){
|
||||
public PlayerUnbanEvent(Player player){
|
||||
this.player = player;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ public class Schematics implements Loadable{
|
||||
boolean found = false;
|
||||
for(int cx = x; cx <= x2; cx++){
|
||||
for(int cy = y; cy <= y2; cy++){
|
||||
Tilec linked = world.ent(cx, cy);
|
||||
Building linked = world.ent(cx, cy);
|
||||
|
||||
if(linked != null &&linked.block().isVisible() && !(linked.block() instanceof BuildBlock)){
|
||||
int top = linked.block().size/2;
|
||||
@@ -346,7 +346,7 @@ public class Schematics implements Loadable{
|
||||
IntSet counted = new IntSet();
|
||||
for(int cx = ox; cx <= ox2; cx++){
|
||||
for(int cy = oy; cy <= oy2; cy++){
|
||||
Tilec tile = world.ent(cx, cy);
|
||||
Building tile = world.ent(cx, cy);
|
||||
|
||||
if(tile != null && !counted.contains(tile.pos()) && !(tile.block() instanceof BuildBlock)
|
||||
&& (tile.block().isVisible() || (tile.block() instanceof CoreBlock && Core.settings.getBool("coreselect")))){
|
||||
|
||||
@@ -60,8 +60,8 @@ public class SpawnGroup implements Serializable{
|
||||
* Creates a unit, and assigns correct values based on this group's data.
|
||||
* This method does not add() the unit.
|
||||
*/
|
||||
public Unitc createUnit(Team team, int wave){
|
||||
Unitc unit = type.create(team);
|
||||
public Unit createUnit(Team team, int wave){
|
||||
Unit unit = type.create(team);
|
||||
|
||||
if(effect != null){
|
||||
unit.apply(effect, 999999f);
|
||||
|
||||
@@ -55,10 +55,10 @@ public class Teams{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void eachEnemyCore(Team team, Cons<Tilec> ret){
|
||||
public void eachEnemyCore(Team team, Cons<Building> ret){
|
||||
for(TeamData data : active){
|
||||
if(areEnemies(team, data.team)){
|
||||
for(Tilec tile : data.cores){
|
||||
for(Building tile : data.cores){
|
||||
ret.get(tile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ public class Tutorial{
|
||||
//utility
|
||||
|
||||
static void placeBlocks(){
|
||||
Tilec core = state.teams.playerCores().first();
|
||||
Building core = state.teams.playerCores().first();
|
||||
for(int i = 0; i < blocksToBreak; i++){
|
||||
world.tile(core.tile().x + blockOffset, core.tile().y + i).remove();
|
||||
world.tile(core.tile().x + blockOffset, core.tile().y + i).setBlock(Blocks.scrapWall, state.rules.defaultTeam);
|
||||
@@ -247,7 +247,7 @@ public class Tutorial{
|
||||
}
|
||||
|
||||
static boolean blocksBroken(){
|
||||
Tilec core = state.teams.playerCores().first();
|
||||
Building core = state.teams.playerCores().first();
|
||||
|
||||
for(int i = 0; i < blocksToBreak; i++){
|
||||
if(world.tile(core.tile().x + blockOffset, core.tile().y + i).block() == Blocks.scrapWall){
|
||||
|
||||
Reference in New Issue
Block a user