Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move classes of Seraphim projectiles to separate files #5677

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/snippets/other.5677.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- (#5669) Move the Classes of Seraphim Projectiles to separate Files.
668 changes: 63 additions & 605 deletions lua/seraphimprojectiles.lua

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions lua/sim/projectiles/seraphim/SAAHotheFlareProjectile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---------------------------------------------------------------------------------------
-- Copyright (c) 2023 FAForever
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
---------------------------------------------------------------------------------------

local EmitterProjectile = import('/lua/sim/defaultprojectiles.lua').EmitterProjectile
local EffectTemplate = import('/lua/effecttemplates.lua')

--- HOTHE DECOY FLARE PROJECTILE
---@class SAAHotheFlareProjectile : EmitterProjectile
SAAHotheFlareProjectile = ClassProjectile(EmitterProjectile) {
FxTrails = EffectTemplate.AAntiMissileFlare,
FxImpactNone = EffectTemplate.AAntiMissileFlareHit,
FxImpactProjectile = EffectTemplate.AAntiMissileFlareHit,
FxOnKilled = EffectTemplate.AAntiMissileFlareHit,
FxUnitHitScale = 0.4,
FxLandHitScale = 0.4,
FxWaterHitScale = 0.4,
FxUnderWaterHitScale = 0.4,
FxAirUnitHitScale = 0.4,
FxNoneHitScale = 0.4,
DestroyOnImpact = false,

--- We only destroy when we hit the ground/water.
---@param self SAAHotheFlareProjectile
---@param TargetType ImpactType
---@param targetEntity Unit | Prop
OnImpact = function(self, TargetType, targetEntity)
if type == 'Terrain' or type == 'Water' then
EmitterProjectile.OnImpact(self, TargetType, targetEntity)
if TargetType == 'Terrain' or TargetType == 'Water' or TargetType == 'Prop' then
if self.Trash then
self.Trash:Destroy()
end
self:Destroy()
end
end
end,
}
37 changes: 37 additions & 0 deletions lua/sim/projectiles/seraphim/SAireauBolter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---------------------------------------------------------------------------------------
-- Copyright (c) 2023 FAForever
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
---------------------------------------------------------------------------------------

local MultiPolyTrailProjectile = import('/lua/sim/defaultprojectiles.lua').MultiPolyTrailProjectile
local EffectTemplate = import('/lua/effecttemplates.lua')

--- SERAPHIM AIRE-AU BOLTER
--- T2 bot (Ilshavoh) and T3 tank (Othuum)
---@class SAireauBolter : MultiPolyTrailProjectile
SAireauBolter = ClassProjectile(MultiPolyTrailProjectile) {
FxImpactLand = EffectTemplate.SAireauBolterHit,
FxImpactNone = EffectTemplate.SAireauBolterHit,
FxImpactProp = EffectTemplate.SAireauBolterHit,
FxImpactUnit = EffectTemplate.SAireauBolterHit,
FxTrails = EffectTemplate.SAireauBolterProjectileFxTrails,
PolyTrailOffset = { 0, 0, 0 },
PolyTrails = EffectTemplate.SAireauBolterProjectilePolyTrails,
}
43 changes: 43 additions & 0 deletions lua/sim/projectiles/seraphim/SAnaitTorpedo.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---------------------------------------------------------------------------------------
-- Copyright (c) 2023 FAForever
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
---------------------------------------------------------------------------------------

local MultiPolyTrailProjectile = import('/lua/sim/defaultprojectiles.lua').MultiPolyTrailProjectile
local EffectTemplate = import('/lua/effecttemplates.lua')

--- SERAPHIM ANA-IT TORPEDO
---@class SAnaitTorpedo : MultiPolyTrailProjectile
SAnaitTorpedo = ClassProjectile(MultiPolyTrailProjectile) {
FxImpactUnderWater = EffectTemplate.SAnaitTorpedoHit,
FxUnderWaterHitScale = 1,
FxImpactUnit = EffectTemplate.SAnaitTorpedoHit,
FxImpactNone = EffectTemplate.SAnaitTorpedoHit,
FxTrails = EffectTemplate.SAnaitTorpedoFxTrails,
PolyTrails = EffectTemplate.SAnaitTorpedoPolyTrails,
PolyTrailOffset = { 0, 0 },

---@param self SAnaitTorpedo
---@param inWater boolean
OnCreate = function(self, inWater)
self:SetCollisionShape('Sphere', 0, 0, 0, 1.0)
MultiPolyTrailProjectile.OnCreate(self, inWater)
end,
}
32 changes: 32 additions & 0 deletions lua/sim/projectiles/seraphim/SAnjelluTorpedoDefenseProjectile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---------------------------------------------------------------------------------------
-- Copyright (c) 2023 FAForever
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
---------------------------------------------------------------------------------------

local MultiPolyTrailProjectile = import('/lua/sim/defaultprojectiles.lua').MultiPolyTrailProjectile
local EffectTemplate = import('/lua/effecttemplates.lua')

--- ANJELLU TORPEDO DEFENSE PROJECTILE
---@class SAnjelluTorpedoDefenseProjectile : MultiPolyTrailProjectile
SAnjelluTorpedoDefenseProjectile = ClassProjectile(MultiPolyTrailProjectile) {
FxImpactProjectileUnderWater = EffectTemplate.SDFAjelluAntiTorpedoHit01,
PolyTrails = EffectTemplate.SDFAjelluAntiTorpedoPolyTrail01,
PolyTrailOffset = { 0, 0 },
}
35 changes: 35 additions & 0 deletions lua/sim/projectiles/seraphim/SBaseTempProjectile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---------------------------------------------------------------------------------------
-- Copyright (c) 2023 FAForever
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
---------------------------------------------------------------------------------------

local EmitterProjectile = import('/lua/sim/defaultprojectiles.lua').EmitterProjectile
local EffectTemplate = import('/lua/effecttemplates.lua')

--- TEMPORARY BASE SERAPHIM PROJECTILE
---@class SBaseTempProjectile : EmitterProjectile
SBaseTempProjectile = ClassProjectile(EmitterProjectile) {
FxImpactLand = EffectTemplate.AMissileHit01,
FxImpactNone = EffectTemplate.AMissileHit01,
FxImpactProjectile = EffectTemplate.ASaintImpact01,
FxImpactProp = EffectTemplate.AMissileHit01,
FxImpactUnit = EffectTemplate.AMissileHit01,
FxTrails = EffectTemplate.SShleoCannonProjectileTrails,
}
39 changes: 39 additions & 0 deletions lua/sim/projectiles/seraphim/SChronatronCannon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---------------------------------------------------------------------------------------
-- Copyright (c) 2023 FAForever
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
---------------------------------------------------------------------------------------

local MultiPolyTrailProjectile = import('/lua/sim/defaultprojectiles.lua').MultiPolyTrailProjectile
local EffectTemplate = import('/lua/effecttemplates.lua')

--- SERAPHIM CHRONATRON CANNONS
---@class SChronatronCannon : MultiPolyTrailProjectile
SChronatronCannon = ClassProjectile(MultiPolyTrailProjectile) {
FxImpactTrajectoryAligned = false,
FxImpactLand = EffectTemplate.SChronotronCannonLandHit,
FxImpactNone = EffectTemplate.SChronotronCannonHit,
FxImpactProp = EffectTemplate.SChronotronCannonLandHit,
FxImpactUnit = EffectTemplate.SChronotronCannonUnitHit,
FxImpactWater = EffectTemplate.SChronotronCannonLandHit,
FxImpactUnderWater = EffectTemplate.SChronotronCannonHit,
FxTrails = EffectTemplate.SChronotronCannonProjectileFxTrails,
PolyTrails = EffectTemplate.SChronotronCannonProjectileTrails,
PolyTrailOffset = { 0, 0, 0 },
}
37 changes: 37 additions & 0 deletions lua/sim/projectiles/seraphim/SChronatronCannonOverCharge.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---------------------------------------------------------------------------------------
-- Copyright (c) 2023 FAForever
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
---------------------------------------------------------------------------------------

local MultiPolyTrailProjectile = import('/lua/sim/defaultprojectiles.lua').MultiPolyTrailProjectile
local EffectTemplate = import('/lua/effecttemplates.lua')

--- SERAPHIM CHRONATRON CANNONS
---@class SChronatronCannonOverCharge : MultiPolyTrailProjectile
SChronatronCannonOverCharge = ClassProjectile(MultiPolyTrailProjectile) {
FxImpactTrajectoryAligned = false,
FxImpactLand = EffectTemplate.SChronotronCannonOverChargeLandHit,
FxImpactNone = EffectTemplate.SChronotronCannonOverChargeLandHit,
FxImpactProp = EffectTemplate.SChronotronCannonOverChargeLandHit,
FxImpactUnit = EffectTemplate.SChronotronCannonOverChargeUnitHit,
FxTrails = EffectTemplate.SChronotronCannonOverChargeProjectileFxTrails,
PolyTrails = EffectTemplate.SChronotronCannonOverChargeProjectileTrails,
PolyTrailOffset = { 0, 0, 0 },
}
37 changes: 37 additions & 0 deletions lua/sim/projectiles/seraphim/SDFAireauProjectile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---------------------------------------------------------------------------------------
-- Copyright (c) 2023 FAForever
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
---------------------------------------------------------------------------------------

local MultiPolyTrailProjectile = import('/lua/sim/defaultprojectiles.lua').MultiPolyTrailProjectile
local EffectTemplate = import('/lua/effecttemplates.lua')

--- ythotha
---@class SDFAireauProjectile : MultiPolyTrailProjectile
SDFAireauProjectile = ClassProjectile(MultiPolyTrailProjectile) {
FxImpactNone = EffectTemplate.SDFAireauWeaponHit01,
FxImpactUnit = EffectTemplate.SDFAireauWeaponHitUnit,
FxImpactProp = EffectTemplate.SDFAireauWeaponHit01,
FxImpactLand = EffectTemplate.SDFAireauWeaponHit01,
FxImpactWater= EffectTemplate.SDFAireauWeaponHit01,
RandomPolyTrails = 1,
PolyTrails = EffectTemplate.SDFAireauWeaponPolytrails01,
PolyTrailOffset = { 0, 0, 0 },
}
36 changes: 36 additions & 0 deletions lua/sim/projectiles/seraphim/SDFExperimentalPhasonProjectile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---------------------------------------------------------------------------------------
-- Copyright (c) 2023 FAForever
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
---------------------------------------------------------------------------------------

local EmitterProjectile = import('/lua/sim/defaultprojectiles.lua').EmitterProjectile
local EffectTemplate = import('/lua/effecttemplates.lua')

--- SERAPHIM EXPERIMENTAL PHASON BEAM PROJECTILE
--- ythotha
---@class SDFExperimentalPhasonProjectile : EmitterProjectile
SDFExperimentalPhasonProjectile = ClassProjectile(EmitterProjectile) {
FxImpactTrajectoryAligned = false,
FxTrails = EffectTemplate.SDFExperimentalPhasonProjFXTrails01,
FxImpactUnit = EffectTemplate.SDFExperimentalPhasonProjHitUnit,
FxImpactProp = EffectTemplate.SDFExperimentalPhasonProjHit01,
FxImpactLand = EffectTemplate.SDFExperimentalPhasonProjHit01,
FxImpactWater = EffectTemplate.SDFExperimentalPhasonProjHit01,
}
Loading