Merge branch 'v103.3' of https://github.com/PetrGasparik/Mindustry; branch 'master' of https://github.com/Anuken/Mindustry into v103.3
This commit is contained in:
BIN
core/assets/fonts/fontello.ttf
Normal file
BIN
core/assets/fonts/fontello.ttf
Normal file
Binary file not shown.
@@ -33,8 +33,7 @@ public class Pathfinder implements Runnable{
|
||||
/** handles task scheduling on the update thread. */
|
||||
private TaskQueue queue = new TaskQueue();
|
||||
/** current pathfinding thread */
|
||||
private @Nullable
|
||||
Thread thread;
|
||||
private @Nullable Thread thread;
|
||||
|
||||
public Pathfinder(){
|
||||
Events.on(WorldLoadEvent.class, event -> {
|
||||
|
||||
@@ -1,30 +1,29 @@
|
||||
package mindustry.core;
|
||||
|
||||
import arc.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import arc.struct.*;
|
||||
import arc.graphics.*;
|
||||
import arc.math.*;
|
||||
import arc.util.CommandHandler.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import arc.util.CommandHandler.*;
|
||||
import arc.util.io.*;
|
||||
import arc.util.serialization.*;
|
||||
import mindustry.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.core.GameState.*;
|
||||
import mindustry.ctype.ContentType;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.Effects.*;
|
||||
import mindustry.entities.traits.BuilderTrait.*;
|
||||
import mindustry.entities.traits.*;
|
||||
import mindustry.entities.type.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.net.Administration.*;
|
||||
import mindustry.net.Net.*;
|
||||
import mindustry.net.*;
|
||||
import mindustry.net.Packets.*;
|
||||
import mindustry.type.TypeID;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.modules.*;
|
||||
|
||||
@@ -267,6 +266,9 @@ public class NetClient implements ApplicationListener{
|
||||
ui.showText("", message);
|
||||
}
|
||||
|
||||
//TODO these are commented out to enforce compatibility with 103! uncomment before 104 release
|
||||
/*
|
||||
|
||||
@Remote(variants = Variant.both)
|
||||
public static void onInfoPopup(String message, float duration, int align, int top, int left, int bottom, int right){
|
||||
ui.showInfoPopup(message, duration, align, top, left, bottom, right);
|
||||
@@ -285,7 +287,7 @@ public class NetClient implements ApplicationListener{
|
||||
@Remote(variants = Variant.both)
|
||||
public static void onEffectReliable(Effect effect, float x, float y, float rotation, Color color){
|
||||
Effects.effect(effect, color, x, y, rotation);
|
||||
}
|
||||
}*/
|
||||
|
||||
@Remote(variants = Variant.both)
|
||||
public static void onInfoToast(String message, float duration){
|
||||
|
||||
@@ -284,11 +284,11 @@ public class NetServer implements ApplicationListener{
|
||||
});
|
||||
|
||||
//duration of a a kick in seconds
|
||||
int kickDuration = 20 * 60;
|
||||
int kickDuration = 60 * 60;
|
||||
//voting round duration in seconds
|
||||
float voteDuration = 0.5f * 60;
|
||||
//cooldown between votes
|
||||
int voteCooldown = 60 * 2;
|
||||
int voteCooldown = 60 * 1;
|
||||
|
||||
class VoteSession{
|
||||
Player target;
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.io.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
|
||||
public static final float timeToSleep = 60f * 4; //4 seconds to fall asleep
|
||||
public static final float timeToSleep = 60f * 1; //1 second to fall asleep
|
||||
private static final ObjectSet<Tile> tmpTiles = new ObjectSet<>();
|
||||
/** This value is only used for debugging. */
|
||||
public static int sleepingEntities = 0;
|
||||
|
||||
@@ -17,6 +17,10 @@ public class Teams{
|
||||
/** Active teams. */
|
||||
private Array<TeamData> active = new Array<>();
|
||||
|
||||
public Teams(){
|
||||
active.add(get(Team.crux));
|
||||
}
|
||||
|
||||
public @Nullable CoreEntity closestEnemyCore(float x, float y, Team team){
|
||||
for(TeamData data : active){
|
||||
if(areEnemies(team, data.team)){
|
||||
@@ -85,7 +89,6 @@ public class Teams{
|
||||
|
||||
/** Returns whether {@param other} is an enemy of {@param #team}. */
|
||||
public boolean areEnemies(Team team, Team other){
|
||||
//todo what about derelict?
|
||||
return team != other;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ public class Administration{
|
||||
if(player.getInfo().messageInfractions >= Config.messageSpamKick.num() && Config.messageSpamKick.num() != 0){
|
||||
player.con.kick("You have been kicked for spamming.", 1000 * 60 * 2);
|
||||
}
|
||||
player.getInfo().lastSentMessage = message;
|
||||
return null;
|
||||
}else{
|
||||
player.getInfo().messageInfractions = 0;
|
||||
|
||||
@@ -190,7 +190,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
|
||||
if(e.ys[i] > nextMax) e.ys[i] = nextMax;
|
||||
if(e.ys[i] > 0.5 && i > 0) e.mid = i - 1;
|
||||
e.xs[i] = Mathf.approachDelta(e.xs[i], 0, 0.1f);
|
||||
e.xs[i] = Mathf.approachDelta(e.xs[i], 0, speed*2);
|
||||
|
||||
if(e.ys[i] >= 1f && offloadDir(tile, e.ids[i])){
|
||||
//align X position if passing forwards
|
||||
@@ -198,14 +198,14 @@ public class Conveyor extends Block implements Autotiler{
|
||||
e.nextc.xs[e.nextc.lastInserted] = e.xs[i];
|
||||
}
|
||||
//remove last item
|
||||
e.items.remove(e.ids[i], e.len - i);
|
||||
e.len = Math.min(i, e.len);
|
||||
e.items.remove(e.ids[i], 1);
|
||||
}else if(e.ys[i] < e.minitem){
|
||||
e.minitem = e.ys[i];
|
||||
}
|
||||
}
|
||||
|
||||
if(e.minitem < itemSpace + (e.blendbits == 1 ? 0.5f : 0f)){
|
||||
if(e.minitem < itemSpace + (e.blendbits == 1 ? 0.3f : 0f)){
|
||||
e.clogHeat = Mathf.lerpDelta(e.clogHeat, 1f, 0.02f);
|
||||
}else{
|
||||
e.clogHeat = 0f;
|
||||
@@ -281,7 +281,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
ConveyorEntity e = tile.ent();
|
||||
if(e.len >= capacity) return false;
|
||||
int direction = source == null ? 0 : Math.abs(source.relativeTo(tile.x, tile.y) - tile.rotation());
|
||||
return (((direction == 0) && e.minitem >= itemSpace) || ((direction % 2 == 1) && e.minitem > 0.5f + itemSpace)) && (source == null || !(source.block().rotate && (source.rotation() + 2) % 4 == tile.rotation()));
|
||||
return (((direction == 0) && e.minitem >= itemSpace) || ((direction % 2 == 1) && e.minitem > 0.7f)) && (source == null || !(source.block().rotate && (source.rotation() + 2) % 4 == tile.rotation()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user