public Tech(string name, Cost cost, TechRequirements techRequirements, int ranking, TechCategory category) { this.name = name; this.cost = cost; this.techRequirements = techRequirements; this.ranking = ranking; this.category = category; }
/** * Return True if the player can have this tech, False otherwise */ public bool hasTech(Tech tech) { return(true); // check the PRT TechRequirements req = tech.getTechRequirements(); if (req.getPrtRequired() != race.getPRT()) { return(false); } if (race.getPRT() == req.getPrtDenied()) { return(false); } foreach (LRT lrt in req.getLrtsRequired()) { if (!race.getLrts().Contains(lrt)) { return(false); } } foreach (LRT lrt in req.getLrtsDenied()) { if (race.getLrts().Contains(lrt)) { return(false); } } if (techLevels.lt(req)) { return(false); } return(true); }
public TechHull(string name, Cost cost, TechRequirements techRequirements, int ranking, TechCategory category) : base(name, cost, techRequirements, ranking, category) { }
public bool IsAvailable(Settlement.Settlement settlement) { return((RankRequirement == null || settlement.Rank >= RankRequirement) && (TechRequirements == null || TechRequirements.TrueForAll(tech => settlement.TechManager.Discovered.Contains(tech)))); }
public void setTechRequirements(TechRequirements techRequirements) { this.techRequirements = techRequirements; }
public TechPlanetaryScanner(string name, Cost cost, TechRequirements techRequirements, int ranking, TechCategory category) : base(name, cost, techRequirements, ranking, category) { }