Damage System Rewrite
New damage system, much easier to understand Splash damage support Hardpoint armor consolidated with hull armor Minimap shows view cone New industry standard palette for temperature display Temperature range display contains palette Restoring loadouts now ignores temperature and armor Items can ignore thermal mass when adding heat Burst weapons can consume single ammo (mainly shotguns) New missile type that follows crosshairs New airburst projectile type that deals splash damage Auto Shotgun and Charged Shotgun
This commit is contained in:
parent
dbc522a224
commit
3a9ee2ccf7
55 changed files with 14253 additions and 2206 deletions
|
|
@ -1,6 +1,8 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
public class GuidedProjectileManager : InstantWeaponEffectManager
|
||||
{
|
||||
|
|
@ -30,6 +32,29 @@ public class GuidedProjectileManager : InstantWeaponEffectManager
|
|||
p.Thrust = source.Entity.ItemManager.Evaluate(launcher.Thrust, item.EquippableItem, source.Entity);
|
||||
p.TopSpeed = source.Entity.ItemManager.Evaluate(launcher.MissileVelocity, item.EquippableItem, source.Entity);
|
||||
}
|
||||
else if(weapon.Data is GuidedWeaponData guidance)
|
||||
{
|
||||
var p = ProjectilePrototype.Instantiate<GuidedProjectile>();
|
||||
p.Source = source.Transform;
|
||||
p.SourceEntity = source.Entity;
|
||||
p.Target = target?.Transform;
|
||||
p.Frequency = guidance.DodgeFrequency;
|
||||
var hp = source.Entity.Hardpoints[item.Position.x, item.Position.y];
|
||||
var barrel = source.GetBarrel(hp);
|
||||
p.StartPosition = p.transform.position = barrel.position;
|
||||
p.Damage = weapon.Damage;
|
||||
p.Range = weapon.Range;
|
||||
p.Penetration = weapon.Penetration;
|
||||
p.Spread = weapon.DamageSpread;
|
||||
p.DamageType = weapon.WeaponData.DamageType;
|
||||
p.GuidanceCurve = guidance.GuidanceCurve.ToCurve();
|
||||
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.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