Separate surface and underground library marker options
This commit is contained in:
@@ -277,6 +277,8 @@ public final class Settings {
|
||||
public boolean autoShrineMarkers = true;
|
||||
/** <b>[Server-only]</b> Whether global markers for library ruins are added to antique atlases. */
|
||||
public boolean autoLibraryMarkers = true;
|
||||
/** <b>[Server-only]</b> Whether global markers for underground library ruins are added to antique atlases. */
|
||||
public boolean autoUndergroundLibraryMarkers = false;
|
||||
|
||||
// Synchronised settings. These settings affect both client-side AND server-side code. Changing these locally
|
||||
// only has an effect if the local game is the host, i.e. a dedicated server, a LAN host or a singleplayer world.
|
||||
@@ -1286,6 +1288,14 @@ public final class Settings {
|
||||
autoLibraryMarkers = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(COMPATIBILITY_CATEGORY, "autoPlaceUndergroundLibraryMarkers", false,
|
||||
"Controls whether wizardry automatically places antique atlas markers at the locations of underground library ruins.");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".auto_place_underground_library_markers");
|
||||
property.setRequiresMcRestart(true);
|
||||
Wizardry.proxy.setToNamedBooleanEntry(property);
|
||||
autoUndergroundLibraryMarkers = property.getBoolean();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
config.setCategoryPropertyOrder(COMPATIBILITY_CATEGORY, propOrder);
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -68,8 +68,8 @@ public class WizardryAntiqueAtlasIntegration {
|
||||
|
||||
/** Places a global library ruins marker in all antique atlases at the given coordinates in the given world if
|
||||
* {@link electroblob.wizardry.Settings#autoLibraryMarkers} is enabled. Server side only! */
|
||||
public static void markLibrary(World world, int x, int z){
|
||||
if(enabled() && Wizardry.settings.autoLibraryMarkers){ // TODO: More granular settings for above/below ground
|
||||
public static void markLibrary(World world, int x, int z, boolean underground){
|
||||
if(enabled() && (underground ? Wizardry.settings.autoUndergroundLibraryMarkers : Wizardry.settings.autoLibraryMarkers)){
|
||||
AtlasAPI.getMarkerAPI().putGlobalMarker(world, false, LIBRARY_MARKER.toString(), "integration.antiqueatlas.marker." + LIBRARY_MARKER.toString().replace(':', '.'), x, z);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public class WorldGenLibraryRuins extends WorldGenSurfaceStructure {
|
||||
|
||||
template.addBlocksToWorld(world, origin, processor, settings, 2 | 16);
|
||||
|
||||
WizardryAntiqueAtlasIntegration.markLibrary(world, origin.getX(), origin.getZ());
|
||||
WizardryAntiqueAtlasIntegration.markLibrary(world, origin.getX(), origin.getZ(), false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class WorldGenUndergroundLibraryRuins extends WorldGenUndergroundStructur
|
||||
|
||||
template.addBlocksToWorld(world, origin, processor, settings, 2 | 16);
|
||||
|
||||
WizardryAntiqueAtlasIntegration.markLibrary(world, origin.getX(), origin.getZ());
|
||||
WizardryAntiqueAtlasIntegration.markLibrary(world, origin.getX(), origin.getZ(), true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user