CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.13k stars 4.1k forks source link

Small dogs still zombify, despite ``delete`` field used in their JSON definition #62019

Closed Karol1223 closed 2 months ago

Karol1223 commented 1 year ago

Describe the bug

In #61668 I made the smallest dogs not zombify. Or, well, I thought I did. The code is there, it should work. It was such a simple change I didn't even bother to test it. The problem is that now it turns out my way to remove the zombifies_into field didn't work. This was brought to light in #62008 where it turned out that copy_from and zombifies_into have a deep romance that cannot be broken by conventional means. Using delete will simply be ignored, while supposedly (I did not test that myself, however, that is what I was told is the case) setting zombifies_into to mon_null does stop the zombification while not removing the warning icon on a corpse.

Steps to reproduce

  1. Find a small dog like a beagle, a chihuahua or a dachshund
  2. Murder
  3. Notice the revival warning icon
  4. Check the code and notice that the zombifies_into should be properly removed
  5. Cry

Expected behavior

delete should not randomly lose its expected functionality on just one random field. I'd hazard a guess it doing just that isn't expected considering #61668 was approved and merged.

Screenshots

A beautiful corpse of a dachshund with a revival warning icon despite the code implying the monster shouldn't zombify. obraz

Versions and configuration

Additional context

Didn't test it but I think it'd be worthwhile to take a look at what happens whether a monster using copy_from from some other monster that zombifies has a zombifies_into defined but aimed at a different zombie. Which zombie will it revive as?

terryjacob200 commented 1 year ago

Tested in windows-tiles-sounds-x64-2022-10-30-0948 with base DDA only. Beagle Chihuahua Dachshund all revived. Puppies of all did not revive. Is that enough or should I try "delete" on other creatures?

Karol1223 commented 1 year ago

Puppies of all did not revive.

Puppies should be unaffected since they use copy_from the labrador puppy which in itself doesn't revive, so them not reviving is expected but honestly thank god that at least that works how its expected to work.

NetSysFire commented 1 year ago

delete does not work, but why does explicitely overwriting zombifies_into to mon_null not work either?

Edit: apparently I am dumb but there is still a tileset issue which displays the reviving corpse warning.

irwiss commented 1 year ago

"zombify_into": "" should remove the revival marker