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

Desnowflakes mechs, take 3 (actually functional edition) #10014

Merged
merged 54 commits into from
May 18, 2024

Conversation

Tsar-Salat
Copy link
Contributor

@Tsar-Salat Tsar-Salat commented Oct 12, 2023

Main PR

Fixes

About The Pull Request

Title. The goal of this PR is to make mechs a subtype of vehicle/sealed/, and thereby removing a lot of snowflake code for them.

Some improvements were made to mech code in general, but generally, they all follow this common theme.

This is not a Mech Rework or a Mech Revamp. It effectively is just a typepath change, and switching all the core mech code to use vehicle vars.

I cut every commit up by file.

TODO

Why It's Good For The Game

Kills the biggest snowflake in the game. Allows us to achieve parity with literally any mechcode improvements on other codebases(they all ported this 4 years ago).

Required for TGUIfication of Mech UI's (they suck rn)

Requirement for Modsuits (Through AI code)

Testing Photographs and Procedure

Screenshots&Videos

Slowdown

dreamseeker_A6fe7lKtMx.mp4

These dont fit below 10MB no matter how much I compress them

https://imgur.com/a/RqfKhcu

Changelog

🆑 rkz, Tiviplus, msgerbs, Ghommie, Fikou, necromanceranne
refactor: mechs are now a vehicle subtype, instead of Winter Wonderland snowflake code
tweak: mechs no longer need to use middle click as a janky override to utilize their equipment.
fix: fixed bugs with inconsistent mech equipment balloons/to_chat
fix: fixed mechs with ballistics shooting themselves while moving
/:cl:

@github-actions
Copy link

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

Copy link

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

@PowerfulBacon
Copy link
Member

I cannot fix this at the moment, seems to be a projectile issue mainly. Weirdly every direction moved except NORTH can hit. Messed up logic possibly?

If you haven't fixed this already, I believe this is an issue to do with marking the firer of a projectile. I believe that is the variable of projectiles which says who fired the projectile and who it shouldn't collide with, although it may be separated into a different one.

@Tsar-Salat Tsar-Salat requested a review from a team as a code owner April 27, 2024 14:50
@Tsar-Salat
Copy link
Contributor Author

I believe this is an issue to do with marking the firer of a projectile

Yes you were correct. I found the mecha weapon code that fired the projectile and just set the mech vehicle to be the firer.

Seems to have resolved the issue.
dca4858

Copy link

github-actions bot commented May 7, 2024

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

Copy link

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

/obj/vehicle/sealed/mecha/vehicle_move(direction, forcerotate = FALSE)
if(!COOLDOWN_FINISHED(src, cooldown_vehicle_move))
return FALSE
COOLDOWN_START(src, cooldown_vehicle_move, movedelay + step_restricted)
Copy link
Member

Choose a reason for hiding this comment

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

Should this include the step multiplier?

Copy link
Contributor Author

@Tsar-Salat Tsar-Salat May 17, 2024

Choose a reason for hiding this comment

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

Honestly, I forgot to include it, but I'm not even certain the change is necessary as we are on vehicle_move now instead of snowflake code.

I tested the times across a 34 tile length on box:

  • 11.99 seconds as gygax unaltered
  • 05.41 seconds as gygax actuator
  • 07.04 on foot
dreamseeker_GKOsKFN6Ry.mp4

I later tested by swapping between leg actuator and regular gygax mode, and the movespeed changed each time correctly.

The overall goal in #9673 was making them slower than the base carbon movespeed and ensuring they stayed that way, I think that has been achieved.

lmk your thoughts

Edit: Heres a larger 72 tile length, so the timing is more noticeable

Human: 14.71
Gygax: 25.13

8mb.video-ewF-Ok0PGyfE.mp4

@PowerfulBacon PowerfulBacon added this pull request to the merge queue May 18, 2024
@PowerfulBacon
Copy link
Member

Seems fine to me then

Merged via the queue into BeeStation:master with commit f907edb May 18, 2024
8 checks passed
@Tsar-Salat Tsar-Salat deleted the mech-refactor-tak3 branch June 16, 2024 13:48
@Tsar-Salat Tsar-Salat restored the mech-refactor-tak3 branch August 12, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants