if(toggleTimer <= 0)
{
varGear = !varGear;
player.addChatMessage(new ChatComponentText("Landing gear " + (varGear ? "down" : "up")));
toggleTimer = 10;
FlansMod.getPacketHandler().sendToServer(new PacketDriveableControl(this));
}
return true;
}
case 14 : // Door
{
if(toggleTimer <= 0)
{
varDoor = !varDoor;
if(type.hasDoor)
player.addChatMessage(new ChatComponentText("Doors " + (varDoor ? "open" : "closed")));
toggleTimer = 10;
FlansMod.getPacketHandler().sendToServer(new PacketDriveableControl(this));
}
return true;
}
case 15 : // Wing
{
if(toggleTimer <= 0)
{
if(type.hasWing)
{
varWing = !varWing;
player.addChatMessage(new ChatComponentText("Switching mode"));
}
if(type.mode == EnumPlaneMode.VTOL)
{
if(mode == EnumPlaneMode.HELI)
mode = EnumPlaneMode.PLANE;
else mode = EnumPlaneMode.HELI;
player.addChatMessage(new ChatComponentText(mode == EnumPlaneMode.HELI ? "Entering hover mode" : "Entering plane mode"));
}
toggleTimer = 10;
FlansMod.getPacketHandler().sendToServer(new PacketDriveableControl(this));
}
return true;
}
case 16 : // Trim Button
{