Package civquest.parser.ruleset

Examples of civquest.parser.ruleset.Ruleset


       
        JScrollPane fieldScrollPane = new JScrollPane();
        fieldScrollPane.setViewportView(infoPanel);
        newData(gameData);

        Ruleset scenarioRuleset = paneRegistry.getRuleset(
                "scenarioEditorInfoPaneManager");
        RulesetGameChangeLoader.addListener(
                scenarioRuleset.getSection("listensAll"), this,
                GameChangeManager.Listening.ALL_NATIONS);
//        RulesetGameChangeLoader.addListener(
//                scenarioRuleset.getSection("listensCurrent"), this);
        this.setUpFunctions(paneRegistry);
    }
View Full Code Here


    Messages messages = Messages.getMessages();
    messages.info("MapData-Config", "ResourceConf", "==============================");
    messages.info("MapData-Config", "ResourceConf", "Loading resource definitions");   

    Ruleset defRuleset = resourceRegistry.getRuleset("definition");
    Iterator<Section> sectionIterator = defRuleset.getSectionIterator();
    while (sectionIterator.hasNext()) {
      Section currSection = sectionIterator.next();

      String name = currSection.getField("Name").getStringValue();
View Full Code Here

                    + chooser.getSelectedFile());

      try {

        Registry ioRegistry = civQuest.getTopRegistry().getSubRegistry("io");
        Ruleset xmlSaveRuleset = ioRegistry.getRuleset("xmlSaveGame");

        File file = chooser.getSelectedFile();
        DataToSave data = constructDataToSave();
        XMLSaveGameWriter writer = new DefaultXMLSaveGameWriter(xmlSaveRuleset);
        writer.write(file, data);
View Full Code Here

      = new BlackWhiteGameChangeListener(visRegistry, this);
    this.nation = nation;
  }

  private void loadSettings(Registry registry) throws RulesetException {
    Ruleset settingRuleset = registry.getRuleset("settings");
    Section section = settingRuleset.getSection("settings");
    unitVisibilityDistance = section.getField("unitVisibilityDistance").getIntValue();
    cityVisibilityDistance = section.getField("cityVisibilityDistance").getIntValue();
   
    String fallBackTo = section.getField("fallBackTo").getStringValue();
    if (fallBackTo.equals("Terrain")) {
View Full Code Here

        configure(flatRegistry);
    }

    private void configure(Registry flatRegistry) throws RulesetException {
    Messages messages = Messages.getMessages();
        Ruleset settingsRuleset = flatRegistry.getRuleset("flatSettings");
        Section fieldViewSection = settingsRuleset.getSection("fieldViews");
        String whichFieldView = fieldViewSection.getField("whichFieldView").getStringValue();
        if (whichFieldView.equals("QuadFlatLayeredFieldView")) {
            constructLayeredFV();
        } else {
            messages.info("QuadMap.FlatProp", "QMapFV", "FallBack",
View Full Code Here

    }
  }

  private void loadConfiguration(Registry registry) throws RulesetException {
    Registry mapRegistry = registry.getSubRegistry("map");
    Ruleset flatRuleset = mapRegistry.getRuleset("flat");
    Section distSection = flatRuleset.getSection("distances");
    diagonalDistance = distSection.getField("diagonal").getIntValue();
    straightDistance = distSection.getField("straight").getIntValue();
 
View Full Code Here

  }

  // visibility

  private String getWhichVisManager() throws RulesetException {
    Ruleset settingsRuleset = nationRegistry.getRuleset("settings");
    Section visSection = settingsRuleset.getSection("visibility");
    return visSection.getField("whichManager").getStringValue();
  }
View Full Code Here

      try {
        GUIBuilder.killGUI(civQuest);

        Registry ioRegistry = civQuest.getTopRegistry().getSubRegistry("io");
        Ruleset xmlSaveRuleset = ioRegistry.getRuleset("xmlSaveGame");

        File file = chooser.getSelectedFile();

        XMLSaveGameReader reader = new SaxSaveGameReader(xmlSaveRuleset);
        LoadedData data = reader.read(file);
View Full Code Here

    JSplitPane splitPane
      = new JSplitPane(JSplitPane.VERTICAL_SPLIT, fieldScrollPane, unitScrollPane);
    component.add(splitPane);
    component.setLayout(new BoxLayout(component, BoxLayout.Y_AXIS));   

    Ruleset equiRuleset = paneRegistry.getRuleset("equiInfoPaneManager");
    RulesetGameChangeLoader.addListener(equiRuleset.getSection("listensAll"),
                      this, GameChangeManager.Listening.ALL_NATIONS);
    RulesetGameChangeLoader.addListener(equiRuleset.getSection("listensCurrent"), this);

        this.wfInfoPanel = new JPanel();
        this.wfInfoPanel.setLayout(new BoxLayout(this.wfInfoPanel,
                BoxLayout.Y_AXIS));
        this.wfInfoPanel.add(this.dummyWfPanel);
View Full Code Here

                 BlackWhiteVisibilityManager manager)
    throws RulesetException {

    this.manager = manager;

    Ruleset listenerRuleset = visRegistry.getRuleset("listens");
    Section section = listenerRuleset.getSection("listens");
   
    try {
      RulesetGameChangeLoader.addListener(section, this,
                        GameChangeManager.Listening.ALL_NATIONS);
    } catch (GameChangeException e) {
View Full Code Here

TOP

Related Classes of civquest.parser.ruleset.Ruleset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.