Removed unnecessary events from global script

This commit is contained in:
Anuken
2020-08-18 17:04:01 -04:00
parent 26acf7cbbc
commit 3d5236dfd3
3 changed files with 6 additions and 6 deletions

View File

@ -124,14 +124,14 @@ const UnlockEvent = Packages.mindustry.game.EventType.UnlockEvent
const StateChangeEvent = Packages.mindustry.game.EventType.StateChangeEvent
const BuildinghangeEvent = Packages.mindustry.game.EventType.BuildinghangeEvent
const GameOverEvent = Packages.mindustry.game.EventType.GameOverEvent
const TapConfigEvent = Packages.mindustry.game.EventType.TapConfigEvent
const TapEvent = Packages.mindustry.game.EventType.TapEvent
const ConfigEvent = Packages.mindustry.game.EventType.ConfigEvent
const DepositEvent = Packages.mindustry.game.EventType.DepositEvent
const WithdrawEvent = Packages.mindustry.game.EventType.WithdrawEvent
const SectorCaptureEvent = Packages.mindustry.game.EventType.SectorCaptureEvent
const ZoneConfigureCompleteEvent = Packages.mindustry.game.EventType.ZoneConfigureCompleteEvent
const ZoneRequireCompleteEvent = Packages.mindustry.game.EventType.ZoneRequireCompleteEvent
const PlayerChatEvent = Packages.mindustry.game.EventType.PlayerChatEvent
const ClientPreConnectEvent = Packages.mindustry.game.EventType.ClientPreConnectEvent
const CommandIssueEvent = Packages.mindustry.game.EventType.CommandIssueEvent
const LaunchItemEvent = Packages.mindustry.game.EventType.LaunchItemEvent
const SectorLoseEvent = Packages.mindustry.game.EventType.SectorLoseEvent

View File

@ -166,13 +166,13 @@ public class EventType{
}
}
/** Called when the player sets a specific block. */
public static class TapConfigEvent{
/** Called when the configures sets a specific block. */
public static class ConfigEvent{
public final Building tile;
public final Player player;
public final Object value;
public TapConfigEvent(Building tile, Player player, Object value){
public ConfigEvent(Building tile, Player player, Object value){
this.tile = tile;
this.player = player;
this.value = value;

View File

@ -212,7 +212,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
if(net.server() && (!Units.canInteract(player, tile) ||
!netServer.admins.allowAction(player, ActionType.configure, tile.tile(), action -> action.config = value))) throw new ValidateException(player, "Player cannot configure a tile.");
tile.configured(player, value);
Core.app.post(() -> Events.fire(new TapConfigEvent(tile, player, value)));
Core.app.post(() -> Events.fire(new ConfigEvent(tile, player, value)));
}
@Remote(targets = Loc.both, called = Loc.both, forward = true)