-
Notifications
You must be signed in to change notification settings - Fork 281
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
feat(content): Support for antigrav #5502
base: main
Are you sure you want to change the base?
feat(content): Support for antigrav #5502
Conversation
PLEASE do not merge this before json changes are documented |
Only thought I have so far is: since rotors had their stupid janky invisible hitboxes removed, what functionally is the difference between rotor size and repulsion? What does a repulsor do differently compared to what a rotor does, besides have a different name? If they both do the same thing then it's possible we could be using a generic "max lift" property for both? Obviously in the future we mainly need to distinguish between 100% always-on lift (for airships), on-so-long-as-engine-is-running lift (helis), and must-stay-moving lift (for airplanes), but raw "liftiness" could be a unified stat for now unless your code has a current reason for them to be separate stats. |
@chaosvolt the main difference right now is that propulsor lift scales linearly while increasing the rotor area doesn't. For example, doubling the number of repulsors doubles your lift, while doubling total rotor area only increases your lift by about 1.2. But I totally understand if that's not differentiated enough, and it might not be super clear to the user that the scaling is different as well |
Ah, interesting. I think I do like the idea of linear lift scaling too, as well... |
…hicle construction * update repulsors.json to be more clear that repulsors are just a test/placeholder for now (please don't read the branch name please) * Make it so only rotor craft make rotor noises * add new has_lift() function to check if vehicle generates any lift at all
…-Jr/Cataclysm-BN into support-for-antigrav
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
I could foresee rotor damage on taking off next to a building coming back but only if we:
|
@@ -913,6 +928,11 @@ int vpart_info::rotor_diameter() const | |||
return has_flag( VPFLAG_ROTOR ) ? rotor_info->rotor_diameter : 0; | |||
} | |||
|
|||
float vpart_info::repulsion() const | |||
{ | |||
return has_flag( "REPULSOR" ) ? repulsor_info->repulsion : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth extracting to a VPFLAG_*
, since it's going to be checked a lot.
@@ -4081,7 +4085,7 @@ void vehicle::noise_and_smoke( int load, time_duration time ) | |||
spew_field( mufflesmoke, exhaust_part, fd_smoke, | |||
bad_filter ? fd_smoke.obj().get_max_intensity() : 1 ); | |||
} | |||
if( is_flying && is_rotorcraft() ) { | |||
if( is_flying && has_part( "ROTOR" ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check for the VPFLAG_*
variant of the flag preferred.
Checklist
Required
main
so it won't cause conflict when updatingmain
branch later.Optional
doc/
folder.lang/bn_extract_json_strings.sh
script if it does not support them yet.Purpose of change
Add support for flying vehicles powered by anti-gravity repulsors, as opposed to rotors. Also includes a test repulsor.
Describe the solution
The game assumes that all flying vehicles will be helicopters, so this replaces references to "rotorcraft" with "aircraft" where necessary. In addition, I've added some functions which repulsor craft use to calculate lift, and added a [ "REPULSOR" ] tag which vehicle parts can now use.
Describe alternatives you've considered
Balloons?
Testing
Have not tested this yet
Additional context