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

Conversation

lL1l1
Copy link
Contributor

@lL1l1 lL1l1 commented Apr 9, 2024

Description of the proposed changes

  • Moves the collision beams into separate files like we have with weapons and projectiles.
  • Some of them had effects that weren't in the effect templates file, so I moved those effects there.
  • I also did basic upvaluing for terrain interactions in CollisionBeam.lua, similar to how terrain interactions are done in projectile.lua.

Testing done on the proposed changes

Spawned all units with beams and made sure there are no errors when firing: Land/air units:
   CreateUnitAtMouse('xrb0304', 0,    3.26,   -4.52, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,    3.26,   -0.52, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,    3.26,   -6.52, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,    3.26,   -2.52, -0.00000)
   CreateUnitAtMouse('url0402', 0,   13.26,    7.48, -0.00000)
   CreateUnitAtMouse('ual0401', 0,    8.26,    7.48, -0.00000)
   CreateUnitAtMouse('xab1401', 0,   -6.74,   -2.52, -0.00000)
   CreateUnitAtMouse('uaa0310', 0,  -20.24,    0.97, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,    3.26,    1.48, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,   -0.74,   -4.52, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,   -0.74,   -6.52, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,    1.26,    1.48, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,   -0.74,   -2.52, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,    1.26,   -0.52, -0.00000)
   CreateUnitAtMouse('xea0002', 0,    1.04,    9.47, -0.00197)
   CreateUnitAtMouse('url0001', 0,   -5.74,    7.48, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,   -0.74,    1.48, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,   -0.74,   -0.52, -0.00000)
   CreateUnitAtMouse('xsb2301', 0,   -8.74,    7.48, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,    1.26,   -6.52, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,    1.26,   -2.52, -0.00000)
   CreateUnitAtMouse('xrb0304', 0,    1.26,   -4.52, -0.00000)

Naval units:

   CreateUnitAtMouse('xss0201', 0,    5.25,   -0.25,  0.34907)
   CreateUnitAtMouse('xes0307', 0,   -5.25,    0.25,  0.48869)

Additional context

Next I want to create a scorching beam class so that I don't have to copy code across 7 beams to fix the bug where ground splats appear when hitting naval units with beams, since that's my original goal here.

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version

@lL1l1 lL1l1 added the area: code style code refactoring label Apr 9, 2024
Remove unnecessary spaces in function calls for scorching beams
Add spaces to table creations of single values in tractor claw beam
@Garanas Garanas merged commit f925f48 into FAForever:deploy/fafdevelop Apr 21, 2024
clyfordv added a commit to clyfordv/fa that referenced this pull request Apr 23, 2024
commit ceb09ce
Author: Josh <[email protected]>
Date:   Tue Apr 23 09:35:48 2024 +0100

    Balance : TML Hp Reduction & Adds Death Weapon (FAForever#6104)

    Co-authored-by: lL1l1 <[email protected]>

commit 23ebe48
Author: lL1l1 <[email protected]>
Date:   Mon Apr 22 12:06:13 2024 -0700

    Fix units not rebuilding on army transfer (FAForever#6106)

commit 5f7b2a9
Author: clyf <[email protected]>
Date:   Mon Apr 22 04:15:20 2024 -0400

    Simplify and robustify transport cargo killing and veterancy (FAForever#6091)

    Co-authored-by: lL1l1 <[email protected]>

commit d3ef3c0
Author: lL1l1 <[email protected]>
Date:   Sun Apr 21 10:02:18 2024 -0700

    Inherit all damage data in Ahwassa bomb script (FAForever#6102)

commit f925f48
Author: lL1l1 <[email protected]>
Date:   Sat Apr 20 22:21:57 2024 -0700

    Refactor collision beams (FAForever#6065)

commit 24abffa
Author: G C <[email protected]>
Date:   Sat Apr 20 08:45:44 2024 -0700

    Quicken inevitable voting results (FAForever#5088)

commit 2547d18
Author: (Jip) Willem Wijnia <[email protected]>
Date:   Sat Apr 20 09:28:24 2024 +0200

    Introduce basic anti-spam protection from taunts (FAForever#6099)

commit 1635090
Author: (Jip) Willem Wijnia <[email protected]>
Date:   Sat Apr 20 09:25:23 2024 +0200

    Revert "Remove mass from dead trees and tree groups" (FAForever#6101)

commit ca94bd8
Author: lL1l1 <[email protected]>
Date:   Fri Apr 19 15:09:17 2024 -0700

    Revert "Remove mass from dead trees and tree groups" (FAForever#6100)

commit 524fc7f
Author: clyf <[email protected]>
Date:   Fri Apr 19 10:42:27 2024 -0400

    Fix being able to detach the external factory of the primary unit (FAForever#6093)

commit 7993337
Author: lL1l1 <[email protected]>
Date:   Thu Apr 18 00:53:13 2024 -0700

    Revert hoplite firing from transports (FAForever#6094)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: code style code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants