Riizade/config file (#520)

* added POJO + yaml file

* made config members public

* switched to yaml

* modified files to use YamlConfig over ServerConstants

* removed constants from ServerConstants

* removed unused imports

* removed unused import

* removed world ini

* removed now unused .ini files

* fixed docker-launch.sh

* added jackson dependency JARs

* fixed errors

* removed unused server config values, added world defaults

* don't use env variables for docker

* fixed package imports/specifiers for js files
This commit is contained in:
Adam James-Liebau Johnson
2019-09-20 16:49:24 -07:00
committed by Ronan Lana
parent e169971384
commit 181573dc74
163 changed files with 1531 additions and 1113 deletions

View File

@@ -24,6 +24,7 @@ package scripting.npc;
import java.io.File;
import java.sql.SQLException;
import config.YamlConfig;
import constants.ServerConstants;
import net.server.Server;
import net.server.guild.MapleAlliance;
@@ -340,7 +341,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
public boolean canSpawnPlayerNpc(int mapid) {
MapleCharacter chr = getPlayer();
return !ServerConstants.PLAYERNPC_AUTODEPLOY && chr.getLevel() >= chr.getMaxClassLevel() && !chr.isGM() && MaplePlayerNPC.canSpawnPlayerNpc(chr.getName(), mapid);
return !YamlConfig.config.server.PLAYERNPC_AUTODEPLOY && chr.getLevel() >= chr.getMaxClassLevel() && !chr.isGM() && MaplePlayerNPC.canSpawnPlayerNpc(chr.getName(), mapid);
}
public MaplePlayerNPC getPlayerNPCByScriptid(int scriptId) {
@@ -592,7 +593,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
}
public boolean isUsingOldPqNpcStyle() {
return ServerConstants.USE_OLD_GMS_STYLED_PQ_NPCS && this.getPlayer().getParty() != null;
return YamlConfig.config.server.USE_OLD_GMS_STYLED_PQ_NPCS && this.getPlayer().getParty() != null;
}
public Object[] getAvailableMasteryBooks() {