mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-08-07 15:25:31 +00:00
Fixed issue with apostrophes in the script data and changed script color allocation a little bit.
This commit is contained in:
@@ -107,6 +107,7 @@ public class MythosEditor {
|
|||||||
JAXBElement<Block> root = new JAXBElement<>(qName, Block.class, script.getBlock());
|
JAXBElement<Block> root = new JAXBElement<>(qName, Block.class, script.getBlock());
|
||||||
context.createMarshaller().marshal(root, buffer);
|
context.createMarshaller().marshal(root, buffer);
|
||||||
String xml = buffer.toString();
|
String xml = buffer.toString();
|
||||||
|
xml = xml.replaceAll("'", "'");
|
||||||
xml = xml.replace("?>", "?><xml>");
|
xml = xml.replace("?>", "?><xml>");
|
||||||
xml += "</xml>";
|
xml += "</xml>";
|
||||||
System.out.println("xml: " + xml);
|
System.out.println("xml: " + xml);
|
||||||
|
@@ -41,7 +41,7 @@ public class TileMap extends ArrayList<ArrayList<Tile>> implements Serializable
|
|||||||
loadFromMap(m);
|
loadFromMap(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final double SATURATION = 0.75;
|
public static final double SATURATION = 0.70;
|
||||||
public static final double VALUE = 1.0;
|
public static final double VALUE = 1.0;
|
||||||
public static double HUE = 180;
|
public static double HUE = 180;
|
||||||
private final java.util.Map<Integer, List<Script>> locationScripts = new HashMap<>();
|
private final java.util.Map<Integer, List<Script>> locationScripts = new HashMap<>();
|
||||||
@@ -85,7 +85,7 @@ public class TileMap extends ArrayList<ArrayList<Tile>> implements Serializable
|
|||||||
private void registerLocationScript(int x, int y, Script s) {
|
private void registerLocationScript(int x, int y, Script s) {
|
||||||
if (!scriptColors.containsKey(s)) {
|
if (!scriptColors.containsKey(s)) {
|
||||||
scriptColors.put(s, Color.hsb(HUE, SATURATION, VALUE));
|
scriptColors.put(s, Color.hsb(HUE, SATURATION, VALUE));
|
||||||
HUE = (HUE + 35) % 360;
|
HUE = (HUE + 27) % 360;
|
||||||
}
|
}
|
||||||
int loc = getMortonNumber(x, y);
|
int loc = getMortonNumber(x, y);
|
||||||
List<Script> list = locationScripts.get(loc);
|
List<Script> list = locationScripts.get(loc);
|
||||||
|
Reference in New Issue
Block a user