Cleanup continues

This commit is contained in:
Anuken
2020-02-04 18:00:32 -05:00
parent 012421afcb
commit a7b39e56bd
106 changed files with 2266 additions and 4543 deletions
+25 -25
View File
@@ -3,7 +3,7 @@ package mindustry.game;
import arc.util.ArcAnnotate.*;
import mindustry.core.GameState.*;
import mindustry.ctype.*;
import mindustry.entities.type.*;
import mindustry.gen.*;
import mindustry.entities.units.*;
import mindustry.gen.*;
import mindustry.type.*;
@@ -62,10 +62,10 @@ public class EventType{
}
public static class PlayerChatEvent{
public final Player player;
public final Playerc player;
public final String message;
public PlayerChatEvent(Player player, String message){
public PlayerChatEvent(Playerc player, String message){
this.player = player;
this.message = message;
}
@@ -144,11 +144,11 @@ public class EventType{
/** Called when the player withdraws items from a block. */
public static class WithdrawEvent{
public final Tile tile;
public final Player player;
public final Playerc player;
public final Item item;
public final int amount;
public WithdrawEvent(Tile tile, Player player, Item item, int amount){
public WithdrawEvent(Tile tile, Playerc player, Item item, int amount){
this.tile = tile;
this.player = player;
this.item = item;
@@ -159,11 +159,11 @@ public class EventType{
/** Called when a player deposits items to a block.*/
public static class DepositEvent{
public final Tile tile;
public final Player player;
public final Playerc player;
public final Item item;
public final int amount;
public DepositEvent(Tile tile, Player player, Item item, int amount){
public DepositEvent(Tile tile, Playerc player, Item item, int amount){
this.tile = tile;
this.player = player;
this.item = item;
@@ -174,9 +174,9 @@ public class EventType{
/** Called when the player taps a block. */
public static class TapEvent{
public final Tile tile;
public final Player player;
public final Playerc player;
public TapEvent(Tile tile, Player player){
public TapEvent(Tile tile, Playerc player){
this.tile = tile;
this.player = player;
}
@@ -185,10 +185,10 @@ public class EventType{
/** Called when the player sets a specific block. */
public static class TapConfigEvent{
public final Tile tile;
public final Player player;
public final Playerc player;
public final int value;
public TapConfigEvent(Tile tile, Player player, int value){
public TapConfigEvent(Tile tile, Playerc player, int value){
this.tile = tile;
this.player = player;
this.value = value;
@@ -262,10 +262,10 @@ public class EventType{
public final Tile tile;
public final Team team;
public final @Nullable
Player player;
Playerc player;
public final boolean breaking;
public BlockBuildEndEvent(Tile tile, @Nullable Player player, Team team, boolean breaking){
public BlockBuildEndEvent(Tile tile, @Nullable Playerc player, Team team, boolean breaking){
this.tile = tile;
this.team = team;
this.player = player;
@@ -323,10 +323,10 @@ public class EventType{
//TODO rename
public static class MechChangeEvent{
public final Player player;
public final Playerc player;
public final UnitDef mech;
public MechChangeEvent(Player player, UnitDef mech){
public MechChangeEvent(Playerc player, UnitDef mech){
this.player = player;
this.mech = mech;
}
@@ -334,42 +334,42 @@ public class EventType{
/** Called after connecting; when a player recieves world data and is ready to play.*/
public static class PlayerJoin{
public final Player player;
public final Playerc player;
public PlayerJoin(Player player){
public PlayerJoin(Playerc player){
this.player = player;
}
}
/** Called when a player connects, but has not joined the game yet.*/
public static class PlayerConnect{
public final Player player;
public final Playerc player;
public PlayerConnect(Player player){
public PlayerConnect(Playerc player){
this.player = player;
}
}
public static class PlayerLeave{
public final Player player;
public final Playerc player;
public PlayerLeave(Player player){
public PlayerLeave(Playerc player){
this.player = player;
}
}
public static class PlayerBanEvent{
public final Player player;
public final Playerc player;
public PlayerBanEvent(Player player){
public PlayerBanEvent(Playerc player){
this.player = player;
}
}
public static class PlayerUnbanEvent{
public final Player player;
public final Playerc player;
public PlayerUnbanEvent(Player player){
public PlayerUnbanEvent(Playerc player){
this.player = player;
}
}
+9 -5
View File
@@ -5,6 +5,7 @@ import arc.util.serialization.Json.Serializable;
import arc.util.serialization.JsonValue;
import mindustry.content.*;
import mindustry.ctype.ContentType;
import mindustry.gen.*;
import mindustry.type.*;
import static mindustry.Vars.content;
@@ -18,7 +19,7 @@ public class SpawnGroup implements Serializable{
public static final int never = Integer.MAX_VALUE;
/** The unit type spawned */
public UnitType type;
public UnitDef type;
/** When this spawn should end */
public int end = never;
/** When this spawn should start */
@@ -36,7 +37,7 @@ public class SpawnGroup implements Serializable{
/** Items this unit spawns with. Null to disable. */
public ItemStack items;
public SpawnGroup(UnitType type){
public SpawnGroup(UnitDef type){
this.type = type;
}
@@ -56,8 +57,11 @@ 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 BaseUnit createUnit(Team team){
BaseUnit unit = type.create(team);
public Unitc createUnit(Team team){
//TODO
throw new IllegalArgumentException("TODO");
/*
Unitc unit = type.create(team);
if(effect != null){
unit.applyEffect(effect, 999999f);
@@ -67,7 +71,7 @@ public class SpawnGroup implements Serializable{
unit.addItem(items.item, items.amount);
}
return unit;
return unit;*/
}
@Override
+1 -1
View File
@@ -10,7 +10,7 @@ import arc.scene.ui.*;
import arc.scene.ui.layout.*;
import arc.util.*;
import mindustry.content.*;
import mindustry.entities.type.*;
import mindustry.gen.*;
import mindustry.game.EventType.*;
import mindustry.graphics.*;
import mindustry.type.*;