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 two vermin infestation issues #28181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

warriorstar-orion
Copy link
Contributor

What Does This PR Do

This PR fixes two issues with the vermin infestation event. The first is that locating an area always returns a result, even if that area has no turfs, meaning a station without the chosen area (like Meta using Turbine instead of Incinerator) will silently fail. The second is that the turf_clear method it was using for checking for available spawn points was awful, essentially excluding any floor with any contents whatsoever: lights, underfloor cables, etc. This meant that for example, Metastation tech storage was seen as having no eligible turfs for spawning:

2025_01_29__23_21_44__paradise dme  metastation dmm  - StrongDMM

Despite having tons of floor space.

Why It's Good For The Game

More reliable event.

Testing

Used event manager to run Vermin Infestation event, ensured results were still random and all expected locations worked.


Declaration

  • I confirm that I either do not require pre-approval for this PR, or I have obtained such approval and have included a screenshot to demonstrate this below.

Changelog

🆑
fix: Vermin infestation events will now more reliably trigger.
/:cl:

@ParadiseSS13-Bot ParadiseSS13-Bot added the -Status: Awaiting review This PR is awaiting review from the review team label Jan 30, 2025
@ParadiseSS13-Bot ParadiseSS13-Bot added -Status: Awaiting merge This PR is ready for merge and removed -Status: Awaiting review This PR is awaiting review from the review team labels Jan 31, 2025
Copy link
Contributor

@lewcc lewcc left a comment

Choose a reason for hiding this comment

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

LGTM, just a quick nit


log_debug("Failed to locate area for infestation event!")
kill()
return
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting merge This PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants