Skip to content

Commit

Permalink
All lingering changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRowey committed Dec 18, 2024
1 parent 508885d commit e093afc
Show file tree
Hide file tree
Showing 29 changed files with 44 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ SBOOhwalliBombEffectController01 = Class(NullShell) {
WaitTicks(26)

-- Create a light for this thing's flash.
CreateLightParticle(self, -1, self:GetArmy(), 80, 14, 'flare_lens_add_03', 'ramp_white_07' )
CreateLightParticle(self, -1, self.Army, 80, 14, 'flare_lens_add_03', 'ramp_white_07' )

-- Create our decals
CreateDecal( self:GetPosition(), RandomFloat(0.0,6.28), 'Scorch_012_albedo', '', 'Albedo', 80, 80, 1000, 0, self:GetArmy())
CreateDecal( self:GetPosition(), RandomFloat(0.0,6.28), 'Scorch_012_albedo', '', 'Albedo', 80, 80, 1000, 0, self.Army)

-- Create explosion effects
for k, v in EffectTemplate.SOhwalliDetonate01 do
Expand Down
2 changes: 1 addition & 1 deletion effects/Entities/SCUDeath01/SCUDeath01_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SCUDeath01 = Class(NullShell) {

---@param self SCUDeath01
EffectThread = function(self)
local army = self:GetArmy()
local army = self.Army
local position = self:GetPosition()
if position[2] + 2 > GetSurfaceHeight(position[1], position[3]) then
self:ForkThread(self.CreateOuterRingWaveSmokeRing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TeleportSpinner01 = Class(NullShell) {
---@param self TeleportSpinner01
OnCreate = function(self)
NullShell.OnCreate(self)
local army = self:GetArmy()
local army = self.Army

for k, v in EffectTemplate.CSGTestSpinner1 do
CreateEmitterOnEntity( self, army, v )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TeleportSpinner02 = Class(NullShell) {
---@param self TeleportSpinner02
OnCreate = function(self)
NullShell.OnCreate(self)
local army = self:GetArmy()
local army = self.Army

for k, v in EffectTemplate.CSGTestSpinner2 do
CreateEmitterOnEntity( self, army, v )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TeleportSpinner03 = Class(NullShell) {
---@param self TeleportSpinner03
OnCreate = function(self)
NullShell.OnCreate(self)
local army = self:GetArmy()
local army = self.Army

for k, v in EffectTemplate.CSGTestSpinner3 do
CreateEmitterOnEntity( self, army, v )
Expand Down
2 changes: 1 addition & 1 deletion env/DevTest/Props/thermal_vent_01_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local Prop = import("/lua/sim/prop.lua").Prop
ThermalVent01 = Class(Prop) {
OnCreate = function(self)
Prop.OnCreate(self)
--CreateAttachedEmitter(self, -1, self:GetArmy(), '/effects/emitters/_test_20_gaseous_emit.bp')
--CreateAttachedEmitter(self, -1, self.Army, '/effects/emitters/_test_20_gaseous_emit.bp')
end,
}
TypeClass = ThermalVent01
8 changes: 4 additions & 4 deletions lua/SimCallbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -896,13 +896,13 @@ local function ShowRaisedPlatforms(self)
pos[3] + plats[((i - 1) * 12) + (b * 3) - 1]
), true)
end
self.Trash:Add(AttachBeamEntityToEntity(entities[i][1], -2, entities[i][2], -2, self:GetArmy(),
self.Trash:Add(AttachBeamEntityToEntity(entities[i][1], -2, entities[i][2], -2, self.Army,
'/effects/emitters/build_beam_01_emit.bp'))
self.Trash:Add(AttachBeamEntityToEntity(entities[i][1], -2, entities[i][3], -2, self:GetArmy(),
self.Trash:Add(AttachBeamEntityToEntity(entities[i][1], -2, entities[i][3], -2, self.Army,
'/effects/emitters/build_beam_01_emit.bp'))
self.Trash:Add(AttachBeamEntityToEntity(entities[i][4], -2, entities[i][2], -2, self:GetArmy(),
self.Trash:Add(AttachBeamEntityToEntity(entities[i][4], -2, entities[i][2], -2, self.Army,
'/effects/emitters/build_beam_01_emit.bp'))
self.Trash:Add(AttachBeamEntityToEntity(entities[i][4], -2, entities[i][3], -2, self:GetArmy(),
self.Trash:Add(AttachBeamEntityToEntity(entities[i][4], -2, entities[i][3], -2, self.Army,
'/effects/emitters/build_beam_01_emit.bp'))
end
end
Expand Down
6 changes: 3 additions & 3 deletions lua/defaultantiprojectile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Flare = Class(Entity) {
---@param self Flare
---@param spec FlareSpec
OnCreate = function(self, spec)
self.Army = self:GetArmy()
self.Army = self.Army
self.Owner = spec.Owner
self.Radius = spec.Radius or 5
self.OffsetMult = spec.OffsetMult or 0
Expand Down Expand Up @@ -133,7 +133,7 @@ DepthCharge = Class(Entity) {
---@param self DepthCharge
---@param spec DepthChargeSpec
OnCreate = function(self, spec)
self.Army = self:GetArmy()
self.Army = self.Army
self.Owner = spec.Owner
self.Radius = spec.Radius
self.ProjectilesToDeflect = spec.ProjectilesToDeflect or 3
Expand Down Expand Up @@ -172,7 +172,7 @@ MissileRedirect = Class(Entity) {
---@param self MissileRedirect
---@param spec MissileRedirectSpec
OnCreate = function(self, spec)
self.Army = self:GetArmy()
self.Army = self.Army
self.Owner = spec.Owner
self.Radius = spec.Radius
self.RedirectRateOfFire = spec.RedirectRateOfFire or 1
Expand Down
2 changes: 1 addition & 1 deletion lua/shield.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ CzarShield = ClassShield(PersonalShield) {

self.LiveImpactEntities = self.LiveImpactEntities + 1

local army = self:GetArmy()
local army = self.Army
local OffsetLength = Util.GetVectorLength(vector)
local ImpactMesh = Entity(self.ImpactEntitySpecs)
local pos = self:GetPosition()
Expand Down
2 changes: 1 addition & 1 deletion lua/sim/CollisionBeam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ CollisionBeam = Class(moho.CollisionBeamEntity) {
self.LastTerrainType = nil
self.BeamEffectsBag = {}
self.TerrainEffectsBag = {}
self.Army = self:GetArmy()
self.Army = self.Army
self.Trash = TrashBag()
end,

Expand Down
4 changes: 2 additions & 2 deletions lua/sim/Unit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Unit = ClassUnit(moho.unit_methods, IntelComponent, VeterancyComponent, DebugUni
-- Each unit has a sync table to replicate values to the global sync table to be copied to the user layer at sync time.
self.Sync = {}
self.Sync.id = self:GetEntityId()
self.Sync.army = self:GetArmy()
self.Sync.army = self.Army
setmetatable(self.Sync, SyncMeta)

self.Trash = self.Trash or TrashBag()
Expand Down Expand Up @@ -253,7 +253,7 @@ Unit = ClassUnit(moho.unit_methods, IntelComponent, VeterancyComponent, DebugUni

-- cache engine calls
self.EntityId = self:GetEntityId()
self.Army = self:GetArmy()
self.Army = self.Army
self.UnitId = self:GetUnitId()
self.Brain = self:GetAIBrain()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ExperimentalPhasonLaserCollisionBeam = Class(SCCollisionBeam) {

---@param self ExperimentalPhasonLaserCollisionBeam
ScorchThread = function(self)
local army = self:GetArmy()
local army = self.Army
local size = 4.0 + (Random() * 1.0)
local CurrentPosition = self:GetPosition(1)
local LastPosition = Vector(0,0,0)
Expand Down Expand Up @@ -71,11 +71,11 @@ ExperimentalPhasonLaserCollisionBeam = Class(SCCollisionBeam) {
CreateBeamEffects = function(self)
SCCollisionBeam.CreateBeamEffects(self)
for k, v in EffectTemplate.SExperimentalPhasonLaserBeam do
local fxBeam = CreateBeamEntityToEntity(self, 0, self, 1, self:GetArmy(), v)
local fxBeam = CreateBeamEntityToEntity(self, 0, self, 1, self.Army, v)
table.insert(self.BeamEffectsBag, fxBeam)
self.Trash:Add(fxBeam)
end
-- local fxBeam = CreateBeamEntityToEntity(self, 0, self, 1, self:GetArmy(), '/effects/emitters/seraphim_expirimental_laser_beam_02_emit.bp' )
-- local fxBeam = CreateBeamEntityToEntity(self, 0, self, 1, self.Army, '/effects/emitters/seraphim_expirimental_laser_beam_02_emit.bp' )
end,
}

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ LightningSmallSurfaceCollisionBeam = Class(LightningSmallCollisionBeam) {

---@param self LightningSmallSurfaceCollisionBeam
ScorchThread = function(self)
local army = self:GetArmy()
local army = self.Army
local size = 1.1 + (Random() * 1.1)
local CurrentPosition = self:GetPosition(1)
local LastPosition = Vector(0,0,0)
Expand Down
2 changes: 1 addition & 1 deletion lua/sim/collisionBeams/MicrowaveLaserCollisionBeam01.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ MicrowaveLaserCollisionBeam01 = Class(SCCollisionBeam) {

---@param self MicrowaveLaserCollisionBeam01
ScorchThread = function(self)
local army = self:GetArmy()
local army = self.Army
local size = 1.5 + (Random() * 1.5)
local CurrentPosition = self:GetPosition(1)
local LastPosition = Vector(0,0,0)
Expand Down
2 changes: 1 addition & 1 deletion lua/sim/collisionBeams/OrbitalDeathLaserCollisionBeam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ OrbitalDeathLaserCollisionBeam = Class(SCCollisionBeam) {

---@param self OrbitalDeathLaserCollisionBeam
ScorchThread = function(self)
local army = self:GetArmy()
local army = self.Army
local size = 3.5 + (Random() * 3.5)
local CurrentPosition = self:GetPosition(1)
local LastPosition = Vector(0,0,0)
Expand Down
2 changes: 1 addition & 1 deletion lua/sim/collisionBeams/PhasonLaserCollisionBeam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PhasonLaserCollisionBeam = Class(SCCollisionBeam) {

---@param self PhasonLaserCollisionBeam
ScorchThread = function(self)
local army = self:GetArmy()
local army = self.Army
local size = 1.5 + (Random() * 1.5)
local CurrentPosition = self:GetPosition(1)
local LastPosition = Vector(0,0,0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ QuantumBeamGeneratorCollisionBeam = Class(SCCollisionBeam) {

---@param self QuantumBeamGeneratorCollisionBeam
ScorchThread = function(self)
local army = self:GetArmy()
local army = self.Army
local size = 3.5 + (Random() * 3.5)
local CurrentPosition = self:GetPosition(1)
local LastPosition = Vector(0,0,0)
Expand Down
2 changes: 1 addition & 1 deletion lua/sim/collisionBeams/TDFHiroCollisionBeam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ TDFHiroCollisionBeam = Class(CollisionBeam) {

---@param self TDFHiroCollisionBeam
ScorchThread = function(self)
local army = self:GetArmy()
local army = self.Army
local size = 1.5 + (Random() * 1.5)
local CurrentPosition = self:GetPosition(1)
local LastPosition = Vector(0,0,0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ UltraChromaticBeamGeneratorCollisionBeam = Class(SCCollisionBeam) {

---@param self UltraChromaticBeamGeneratorCollisionBeam
ScorchThread = function(self)
local army = self:GetArmy()
local army = self.Army
local size = 1 + (Random() * 1)
local CurrentPosition = self:GetPosition(1)
local LastPosition = Vector(0,0,0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ UnstablePhasonLaserCollisionBeam = Class(SCCollisionBeam) {

---@param self ExperimentalPhasonLaserCollisionBeam
ScorchThread = function(self)
local army = self:GetArmy()
local army = self.Army
local size = 1.5 + (Random() * 1.5)
local CurrentPosition = self:GetPosition(1)
local LastPosition = Vector(0,0,0)
Expand Down
2 changes: 1 addition & 1 deletion lua/sim/projectiles/OverchargeProjectile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ OverchargeProjectile = ClassSimple {

---@param self OverchargeProjectile | moho.projectile_methods
OnCreate = function(self)
self.Army = self:GetArmy()
self.Army = self.Army

if not OCProjectiles[self.Army] then
OCProjectiles[self.Army] = 0
Expand Down
2 changes: 1 addition & 1 deletion lua/sim/units/uef/TConstructionPodUnit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TConstructionPodUnit = ClassUnit(TConstructionUnit) {
---@param self TConstructionPodUnit
OnCreate = function(self)
TConstructionUnit.OnCreate(self)
self.guardDummy = CreateUnitHPR('ZXA0003', self:GetArmy(), 0,0,0,0,0,0)
self.guardDummy = CreateUnitHPR('ZXA0003', self.Army, 0,0,0,0,0,0)
self.guardDummy:AttachTo(self, -1)
self.Trash:Add(self.guardDummy)
end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CDFRocketIridium03 = Class(CIridiumRocketProjectile) {

OnImpact = function(self, targetType, targetEntity)
CIridiumRocketProjectile.OnImpact(self, targetType, targetEntity)
local army = self:GetArmy()
local army = self.Army
CreateLightParticle( self, -1, army, 2, 1, 'glow_03', 'ramp_red_06' )
CreateLightParticle( self, -1, army, 1, 3, 'glow_03', 'ramp_antimatter_02' )
end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MissileCruiseSubTerran01 = ClassProjectile(TMissileCruiseSubProjectile) {
WaitTicks(1)
local emitter = {}
for i in self.FxUnderWaterTrail do --underwater trail
table.insert(emitter, CreateEmitterOnEntity(self,self:GetArmy(),self.FxUnderWaterTrail[i]):ScaleEmitter(self.FxTrailScale):OffsetEmitter(0,0,self.FxTrailOffset))
table.insert(emitter, CreateEmitterOnEntity(self,self.Army,self.FxUnderWaterTrail[i]):ScaleEmitter(self.FxTrailScale):OffsetEmitter(0,0,self.FxTrailOffset))
end

WaitTicks(45)
Expand All @@ -31,10 +31,10 @@ MissileCruiseSubTerran01 = ClassProjectile(TMissileCruiseSubProjectile) {
for i in emitter do
emitter[i]:Destroy()
end
self.MissileExhaust = CreateBeamEmitter('/effects/emitters/missile_cruise_munition_exhaust_beam_01_emit.bp',self:GetArmy())
AttachBeamToEntity(self.MissileExhaust, self, -1, self:GetArmy())
self.MissileExhaust = CreateBeamEmitter('/effects/emitters/missile_cruise_munition_exhaust_beam_01_emit.bp',self.Army)
AttachBeamToEntity(self.MissileExhaust, self, -1, self.Army)
for i in self.FxLaunchTrails do --launch trails
CreateEmitterOnEntity(self,self:GetArmy(),self.FxLaunchTrails[i]):ScaleEmitter(self.FxTrailScale):OffsetEmitter(0,0,self.FxTrailOffset)
CreateEmitterOnEntity(self,self.Army,self.FxLaunchTrails[i]):ScaleEmitter(self.FxTrailScale):OffsetEmitter(0,0,self.FxTrailOffset)
end
WaitTicks(30) --Straight Up
self:TrackTarget(true)
Expand All @@ -44,8 +44,8 @@ MissileCruiseSubTerran01 = ClassProjectile(TMissileCruiseSubProjectile) {
self:SetBallisticAcceleration()
self.MissileExhaust:Destroy()
WaitTicks(10) --Falling
self.MissileExhaust = CreateBeamEmitter('/effects/emitters/missile_cruise_munition_exhaust_beam_02_emit.bp',self:GetArmy())
AttachBeamToEntity(self.MissileExhaust, self, -1, self:GetArmy())
self.MissileExhaust = CreateBeamEmitter('/effects/emitters/missile_cruise_munition_exhaust_beam_02_emit.bp',self.Army)
AttachBeamToEntity(self.MissileExhaust, self, -1, self.Army)
for i in self.FxTrails do --flight trails
CreateEmitterOnEntity(self,self.Army,self.FxTrails[i]):ScaleEmitter(self.FxTrailScale):OffsetEmitter(0,0,self.FxTrailOffset)
end
Expand Down
2 changes: 1 addition & 1 deletion units/UAC1101/UAC1101_Script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ UAC1101 = ClassUnit(ACivilianStructureUnit) {

OnCreate = function(self)
ACivilianStructureUnit.OnCreate(self)
local army = self:GetArmy()
local army = self.Army
for k, v in self.BoneSetE01 do
AttachBeamEntityToEntity(self, self.BoneB01, self, v, army, self.FxBeamAmbient )
end
Expand Down
4 changes: 2 additions & 2 deletions units/UEB1303/UEB1303_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ UEB1303 = ClassUnit(TMassFabricationUnit) {
self.Rotator:SetAccel(10)
self.Rotator:SetTargetSpeed(40)
self.Trash:Add(self.Rotator)
self.AmbientEffects = CreateEmitterAtEntity(self, self:GetArmy(), '/effects/emitters/uef_t3_massfab_ambient_01_emit.bp')
self.AmbientEffects = CreateEmitterAtEntity(self, self.Army, '/effects/emitters/uef_t3_massfab_ambient_01_emit.bp')
self.Trash:Add(self.AmbientEffects)

end,
Expand All @@ -37,7 +37,7 @@ UEB1303 = ClassUnit(TMassFabricationUnit) {
TMassFabricationUnit.OnProductionUnpaused(self)
self.Rotator:SetTargetSpeed(40)
self.Rotator:SetSpinDown(false)
self.AmbientEffects = CreateEmitterAtEntity(self, self:GetArmy(), '/effects/emitters/uef_t3_massfab_ambient_01_emit.bp')
self.AmbientEffects = CreateEmitterAtEntity(self, self.Army, '/effects/emitters/uef_t3_massfab_ambient_01_emit.bp')
self.Trash:Add(self.AmbientEffects)
end,
}
Expand Down
2 changes: 1 addition & 1 deletion units/UEC1501/UEC1501_Script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ UEC1501 = ClassUnit(TCivilianStructureUnit) {

OnCreate = function(self)
TCivilianStructureUnit.OnCreate(self)
local army = self:GetArmy()
local army = self.Army
for k, v in self.EffectBones01 do
CreateAttachedEmitter(self,v,army,'/effects/emitters/uec1501_smoke_01_emit.bp')
end
Expand Down
2 changes: 1 addition & 1 deletion units/XSC1101/XSC1101_Script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ UAC1101 = ClassUnit(ACivilianStructureUnit) {

OnCreate = function(self)
ACivilianStructureUnit.OnCreate(self)
local army = self:GetArmy()
local army = self.Army
for k, v in self.BoneSetE01 do
AttachBeamEntityToEntity(self, self.BoneB01, self, v, army, self.FxBeamAmbient )
end
Expand Down
2 changes: 1 addition & 1 deletion units/XSC1901/XSC1901_Script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local SCivilianStructureUnit = import("/lua/seraphimunits.lua").SCivilianStructu
XSC1901 = ClassUnit(SCivilianStructureUnit) {
OnCreate = function(self)
SCivilianStructureUnit.OnCreate(self)
local army = self:GetArmy()
local army = self.Army
--------------CreateAttachedEmitter(self,'XSC1901',army, '/effects/emitters/seraphim_rift_arch_base_01_emit.bp'):OffsetEmitter(0.00, 0.00, 0.00)
CreateAttachedEmitter(self,'XSC1901',army, '/effects/emitters/seraphim_rift_arch_base_01_emit.bp') -- glow
CreateAttachedEmitter(self,'XSC1901',army, '/effects/emitters/seraphim_rift_arch_base_02_emit.bp') -- plasma pillar
Expand Down

0 comments on commit e093afc

Please sign in to comment.