Bug report link, proper minimap colors
This commit is contained in:
@@ -71,6 +71,7 @@ mods.alpha = [accent](Alpha)
|
|||||||
mods = Mods
|
mods = Mods
|
||||||
mods.none = [LIGHT_GRAY]No mods found!
|
mods.none = [LIGHT_GRAY]No mods found!
|
||||||
mods.guide = Modding Guide
|
mods.guide = Modding Guide
|
||||||
|
mods.report = Report Bug
|
||||||
mod.enabled = [lightgray]Enabled
|
mod.enabled = [lightgray]Enabled
|
||||||
mod.disabled = [scarlet]Disabled
|
mod.disabled = [scarlet]Disabled
|
||||||
mod.disable = Disable
|
mod.disable = Disable
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ public class Vars implements Loadable{
|
|||||||
public static final String crashReportURL = "http://mins.us.to/report";
|
public static final String crashReportURL = "http://mins.us.to/report";
|
||||||
/** URL the links to the wiki's modding guide.*/
|
/** URL the links to the wiki's modding guide.*/
|
||||||
public static final String modGuideURL = "https://mindustrygame.github.io/wiki/modding/";
|
public static final String modGuideURL = "https://mindustrygame.github.io/wiki/modding/";
|
||||||
|
/** URL the links to the wiki's modding guide.*/
|
||||||
|
public static final String reportIssueURL = "https://github.com/Anuken/Mindustry/issues/new?template=bug_report.md";
|
||||||
/** list of built-in servers.*/
|
/** list of built-in servers.*/
|
||||||
public static final Array<String> defaultServers = Array.with(/*"mins.us.to"*/);
|
public static final Array<String> defaultServers = Array.with(/*"mins.us.to"*/);
|
||||||
/** maximum distance between mine and core that supports automatic transferring */
|
/** maximum distance between mine and core that supports automatic transferring */
|
||||||
|
|||||||
@@ -19,9 +19,14 @@ public class ModsDialog extends FloatingDialog{
|
|||||||
public ModsDialog(){
|
public ModsDialog(){
|
||||||
super("$mods");
|
super("$mods");
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
|
buttons.addImageTextButton("$mods.report", Icon.link,
|
||||||
|
() -> Core.net.openURI(reportIssueURL))
|
||||||
|
.size(250f, 64f);
|
||||||
|
|
||||||
buttons.addImageTextButton("$mods.guide", Icon.wiki,
|
buttons.addImageTextButton("$mods.guide", Icon.wiki,
|
||||||
() -> Core.net.openURI(modGuideURL))
|
() -> Core.net.openURI(modGuideURL))
|
||||||
.size(290f, 64f);
|
.size(280f, 64f);
|
||||||
|
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
|
|
||||||
|
|||||||
@@ -672,6 +672,28 @@ public class Block extends BlockStorage{
|
|||||||
super.createIcons(out, editor);
|
super.createIcons(out, editor);
|
||||||
|
|
||||||
editor.pack(name + "-icon-editor", Core.atlas.getPixmap((AtlasRegion)icon(Cicon.full)).crop());
|
editor.pack(name + "-icon-editor", Core.atlas.getPixmap((AtlasRegion)icon(Cicon.full)).crop());
|
||||||
|
|
||||||
|
if(!synthetic()){
|
||||||
|
PixmapRegion image = Core.atlas.getPixmap((AtlasRegion)icon(Cicon.full));
|
||||||
|
|
||||||
|
Color average = this.color;
|
||||||
|
Color color = new Color();
|
||||||
|
for(int x = 0; x < image.width; x++){
|
||||||
|
for(int y = 0; y < image.height; y++){
|
||||||
|
image.getPixel(x, y, color);
|
||||||
|
average.r += color.r;
|
||||||
|
average.g += color.g;
|
||||||
|
average.b += color.b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
average.mul(1f / (image.width * image.height));
|
||||||
|
if(isFloor()){
|
||||||
|
average.mul(0.8f);
|
||||||
|
}else{
|
||||||
|
average.mul(1.1f);
|
||||||
|
}
|
||||||
|
average.a = 1f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Never use outside of the editor! */
|
/** Never use outside of the editor! */
|
||||||
|
|||||||
Reference in New Issue
Block a user