mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Fix importing maps with upper case letters on linux. (Thanks Daeslender)
This commit is contained in:
parent
1b4c23cb26
commit
b6debbd8e9
@ -45,7 +45,7 @@ namespace MCGalaxy.Levels.IO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void LoadEnv(Level level) {
|
public static void LoadEnv(Level level) {
|
||||||
string path = "levels/level properties/" + level.MapName.ToLower() + ".env";
|
string path = "levels/level properties/" + level.MapName + ".env";
|
||||||
PropertiesFile.Read(path, ref level, EnvLineProcessor);
|
PropertiesFile.Read(path, ref level, EnvLineProcessor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ namespace MCGalaxy {
|
|||||||
for (int i = 0; i < CustomBlockProps.Length; i++)
|
for (int i = 0; i < CustomBlockProps.Length; i++)
|
||||||
CustomBlockProps[i] = BlockDefinition.GlobalProps[i];
|
CustomBlockProps[i] = BlockDefinition.GlobalProps[i];
|
||||||
|
|
||||||
name = n; MapName = n;
|
name = n; MapName = n.ToLower();
|
||||||
BlockDB = new BlockDB(this);
|
BlockDB = new BlockDB(this);
|
||||||
EdgeLevel = (short)(y / 2);
|
EdgeLevel = (short)(y / 2);
|
||||||
CloudsHeight = (short)(y + 2);
|
CloudsHeight = (short)(y + 2);
|
||||||
@ -232,8 +232,10 @@ namespace MCGalaxy {
|
|||||||
public static Level FindExact(string name) { return LevelInfo.FindExact(name); }
|
public static Level FindExact(string name) { return LevelInfo.FindExact(name); }
|
||||||
|
|
||||||
public static void SaveSettings(Level lvl) {
|
public static void SaveSettings(Level lvl) {
|
||||||
|
if (lvl.IsMuseum) return; // museums do not save properties
|
||||||
|
|
||||||
lock (lvl.savePropsLock)
|
lock (lvl.savePropsLock)
|
||||||
LvlProperties.Save(lvl, LevelInfo.PropertiesPath(lvl.name));
|
LvlProperties.Save(lvl, LevelInfo.PropertiesPath(lvl.MapName));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns true if ListCheck does not already have an check in the position.
|
// Returns true if ListCheck does not already have an check in the position.
|
||||||
@ -243,8 +245,9 @@ namespace MCGalaxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Save(bool Override = false, bool clearPhysics = false) {
|
public void Save(bool Override = false, bool clearPhysics = false) {
|
||||||
if (blocks == null) return;
|
if (blocks == null || IsMuseum) return; // museums do not save properties
|
||||||
string path = LevelInfo.MapPath(name);
|
|
||||||
|
string path = LevelInfo.MapPath(MapName);
|
||||||
if (LevelSave != null) LevelSave(this);
|
if (LevelSave != null) LevelSave(this);
|
||||||
OnLevelSaveEvent.Call(this);
|
OnLevelSaveEvent.Call(this);
|
||||||
if (cancelsave1) { cancelsave1 = false; return; }
|
if (cancelsave1) { cancelsave1 = false; return; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user