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

more bugfixes wehhh #3573

Merged
merged 5 commits into from
Sep 28, 2024

Commits on Sep 27, 2024

  1. fixes contents not being removed from the spatial grid when deleted d…

    …uring movement between 2 grid cells (#75658)
    
    ## About The Pull Request
    fixes the flaky test reports for cockroaches being stuck in the spatial
    grid (which mothblocks seems to have closed all of)
    
    cockroaches get deleted when they die, so theres a spurious unit test
    failure where if a cockroach is on a tile in grid cell A and moves to a
    lava tile in grid cell B, they will get killed when lava.Entered() is
    called, then deleted, and when /atom/movable/Destroy() is called we try
    to take them out of grid cell B (because their loc is the lava tile) but
    they were never added to that cell yet because their movement never
    finished, so that doesnt do anything. THEN moveToNullspace() is called,
    that movement finishes before the first movement, and then in
    Moved(old_loc = lava turf) we try to remove it from grid cell B which
    again doesnt work, and then the first movements Moved(old_loc = original
    turf) is called where we can actually remove them from the correct grid
    cell, except we cant because in exit_cell() we subtract
    `old_target.important_recursive_contents[channel]` from the cells
    content lists, and since the target is deleted by this point it doesnt
    have important_recursive_contents. so the fix here is changing this so
    it subtracts `old_target.important_recursive_contents?[type] ||
    old_target` instead, which works if the target is deleted.
    
    also fixes some Entered() overrides that dont call parent and improves
    documentation on spatial grid defines
    ## Why It's Good For The Game
    fixes it without needing the change_loc() setter
    Kylerace authored and Absolucy committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    7d30e4f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e2bf193 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1e6c6b4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    521957e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6fc81e6 View commit details
    Browse the repository at this point in the history