Skip to content

Commit

Permalink
Introduce and fix code annotations (FAForever#5644)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRowey authored Nov 12, 2023
1 parent 6aa5319 commit 3551bac
Show file tree
Hide file tree
Showing 91 changed files with 563 additions and 541 deletions.
9 changes: 3 additions & 6 deletions effects/EMPFluxWarhead/EMPFluxWarheadEffect01_script.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
--
-- script for projectile BoneAttached
--
local NullShell = import("/lua/sim/defaultprojectiles.lua").NullShell

--- script for projectile BoneAttached
---@class EMPFluxWarheadEffect01 : NullShell
EMPFluxWarheadEffect01 = Class(NullShell) {}

TypeClass = EMPFluxWarheadEffect01

TypeClass = EMPFluxWarheadEffect01
9 changes: 3 additions & 6 deletions effects/EMPFluxWarhead/EMPFluxWarheadEffect02_script.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
--
-- script for projectile BoneAttached
--
local NullShell = import("/lua/sim/defaultprojectiles.lua").NullShell

--- script for projectile BoneAttached
---@class EMPFluxWarheadEffect02 : NullShell
EMPFluxWarheadEffect02 = Class(NullShell) {}

TypeClass = EMPFluxWarheadEffect02

TypeClass = EMPFluxWarheadEffect02
9 changes: 3 additions & 6 deletions effects/EMPFluxWarhead/EMPFluxWarheadEffect03_script.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
--
-- script for projectile BoneAttached
--
local NullShell = import("/lua/sim/defaultprojectiles.lua").NullShell

--- script for projectile BoneAttached
---@class EMPFluxWarheadEffect03 : NullShell
EMPFluxWarheadEffect03 = Class(NullShell) {}

TypeClass = EMPFluxWarheadEffect03

TypeClass = EMPFluxWarheadEffect03
4 changes: 2 additions & 2 deletions effects/Entities/ADFTractorFall01/ADFTractorFall01_script.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

---@class ADFTractorFall01 : DummyProjectile
ADFTractorFall01 = ClassDummyProjectile(import("/lua/sim/projectile.lua").DummyProjectile) { }
TypeClass = ADFTractorFall01
TypeClass = ADFTractorFall01
4 changes: 2 additions & 2 deletions effects/Entities/AeonBuildEffect/AeonBuildEffect01_script.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

---@class AeonBuildEffect01 : DummyProjectile
AeonBuildEffect01 = ClassDummyProjectile(import("/lua/sim/projectile.lua").DummyProjectile) { }
TypeClass = AeonBuildEffect01
TypeClass = AeonBuildEffect01
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
local EffectTemplate = import("/lua/effecttemplates.lua")
local EmitterProjectile = import("/lua/sim/defaultprojectiles.lua").EmitterProjectile

--- BrackmanQAIHackCircuitryEffect01, non-damaging
---@class BrackmanQAIHackCircuitryEffect01 : EmitterProjectile
BrackmanQAIHackCircuitryEffect01 = Class(EmitterProjectile) {
FxImpactTrajectoryAligned = true,
FxTrajectoryAligned= true,
FxTrails = EffectTemplate.CBrackmanQAIHackCircuitryEffectFxtrailsALL[1],
}
TypeClass = BrackmanQAIHackCircuitryEffect01
TypeClass = BrackmanQAIHackCircuitryEffect01
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
local EffectTemplate = import("/lua/effecttemplates.lua")
local EmitterProjectile = import("/lua/sim/defaultprojectiles.lua").EmitterProjectile

--- BrackmanQAIHackCircuitryEffect02, non-damaging
---@class BrackmanQAIHackCircuitryEffect02 : EmitterProjectile
BrackmanQAIHackCircuitryEffect02 = Class(EmitterProjectile) {
FxImpactTrajectoryAligned = true,
FxTrajectoryAligned= true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
local EffectTemplate = import("/lua/effecttemplates.lua")
local EmitterProjectile = import("/lua/sim/defaultprojectiles.lua").EmitterProjectile

--- BrackmanQAIHackCircuitryEffect03, non-damaging
---@class BrackmanQAIHackCircuitryEffect03 : EmitterProjectile
BrackmanQAIHackCircuitryEffect03 = Class(EmitterProjectile) {
FxImpactTrajectoryAligned = true,
FxTrajectoryAligned= true,
Expand Down
1 change: 1 addition & 0 deletions effects/Entities/DEBRISMISC010/DebrisMisc010_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---@class DebrisMisc010 : GenericDebris
DebrisMisc010 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc010
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
local GenericDebris = import("/lua/genericdebris.lua").GenericDebris

---@class DebrisBoneAttachChassis01 : GenericDebris
DebrisBoneAttachChassis01 = ClassDummyProjectile(GenericDebris) {
FxLandHitScale = 1.0,
FxTrails = { },
FxTrailScale = 1,
}
TypeClass = DebrisBoneAttachChassis01

TypeClass = DebrisBoneAttachChassis01
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
local GenericDebris = import("/lua/genericdebris.lua").GenericDebris

---@class DebrisBoneAttachHigh01 : GenericDebris
DebrisBoneAttachHigh01 = ClassDummyProjectile(GenericDebris) {
FxUnitHitScale = 0.25,
FxWaterHitScale = 0.25,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
local GenericDebris = import("/lua/genericdebris.lua").GenericDebris

---@class DebrisBoneAttachHigh01 : GenericDebris
DebrisBoneAttachLow01 = ClassDummyProjectile(GenericDebris) {
FxUnitHitScale = 0.25,
FxUnderWaterHitScale = 0.25,
Expand Down
2 changes: 2 additions & 0 deletions effects/Entities/DebrisMisc01/DebrisMisc01_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
--- DebrisMisc01
---@class DebrisMisc01 : GenericDebris
DebrisMisc01 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc01
2 changes: 2 additions & 0 deletions effects/Entities/DebrisMisc02/DebrisMisc02_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
--- DebrisMisc02
---@class DebrisMisc02 : GenericDebris
DebrisMisc02 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc02
1 change: 1 addition & 0 deletions effects/Entities/DebrisMisc03/DebrisMisc03_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---@class DebrisMisc03 : GenericDebris
DebrisMisc03 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc03
1 change: 1 addition & 0 deletions effects/Entities/DebrisMisc04/DebrisMisc04_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---@class DebrisMisc04 : GenericDebris
DebrisMisc04 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc04
1 change: 1 addition & 0 deletions effects/Entities/DebrisMisc05/DebrisMisc05_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---@class DebrisMisc05 : GenericDebris
DebrisMisc05 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc05
1 change: 1 addition & 0 deletions effects/Entities/DebrisMisc06/DebrisMisc06_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---@class DebrisMisc06 : GenericDebris
DebrisMisc06 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc06
3 changes: 2 additions & 1 deletion effects/Entities/DebrisMisc07/DebrisMisc07_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---@class DebrisMisc07 : GenericDebris
DebrisMisc07 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc07
TypeClass = DebrisMisc07
3 changes: 2 additions & 1 deletion effects/Entities/DebrisMisc08/DebrisMisc08_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---@class DebrisMisc08 : GenericDebris
DebrisMisc08 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc08
TypeClass = DebrisMisc08
3 changes: 2 additions & 1 deletion effects/Entities/DebrisMisc09/DebrisMisc09_script.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---@class DebrisMisc09 : GenericDebris
DebrisMisc09 = ClassDummyProjectile(import("/lua/genericdebris.lua").GenericDebris) { }
TypeClass = DebrisMisc09
TypeClass = DebrisMisc09
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
local EmitterProjectile = import("/lua/sim/defaultprojectiles.lua").EmitterProjectile

---@class DestructionDust01 : EmitterProjectile
DestructionDust01 = Class(EmitterProjectile) {
FxTrails = {'/effects/emitters/terran_bomber_dust_blanket_01_emit.bp',},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local NullShell = import("/lua/sim/defaultprojectiles.lua").NullShell

---@class DestructionFire01 : NullShell
DestructionFire01 = Class(NullShell) {
FxImpactUnit = { },
FxImpactLand = { },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local NullShell = import("/lua/sim/defaultprojectiles.lua").NullShell

---@class DestructionFire01 : NullShell
DestructionFirePlume01 = Class(NullShell) {
FxImpactUnit = { },
FxImpactLand = { },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
--
-- Fire Test Projectile Script
--
local NullShell = import("/lua/sim/defaultprojectiles.lua").NullShell

--- Fire Test Projectile Script
---@class DestructionSpark01 : NullShell
DestructionSpark01 = Class(NullShell) {
FxImpactUnit = { },
FxImpactLand = { },
FxImpactWater = { },
FxImpactNone = { },
}
TypeClass = DestructionSpark01

TypeClass = DestructionSpark01
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local EmitterProjectile = import("/lua/sim/defaultprojectiles.lua").EmitterProjectile

---@class EffectProtonAmbient01 : EmitterProjectile
EffectProtonAmbient01 = Class(EmitterProjectile) {
FxTrails = {'/effects/emitters/proton_bomb_hit_03_emit.bp',},
}

TypeClass = EffectProtonAmbient01
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
--
-- script for projectile BoneAttached
--
local EmitterProjectile = import("/lua/sim/defaultprojectiles.lua").EmitterProjectile

---@class EffectThrustTransport01 : EmitterProjectile
EffectThrustTransport01 = Class(EmitterProjectile) {
FxTrails = { },
FxTrailScale = 1,
Expand All @@ -23,6 +21,4 @@ EffectThrustTransport01 = Class(EmitterProjectile) {
FxNoneHitScale = 1,
FxImpactNone = { },
}

TypeClass = EffectThrustTransport01

TypeClass = EffectThrustTransport01
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
--
-- script for projectile BoneAttached
--
local EmitterProjectile = import("/lua/sim/defaultprojectiles.lua").EmitterProjectile

---@class EffectThrustTransport01 : EmitterProjectile
EffectThrustTransport01 = Class(EmitterProjectile) {
FxTrails = { },
FxTrailScale = 1,
Expand All @@ -17,13 +15,10 @@ EffectThrustTransport01 = Class(EmitterProjectile) {
FxWaterHitScale = 20,
FxImpactWater = {'/effects/emitters/destruction_water_splash_ripples_02_emit.bp',
'/effects/emitters/destruction_water_splash_wash_02_emit.bp',
},
},

FxUnderWaterHitScale = 1,
FxNoneHitScale = 1,
FxImpactNone = { },

}

TypeClass = EffectThrustTransport01

TypeClass = EffectThrustTransport01
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ local EffectTemplate = import("/lua/effecttemplates.lua")
local SIFInainoStrategicMissileEffect01 = '/effects/Entities/SIFInainoStrategicMissileEffect01/SIFInainoStrategicMissileEffect01_proj.bp'
local SIFInainoStrategicMissileEffect02 = '/effects/Entities/SIFInainoStrategicMissileEffect02/SIFInainoStrategicMissileEffect02_proj.bp'
local SIFInainoStrategicMissileEffect03 = '/effects/Entities/SIFInainoStrategicMissileEffect03/SIFInainoStrategicMissileEffect03_proj.bp'
local SIFInainoStrategicMissileEffect04 = '/effects/Entities/SIFInainoStrategicMissileEffect04/SIFInainoStrategicMissileEffect04_proj.bp'

---@class InainoEffectController01 : NullShell
InainoEffectController01 = Class(NullShell) {

---@param self InainoEffectController01
---@param Data table
EffectThread = function(self, Data)
self:ForkThread(self.CreateInitialHit, self.Army)
self:ForkThread(self.CreateInitialBuildup, self.Army)
Expand All @@ -22,19 +25,25 @@ InainoEffectController01 = Class(NullShell) {
self:ForkThread(self.MainBlast, self.Army)
end,

---@param self InainoEffectController01
---@param army number
CreateInitialHit = function(self, army)
for k, v in EffectTemplate.SIFInainoHit01 do
emit = CreateEmitterAtEntity(self,army,v)
end
end,

---@param self InainoEffectController01
---@param army number
CreateInitialBuildup = function(self, army)
WaitSeconds(2.0)
for k, v in EffectTemplate.SIFInainoHit02 do
emit = CreateEmitterAtEntity(self,army,v)
end
end,

---@param self InainoEffectController01
---@param army number
MainBlast = function(self, army)
WaitSeconds(5.00)

Expand Down Expand Up @@ -82,6 +91,7 @@ InainoEffectController01 = Class(NullShell) {
end
end,

---@param self InainoEffectController01
CreateGroundFingers = function(self)
-- Outward rushing fingers that spawn the upward fingers
local num_projectiles = 5
Expand All @@ -100,6 +110,7 @@ InainoEffectController01 = Class(NullShell) {
end
end,

---@param self InainoEffectController01
CreateInitialFingers = function(self)
WaitSeconds(1.75)
-- Upward rising fingers that join to form explosion
Expand All @@ -121,3 +132,6 @@ InainoEffectController01 = Class(NullShell) {
end,
}
TypeClass = InainoEffectController01

-- Kept for Backwards Compatibility
local SIFInainoStrategicMissileEffect04 = '/effects/Entities/SIFInainoStrategicMissileEffect04/SIFInainoStrategicMissileEffect04_proj.bp'
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
--****************************************************************************
--**
--** File : /data/projectiles/SBOOhwalliBombEffect01/SBOOhwalliBombEffect01_script.lua
--** Author(s): Greg Kohne, Gordon Duclos
--**
--** Summary : Ohwalli Strategic Bomb effect script, non-damaging
--**
--** Copyright © 2007 Gas Powered Games, Inc. All rights reserved.
--****************************************************************************
------------------------------------------------------------------------------
-- File : /data/projectiles/SBOOhwalliBombEffect01/SBOOhwalliBombEffect01_script.lua
-- Author(s): Greg Kohne, Gordon Duclos
-- Summary : Ohwalli Strategic Bomb effect script, non-damaging
-- Copyright © 2007 Gas Powered Games, Inc. All rights reserved.
------------------------------------------------------------------------------
local EffectTemplate = import("/lua/effecttemplates.lua")

--- Ohwalli Strategic Bomb effect script, non-damaging
---@class SBOOhwalliBombEffect01 : EmitterProjectile
SBOOhwalliBombEffect01 = Class(import("/lua/sim/defaultprojectiles.lua").EmitterProjectile) {
FxTrails = EffectTemplate.SOhwalliBombPlumeFxTrails01,
}
TypeClass = SBOOhwalliBombEffect01
TypeClass = SBOOhwalliBombEffect01
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
--****************************************************************************
--**
--** File : /data/projectiles/SBOKhamaseenBombEffect02/SBOKhamaseenBombEffect02_script.lua
--** Author(s): Greg Kohne
--**
--** Summary : Ohwalli Strategic Bomb effect script, non-damaging
--**
--** Copyright © 2007 Gas Powered Games, Inc. All rights reserved.
--****************************************************************************
------------------------------------------------------------------------------
-- File : /data/projectiles/SBOKhamaseenBombEffect02/SBOKhamaseenBombEffect02_script.lua
-- Author(s): Greg Kohne
-- Summary : Ohwalli Strategic Bomb effect script, non-damaging
-- Copyright © 2007 Gas Powered Games, Inc. All rights reserved.
------------------------------------------------------------------------------
local EffectTemplate = import("/lua/effecttemplates.lua")

--- Ohwalli Strategic Bomb effect script, non-damaging
---@class SBOOhwalliBombEffect02 : EmitterProjectile
SBOOhwalliBombEffect02 = Class(import("/lua/sim/defaultprojectiles.lua").EmitterProjectile) {
FxTrails = EffectTemplate.SOhwalliBombHitSpiralFxTrails02,
}
TypeClass = SBOOhwalliBombEffect02
TypeClass = SBOOhwalliBombEffect02
Loading

0 comments on commit 3551bac

Please sign in to comment.