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

Tesla is no longer an event horizon #28718

Closed
wants to merge 20 commits into from

Conversation

Plykiya
Copy link
Contributor

@Plykiya Plykiya commented Jun 7, 2024

About the PR

Tesla no longer eats walls/consumes entities it passes over
Tesla phases through walls harmlessly but is contained by containment field or the generator

Why / Balance

image

I tested the change locally, imo this is the only thing needed to tone down the tesla

shocking people and exploding electronics is a decent amount of potential damage, without the exploding electronics it feels really lackluster

Technical details

  • LightningSystem no longer defaults to just the base "lightning", since different lightning types don't use the sprite randomizer
  • Fixed beams being weird by not having it go through the sprite randomizer logic
  • Beams now use static physics bodies as opposed to dynamic static bodies, so they don't get displaced by explosions (you shouldn't be able to split a lightning bolt or a beam into pieces)
  • ElectricityAnomaly now specifies what kind of lightning it shoots
  • OnHitByLightningEvent now actually causes people to get shocked as a result of the EVENT (them being targeted) rather than just randomly relying on the Electrified collision working out
  • Singularity/Tesla Generator now gets deleted after it spawns one rather than randomly relying on the non-existent EventHorizon to eat it
  • ParticleProjectiles now check for collision with the tesla and appropriately give it energy or decrease its energy
  • Tesla prevents collision with all entities besides the containment field, the containment field generators, or particle projectiles
  • Tesla is now electrified to deal contact damage when you try to pet it (why the hell was it not electrified before?)

TODO:

  • Fix chain lightning
  • Code in getting hit by lightning actually causing damage and storing the damage on a sane component
  • Fix all the recursive lightning shot TODOs
  • Make lightning last much shorter (why does it stick around for like five seconds anyways?)

Media

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase
2024-06-07.17-34-23.mp4

Breaking changes

TeslaEnergyBallComponent.cs no longer has the "ConsumeStuffEnergy" field, as it cannot consume things anymore

Changelog

🆑

  • tweak: Tesla no longer eats entities like walls or people.
  • tweak: The tesla is now electrified to the touch.
  • tweak: The tesla now has HYPER CHARGED LIGHTNING.

@github-actions github-actions bot added the Changes: No C# Changes: Requires no C# knowledge to review or fix this item. label Jun 7, 2024
@Plykiya
Copy link
Contributor Author

Plykiya commented Jun 7, 2024

you know what, I just realized that the tesla probably only spawns miniballs because it just consumes the PA projectiles like the singulo to "gain power"

I'll have to account for that, one second

turns out it also used to conveniently consume the tesla generator on spawning as well, so yet another thing to handle...

@Plykiya
Copy link
Contributor Author

Plykiya commented Jun 8, 2024

last thing to do is to have it go through walls which I'm kind out of ideas for... but it might not be necessary?

it used to achieve the "goes through wall" thing by just... consuming the damn wall with the event horizon and plowing through it
if I give the tesla no collision then it just ghosts through the containment field and becomes uncontainable

it can get around the station like 99% of the time even without the ability to ghost through walls because it will continuously target doors non-stop until the doors explode every wall around them before destroying the door itself

it kind of opens the door to cheesing containment by just... building a fully solid container made of walls and windows for the emitters to shoot through

if anyone has implementation ideas for this, I'd love to hear it

@EmoGarbage404
Copy link
Member

if anyone has implementation ideas for this, I'd love to hear it

Could just implement c# logic that cancels the collision if the thing its colliding with has a structure tag or w/e

@Plykiya
Copy link
Contributor Author

Plykiya commented Jun 8, 2024

if anyone has implementation ideas for this, I'd love to hear it

Could just implement c# logic that cancels the collision if the thing its colliding with has a structure tag or w/e

thanks, works, all ready for review now

@Plykiya
Copy link
Contributor Author

Plykiya commented Jun 8, 2024

something to note
if #28747 gets merged, a no miniball baby tesla dies in one or two hits of the particle decelerator, a fully souped out tesla will take like nine or ten hits

@Plykiya
Copy link
Contributor Author

Plykiya commented Jun 9, 2024

#28797 damn, false alarm, it didn't fix beam stuff

I at least figured out why beam stuff is kind of fucked for the lightning. It has to deal with how the lightning is choosing the sprites.

@github-actions github-actions bot added the S: Needs Review Status: Requires additional reviews before being fully accepted label Jun 10, 2024
@Plykiya
Copy link
Contributor Author

Plykiya commented Jun 10, 2024

current implementation does not successfully work out for chained lightning hits
god I hate lightning code so much
it's made so much harder by the lightningPrototype being a string and something I can't access and the recursive function giving me no access to the actual lightning or source of lightning itself

@luizwritescode
Copy link
Contributor

the recursive function giving me no access to the actual lightning or source of lightning itself

Well, I'm not sure how to solve this "correctly", but adding a callback to the recursive function as a getter for lighting source might fix this issue.

@metalgearsloth
Copy link
Contributor

Is this ready for review or

@Plykiya
Copy link
Contributor Author

Plykiya commented Jun 14, 2024

Is this ready for review or

not yet, although I can't really draft the PR for some reason

@metalgearsloth metalgearsloth marked this pull request as draft June 14, 2024 06:21
@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Aug 1, 2024
Copy link
Contributor

github-actions bot commented Aug 1, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Plykiya Plykiya closed this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: No C# Changes: Requires no C# knowledge to review or fix this item. S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted S: Needs Review Status: Requires additional reviews before being fully accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants