This commit is contained in:
Anuken
2020-02-23 20:14:38 -05:00
18 changed files with 55 additions and 35 deletions

View File

@@ -320,7 +320,7 @@ public class NetServer implements ApplicationListener{
votes += d;
voted.addAll(player.uuid(), admins.getInfo(player.uuid()).lastIP);
Call.sendMessage(Strings.format("[orange]{0}[lightgray] has voted to kick[orange] {1}[].[accent] ({2}/{3})\n[lightgray]Type[orange] /vote <y/n>[] to agree.",
Call.sendMessage(Strings.format("[orange]{0}[lightgray] has voted on kicking[orange] {1}[].[accent] ({2}/{3})\n[lightgray]Type[orange] /vote <y/n>[] to agree.",
player.name(), target.name(), votes, votesRequired()));
}

View File

@@ -24,8 +24,8 @@ public class Units{
* Validates a target.
* @param target The target to validate
* @param team The team of the thing doing tha targeting
* @param x The X position of the thing doign the targeting
* @param y The Y position of the thing doign the targeting
* @param x The X position of the thing doing the targeting
* @param y The Y position of the thing doing the targeting
* @param range The maximum distance from the target X/Y the targeter can be for it to be valid
* @return whether the target is invalid
*/

View File

@@ -82,6 +82,9 @@ public class Rules{
public boolean lighting = false;
/** Ambient light color, used when lighting is enabled. */
public Color ambientLight = new Color(0.01f, 0.01f, 0.04f, 0.99f);
/** Multiplier for solar panel power output.
negative = use ambient light if lighting is enabled. */
public float solarPowerMultiplier = -1f;
/** team of the player by default */
public Team defaultTeam = Team.sharded;
/** team of the enemy in waves/sectors */

View File

@@ -230,7 +230,7 @@ public class Administration{
}
/**
* Returns list of all players with admin status
* Returns list of all players which are banned
*/
public Array<PlayerInfo> getBanned(){
Array<PlayerInfo> result = new Array<>();

View File

@@ -16,7 +16,7 @@ public class Links{
new LinkEntry("changelog", "https://github.com/Anuken/Mindustry/releases", Icon.list, Pal.accent.cpy()),
new LinkEntry("trello", "https://trello.com/b/aE2tcUwF", Icon.trello, Color.valueOf("026aa7")),
new LinkEntry("wiki", "https://mindustrygame.github.io/wiki/", Icon.book, Color.valueOf("0f142f")),
new LinkEntry("feathub", "https://feathub.com/Anuken/Mindustry/", Icon.add, Color.valueOf("ebebeb")),
new LinkEntry("feathub", "https://github.com/Anuken/Mindustry-Suggestions/issues/new/choose/", Icon.add, Color.valueOf("ebebeb")),
new LinkEntry("reddit", "https://www.reddit.com/r/Mindustry/", Icon.redditAlien, Color.valueOf("ee593b")),
new LinkEntry("itch.io", "https://anuke.itch.io/mindustry", Icon.itchio, Color.valueOf("fa5c5c")),
new LinkEntry("google-play", "https://play.google.com/store/apps/details?id=io.anuke.mindustry", Icon.googleplay, Color.valueOf("689f38")),

View File

@@ -172,6 +172,7 @@ public class CustomRulesDialog extends FloatingDialog{
number("$rules.enemycorebuildradius", f -> rules.enemyCoreBuildRadius = f * tilesize, () -> Math.min(rules.enemyCoreBuildRadius / tilesize, 200));
title("$rules.title.experimental");
number("$rules.solarpowermultiplier", f -> rules.solarPowerMultiplier = f, () -> rules.solarPowerMultiplier);
check("$rules.lighting", b -> rules.lighting = b, () -> rules.lighting);
main.addButton(b -> {

View File

@@ -28,6 +28,7 @@ public class PlanetDialog extends FloatingDialog{
private final VertexBatch3D batch = new VertexBatch3D(false, true, 0);
private float lastX, lastY;
private Sector selected;
public PlanetDialog(){
super("", Styles.fullDialog);
@@ -93,6 +94,7 @@ public class PlanetDialog extends FloatingDialog{
planet.mesh.render(cam.combined());
outline.render(cam.combined());
//dftactgrp sqlrpgle
Ptile tile = outline.getTile(cam.getPickRay(Core.input.mouseX(), Core.input.mouseY()));
if(tile != null){
float length = 0.1f;

View File

@@ -17,7 +17,7 @@ public class SolarGenerator extends PowerGenerator{
@Override
public void update(Tile tile){
tile.<GeneratorEntity>ent().productionEfficiency = state.rules.lighting ? 1f - state.rules.ambientLight.a : 1f;
tile.<GeneratorEntity>ent().productionEfficiency = state.rules.solarPowerMultiplier < 0 ? (state.rules.lighting ? 1f - state.rules.ambientLight.a : 1f) : state.rules.solarPowerMultiplier;
}
@Override