diff --git a/Assets/Content/Prefabs/Weapons/Mine Launcher.prefab b/Assets/Content/Prefabs/Weapons/Mine Launcher.prefab deleted file mode 100644 index 05171242b..000000000 --- a/Assets/Content/Prefabs/Weapons/Mine Launcher.prefab +++ /dev/null @@ -1,336 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &756302067359749329 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3605572244125604411} - - component: {fileID: 5473211974529592485} - - component: {fileID: 4535912766998605946} - - component: {fileID: 2069293240452108309} - - component: {fileID: 951258163572815990} - - component: {fileID: 6357237398779034136} - m_Layer: 21 - m_Name: Mine - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &3605572244125604411 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 756302067359749329} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 466182245789483358} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &5473211974529592485 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 756302067359749329} - m_Mesh: {fileID: -5495902117074765545, guid: dab8e1a18a1b825458e8e6356cf00cd2, type: 3} ---- !u!23 &4535912766998605946 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 756302067359749329} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 3720744386649352057, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, type: 3} - - {fileID: 3720744386649352057, guid: a1d39ea984432bf44b4a0686afe2bf1a, type: 3} - - {fileID: 2100000, guid: e879c37f3520bf14a8a6075581faf7b2, type: 2} - - {fileID: 9178725544925813344, guid: 58e16b7dbc1c31f4585e11544cdce127, type: 3} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &2069293240452108309 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 756302067359749329} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1281fe44325f9b548aa42dc331b17266, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &951258163572815990 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 756302067359749329} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f190191fe8c8419f85767868c50cde5f, type: 3} - m_Name: - m_EditorClassIdentifier: - GridObject: {fileID: 6357237398779034136} - MeshRenderer: {fileID: 4535912766998605946} - EmissionSubmesh: 2 - EmissionCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0.051179443 - outSlope: 0.051179443 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0.24423963 - - serializedVersion: 3 - time: 0.5 - value: 0.1 - inSlope: 0 - outSlope: 0 - tangentMode: 34 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: -0 - outSlope: -0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.22580647 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - ActiveCycleDuration: 1 - ArmedCycleDuration: 0.25 - ActiveEmission: 100 - ArmedEmission: 1000 - HitEffect: {fileID: 3349939966709198091} - Lifetime: 30 - ActivationDelay: 2 - BlastRange: 25 - BlastDelay: 2 ---- !u!114 &6357237398779034136 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 756302067359749329} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 737f47c158214f0995ba2835f040ed96, type: 3} - m_Name: - m_EditorClassIdentifier: - RotationSpeed: 1 - GridOffset: 0 - GridAttraction: 10 - Gravity: 1 - Drag: 0.05 - LaunchDrag: 0.2 ---- !u!1 &951357816492268516 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 466182245789483358} - - component: {fileID: 2749986269966238105} - m_Layer: 0 - m_Name: Mine Launcher - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &466182245789483358 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 951357816492268516} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 3865250807623958572} - - {fileID: 3605572244125604411} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2749986269966238105 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 951357816492268516} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6e048d9c74a84343befd496907ee2126, type: 3} - m_Name: - m_EditorClassIdentifier: - ProjectilePrototype: {fileID: 2069293240452108309} - InheritVelocity: 1 ---- !u!1001 &3867385469207619610 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 466182245789483358} - m_Modifications: - - target: {fileID: 1121192042590650, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_Name - value: BigExplosion - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalScale.x - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalScale.y - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalScale.z - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 198917022394846920, guid: e1b08032bec16ba4eb1ae23cbd572664, - type: 3} - propertyPath: stopAction - value: 3 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: e1b08032bec16ba4eb1ae23cbd572664, type: 3} ---- !u!4 &3865250807623958572 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 4388947112716342, guid: e1b08032bec16ba4eb1ae23cbd572664, - type: 3} - m_PrefabInstance: {fileID: 3867385469207619610} - m_PrefabAsset: {fileID: 0} ---- !u!1 &3866425147859458464 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 1121192042590650, guid: e1b08032bec16ba4eb1ae23cbd572664, - type: 3} - m_PrefabInstance: {fileID: 3867385469207619610} - m_PrefabAsset: {fileID: 0} ---- !u!114 &3349939966709198091 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3866425147859458464} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1281fe44325f9b548aa42dc331b17266, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &5700147869379115258 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3866425147859458464} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: db021a309de3d324588c5603de40c29f, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/Content/Prefabs/Weapons/Mine Launcher.prefab.meta b/Assets/Content/Prefabs/Weapons/Mine Launcher.prefab.meta deleted file mode 100644 index 2489e77fa..000000000 --- a/Assets/Content/Prefabs/Weapons/Mine Launcher.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 24eddacc819f20542962f2395930f261 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/HullCollider.cs b/Assets/Scripts/Gameplay/HullCollider.cs index e5dc4ad14..8d9275eb4 100644 --- a/Assets/Scripts/Gameplay/HullCollider.cs +++ b/Assets/Scripts/Gameplay/HullCollider.cs @@ -2,11 +2,10 @@ using UnityEngine; using CultMath.UnityBridge; // Cut 4 (docs/fire-control-cut.md): Hit, Splash, SendHit and SendSplash are deleted -- their last callers -// (ConstantLaser, ConstantLightning, ConstantParticleWeapon, HitscanEffect, Mine) are gone too (see those +// (ConstantLaser, ConstantLightning, ConstantParticleWeapon, HitscanEffect) are gone too (see those // files and FireControl.Detonate, 12.4(b)'s renamed Splash). Nothing decides or applies damage through a Unity // collider any more (R8): -// this component is now purely a physics surface for ship-on-ship collision impulse and Mine's own proximity -// arming query (Q7), neither of which is hit detection. +// this component is now purely a physics surface for ship-on-ship collision impulse, not hit detection. public class HullCollider : MonoBehaviour { public Entity Entity { get; set; } diff --git a/Assets/Scripts/Gameplay/ShieldManager.cs b/Assets/Scripts/Gameplay/ShieldManager.cs index cf12797d7..05a303e6d 100644 --- a/Assets/Scripts/Gameplay/ShieldManager.cs +++ b/Assets/Scripts/Gameplay/ShieldManager.cs @@ -38,7 +38,6 @@ public class ShieldManager : MonoBehaviour if (gridObject) { var itemPickup = other.collider.GetComponent(); - var mine = other.collider.GetComponent(); if (itemPickup) { if (Entity.CargoBays.Any(c => c.TryStore(itemPickup.Item))) @@ -54,13 +53,9 @@ public class ShieldManager : MonoBehaviour Debug.Log("Attempted item pickup, but no space in cargo bay!"); } } - else if (mine) - { - mine.Explode(); - } else { - Debug.Log("Shield collision occurred with grid object, but other collider isn't a mine or an item pickup!"); + Debug.Log("Shield collision occurred with grid object, but other collider isn't an item pickup!"); } } else diff --git a/Assets/Scripts/Gameplay/Weapons/Mine.cs b/Assets/Scripts/Gameplay/Weapons/Mine.cs deleted file mode 100644 index 57d56f68e..000000000 --- a/Assets/Scripts/Gameplay/Weapons/Mine.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using CultMath; -using CultMath.UnityBridge; -using static CultMath.math; -using UnityEngine; -using Random = UnityEngine.Random; - -public class Mine : MonoBehaviour -{ - public GridObject GridObject; - public MeshRenderer MeshRenderer; - public int EmissionSubmesh; - public AnimationCurve EmissionCurve; - public float ActiveCycleDuration; - public float ArmedCycleDuration; - public float ActiveEmission; - public float ArmedEmission; - public Prototype HitEffect; - public float Lifetime; - - public float ActivationDelay; - public float BlastRange; - public float BlastDelay; - - private float _startTime; - private float _blastTime; - private bool _blastCountdown; - private bool _active; - private Material _material; - private float _pulseLerp; - private float _emission; - public float Damage { get; set; } - public DamageType DamageType { get; set; } - public EntityInstance Source { get; set; } - public float Range { get; set; } - - private void Start() - { - _material = MeshRenderer.materials[EmissionSubmesh]; - } - - private void OnEnable() - { - _startTime = Time.time; - _blastCountdown = false; - _active = false; - _emission = 0; - } - - // Update is called once per frame - void Update() - { - var position = transform.position; - - if (Time.time - _startTime > ActivationDelay && !_active) - { - _active = true; - } - - if(_active) - { - _emission = lerp(_emission, _blastCountdown ? ArmedEmission : ActiveEmission, Time.deltaTime * 10); - _pulseLerp += Time.deltaTime / (_blastCountdown ? ArmedCycleDuration : ActiveCycleDuration); - _pulseLerp %= 1; - if(!_blastCountdown) - { - foreach (var collider in Physics.OverlapSphere(position, BlastRange, 1)) - { - var hull = collider.GetComponent(); - if (hull) - { - _blastCountdown = true; - _blastTime = Time.time + BlastDelay; - } - } - } - - if ((position - Source.transform.position).magnitude > Range || - Time.time - _startTime > Lifetime || - _blastCountdown && Time.time > _blastTime) - { - Explode(); - } - } - _material.SetFloat("_Emission", _emission * EmissionCurve.Evaluate(_pulseLerp)); - } - - // Cut 4 (docs/fire-control-cut.md, Q7): the arming OverlapSphere above stays -- that is contact detection, - // not hit detection. Blast damage is not: it goes through the same FireControl.Detonate every blast-shaped - // weapon uses now (12.4(b) renamed Splash), over the zone's own planar entities, not a Unity collider - // query. Presentation (ShowHit) goes with the query it depended on -- nothing here decides who was hit any - // more, so nothing here can point a hit effect at them; a future pass can rebuild that off - // FireControl-published state if the mine ever ships (R9 keeps it regardless). F12-6: BlastRange stays a - // presentation-side input -- Mine has no catalog weapon record carrying Fuse/BlastRadius. - public void Explode() - { - var position = transform.position; - FireControl.Detonate(Source.Entity.Zone, position.ToCultMath().xz, BlastRange, Damage, DamageType); - - var ht = HitEffect.Instantiate(); - ht.position = position; - GetComponent().ReturnToPool(); - } -} diff --git a/Assets/Scripts/Gameplay/Weapons/Mine.cs.meta b/Assets/Scripts/Gameplay/Weapons/Mine.cs.meta deleted file mode 100644 index 656e2023e..000000000 --- a/Assets/Scripts/Gameplay/Weapons/Mine.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f190191fe8c8419f85767868c50cde5f -timeCreated: 1612545564 \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/Weapons/MineManager.cs b/Assets/Scripts/Gameplay/Weapons/MineManager.cs deleted file mode 100644 index 0e9347e28..000000000 --- a/Assets/Scripts/Gameplay/Weapons/MineManager.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using CultMath; -using static CultMath.math; -using Random = UnityEngine.Random; - -public class MineManager : InstantWeaponEffectManager -{ - public Prototype ProjectilePrototype; - public bool InheritVelocity; - - public override void Fire(InstantWeapon weapon, EquippedItem item, EntityInstance source, EntityInstance target, int shotId) - { - var p = ProjectilePrototype.Instantiate(); - var hp = item.Hardpoint; - var barrel = source.GetBarrel(hp); - var angle = weapon.Spread / 2; - p.Source = source; - p.transform.position = barrel.position; - p.GridObject.Velocity = Quaternion.Euler( - Random.Range(-angle, angle), - Random.Range(-angle, angle), - Random.Range(-angle, angle)) * - barrel.forward * - weapon.Velocity; - if(InheritVelocity) - p.GridObject.Velocity += new Vector3(source.Entity.Velocity.x, 0, source.Entity.Velocity.y); - p.Damage = weapon.Damage; - p.Range = weapon.Range; - p.DamageType = weapon.WeaponData.DamageType; - p.GridObject.Zone = source.Entity.Zone; - } -} diff --git a/Assets/Scripts/Gameplay/Weapons/MineManager.cs.meta b/Assets/Scripts/Gameplay/Weapons/MineManager.cs.meta deleted file mode 100644 index fb1cc2343..000000000 --- a/Assets/Scripts/Gameplay/Weapons/MineManager.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 6e048d9c74a84343befd496907ee2126 -timeCreated: 1612545538 \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/FireControl.cs b/Assets/Scripts/ServerShared/FireControl.cs index 04e960d33..62c8db228 100644 --- a/Assets/Scripts/ServerShared/FireControl.cs +++ b/Assets/Scripts/ServerShared/FireControl.cs @@ -1322,8 +1322,7 @@ public static class FireControl // Cut 12.4(b) (docs/fire-control-cut.md, "Area, per entity"): the one owner of blast damage -- a blast is // an area, not a bundle of rays (Q12-7 dissolved the ray model's remainder question along with the rays - // themselves). Splash's signature with the point made planar (R7). Callers: Apply's three fuse branches and - // Mine.Explode. Nothing draws: every candidate entity in radius takes its share, unconditionally. + // themselves). Splash's signature with the point made planar (R7). Callers: Apply's three fuse branches. Nothing draws: every candidate entity in radius takes its share, unconditionally. // // For each candidate (an entity whose centre lies within radius plus half its own hull diagonal -- // CandidatesIncludeHullsWhoseCentreIsOutsideTheRadius, which Splash's centre-distance cull could not pass):