Formatting Icons (#10359)
* formatIcons
* Smarter end check
I think it's smarter?
* unecessary
* oop
* Update UI.java
* Just don't check for adjacent colons.
The hasUnicodeStr already checks for validity
* Copy from I18NBundle
* Revert "Copy from I18NBundle"
This reverts commit ac660fcd9f.
* If get and format refer to parent, then just set the existing bundle as parent
* Test with Ground Zero objectives
* Update MBundle.java
* That didn't work
* Slip the method into reasonable places like objectives and chat
* Check for Icons as well
* More testing with objective text
* Apply to hints
* Optimized formatIcons
No longer scans through every character
* TIME UPDATE THE BUNDLES YIPPEEEEEEEEEEE
* residual
* Apply to message blocks
* IntelliJ lied
* Suggestions
* Format before sending
This commit is contained in:
@@ -11,6 +11,7 @@ import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.game.MapObjectives.*;
|
||||
import mindustry.gen.*;
|
||||
@@ -661,17 +662,19 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
||||
if(text.startsWith("@")){
|
||||
String key = text.substring(1);
|
||||
|
||||
String out;
|
||||
if(mobile){
|
||||
return state.mapLocales.containsProperty(key + ".mobile") ?
|
||||
state.mapLocales.getProperty(key + ".mobile") :
|
||||
Core.bundle.get(key + ".mobile", Core.bundle.get(key));
|
||||
out = state.mapLocales.containsProperty(key + ".mobile") ?
|
||||
state.mapLocales.getProperty(key + ".mobile") :
|
||||
Core.bundle.get(key + ".mobile", Core.bundle.get(key));
|
||||
}else{
|
||||
return state.mapLocales.containsProperty(key) ?
|
||||
state.mapLocales.getProperty(key) :
|
||||
Core.bundle.get(key);
|
||||
out = state.mapLocales.containsProperty(key) ?
|
||||
state.mapLocales.getProperty(key) :
|
||||
Core.bundle.get(key);
|
||||
}
|
||||
return UI.formatIcons(out);
|
||||
}else{
|
||||
return text;
|
||||
return UI.formatIcons(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user