public StarSystem(StarSystemId id, int x, int y, Size size, TechLevel techLevel, PoliticalSystemType politicalSystemType, SystemPressure systemPressure, SpecialResource specialResource) { _id = id; _x = x; _y = y; _size = size; _techLevel = techLevel; _politicalSystemType = politicalSystemType; _systemPressure = systemPressure; _specialResource = specialResource; InitializeTradeItems(); }
public StarSystem(Hashtable hash) : base(hash) { _id = (StarSystemId)GetValueFromHash(hash, "_id", _id); _x = (int)GetValueFromHash(hash, "_x", _x); _y = (int)GetValueFromHash(hash, "_y", _y); _size = (Size)GetValueFromHash(hash, "_size", _size); _techLevel = (TechLevel)GetValueFromHash(hash, "_techLevel", _techLevel); _politicalSystemType = (PoliticalSystemType)GetValueFromHash(hash, "_politicalSystemType", _politicalSystemType); _systemPressure = (SystemPressure)GetValueFromHash(hash, "_systemPressure", _systemPressure); _specialResource = (SpecialResource)GetValueFromHash(hash, "_specialResource", _specialResource); _specialEventType = (SpecialEventType)GetValueFromHash(hash, "_specialEventType", _specialEventType); _tradeItems = (int[])GetValueFromHash(hash, "_tradeItems", _tradeItems); _countDown = (int)GetValueFromHash(hash, "_countDown", _countDown); _visited = (bool)GetValueFromHash(hash, "_visited", _visited); _shipyardId = (ShipyardId)GetValueFromHash(hash, "_shipyardId", _shipyardId); }
private int _roundOff; // Roundoff price for trade in orbit #endregion #region Methods public TradeItem(TradeItemType type, TechLevel techProduction, TechLevel techUsage, TechLevel techTopProduction, int piceLowTech, int priceInc, int priceVariance, SystemPressure pressurePriceHike, SpecialResource resourceLowPrice, SpecialResource resourceHighPrice, int minTradePrice, int maxTradePrice, int roundOff) { _type = type; _techProduction = techProduction; _techUsage = techUsage; _techTopProduction = techTopProduction; _piceLowTech = piceLowTech; _priceInc = priceInc; _priceVariance = priceVariance; _pressurePriceHike = pressurePriceHike; _resourceLowPrice = resourceLowPrice; _resourceHighPrice = resourceHighPrice; _minTradePrice = minTradePrice; _maxTradePrice = maxTradePrice; _roundOff = roundOff; }