public override void Interact(PlayerShip p) { if (miningPlatform == null && FactionManager.CanBuildMiningPlatform(p.FactionNumber)) { Vector3 P3 = new Vector3(Position.X(), 0, Position.Y()); for (int i = 0; i < 40; i++) { LineParticleSystem.AddParticle(P3, P3 + Rand.V3() * 1000, TeamInfo.GetColor(p.GetTeam())); } MiningPlatform m = FactionManager.GetMiningPlatform(p.FactionNumber); ParentLevel.AddObject(m); m.Position.set(Position.get()); setPlatform(m); SoundManager.Play3DSound("PlayerBuildMiningRing", new Vector3(m.Position.X(), Y, m.Position.Y()), 0.25f, 500, 1); if (p.PlacedStartingMineralRock) { FactionManager.AddCells(p.FactionNumber, -FactionManager.GetMiningPlatformCost(p.FactionNumber)); FactionManager.SetBuildingPlatform(p.FactionNumber, m); } else { FactionManager.GetFaction(p.FactionNumber).MiningPlatformCounter = 0; m.HullToughness *= 2; m.SetAsStarting(); p.PlacedStartingMineralRock = true; p.StartingMineralRock = this; } p.LastPlacedPlatform.AddFirst(m); PathFindingManager.AddMineralRock(m); } base.Interact(p); }