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

Refactor collision beams #6065

Merged
merged 16 commits into from
Apr 21, 2024
Merged
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
2 changes: 2 additions & 0 deletions changelog/3810.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@

- (#5668, #6066) Rework Seraphim weapon modules

- (#6065) Refactor collision beam modules

- (#6067) Fix a performance issue related to AIs and their transport logic

- (#6041, #6055) Clean up the blueprint-files of various structures.
Expand Down
12 changes: 6 additions & 6 deletions engine/Sim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ end
--- creates a beam, which then needs to be attached to a bone
---@see AttachBeamToEntity(emitter, entity, bone, army) # to attach the beam to an entity bone
---@see CreateBeamEmitterOnEntity(object, tobone, army, blueprint) # to create an attached beam emitter at once
---@param blueprint string
---@param blueprint FileName
---@param army Army
---@return moho.IEffect
function CreateBeamEmitter(blueprint, army)
Expand All @@ -156,7 +156,7 @@ end
---@param object BoneObject
---@param tobone Bone
---@param army Army
---@param blueprint string
---@param blueprint FileName
---@return moho.IEffect
function CreateBeamEmitterOnEntity(object, tobone, army, blueprint)
end
Expand Down Expand Up @@ -425,7 +425,7 @@ end
--- Creates a unit from a blueprint for an army, at a position with quaternion orientation
---@see CreateUnit2() # simple version
---@see CreateUnitHPR() # heading-pitch-roll version
---@param blueprint string
---@param blueprintId string
---@param army Army
---@param x number
---@param y number
Expand All @@ -436,20 +436,20 @@ end
---@param qw number
---@param layer? number
---@return Unit
function CreateUnit(blueprint, army, x, y, z, qx, qy, qz, qw, layer)
function CreateUnit(blueprintId, army, x, y, z, qx, qy, qz, qw, layer)
end

--- Creates a unit from a blueprint for an army, at an X-Z map point with a heading
---@see CreateUnit() # quaternion version
---@see CreateUnitHPR() # heading-pitch-roll version
---@param blueprint string
---@param blueprintId string
---@param army Army
---@param layer? number
---@param x number
---@param z number
---@param heading number
---@return Unit
function CreateUnit2(blueprint, army, layer, x, z, heading)
function CreateUnit2(blueprintId, army, layer, x, z, heading)
end

--- Creates a unit from a blueprint for an army, at a position with heading, pitch, and roll
Expand Down
111 changes: 111 additions & 0 deletions lua/EffectTemplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ SeraphimTeleportInWeapon01 = {

-- ---------------------------------------------------------------
-- -- -- -- UNIT CONSTRUCTION -- -- --
-- ---------------------------------------------------------------

-- ---------------------------------------------------------------
-- Build Effects
Expand Down Expand Up @@ -617,6 +618,7 @@ UpgradeBoneAmbient = {

-- ---------------------------------------------------------------
-- -- -- -- UNIT TRANSPORT BEAMS -- -- --
-- ---------------------------------------------------------------

-- ---------------------------------------------------------------
-- Terran Transport Beam Effects
Expand All @@ -641,6 +643,7 @@ ACollossusTractorBeamCrush01 = {

-- ---------------------------------------------------------------
-- -- -- -- UNIT MOVEMENT -- -- --
-- ---------------------------------------------------------------

-- ---------------------------------------------------------------
-- Sea Unit Environmental Effects
Expand Down Expand Up @@ -728,6 +731,7 @@ AeonOpHackACU = {

-- ---------------------------------------------------------------
-- -- -- -- AEON PROJECTILES -- -- --
-- ---------------------------------------------------------------

AMercyGuidedMissileSplit = {
EmtBpPath .. 'aeon_mercy_guided_missile_split_01.bp',
Expand Down Expand Up @@ -1156,6 +1160,10 @@ AQuarkBombHitUnit01 = AQuarkBombHit01
AQuarkBombHitAirUnit01 = AQuarkBombHit02
AQuarkBombHitLand01 = AQuarkBombHit01

APhasonLaserBeam = {
EmtBpPath .. 'phason_laser_beam_01_emit.bp',
}

APhasonLaserMuzzle01 = {
EmtBpPath .. 'phason_laser_muzzle_01_emit.bp',
EmtBpPath .. 'phason_laser_muzzle_02_emit.bp',
Expand Down Expand Up @@ -1245,6 +1253,7 @@ ATorpedoPolyTrails01 = EmtBpPath .. 'aeon_torpedocluster_polytrail_01_emit.bp'

-- ---------------------------------------------------------------
-- -- -- -- CYBRAN UNIT AMBIENT EFFECTS -- -- --
-- ---------------------------------------------------------------

CCivilianBuildingInfectionAmbient = {
EmtBpPath .. 'cybran_building01_infect_ambient_01_emit.bp',
Expand Down Expand Up @@ -1311,6 +1320,16 @@ CSoothSayerAmbient = {

-- ---------------------------------------------------------------
-- -- -- -- CYBRAN PROJECTILES -- -- --
-- ---------------------------------------------------------------

CZapperBeam = {
EmtBpPath .. 'zapper_beam_01_emit.bp',
}

CZapperHit01 = {
EmtBpPath .. 'cannon_muzzle_flash_01_emit.bp',
EmtBpPath .. 'sparks_07_emit.bp',
}

CBrackmanCrabPegPodSplit01 = {
EmtBpPath .. 'cybran_brackman_crab_pegpod_split_01_emit.bp',
Expand Down Expand Up @@ -1609,6 +1628,14 @@ CLaserMuzzleFlash03 = {
EmtBpPath .. 'cybran_laser_muzzle_flash_04_emit.bp',
}

CMicrowaveLaserBeam01 = {
EmtBpPath .. 'microwave_laser_beam_01_emit.bp',
}

CMicrowaveLaserBeam02 = { -- thinner ACU laser
EmtBpPath .. 'microwave_laser_beam_02_emit.bp',
}

CMicrowaveLaserMuzzle01 = {
EmtBpPath .. 'microwave_laser_flash_01_emit.bp',
EmtBpPath .. 'microwave_laser_muzzle_01_emit.bp',
Expand Down Expand Up @@ -1726,6 +1753,15 @@ CParticleCannonHit01 = { EmtBpPath .. 'laserturret_hit_flash_01_emit.bp', }
CParticleCannonHitUnit01 = table.concatenate(CParticleCannonHit01, UnitHitShrapnel01)
CParticleCannonHitLand01 = table.concatenate(CParticleCannonHit01)

CParticleCannonBeam = { -- For unused particle cannon beam
EmtBpPath .. 'particle_cannon_beam_01_emit.bp',
EmtBpPath .. 'particle_cannon_beam_02_emit.bp',
}
CParticleCannonHit02 = { -- For unused particle cannon beam
EmtBpPath .. 'particle_cannon_end_01_emit.bp',
EmtBpPath .. 'particle_cannon_end_02_emit.bp',
}

CProtonBombHit01 = {
EmtBpPath .. 'proton_bomb_hit_01_emit.bp',
EmtBpPath .. 'proton_bomb_hit_02_emit.bp',
Expand Down Expand Up @@ -1846,6 +1882,32 @@ CMobileBeetleExplosion = {
-- -- -- -- UEF PROJECTILES (previously Terran) -- -- --
-- ---------------------------------------------------------------

-- ------------------------------------------------------------------------
-- TERRAN ORBITAL DEATH LASER EMITTERS
-- ------------------------------------------------------------------------
TOrbitalDeathLaserBeam = {
EmtBpPath .. 'uef_orbital_death_laser_beam_01_emit.bp'
}

TOrbitalDeathLaserMuzzleFlash01 = {
EmtBpPath .. 'uef_orbital_death_laser_muzzle_01_emit.bp', -- random bright blueish dots
EmtBpPath .. 'uef_orbital_death_laser_muzzle_02_emit.bp', -- molecular, small details
EmtBpPath .. 'uef_orbital_death_laser_muzzle_03_emit.bp', -- darkening lines
EmtBpPath .. 'uef_orbital_death_laser_muzzle_04_emit.bp', -- small downward sparks
EmtBpPath .. 'uef_orbital_death_laser_muzzle_05_emit.bp', -- big glow
}

TOrbitalDeathLaserHit01 = {
EmtBpPath .. 'uef_orbital_death_laser_end_01_emit.bp', -- big glow
EmtBpPath .. 'uef_orbital_death_laser_end_02_emit.bp', -- random bright blueish dots
EmtBpPath .. 'uef_orbital_death_laser_end_03_emit.bp', -- darkening lines
EmtBpPath .. 'uef_orbital_death_laser_end_04_emit.bp', -- molecular, small details
EmtBpPath .. 'uef_orbital_death_laser_end_05_emit.bp', -- rings
EmtBpPath .. 'uef_orbital_death_laser_end_06_emit.bp', -- upward sparks
EmtBpPath .. 'uef_orbital_death_laser_end_07_emit.bp', -- outward line streaks
EmtBpPath .. 'uef_orbital_death_laser_end_08_emit.bp', -- center glow
EmtBpPath .. 'uef_orbital_death_laser_end_distort_emit.bp', -- screen distortion
}

-- ------------------------------------------------------------------------
-- TERRAN ANTI-MATTER SHELL EMITTERS
Expand Down Expand Up @@ -2111,6 +2173,24 @@ TAAGinsuHitUnit = {
EmtBpPath .. 'destruction_unit_hit_shrapnel_01_emit.bp',
}

TAAGinsuBeam = { -- unused
EmtBpPath .. 'riot_gun_beam_01_emit.bp',
EmtBpPath .. 'riot_gun_beam_02_emit.bp',
}

TAAGinsuEndPoint = { -- unused
EmtBpPath .. 'sparks_02_emit.bp',
}

TAAGinsuHitLand02 = { -- unused
EmtBpPath .. 'destruction_land_hit_puff_01_emit.bp',
EmtBpPath .. 'destruction_explosion_flash_01_emit.bp',
}

TAAGinsuHitUnit02 = { -- unused
EmtBpPath .. 'riotgun_hit_flash_01_emit.bp',
}


-- ------------------------------------------------------------------------
-- TERRAN HEAVY FRAGMENTATION GRENADE EMITTERS
Expand Down Expand Up @@ -4328,6 +4408,37 @@ SDFSniperShotPolytrail = {
-- -- -- -- -- -- -- AEON PROJECTILES -- -- -- -- -- --
-- ---------------------------------------------------------------

ADisruptorBeamBeam = {
EmtBpPath .. 'disruptor_beam_01_emit.bp',
}

ADisruptorBeamMuzzleFlash01 = {
EmtBpPath .. 'aeon_commander_disruptor_flash_01_emit.bp',
EmtBpPath .. 'aeon_commander_disruptor_flash_02_emit.bp',
}

ADisruptorBeamHit01 = {
EmtBpPath .. 'aeon_commander_disruptor_hit_01_emit.bp',
EmtBpPath .. 'aeon_commander_disruptor_hit_02_emit.bp',
}

AQuantumBeamGeneratorBeam = {
EmtBpPath .. 'quantum_generator_beam_01_emit.bp',
}

AQuantumBeamGeneratorMuzzleFlash01 = {
EmtBpPath .. 'quantum_generator_01_emit.bp',
EmtBpPath .. 'quantum_generator_02_emit.bp',
EmtBpPath .. 'quantum_generator_04_emit.bp',
}

AQuantumBeamGeneratorHit01 = {
EmtBpPath .. 'quantum_generator_end_01_emit.bp',
EmtBpPath .. 'quantum_generator_end_03_emit.bp',
EmtBpPath .. 'quantum_generator_end_04_emit.bp',
EmtBpPath .. 'quantum_generator_end_05_emit.bp',
EmtBpPath .. 'quantum_generator_end_06_emit.bp',
}

Aeon_QuadLightLaserCannonMuzzleFlash = {
EmtBpPath .. 'aeon_dualquantum_cannon_muzzle_flash_emit.bp',
Expand Down
Loading