Bug report link, proper minimap colors
This commit is contained in:
@@ -47,6 +47,8 @@ public class Vars implements Loadable{
|
||||
public static final String crashReportURL = "http://mins.us.to/report";
|
||||
/** URL the links to the wiki's modding guide.*/
|
||||
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.*/
|
||||
public static final Array<String> defaultServers = Array.with(/*"mins.us.to"*/);
|
||||
/** maximum distance between mine and core that supports automatic transferring */
|
||||
|
||||
@@ -19,9 +19,14 @@ public class ModsDialog extends FloatingDialog{
|
||||
public ModsDialog(){
|
||||
super("$mods");
|
||||
addCloseButton();
|
||||
|
||||
buttons.addImageTextButton("$mods.report", Icon.link,
|
||||
() -> Core.net.openURI(reportIssueURL))
|
||||
.size(250f, 64f);
|
||||
|
||||
buttons.addImageTextButton("$mods.guide", Icon.wiki,
|
||||
() -> Core.net.openURI(modGuideURL))
|
||||
.size(290f, 64f);
|
||||
.size(280f, 64f);
|
||||
|
||||
shown(this::setup);
|
||||
|
||||
|
||||
@@ -672,6 +672,28 @@ public class Block extends BlockStorage{
|
||||
super.createIcons(out, editor);
|
||||
|
||||
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! */
|
||||
|
||||
Reference in New Issue
Block a user