Shops & Weapon Icons
Added stations to loadout generator Overhauled Trade menu to sell station inventory contents Placing stations in ZoneGenerator Moved weapons to new item type: WeaponItemData Implemented icon sets for weapon functionality Renamed MegaCorporation to Faction Implemented quality-dependent item pricing Added unoccupied space helper function for entity Moved sector generation settings to settings file
This commit is contained in:
parent
28f08398a1
commit
fd81bf267e
33 changed files with 1640 additions and 1077 deletions
|
|
@ -221,14 +221,22 @@ public static class ZoneGenerator
|
|||
return planetData;
|
||||
}).ToList();
|
||||
|
||||
if (sectorZone.Owner != null)
|
||||
var nearestFaction = sector.Factions.MinBy(f => sector.HomeZones[f].Distance[sectorZone]);
|
||||
var nearestFactionHomeZone = sector.HomeZones[nearestFaction];
|
||||
var factionPresence = nearestFaction.InfluenceDistance - nearestFactionHomeZone.Distance[sectorZone];
|
||||
|
||||
var loadoutGenerator = new LoadoutGenerator(ref random, itemManager, sector, sectorZone, nearestFaction, 1);
|
||||
for (int i = 0; i < factionPresence; i++)
|
||||
{
|
||||
var loadoutGenerator = new LoadoutGenerator(ref random, itemManager, sector, sectorZone, sectorZone.Owner, 1);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
pack.Entities.Add(loadoutGenerator.GenerateShipLoadout());
|
||||
}
|
||||
pack.Entities.Add(loadoutGenerator.GenerateShipLoadout());
|
||||
}
|
||||
|
||||
var replacePlanet = pack.Planets.MinBy(p => p.Mass.Value);
|
||||
pack.Planets.Remove(replacePlanet);
|
||||
var stationOrbit = replacePlanet.Orbit;
|
||||
var station = loadoutGenerator.GenerateStationLoadout();
|
||||
((OrbitalEntityPack) station).Orbit = stationOrbit;
|
||||
pack.Entities.Add(station);
|
||||
|
||||
return pack;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue