org.mars_sim.msp.core.structure.construction
Class SalvageValues

java.lang.Object
  extended by org.mars_sim.msp.core.structure.construction.SalvageValues
All Implemented Interfaces:
Serializable

public class SalvageValues
extends Object
implements Serializable

Calculates values for salvaging buildings at a settlement.

See Also:
Serialized Form

Method Summary
 void destroy()
          Prepare object for garbage collection.
 double getAllSalvageSitesProfit(int constructionSkill)
          Gets the overall salvage profit of all existing construction sites at a settlement that can be worked on with a given construction skill.
 double getNewBuildingSalvageProfit(Building building, int constructionSkill)
          Gets the profit from salvaging a given existing building.
 double getNewSalvageSiteProfit(int constructionSkill)
          Gets the profit of creating a new salvage construction site at a settlement.
 double getSalvageSiteProfit(ConstructionSite site)
          Gets the salvage profit of an existing construction site at a settlement.
 double getSalvageSiteProfit(ConstructionSite site, int constructionSkill)
          Gets the salvage profit of an existing construction site at a settlement.
 double getSettlementSalvageProfit()
          Gets the overall profit for construction salvage at the settlement.
 double getSettlementSalvageProfit(int constructionSkill)
          Gets the overall profit for construction salvage at the settlement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSettlementSalvageProfit

public double getSettlementSalvageProfit()
Gets the overall profit for construction salvage at the settlement.

Returns:
profit (VP)
Throws:
Exception - if error determining profit.

getSettlementSalvageProfit

public double getSettlementSalvageProfit(int constructionSkill)
Gets the overall profit for construction salvage at the settlement.

Parameters:
constructionSkill - the architect's construction skill.
Returns:
profit (VP)
Throws:
Exception - if error determining profit.

getAllSalvageSitesProfit

public double getAllSalvageSitesProfit(int constructionSkill)
Gets the overall salvage profit of all existing construction sites at a settlement that can be worked on with a given construction skill.

Parameters:
constructionSkill - the architect's construction skill.
Returns:
profit (VP)
Throws:
Exception - if error determining profit.

getSalvageSiteProfit

public double getSalvageSiteProfit(ConstructionSite site)
Gets the salvage profit of an existing construction site at a settlement.

Parameters:
site - the construction site.
Returns:
profit (VP)
Throws:
Exception - if error determining profit.

getSalvageSiteProfit

public double getSalvageSiteProfit(ConstructionSite site,
                                   int constructionSkill)
Gets the salvage profit of an existing construction site at a settlement.

Parameters:
site - the construction site.
constructionSkill - the architect's construction skill.
Returns:
profit (VP)
Throws:
Exception - if error determining profit.

getNewSalvageSiteProfit

public double getNewSalvageSiteProfit(int constructionSkill)
Gets the profit of creating a new salvage construction site at a settlement.

Parameters:
constructionSkill - the architect's construction skill.
Returns:
profit (VP)
Throws:
Exception - if error determining profit.

getNewBuildingSalvageProfit

public double getNewBuildingSalvageProfit(Building building,
                                          int constructionSkill)
Gets the profit from salvaging a given existing building.

Parameters:
building - the building.
constructionSkill - the architect's construction skill.
Returns:
salvage profit (VP).
Throws:
Exception - if error determining salvage profit.

destroy

public void destroy()
Prepare object for garbage collection.



Copyright © 2009-2013. All Rights Reserved.