Package civquest.parser.ruleset

Examples of civquest.parser.ruleset.Ruleset


    gcManager.addAfterListener(this, "SetDisplayNation",
                   GameChangeManager.Listening.ALL_NATIONS,
                   "SetDisplayNation");

   
    Ruleset listenerRuleset = mainRegistry.getRuleset(".listens");
    Section listenerSection
      = listenerRuleset.getSection("civquest_listens");

    try {
      RulesetGameChangeLoader.addListener(listenerSection, this,
                        GameChangeManager.Listening.ALL_NATIONS);
    } catch (GameChangeException e) {
View Full Code Here


  private Destination[] errDests = null;
 
  private Messages(Registry msgRegistry) throws RulesetException {

    // load global settings
    Ruleset settingsRuleset = msgRegistry.getRuleset("settings");
    Section settingsSection = settingsRuleset.getSection("settings");
    selfVerbose = settingsSection.getField("selfVerbose").getBoolValue();

    try {
      infoOn = getInfoOn(settingsSection);

      // load categories
      loadBasicCategories(settingsRuleset.getSection("basic_categories"));
      loadCompositeCategories(settingsRuleset.getSection("composite_categories"));

      if (selfVerbose) {
        dumpProvidingCatMap();
      }
     
View Full Code Here

  public int getHalfCellHeight() {
    return halfCellHeight;
  }

    private void configure(Registry isoRegistry) throws RulesetException {
        Ruleset settingsRuleset = isoRegistry.getRuleset("isoSettings");
        Section fieldViewSection = settingsRuleset.getSection("fieldViews");
        whichFieldView = fieldViewSection.getField("whichFieldView").getStringValue();

       
        unitRuleset = isoRegistry.getRuleset("unitimages");       
    }
View Full Code Here

                       ConfigurationException {

    performCommonSetup(registry);
   
    Registry rulesRegistry = registry.getSubRegistry("rules");
    Ruleset timeRuleset = rulesRegistry.getRuleset("time");
    timeRules = new TimeRules(timeRuleset);
    rules = new Rules(this);

    this.turnManager = new TurnManager();
    this.resourceData = new ResourceData(this);
View Full Code Here

    if (step == LoadingStep.CONSTRUCT) {
       constructMap(step);
       constructPlayers(step);
       constructNations(step);

      Ruleset timeRuleset = registry.getSubRegistry("rules").getRuleset("time");
      LoadedData timeRulesData = loadedData.getSubData("timeRules");
      timeRules = new TimeRules(timeRuleset, timeRulesData, step);

      LoadedData idManagerData = loadedData.getSubData("idManager");
      idManager = new IDManager(idManagerData, step);
View Full Code Here

  private static final Color defaultColor = Color.GRAY;
  private int nextColorToDistribute = 0;

  public Session(Registry guiRegistry) throws RulesetException {
    this.guiRegistry = guiRegistry;
    Ruleset listenerRuleset = guiRegistry.getSubRegistry("main").
      getRuleset(".listens");
    Section listenerSection = listenerRuleset.
      getSection("session_listens");

    try {
      RulesetGameChangeLoader.addListener(listenerSection, this,
                        GameChangeManager.Listening.ALL_NATIONS);
View Full Code Here

          ToggleUnitBlinkOn guiChange = new ToggleUnitBlinkOn(guiState);
          guiChange.execute();
        }
      };

    Ruleset generalRuleset = guiRegistry.getRuleset("general");
    Section settingsRuleset = generalRuleset.getSection("settings");
    int blinkInterval = settingsRuleset.getField("unitBlinkInterval").getIntValue();
    guiState.startUnitBlinkTimer(blinkInterval, blinkListener);
  }
View Full Code Here

   
    this.mapRegistry = registry.getSubRegistry("map");
    this.config = new Configuration(mapRegistry);

    Registry destroyRegistry = mapRegistry.getSubRegistry("destroy");
    Ruleset dudRuleset = destroyRegistry.getRuleset("defaultUnitDestroy");
    this.unitDestroyManager = new DefaultUnitDestroyManager(dudRuleset);
  }
View Full Code Here

    this.gameData = gameData;
    loadBasicAmounts();
  }

  private void loadBasicAmounts() throws ConfigurationException {
    Ruleset basicRuleset = resourceRegistry.getRuleset("basic");
    Iterator<Section> sectionIterator = basicRuleset.getSectionIterator();
    while (sectionIterator.hasNext()) {
      Section section = sectionIterator.next();
      String sectionName = section.getName();
      mapConfig.checkHeightVegSectionName(sectionName);
      Field.Height height = mapConfig.getHeightFromSectionName(sectionName);
View Full Code Here

    String heightString = new Integer(size.y).toString();
    return firstSubSet.getSubImageSet(widthString + "x" + heightString);
  }

  private void constructBasicFieldViews(GameDataAccessor gameData) throws RulesetException {
    Ruleset ruleset = registry.getRuleset("LayeredFieldView");
    Section basicFVSection = ruleset.getSection("BasicFieldViews");
   
    // Casts safe because addFieldView returns its argument
    civquest.parser.ruleset.Field terrainField = basicFVSection.getField("TerrainView");
    terrainView = (TerrainView)addFieldView(constructTerrainView(terrainField, gameData));
    civquest.parser.ruleset.Field cityField = basicFVSection.getField("CityView");
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.