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 unit tests #1727

Merged
merged 10 commits into from
Jan 11, 2025
Merged

Conversation

m-dzianishchyts
Copy link
Collaborator

@m-dzianishchyts m-dzianishchyts commented Jan 4, 2025

Что этот PR делает

Чинит падающие тесты.
Тестовые куклы спавнились в космосе из-за того, что у нас другой уровень ЦК. Теперь все на своих местах.

Summary by Sourcery

Tests:

  • Add a test to assert that the cultist target is at full health before being attacked.

Summary by Sourcery

Update the coordinates of the spawn point for test puppets in the admin area to match the updated centcomm map.

Bug Fixes:

  • Fix the issue with test puppets spawning in space during unit tests.

Tests:

  • Update tests to use the new spawn coordinates.

@m-dzianishchyts m-dzianishchyts added the 📜 CL не требуется Эти изменения не влияют на игровой процесс или игроки по какой-то причине не должны о них знать label Jan 4, 2025
Copy link

sourcery-ai bot commented Jan 4, 2025

Reviewer's Guide by Sourcery

This PR fixes failing tests by updating the spawn location of test puppets. The puppets were spawning in space due to a different centcomm level being used in the tests. The spawn location has been corrected to be within the admin testing area.

Sequence diagram for updated throwing object cleanup

sequenceDiagram
    participant T as Thrownthing
    participant SS as SSthrowing Subsystem
    T->>+SS: Destroy()
    SS->>SS: Remove from processing list
    alt currentrun exists
        SS->>SS: Remove from currentrun list
    end
    SS-->>-T: Clear throwing references
Loading

File-Level Changes

Change Details Files
Fix puppet spawn location
  • Updated the initial location of test puppets to locate(20, 210, 1), which is the center of the admin testing area in test_centcomm.dmm. This fixes the issue of puppets spawning in space.
  • Added a null check before removing thrown things from the current run in SSthrowing.dm to prevent runtime errors. This ensures that the current run is not null before attempting to remove an item from it.
code/tests/_game_test_puppeteer.dm
Enable test centcomm by default in test mode
  • Added a preprocessor directive to enable the test centcomm (test_centcomm.dmm) when GAME_TEST is defined. This ensures that the correct centcomm level is used during testing and prevents issues with puppet spawn locations.
_maps/base_map.dm
Add "Trainer's Office" to COM_AREAS
  • Added "Trainer's Office" to the COM_AREAS list in requests_console.dm. This change likely reflects an update to the game's command areas and ensures that the tests cover this new area as well.
modular_ss220/unit_tests/code/requests_console.dm

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added 🔧 Фикс Переписываем ошибку так, чтобы она проявлялась в других обстоятельствах :finnadie: НЕ МОДУЛЬНО Ну это ваще пиздец. Либо засовывай в модуль, либо заливай на апстрим. labels Jan 4, 2025
@github-actions github-actions bot added :feelsgood: Частичная модульность Не всегда получается всё впихнуть в модуль, увы. and removed :finnadie: НЕ МОДУЛЬНО Ну это ваще пиздец. Либо засовывай в модуль, либо заливай на апстрим. labels Jan 4, 2025
@m-dzianishchyts m-dzianishchyts changed the title Fix cult dagger attack chain test? Fix cult dagger attack chain test Jan 11, 2025
@m-dzianishchyts m-dzianishchyts changed the title Fix cult dagger attack chain test Fix unit tests Jan 11, 2025
@m-dzianishchyts m-dzianishchyts marked this pull request as ready for review January 11, 2025 12:32
@m-dzianishchyts m-dzianishchyts merged commit 28d1551 into ss220club:master Jan 11, 2025
25 of 26 checks passed
@m-dzianishchyts m-dzianishchyts deleted the cult-dagger-test-fix branch January 11, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:feelsgood: Частичная модульность Не всегда получается всё впихнуть в модуль, увы. 📜 CL не требуется Эти изменения не влияют на игровой процесс или игроки по какой-то причине не должны о них знать 🔧 Фикс Переписываем ошибку так, чтобы она проявлялась в других обстоятельствах
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants