Heat Performance Curves + Wear & Tear
Added heat variation option for Performance Stats Ability to toggle radiators on/off using H key Item durability loss (Wear) is now heat dependent and incurred only when used Restricted equip/unequip to docked (inactive) entities Fixed race condition causing exceptions in database sync code
This commit is contained in:
parent
1bb058a8dc
commit
4b10923448
44 changed files with 437 additions and 184 deletions
|
|
@ -189,6 +189,12 @@ public class ActionGameManager : MonoBehaviour
|
|||
else Undock();
|
||||
};
|
||||
|
||||
_input.Player.ToggleHeatsinks.performed += context =>
|
||||
{
|
||||
CurrentShip.HeatsinksEnabled = !CurrentShip.HeatsinksEnabled;
|
||||
AkSoundEngine.PostEvent(CurrentShip.HeatsinksEnabled ? "UI_Success" : "UI_Fail", gameObject);
|
||||
};
|
||||
|
||||
_input.Player.TargetReticle.performed += context =>
|
||||
{
|
||||
var underReticle = Zone.Entities.Where(x => x != CurrentShip).MaxBy(x => dot(normalize(x.Position - CurrentShip.Position), CurrentShip.LookDirection));
|
||||
|
|
|
|||
|
|
@ -14,14 +14,14 @@ public class ConstantLaserManager : ConstantWeaponEffectManager
|
|||
p.SourceEntity = source.Entity;
|
||||
var hp = source.Entity.Hardpoints[item.Position.x, item.Position.y];
|
||||
var barrel = source.GetBarrel(hp);
|
||||
p.Range = source.Entity.ItemManager.Evaluate(data.Range, item.EquippableItem, source.Entity);
|
||||
p.Range = source.Entity.ItemManager.Evaluate(data.Range, item);
|
||||
var t = p.transform;
|
||||
t.SetParent(barrel);
|
||||
t.forward = barrel.forward;
|
||||
t.position = barrel.position;
|
||||
p.Damage = source.Entity.ItemManager.Evaluate(data.Damage, item.EquippableItem, source.Entity);
|
||||
p.Penetration = source.Entity.ItemManager.Evaluate(data.Penetration, item.EquippableItem, source.Entity);
|
||||
p.Spread = source.Entity.ItemManager.Evaluate(data.DamageSpread, item.EquippableItem, source.Entity);
|
||||
p.Damage = source.Entity.ItemManager.Evaluate(data.Damage, item);
|
||||
p.Penetration = source.Entity.ItemManager.Evaluate(data.Penetration, item);
|
||||
p.Spread = source.Entity.ItemManager.Evaluate(data.DamageSpread, item);
|
||||
p.DamageType = data.DamageType;
|
||||
_lasers.Add(item, p);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ public class ConstantLightningManager : ConstantWeaponEffectManager
|
|||
var hp = source.Entity.Hardpoints[item.Position.x, item.Position.y];
|
||||
var barrel = source.GetBarrel(hp);
|
||||
p.Barrel = barrel;
|
||||
p.Damage = source.Entity.ItemManager.Evaluate(data.Damage, item.EquippableItem, source.Entity);
|
||||
p.Range = source.Entity.ItemManager.Evaluate(data.Range, item.EquippableItem, source.Entity);
|
||||
p.Penetration = source.Entity.ItemManager.Evaluate(data.Penetration, item.EquippableItem, source.Entity);
|
||||
p.Spread = source.Entity.ItemManager.Evaluate(data.DamageSpread, item.EquippableItem, source.Entity);
|
||||
p.Damage = source.Entity.ItemManager.Evaluate(data.Damage, item);
|
||||
p.Range = source.Entity.ItemManager.Evaluate(data.Range, item);
|
||||
p.Penetration = source.Entity.ItemManager.Evaluate(data.Penetration, item);
|
||||
p.Spread = source.Entity.ItemManager.Evaluate(data.DamageSpread, item);
|
||||
p.DamageType = data.DamageType;
|
||||
_bolts.Add(item, p);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class ConstantParticleWeaponManager : ConstantWeaponEffectManager
|
|||
t.SetParent(barrel);
|
||||
t.forward = barrel.forward;
|
||||
t.position = barrel.position;
|
||||
p.Damage = source.Entity.ItemManager.Evaluate(data.Damage, item.EquippableItem, source.Entity);
|
||||
p.Damage = source.Entity.ItemManager.Evaluate(data.Damage, item);
|
||||
p.DamageType = data.DamageType;
|
||||
_weapons.Add(item, p);
|
||||
p.Initialize();
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ public class GuidedProjectileManager : InstantWeaponEffectManager
|
|||
p.LiftCurve = launcher.LiftCurve.ToCurve();
|
||||
p.ThrustCurve = launcher.ThrustCurve.ToCurve();
|
||||
p.Velocity = barrel.forward * weapon.Velocity;
|
||||
p.Thrust = source.Entity.ItemManager.Evaluate(launcher.Thrust, item.EquippableItem, source.Entity);
|
||||
p.TopSpeed = source.Entity.ItemManager.Evaluate(launcher.MissileVelocity, item.EquippableItem, source.Entity);
|
||||
p.Thrust = source.Entity.ItemManager.Evaluate(launcher.Thrust, item);
|
||||
p.TopSpeed = source.Entity.ItemManager.Evaluate(launcher.MissileVelocity, item);
|
||||
}
|
||||
else if(weapon.Data is GuidedWeaponData guidance)
|
||||
{
|
||||
|
|
@ -51,8 +51,8 @@ public class GuidedProjectileManager : InstantWeaponEffectManager
|
|||
p.LiftCurve = guidance.LiftCurve.ToCurve();
|
||||
p.ThrustCurve = guidance.ThrustCurve.ToCurve();
|
||||
p.Velocity = barrel.forward * weapon.Velocity;
|
||||
p.Thrust = source.Entity.ItemManager.Evaluate(guidance.Thrust, item.EquippableItem, source.Entity);
|
||||
p.TopSpeed = source.Entity.ItemManager.Evaluate(guidance.MissileVelocity, item.EquippableItem, source.Entity);
|
||||
p.Thrust = source.Entity.ItemManager.Evaluate(guidance.Thrust, item);
|
||||
p.TopSpeed = source.Entity.ItemManager.Evaluate(guidance.MissileVelocity, item);
|
||||
p.TargetPosition = () => source.Entity.Position + length( (float3)source.LookAtPoint.position - source.Entity.Position) * source.Entity.LookDirection;
|
||||
}
|
||||
else Debug.LogError($"Weapon {item.EquippableItem.Name} linked to {name} effect, but is not a Launcher!");
|
||||
|
|
|
|||
Loading…
Reference in a new issue