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
|
|
@ -79,8 +79,9 @@ public class ActionGameManager : MonoBehaviour
|
|||
public PostProcessVolume DeathPP;
|
||||
public PostProcessVolume HeatstrokePP;
|
||||
public PostProcessVolume SevereHeatstrokePP;
|
||||
|
||||
|
||||
[Header("Scene Links")]
|
||||
public TradeMenu TradeMenu;
|
||||
public Prototype HostileTargetIndicator;
|
||||
public PlaceUIElementWorldspace ViewDot;
|
||||
public PlaceUIElementWorldspace TargetIndicator;
|
||||
|
|
@ -143,6 +144,10 @@ public class ActionGameManager : MonoBehaviour
|
|||
(float2(0, -1), "Rear")
|
||||
};
|
||||
|
||||
public EntitySettings NewEntitySettings
|
||||
{
|
||||
get => MessagePackSerializer.Deserialize<EntitySettings>(MessagePackSerializer.Serialize(Settings.GameplaySettings.DefaultEntitySettings));
|
||||
}
|
||||
|
||||
public void SaveLoadout(EntityPack pack)
|
||||
{
|
||||
|
|
@ -513,26 +518,6 @@ public class ActionGameManager : MonoBehaviour
|
|||
BindToEntity(targetEntity);
|
||||
}
|
||||
}
|
||||
|
||||
// var stationType = Database.GetAll<HullData>().First(x=>x.HullType==HullType.Station);
|
||||
// var stationHull = ItemManager.CreateInstance(stationType) as EquippableItem;
|
||||
// var stationParent = Zone.PlanetInstances.Values.OrderByDescending(p => p.BodyData.Mass.Value).ElementAt(3);
|
||||
// var stationParentOrbit = stationParent.Orbit.Data.ID;
|
||||
// var stationParentPos = Zone.GetOrbitPosition(stationParentOrbit);
|
||||
// var stationPos = stationParentPos + ItemManager.Random.NextFloat2Direction() * stationParent.GravityWellRadius.Value * .1f;
|
||||
// var stationOrbit = Zone.CreateOrbit(stationParentOrbit, stationPos);
|
||||
// var station = new OrbitalEntity(ItemManager, Zone, stationHull, stationOrbit.ID, Settings.DefaultEntitySettings);
|
||||
// Zone.Entities.Add(station);
|
||||
// var dockingBayData = Database.GetAll<DockingBayData>().First();
|
||||
// var dockingBay = ItemManager.CreateInstance(dockingBayData) as EquippableItem;
|
||||
// station.TryEquip(dockingBay);
|
||||
// station.Activate();
|
||||
//
|
||||
// DoDock(station, station.DockingBays.First());
|
||||
|
||||
// ship.ExitWormhole(
|
||||
// SectorRenderer.WormholeInstances.Keys.First().Position,
|
||||
// ItemManager.Random.NextFloat2Direction() * Settings.GameplaySettings.WormholeExitVelocity);
|
||||
}
|
||||
|
||||
public void Dock()
|
||||
|
|
@ -550,6 +535,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
{
|
||||
UnbindEntity();
|
||||
DoDock(entity, bay);
|
||||
TradeMenu.Inventory = entity.CargoBays.First();
|
||||
AkSoundEngine.PostEvent("Dock", gameObject);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ public class GameSettings : ScriptableObject
|
|||
public int AsteroidMeshCount = 5;
|
||||
public float MinimapAsteroidSize = 3;
|
||||
public float PlanetRotationSpeed = 1;
|
||||
public SectorGenerationSettings SectorGenerationSettings;
|
||||
public BodySettingsCollection[] BodySettingsCollections;
|
||||
public PlanetSettings PlanetSettings;
|
||||
public ZoneGenerationSettings ZoneSettings;
|
||||
|
|
@ -32,6 +33,37 @@ public class GameSettings : ScriptableObject
|
|||
public Gradient ArmorGradient;
|
||||
public Gradient DurabilityGradient;
|
||||
[HideInInspector] public Sprite[] ItemIcons;
|
||||
[HideInInspector] public Sprite[] WeaponTypeIcons;
|
||||
[HideInInspector] public Sprite[] WeaponCaliberIcons;
|
||||
[HideInInspector] public Sprite[] WeaponRangeIcons;
|
||||
[HideInInspector] public Sprite[] WeaponFireTypeIcons;
|
||||
[HideInInspector] public Sprite[] WeaponModifierIcons;
|
||||
|
||||
public Sprite GetIcon(WeaponType type) => WeaponTypeIcons[(int) type];
|
||||
public Sprite GetIcon(WeaponRange range) => WeaponRangeIcons[(int) range];
|
||||
public Sprite GetIcon(WeaponCaliber caliber) => WeaponCaliberIcons[(int) caliber];
|
||||
|
||||
public IEnumerable<Sprite> GetIcons(WeaponFireType type)
|
||||
{
|
||||
var count = Enum.GetValues(typeof(WeaponFireType)).Length;
|
||||
var t = (int) type;
|
||||
for (int i = 0; i < count - 1; i++)
|
||||
{
|
||||
if (1 << i == (1 << i & t))
|
||||
yield return WeaponFireTypeIcons[i + 1];
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Sprite> GetIcons(WeaponModifiers type)
|
||||
{
|
||||
var count = Enum.GetValues(typeof(WeaponModifiers)).Length;
|
||||
var t = (int) type;
|
||||
for (int i = 0; i < count - 1; i++)
|
||||
{
|
||||
if (1 << i == (1 << i & t))
|
||||
yield return WeaponModifierIcons[i + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
|||
Loading…
Reference in a new issue