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

NTSL Achievements Fix #233

Merged
merged 1 commit into from
Feb 9, 2025
Merged

Conversation

untrius
Copy link
Contributor

@untrius untrius commented Feb 9, 2025

About The Pull Request

It seemed suspicious that no one had either of the NTSL achievements yet, so I took a look at what the code was doing on a separate branch.

The first issue was that when checking if the player uploading the NTSL script is a Telecomms Specialist, the code was comparing the player's job datatype with the Telecomms Specialist job name string. This will always return false.

image
image

The second issue is only for the achievement for blocking Poly on comms. The intended checks for this are, to check that Poly is blocked, then check that a nameless user is not blocked. The second check had a double negation on it, so the achievement was only given if effectively all users were blocked from comms. This is clearly not the intended behavior.

Known corner case: The achievement for making Poly loud, will be awarded even if everyone on comms is made loud. While this feels against the point of the achievement, I don't think this should be prevented, as the goal was adequately satisfied.

Known Issue: The 8 servers compile the code all at the same time, before each trying to award one of the achievements. This means either achievement will be awarded 8 times. This spams chat and the End of Round Summary, but otherwise appears harmless. It does not inflate the achievement score, and it does not add extra rows to the achievements table.

image
image
image
image

I can think of 2 potential solutions:

  1. Restrict the achievements to a specific radio channel. But this can cause confusion if Poly is put on a different channel, or if tcomms has been rebuilt from scratch.
  2. Use a mutex so only one tcomms server is allowed to call give_award() at a time. At this time, I don't know if DM supports mutex's or how one would correctly implement their behavior in DM. I may look into this in the future.

Why it's Good for the Game

Bugfix: broken achievements are now available

Proof of Testing

I am using an alt title to prove the achievements are still awarded while using them:
image

Silence Bird:

NTSL Code ![image](https://github.com/user-attachments/assets/f1ee297b-4883-4749-b733-a67edad5018a)

image

Embrace The Bird:

NTSL Code ![image](https://github.com/user-attachments/assets/207b95ed-25be-4da5-956d-1ac74b476109)

image

Changelog

🆑
fix: NTSL achievements are now awardable
/:cl:

@SynthTwo SynthTwo merged commit 0672c74 into IrisSS13:master Feb 9, 2025
22 checks passed
@untrius untrius deleted the ntsl_achievements_fix branch February 11, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants