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

Pushing furniture off the ledge results in a debugmsg error #78828

Closed
moxian opened this issue Dec 29, 2024 · 8 comments · Fixed by #78847
Closed

Pushing furniture off the ledge results in a debugmsg error #78828

moxian opened this issue Dec 29, 2024 · 8 comments · Fixed by #78847
Labels
(S2 - Confirmed) Bug that's been confirmed to exist

Comments

@moxian
Copy link
Contributor

moxian commented Dec 29, 2024

Describe the bug

  • Have a furniture (such as a table) above ground, on a roof
  • Grab it
  • Move it to the edge so it falls down
  • Get error
ERROR : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\map.cpp:1830 [furn_set] Setting furniture f_table at (67,67,1) where terrain is t_open_air (which is_open_air)
If this is intentional, set the ALLOW_ON_OPEN_AIR flag on the furniture
  • The furniture does fall down tho

Attach save file

debug-world-remote-trimmed.tar.gz

Steps to reproduce

see above

Expected behavior

no error

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.5247 (22H2)
  • Game Version: 163ee18 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

Additional context

No response

@moxian moxian added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Dec 29, 2024
@Procyonae
Copy link
Contributor

I think ideally this flag and error should be removed and there should just be some final check in mapgen that removes unintentionally floating furniture (where the error is could well be fine I forget where it is and aren't at home)
Alternatively we prevent it placing furniture in mapgen outright if it's floating but that would add unneeded ordering complications.

@Procyonae Procyonae added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Dec 29, 2024
@PatrikLundell
Copy link
Contributor

The warnings about floating stuff in mapgen are fine, in my view, as they indicate something is wrong there and should be addressed. The problem occurs when post mapgen conditions cause these reports, such as the example above and when buildings collapse.

However, the message is produced by a low level operation, so it doesn't have any info about the context in which it's invoked. It might be possible to add (yet another) parameter to the operation to indicate whether reports should be made or not, but then we might miss out on reports that should have been made because you usually don't want to place stuff in the air, but occasionally that's fine.

@Procyonae
Copy link
Contributor

I don't really see why you should have to guarentee terrain under any furniture during mapgen though, it just makes things more awkward with nests etc and I think this is a reasonable place to have it just silently fail.

@PatrikLundell
Copy link
Contributor

As far as I've seen, the most common reason for things in the air during mapgen is because they weren't placed where intended, so it serves as an notification that you need to recheck your placement.
#78816 is an example of something that wouldn't be detected if warnings weren't present.

@moxian
Copy link
Contributor Author

moxian commented Dec 29, 2024

I'm completely clueless as I have not looked at the code, but would it perhaps be possible to distinguish between "furntire added to a tile" and "furniture moved into a tile", and only inssue the warning in the former case, but not the latter?

@Procyonae
Copy link
Contributor

#78816 is an example of something that wouldn't be detected if warnings weren't present.

I mean it would be detected by anyone looking at the map in game I don't see what extra use the error is when it only happens at mapgen not when the file is read, unless we ever have the tests gen every single special or something then it is unlikely to be catch most instances of this with tests

@PatrikLundell
Copy link
Contributor

@moxian:
Moving furniture is implemented as removing furniture from one tile and adding it to the next one, so the caller would have to somehow tell the furn_set operation that it shouldn't perform a check (which isn't an option currently).

@Procyonae:
I don't think someone looking at the area in the game would detect anything much of the time. A flower spawned one Z level up and dropped one level, where it would be found if the PC went there (the falling would happen outside the visible range), and it would be seen as odd only if it dropped inside the building, but not outside, as it would just be another forest flower found in the forest.

@Procyonae
Copy link
Contributor

I don't think someone looking at the area in the game would detect anything much of the time

Oh right I forgot the " " is replaced with open air by the roof palette so it's invisible unless furniture spawns which given it's minimal density due to no adjacent forest is pretty slim, kind of a funky scenario

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants