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

Fix first use of USCM equipment presets #4859

Merged

Conversation

Drulikar
Copy link
Contributor

@Drulikar Drulikar commented Nov 6, 2023

About the pull request

This PR likely fixes numerous runtimes and weird issues where the first mob that uses an equipment preset will have an ID with no assignment in its name, no paygrade set, etc. This is because for some reason set_status was being used for some USCM to assign the preset's values that should have already been in the definition. Since set_status wasn't the first proc to be called in load_preset, this would result in null values such as in load_id which normally occurs before load_status.

Other values such as access and minimap icon should now be accurate (or at least the values intended as written before), but I don't know the extents of what problems those may have been for the first player of any USCM preset.

Explain why it's good for the game

The equipment presets should work with every use, not just after the first time.

Testing Photographs and Procedure

  1. Open Create Humans menu
  2. Spawn a cryo combat tech
  3. Receive a runtime for their account not getting set up because paygrade is now null
  4. Observe ID has no assignment set (so the name of the ID only contains their name)
  5. Spawn another cryo combat tech again
  6. Receive no runtime, ID name has assignment, they have a money account, etc.

Changelog

🆑 Drathek
fix: Fix the first use of a USCM equipment preset (such as cryo marines) not properly loading rank and other values
/:cl:

…preset is unset (otherwise runtimes in load_id for cryo marines loading accounts)
…status that other procs (like load_id) expected to already be set
@github-actions github-actions bot added the Fix Fix one bug, make ten more label Nov 6, 2023
@realforest2001 realforest2001 added this pull request to the merge queue Nov 7, 2023
Merged via the queue into cmss13-devs:master with commit bc3d517 Nov 8, 2023
26 checks passed
cm13-github added a commit that referenced this pull request Nov 8, 2023
@Drulikar Drulikar deleted the Fix_equipment_presets_load_order branch November 8, 2023 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Fix one bug, make ten more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants