Cataclysm-dda: Card readers only despawn M249 turrets but labs can spawn with antimaterial turrets

Created on 24 Dec 2019  路  4Comments  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug

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

Steps to reproduce the behavior:

  1. Teleport around until you find a lab with .50 cal turret at the door.
  2. Swipe your ID on the reader.
  3. The turret isn't despawned.

Expected 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.

Versions and configuration

  • OS: win10
  • Game Version: 0.D-10626-gb9b3dc2
  • Graphics version: tiles
  • Mods loaded: none

Additional context

Are antimaterial turrets even supposed to spawn indoors?

<Bug> Fields / Furniture / Terrain / Traps Monsters

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.

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings