Package civquest.map.resource

Examples of civquest.map.resource.ResourceDistribution


  }

  public void execute() {
    notifyBefore();

    ResourceDistribution distribution
      = distributing.getResourceDistribution();

    if (amount == null) {
      distribution.removeSource(sourceID);
    } else {
      distribution.setSource(sourceID, amount);
    }

    notifyAfter();
  }
View Full Code Here


   */
  public static SetDistributionConsumer constructAddSetDistributionConsumer
    (ResourceConsumer consumer, String resourceName,
     PhysicalAmount amount, ResourceDistributing distributing) {

    ResourceDistribution distribution
      = distributing.getResourceDistribution();   
   
    ResourceSet resourceSet
      = distribution.getResourcesForConsumer(consumer);
    resourceSet.addToThis(resourceName, amount);
    return new SetDistributionConsumer(consumer, resourceSet,
                       distributing);
  }
View Full Code Here

  }

  public void execute() {
    notifyBefore();

    ResourceDistribution distribution
      = distributing.getResourceDistribution();

    if (amount == null) {
      distribution.removeAmountForConsumer(consumer);
    } else {
      distribution.setAmountForConsumer(consumer, amount);
    }
   
    notifyAfter();
  }
View Full Code Here

TOP

Related Classes of civquest.map.resource.ResourceDistribution

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.