mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-23 22:28:08 +07:00
More stuff fixed / Contributor list
This commit is contained in:
73
core/assets/contributors
Normal file
73
core/assets/contributors
Normal file
@ -0,0 +1,73 @@
|
||||
Prosta4okua
|
||||
Timmeey86
|
||||
Epowerj
|
||||
Baltazár Radics
|
||||
Dexapnow
|
||||
Milinai
|
||||
키에르
|
||||
Luxray5474
|
||||
Leone25
|
||||
Gureumi
|
||||
VizardAlpha
|
||||
LQ
|
||||
Commodore64x
|
||||
iczero
|
||||
Krzysztof Skrzętnicki
|
||||
Baramos666
|
||||
theshadowknight
|
||||
elmenda452
|
||||
Predator127
|
||||
Sonnicon
|
||||
CinExPL
|
||||
toushangyouxiang
|
||||
xgamezs
|
||||
Skybbles // L5474
|
||||
William So
|
||||
beito
|
||||
BeefEX
|
||||
Lorex
|
||||
laohuaji233
|
||||
CrazyBearTR
|
||||
Zachary
|
||||
Fenr1r
|
||||
Jaiun Lee
|
||||
Gab_351
|
||||
Carter Gale
|
||||
Jan Polák
|
||||
JustYanns
|
||||
BasedUser
|
||||
BLucky-gh
|
||||
DinoWattz
|
||||
Jae
|
||||
angelickite
|
||||
ScriptHosT12
|
||||
Senventise
|
||||
SkeptiC
|
||||
Deyvid67
|
||||
Damlon
|
||||
DaGamerFiles
|
||||
Trigg
|
||||
Uriel
|
||||
VXF
|
||||
Valen. H
|
||||
Valentin Sonin
|
||||
Clarence "Sparr" Risher
|
||||
bei2
|
||||
AceEllysium
|
||||
Cedric L'homme
|
||||
indielm
|
||||
Ameb
|
||||
player20033
|
||||
Ignacy
|
||||
J-VdS
|
||||
Kenny
|
||||
L5474
|
||||
Franciszek Zaranowicz
|
||||
Andreas Heiskanen
|
||||
Doyoung Gwak
|
||||
MMG
|
||||
Math2128
|
||||
Michael Plotke
|
||||
Niko
|
||||
Paul T
|
||||
Dominik
|
@ -39,9 +39,6 @@ public class Vars{
|
||||
public static final String discordURL = "https://discord.gg/mindustry";
|
||||
/** URL for Github API for releases */
|
||||
public static final String releasesURL = "https://api.github.com/repos/Anuken/Mindustry/releases";
|
||||
/** URL for Github API for contributors */
|
||||
//TODO remove and replace with a manually updated list
|
||||
public static final String contributorsURL = "https://api.github.com/repos/Anuken/Mindustry/contributors";
|
||||
/** URL for sending crash reports to */
|
||||
public static final String crashReportURL = "http://mins.us.to/report";
|
||||
/** maximum distance between mine and core that supports automatic transferring */
|
||||
|
@ -9,20 +9,17 @@ import io.anuke.arc.scene.ui.TextField.TextFieldFilter;
|
||||
import io.anuke.arc.scene.ui.layout.Table;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.content.StatusEffects;
|
||||
import io.anuke.mindustry.content.UnitTypes;
|
||||
import io.anuke.mindustry.game.DefaultWaves;
|
||||
import io.anuke.mindustry.game.SpawnGroup;
|
||||
import io.anuke.mindustry.content.*;
|
||||
import io.anuke.mindustry.game.*;
|
||||
import io.anuke.mindustry.graphics.Pal;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.UnitType;
|
||||
import io.anuke.mindustry.io.JsonIO;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.ui.dialogs.FloatingDialog;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
import static io.anuke.mindustry.game.SpawnGroup.never;
|
||||
|
||||
public class WaveInfoDialog extends FloatingDialog{
|
||||
private final MapEditor editor;
|
||||
private final static int displayed = 20;
|
||||
private Array<SpawnGroup> groups;
|
||||
|
||||
@ -33,15 +30,10 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
|
||||
public WaveInfoDialog(MapEditor editor){
|
||||
super("$waves.title");
|
||||
this.editor = editor;
|
||||
|
||||
shown(this::setup);
|
||||
hidden(() -> {
|
||||
if(groups == null){
|
||||
editor.getTags().remove("waves");
|
||||
}else{
|
||||
editor.getTags().put("waves", world.maps.writeWaves(groups));
|
||||
}
|
||||
state.rules.spawns = groups;
|
||||
});
|
||||
|
||||
keyDown(key -> {
|
||||
@ -73,7 +65,7 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
}).disabled(b -> Core.app.getClipboard().getContents() == null || Core.app.getClipboard().getContents().isEmpty());
|
||||
dialog.cont.row();
|
||||
dialog.cont.addButton("$settings.reset", () -> ui.showConfirm("$confirm", "$settings.clear.confirm", () -> {
|
||||
groups = null;
|
||||
groups = JsonIO.copy(DefaultWaves.get());
|
||||
buildGroups();
|
||||
dialog.hide();
|
||||
}));
|
||||
@ -82,10 +74,9 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
}
|
||||
|
||||
void setup(){
|
||||
groups = world.maps.readWaves(editor.getTags().get("waves"));
|
||||
groups = JsonIO.copy(state.rules.spawns);
|
||||
|
||||
cont.clear();
|
||||
|
||||
cont.table("clear", main -> {
|
||||
main.pane(t -> table = t).growX().growY().get().setScrollingDisabled(true, false);
|
||||
main.row();
|
||||
@ -237,8 +228,6 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
preview.clear();
|
||||
preview.top();
|
||||
|
||||
Array<SpawnGroup> groups = (this.groups == null ? DefaultWaves.get() : this.groups);
|
||||
|
||||
for(int i = start; i < displayed + start; i++){
|
||||
int wave = i;
|
||||
preview.table("underline", table -> {
|
||||
@ -251,8 +240,6 @@ public class WaveInfoDialog extends FloatingDialog{
|
||||
spawned[spawn.type.id] += spawn.getUnitsSpawned(wave);
|
||||
}
|
||||
|
||||
int f = 0;
|
||||
|
||||
for(int j = 0; j < spawned.length; j++){
|
||||
if(spawned[j] > 0){
|
||||
UnitType type = content.getByID(ContentType.unit, j);
|
||||
|
@ -435,7 +435,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
TargetTrait target = player.target;
|
||||
|
||||
//draw targeting crosshair
|
||||
if(target != null){
|
||||
if(target != null && !state.isEditor()){
|
||||
if(target != lastTarget){
|
||||
crosshairScale = 0f;
|
||||
lastTarget = target;
|
||||
|
@ -1,43 +0,0 @@
|
||||
package io.anuke.mindustry.io;
|
||||
|
||||
import io.anuke.arc.collection.Array;
|
||||
import io.anuke.arc.function.Consumer;
|
||||
import io.anuke.arc.util.serialization.JsonReader;
|
||||
import io.anuke.arc.util.serialization.JsonValue;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
|
||||
import static io.anuke.mindustry.Vars.contributorsURL;
|
||||
|
||||
public class Contributors{
|
||||
|
||||
public static void getContributors(Consumer<Array<Contributor>> success, Consumer<Throwable> fail){
|
||||
Net.http(contributorsURL, "GET", result -> {
|
||||
JsonReader reader = new JsonReader();
|
||||
JsonValue value = reader.parse(result).child;
|
||||
Array<Contributor> out = new Array<>();
|
||||
|
||||
while(value != null){
|
||||
String login = value.getString("login");
|
||||
out.add(new Contributor(login));
|
||||
value = value.next;
|
||||
}
|
||||
|
||||
success.accept(out);
|
||||
}, fail);
|
||||
}
|
||||
|
||||
public static class Contributor{
|
||||
public final String login;
|
||||
|
||||
public Contributor(String login){
|
||||
this.login = login;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "Contributor{" +
|
||||
"login='" + login + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
@ -7,6 +7,7 @@ import io.anuke.mindustry.game.Rules;
|
||||
import io.anuke.mindustry.game.SpawnGroup;
|
||||
import io.anuke.mindustry.type.*;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class JsonIO{
|
||||
private static Json json = new Json(){{
|
||||
setIgnoreUnknownFields(true);
|
||||
@ -42,6 +43,10 @@ public class JsonIO{
|
||||
return json.toJson(object);
|
||||
}
|
||||
|
||||
public static <T> T copy(T object){
|
||||
return read((Class<T>)object.getClass(), write(object));
|
||||
}
|
||||
|
||||
public static <T> T read(Class<T> type, String string){
|
||||
return json.fromJson(type, string);
|
||||
}
|
||||
|
@ -1,35 +1,28 @@
|
||||
package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import io.anuke.arc.Core;
|
||||
import io.anuke.arc.collection.Array;
|
||||
import io.anuke.arc.collection.ObjectSet;
|
||||
import io.anuke.arc.collection.*;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.arc.scene.ui.ScrollPane;
|
||||
import io.anuke.arc.scene.ui.layout.Cell;
|
||||
import io.anuke.arc.scene.ui.layout.Table;
|
||||
import io.anuke.arc.scene.ui.layout.*;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.graphics.Pal;
|
||||
import io.anuke.mindustry.io.Contributors;
|
||||
import io.anuke.mindustry.io.Contributors.Contributor;
|
||||
import io.anuke.mindustry.ui.Links;
|
||||
import io.anuke.mindustry.ui.Links.LinkEntry;
|
||||
|
||||
import static io.anuke.mindustry.Vars.ios;
|
||||
import static io.anuke.mindustry.Vars.ui;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class AboutDialog extends FloatingDialog{
|
||||
private Array<Contributor> contributors = new Array<>();
|
||||
private Array<String> contributors = new Array<>();
|
||||
private static ObjectSet<String> bannedItems = ObjectSet.with("google-play", "itch.io", "dev-builds", "trello");
|
||||
|
||||
public AboutDialog(){
|
||||
super("$about.button");
|
||||
|
||||
if(!ios){
|
||||
shown(() -> Contributors.getContributors(out -> {
|
||||
contributors = out;
|
||||
Core.app.post(this::setup);
|
||||
}, Throwable::printStackTrace));
|
||||
}
|
||||
shown(() -> {
|
||||
contributors = Array.with(Core.files.internal("contributors").readString().split("\n"));
|
||||
Core.app.post(this::setup);
|
||||
});
|
||||
|
||||
shown(this::setup);
|
||||
onResize(this::setup);
|
||||
@ -112,8 +105,8 @@ public class AboutDialog extends FloatingDialog{
|
||||
dialog.cont.pane(new Table(){{
|
||||
int i = 0;
|
||||
left();
|
||||
for(Contributor c : contributors){
|
||||
add("[lightgray]" + c.login).left().pad(3).padLeft(6).padRight(6);
|
||||
for(String c : contributors){
|
||||
add("[lightgray]" + c).left().pad(3).padLeft(6).padRight(6);
|
||||
if(++i % 3 == 0){
|
||||
row();
|
||||
}
|
||||
|
@ -5,8 +5,7 @@ import io.anuke.arc.math.Mathf;
|
||||
import io.anuke.arc.math.geom.Geometry;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
|
||||
import static io.anuke.mindustry.Vars.tilesize;
|
||||
import static io.anuke.mindustry.Vars.world;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class ExtendingItemBridge extends ItemBridge{
|
||||
|
||||
@ -27,8 +26,10 @@ public class ExtendingItemBridge extends ItemBridge{
|
||||
float ex = other.worldx() - tile.worldx() - Geometry.d4[i].x * tilesize / 2f,
|
||||
ey = other.worldy() - tile.worldy() - Geometry.d4[i].y * tilesize / 2f;
|
||||
|
||||
ex *= entity.uptime;
|
||||
ey *= entity.uptime;
|
||||
float uptime = state.isEditor() ? 1f : entity.uptime;
|
||||
|
||||
ex *= uptime;
|
||||
ey *= uptime;
|
||||
|
||||
Lines.stroke(8f);
|
||||
Lines.line(bridgeRegion,
|
||||
@ -49,10 +50,10 @@ public class ExtendingItemBridge extends ItemBridge{
|
||||
Draw.color();
|
||||
|
||||
for(int a = 0; a < arrows; a++){
|
||||
Draw.alpha(Mathf.absin(a / (float)arrows - entity.time / 100f, 0.1f, 1f) * entity.uptime);
|
||||
Draw.alpha(Mathf.absin(a / (float)arrows - entity.time / 100f, 0.1f, 1f) * uptime);
|
||||
Draw.rect(arrowRegion,
|
||||
tile.worldx() + Geometry.d4[i].x * (tilesize / 2f + a * 6f + 2) * entity.uptime,
|
||||
tile.worldy() + Geometry.d4[i].y * (tilesize / 2f + a * 6f + 2) * entity.uptime, i * 90f);
|
||||
tile.worldx() + Geometry.d4[i].x * (tilesize / 2f + a * 6f + 2) * uptime,
|
||||
tile.worldy() + Geometry.d4[i].y * (tilesize / 2f + a * 6f + 2) * uptime, i * 90f);
|
||||
}
|
||||
Draw.reset();
|
||||
}
|
||||
|
Reference in New Issue
Block a user