mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-12-22 04:37:46 +01:00
New option for waypoints
This commit is contained in:
parent
c4ae7bfed3
commit
d54c314812
@ -26,7 +26,7 @@ public class ConfigManager {
|
||||
public final CommandVerbose commandVerbose = new CommandVerbose();
|
||||
|
||||
public boolean overrideVanillaExp, canCreativeCast, passiveSkillsNeedBinding, cobbleGeneratorXP, saveDefaultClassInfo, splitMainExp, splitProfessionExp, disableQuestBossBar,
|
||||
pvpModeEnabled, pvpModeInvulnerabilityCanDamage, forceClassSelection, enableGlobalSkillTreeGUI, enableSpecificSkillTreeGUI, waypointAutoPathCalculation;
|
||||
pvpModeEnabled, pvpModeInvulnerabilityCanDamage, forceClassSelection, enableGlobalSkillTreeGUI, enableSpecificSkillTreeGUI, waypointAutoPathCalculation, waypointLinkReciprocity;
|
||||
public String partyChatPrefix, noSkillBoundPlaceholder;
|
||||
public ChatColor staminaFull, staminaHalf, staminaEmpty;
|
||||
public long combatLogTimer, lootChestExpireTime, lootChestPlayerCooldown, globalSkillCooldown;
|
||||
@ -152,6 +152,7 @@ public class ConfigManager {
|
||||
forceClassSelection = MMOCore.plugin.getConfig().getBoolean("force-class-selection");
|
||||
waypointWarpTime = MMOCore.plugin.getConfig().getInt("waypoints.default-warp-time");
|
||||
waypointAutoPathCalculation = MMOCore.plugin.getConfig().getBoolean("waypoints.auto_path_calculation");
|
||||
waypointLinkReciprocity = MMOCore.plugin.getConfig().getBoolean("waypoints.link_reciprocity");
|
||||
|
||||
// Combat
|
||||
pvpModeEnabled = config.getBoolean("pvp_mode.enabled");
|
||||
|
@ -48,7 +48,6 @@ public class WaypointManager implements MMOCoreManager {
|
||||
if (clearBefore)
|
||||
waypoints.clear();
|
||||
|
||||
|
||||
FileUtils.loadObjectsFromFolder(MMOCore.plugin, "waypoints", false, (key, config) -> {
|
||||
register(new Waypoint(config));
|
||||
}, "Could not load waypoint '%s' from file '%s': %s");
|
||||
|
@ -47,6 +47,10 @@ public class Waypoint implements Unlockable, PreloadedObject {
|
||||
for (String key : section.getKeys(false))
|
||||
destinations.put(MMOCore.plugin.waypointManager.get(key), section.getDouble(key));
|
||||
}
|
||||
|
||||
// Link reciprocity
|
||||
if (MMOCore.plugin.configManager.waypointLinkReciprocity)
|
||||
destinations.forEach((neighbor, cost) -> neighbor.destinations.put(this, cost));
|
||||
});
|
||||
|
||||
public Waypoint(ConfigurationSection config) {
|
||||
|
@ -274,6 +274,8 @@ waypoints:
|
||||
# takes to use the waypoint and teleport to target location.
|
||||
default-warp-time: 100
|
||||
|
||||
link_reciprocity: false
|
||||
|
||||
# By default, MMOCore runs path calculation to enable players
|
||||
# to take shortcuts and directly teleport across distant waypoints.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user