When a player uses an ID card on a card reader, turrets on the same overmap are despawned. However, the code only checks for the hardcoded mon_turret_rifle type, which only covers M249 turrets. Labs can sometimes spawn with .50 cal turrets as guards instead (not sure why?), and those are NOT despawned by card readers when the doors are opened.
Steps to reproduce the behavior:
Card reader's iexamine checks for some kind of JSON flag all turrets have instead of a specific monster id when it despawns the security.
Are antimaterial turrets even supposed to spawn indoors?
M2HB turrets shouldn't be spawning there. The way turrets are despawned is a weird hack from ancient cata and it should be reworked.
We do need some kind of workaround for this, because the expectation is that if you enter the lab by using appropriate credentials, you at least don't get shot in the face by the door guard.
The quick bandaid fix would be to add the other turrets to the check in remove_submap_turrets
.
The quick bandaid fix would be to add the other turrets to the check in remove_submap_turrets.
Simple checking the TURRET
flag instead of harcoded mon_turret_rifle
id should be enough.
Most helpful comment
M2HB turrets shouldn't be spawning there. The way turrets are despawned is a weird hack from ancient cata and it should be reworked.