mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
update to 129v
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
"description": "The mod displays more information for unit, such as health, armor, shield, weapon/weapon reload etc",
|
"description": "The mod displays more information for unit, such as health, armor, shield, weapon/weapon reload etc",
|
||||||
"version": "1.2",
|
"version": "1.2",
|
||||||
"main": "UnitInfo.core.Main",
|
"main": "UnitInfo.core.Main",
|
||||||
"minGameVersion": "128",
|
"minGameVersion": "129",
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"java": true
|
"java": true
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ pArtifactFilename = UnitInfo.jar
|
|||||||
# Group of project (should line up with dirs in src/)
|
# Group of project (should line up with dirs in src/)
|
||||||
pGroup = sharlotte
|
pGroup = sharlotte
|
||||||
# Version of Mindustry to use (if not working, consult jitpack.io)
|
# Version of Mindustry to use (if not working, consult jitpack.io)
|
||||||
pMindustryVersion = v128
|
pMindustryVersion = v129.1
|
||||||
# Minimum API level for d8 (if you don't know what this is, leave it unless d8 yells at you)
|
# Minimum API level for d8 (if you don't know what this is, leave it unless d8 yells at you)
|
||||||
pMinApi = 26
|
pMinApi = 26
|
||||||
@@ -222,7 +222,7 @@ public class BarInfo {
|
|||||||
|
|
||||||
if(target instanceof Unit unit && state.rules.unitAmmo && unit.type != null){
|
if(target instanceof Unit unit && state.rules.unitAmmo && unit.type != null){
|
||||||
strings.set(5, Core.bundle.format("shar-stat.ammos", format(unit.ammo()), format(unit.type().ammoCapacity)));
|
strings.set(5, Core.bundle.format("shar-stat.ammos", format(unit.ammo()), format(unit.type().ammoCapacity)));
|
||||||
colors.set(5, unit.type().ammoType.color);
|
colors.set(5, unit.type().ammoType.color());
|
||||||
numbers.set(5, unit.ammof());
|
numbers.set(5, unit.ammof());
|
||||||
}
|
}
|
||||||
else if(target instanceof Building build && build.block.hasPower && build.block.consumes.hasPower()){
|
else if(target instanceof Building build && build.block.hasPower && build.block.consumes.hasPower()){
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import mindustry.graphics.*;
|
|||||||
import mindustry.input.*;
|
import mindustry.input.*;
|
||||||
import mindustry.logic.*;
|
import mindustry.logic.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
import mindustry.type.ammo.ItemAmmoType;
|
||||||
|
import mindustry.type.ammo.PowerAmmoType;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.*;
|
import mindustry.world.blocks.*;
|
||||||
@@ -379,9 +381,8 @@ public class HudUi {
|
|||||||
|
|
||||||
if(Vars.state.rules.unitAmmo && getTarget() instanceof Unit u && u.type != null){
|
if(Vars.state.rules.unitAmmo && getTarget() instanceof Unit u && u.type != null){
|
||||||
UnitType type = u.type;
|
UnitType type = u.type;
|
||||||
if(type.ammoType == AmmoTypes.copper) region = Items.copper.uiIcon;
|
if(type.ammoType instanceof ItemAmmoType ammo) region = ammo.item.uiIcon;
|
||||||
else if(type.ammoType == AmmoTypes.thorium) region = Items.thorium.uiIcon;
|
else if(type.ammoType instanceof PowerAmmoType) region = Icon.powerSmall.getRegion();
|
||||||
else if(type.ammoType == AmmoTypes.power || type.ammoType == AmmoTypes.powerLow || type.ammoType == AmmoTypes.powerHigh) region = Icon.powerSmall.getRegion();
|
|
||||||
}
|
}
|
||||||
setDrawable(region);
|
setDrawable(region);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -26,12 +26,13 @@ public class Setting {
|
|||||||
public void addGraphicCheckSetting(String key, boolean def){
|
public void addGraphicCheckSetting(String key, boolean def){
|
||||||
ui.settings.graphics.checkPref(key, def);
|
ui.settings.graphics.checkPref(key, def);
|
||||||
}
|
}
|
||||||
|
public void addGraphicSlideSetting(String key, int def, int min, int max, int step, SettingsMenuDialog.StringProcessor s){
|
||||||
|
ui.settings.graphics.sliderPref(key, def, min, max, step, s);
|
||||||
|
}
|
||||||
|
/*
|
||||||
public void addGraphicSlideSetting(String key, int def, int min, int max, int step, SettingsMenuDialog.StringProcessor s, Seq<SettingsMenuDialog.SettingsTable.Setting> list){
|
public void addGraphicSlideSetting(String key, int def, int min, int max, int step, SettingsMenuDialog.StringProcessor s, Seq<SettingsMenuDialog.SettingsTable.Setting> list){
|
||||||
list.add(new SettingsMenuDialog.SettingsTable.Setting() {
|
list.add(new SettingsMenuDialog.SettingsTable.Setting(key) {
|
||||||
{
|
{
|
||||||
name = key;
|
|
||||||
title = bundle.get("setting." + key + ".name");
|
|
||||||
|
|
||||||
Core.settings.defaults(name, def);
|
Core.settings.defaults(name, def);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,8 +261,9 @@ public class Setting {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
public void init(){
|
public void init(){
|
||||||
|
/*
|
||||||
Seq<SettingsMenuDialog.SettingsTable.Setting> waveSeq = new Seq<>();
|
Seq<SettingsMenuDialog.SettingsTable.Setting> waveSeq = new Seq<>();
|
||||||
addGraphicCheckSetting("pastwave", false, waveSeq);
|
addGraphicCheckSetting("pastwave", false, waveSeq);
|
||||||
addGraphicCheckSetting("emptywave", true, waveSeq);
|
addGraphicCheckSetting("emptywave", true, waveSeq);
|
||||||
@@ -285,6 +287,22 @@ public class Setting {
|
|||||||
addGraphicSlideSetting("baropacity", 50, 0, 100, 5, s -> s + "%", opacitySeq);
|
addGraphicSlideSetting("baropacity", 50, 0, 100, 5, s -> s + "%", opacitySeq);
|
||||||
addGraphicSlideSetting("uiopacity", 50, 0, 100, 5, s -> s + "%", opacitySeq);
|
addGraphicSlideSetting("uiopacity", 50, 0, 100, 5, s -> s + "%", opacitySeq);
|
||||||
addGraphicDialogSetting("opacitysetting", opacitySeq, opacityTable);
|
addGraphicDialogSetting("opacitysetting", opacitySeq, opacityTable);
|
||||||
|
*/
|
||||||
|
|
||||||
|
addGraphicCheckSetting("pastwave", false);
|
||||||
|
addGraphicCheckSetting("emptywave", true);
|
||||||
|
addGraphicCheckSetting("scan", false);
|
||||||
|
addGraphicSlideSetting("rangemax", 10, 0, 100, 1, s -> s + "tiles");
|
||||||
|
addGraphicCheckSetting("rangeNearby", true);
|
||||||
|
addGraphicCheckSetting("allTeamRange", false);
|
||||||
|
addGraphicCheckSetting("allTargetRange", false);
|
||||||
|
addGraphicCheckSetting("unitRange", false);
|
||||||
|
addGraphicCheckSetting("softRangeDrawing", false);
|
||||||
|
addGraphicSlideSetting("softRangeOpacity", 10, 0, 25, 1, s -> s + "%");
|
||||||
|
addGraphicSlideSetting("rangeRadius", 5, 0, 20, 1, s -> s + "tiles");
|
||||||
|
addGraphicSlideSetting("selectopacity", 50, 0, 100, 5, s -> s + "%");
|
||||||
|
addGraphicSlideSetting("baropacity", 50, 0, 100, 5, s -> s + "%");
|
||||||
|
addGraphicSlideSetting("uiopacity", 50, 0, 100, 5, s -> s + "%");
|
||||||
|
|
||||||
addGraphicCheckSetting("autoShooting", false);
|
addGraphicCheckSetting("autoShooting", false);
|
||||||
addGraphicCheckSetting("infoui", true);
|
addGraphicCheckSetting("infoui", true);
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class FreeBar {
|
|||||||
float moser = topWidth + height;
|
float moser = topWidth + height;
|
||||||
if(unit.ammo <= 0) moser = (width / 2 + height) * (2 * Mathf.clamp(unit.ammof()) - 1);
|
if(unit.ammo <= 0) moser = (width / 2 + height) * (2 * Mathf.clamp(unit.ammof()) - 1);
|
||||||
|
|
||||||
Draw.color((unit.dead() || unit instanceof BlockUnitc ? Pal.ammo : unit.type.ammoType.color).cpy().a((settings.getInt("baropacity") / 100f)));
|
Draw.color((unit.dead() || unit instanceof BlockUnitc ? Pal.ammo : unit.type.ammoType.color()).cpy().a((settings.getInt("baropacity") / 100f)));
|
||||||
Fill.poly(FloatSeq.with(
|
Fill.poly(FloatSeq.with(
|
||||||
x - (width / 2 + height), y,
|
x - (width / 2 + height), y,
|
||||||
x - width / 2, y + height,
|
x - width / 2, y + height,
|
||||||
|
|||||||
Reference in New Issue
Block a user