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

make teslas great again #1916

Merged
merged 4 commits into from
Oct 27, 2024
Merged

Conversation

MilonPL
Copy link
Member

@MilonPL MilonPL commented Sep 26, 2024

About the PR

Added a passive drain to teslas (3 per second, might need to be adjusted). Once it reaches 100 power, a bunch of lightning balls spawn and power goes back to 0. If it reaches -100, the tesla despawns.
Also replaced the ChasingWalk with RandomWalk so it has randomized pathfinding like the singulo.
Uncommented the spawns, cargo can order it too.

Why / Balance

There was a bunch of discussion about it before, I think it ended up with "wyci" so I coded it. Yippee.
The main point against having teslas was that it was a guaranteed round end, so well, it's not a guaranteed round end anymore. Also you need the PA to be constantly on, like with the singulo, or it's just going to die. Can't wait for engi to fuck up.

Technical details

Uncomments spawns, minor changes to the yaml file, I tried to avoid touching upstream code so this only adds two datafields to the component (which could be done with a separate component too but that feels like just bloat at this point), the actual updates are being handled by a separate system using the public AdjustEnergy() method. Had to add access to the component to modify the DataFields, again, could be all done in a separate TeslaPassiveEnergyDrainComponent instead or whatever.
Decided to change the system to partial instead and add TeslaEnergyBallSystem.PassiveDrain.cs on in the DeltaV namespace to avoid having to call it and also avoid the access issues. Maybe I overcomplicated it. I dunno.

Requirements

Breaking changes

Changelog

🆑

  • add: Re-added teslas!
  • tweak: Tesla now has a random pathfinding and a passive energy drain. Don't forget to leave the PA on!

@MilonPL MilonPL requested review from a team as code owners September 26, 2024 13:44
@github-actions github-actions bot added S: Needs Review Changes: YML Changes any yml files Changes: C# Changes any cs files labels Sep 26, 2024
@MilonPL MilonPL requested a review from a team September 26, 2024 13:45
@MilonPL MilonPL added S: Do Not Merge Don't merge this yet S: Needs Discussion Must be discussed labels Sep 26, 2024
@Avalon-Proto
Copy link
Contributor

THE GRAND RETURN OF LORD TESLOTH!

@dotCatshark
Copy link
Contributor

consider changing it so that the tesla only loses energy when it eats something. i think making it require the pa to run removes some of the uniqueness of it. you might be able to cannibalize the code for that from the singulo code (singulo should gain energy as it consumes stuff. if it doesnt then that particular mechanic from 13 wasnt ported... for some reason)

@MilonPL
Copy link
Member Author

MilonPL commented Sep 26, 2024

consider changing it so that the tesla only loses energy when it eats something. i think making it require the pa to run removes some of the uniqueness of it. you might be able to cannibalize the code for that from the singulo code (singulo should gain energy as it consumes stuff. if it doesnt then that particular mechanic from 13 wasnt ported... for some reason)

All you'd have to do is flip ConsumeStuffEnergy from 2 to -2 technically. But then the tesla is kinda guaranteed to fade away pretty soon.

@deltanedas
Copy link
Member

if it lost energy by consuming i think it would be fine to keep the targeted walk since it would go after power infrastructure etc then die

@MilonPL MilonPL removed S: Do Not Merge Don't merge this yet S: Needs Discussion Must be discussed labels Oct 5, 2024
@MilonPL
Copy link
Member Author

MilonPL commented Oct 5, 2024

@deltanedas this is ready for review fyi, game directors fake anyways and I haven't heard any other ideas regarding how to implement this

Copy link
Member

@deltanedas deltanedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i forgot to request changes ages ago

@MilonPL
Copy link
Member Author

MilonPL commented Oct 27, 2024

i forgot to request changes ages ago

no fucking way i though you just hated it

@deltanedas
Copy link
Member

forgot to click a button highly real

@MilonPL MilonPL requested a review from deltanedas October 27, 2024 21:41
@deltanedas deltanedas merged commit ede4628 into DeltaV-Station:master Oct 27, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: YML Changes any yml files S: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants