mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-02 20:33:50 +07:00
Bugfixes / Auto-strip color codes from meta
This commit is contained in:
parent
acfd18ab7b
commit
caf5d37d98
@ -79,8 +79,6 @@ public class SectorInfo{
|
||||
|
||||
//update sector's internal time spent counter1
|
||||
state.rules.sector.setTimeSpent(internalTimeSpent);
|
||||
|
||||
Log.info(production);
|
||||
}
|
||||
|
||||
/** Update averages of various stats, updates some special sector logic.
|
||||
|
@ -598,6 +598,7 @@ public class Mods implements Loadable{
|
||||
}
|
||||
|
||||
ModMeta meta = json.fromJson(ModMeta.class, Jval.read(metaf.readString()).toString(Jformat.plain));
|
||||
meta.cleanup();
|
||||
String camelized = meta.name.replace(" ", "");
|
||||
String mainClass = meta.main == null ? camelized.toLowerCase() + "." + camelized + "Mod" : meta.main;
|
||||
String baseName = meta.name.toLowerCase().replace(" ", "-");
|
||||
@ -783,6 +784,13 @@ public class Mods implements Loadable{
|
||||
public String displayName(){
|
||||
return displayName == null ? name : displayName;
|
||||
}
|
||||
|
||||
//removes all colors
|
||||
public void cleanup(){
|
||||
if(displayName != null) displayName = Strings.stripColors(displayName);
|
||||
if(author != null) author = Strings.stripColors(author);
|
||||
if(description != null) description = Strings.stripColors(description);
|
||||
}
|
||||
}
|
||||
|
||||
public enum ModState{
|
||||
|
Loading…
Reference in New Issue
Block a user