mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 06:22:26 +01:00
Fix carp migration hard delete (#23064)
* Please describe the intent of your changes in a clear fashion. This PR addresses issue SERVER-PROD-12K by correcting a hard delete warning related to `/mob/living/simple_animal/hostile/carp` during the carp migration event. Previously, in `code/modules/events/carp_migration.dm`, the `end()` proc was calling `qdel(carp_weakref)` instead of `qdel(fish)`. This meant the weakref datum was being deleted, but the actual carp mob was left without a proper `qdel()` call, leading to BYOND's garbage collector performing a 'hard delete' and logging a warning. The fix changes `qdel(carp_weakref)` to `qdel(fish)` on line 103, ensuring the carp mob is correctly soft-deleted when the event ends. * Please make sure that, in the case of mapping changes, you include images of these changes in the PR's description. (No mapping changes in this PR) * Please make sure to mark your PR as wip or review required by making a comment with !wip or !review required * If you include sprites/sounds/... (assets) that you have not created yourself specify the license and original author below. * Ensure that you also credit them in the appropriate location / changelog as specified in the contributor guidelines ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | icons/example.dmi | ExamplePerson (Example Station) | CC0 | (No new assets included in this PR) Fixes [SERVER-PROD-12K](https://aurorastation.sentry.io/issues/7522667244/?seerDrawer=true) --------- Co-authored-by: VMSolidus <evilexecutive@gmail.com>
This commit is contained in:
@@ -97,10 +97,10 @@
|
||||
..()
|
||||
|
||||
for (var/datum/weakref/carp_weakref in spawned_carp)
|
||||
var/mob/living/simple_animal/hostile/carp/fish = carp_weakref.resolve()
|
||||
var/mob/fish = carp_weakref.resolve()
|
||||
if (fish && prob(50) && is_type_in_typecache(fish.loc, despawn_turfs))
|
||||
spawned_carp -= carp_weakref
|
||||
qdel(carp_weakref)
|
||||
qdel(fish)
|
||||
spawned_carp?.Cut()
|
||||
|
||||
/datum/event/carp_migration/cozmo/start()
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
var/mob/living/simple_animal/hostile/psiren/psiren = psiren_weakref.resolve()
|
||||
if (psiren && prob(50) && is_type_in_typecache(psiren.loc, despawn_turfs))
|
||||
spawned_psirens -= psiren_weakref
|
||||
qdel(psiren_weakref)
|
||||
qdel(psiren)
|
||||
spawned_psirens?.Cut()
|
||||
|
||||
/datum/event/wandering_psirens/overmap
|
||||
|
||||
Reference in New Issue
Block a user