Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2020-02-22 19:32:10 -05:00
14 changed files with 39 additions and 24 deletions

View File

@@ -328,7 +328,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

@@ -26,8 +26,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

@@ -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

@@ -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