Cataclysm-DDA
Cataclysm-DDA copied to clipboard
Error when placing stepladder in open air
Describe the bug
a
ctivating a stepladder to place it over a ledge, such as off the roof of a one-story building, produces an error like this:
DEBUG : Setting furniture f_ladder at (71,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
FUNCTION : furn_set
FILE : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\map.cpp
LINE : 1616
VERSION : 579e201
Despite this error message, the stepladder will be placed on the level below as expected.
Steps to reproduce
- Obtain and wield a stepladder.
- Navigate to the roof of a one-story building.
- Walk to the edge of the building.
- Activate the stepladder and select an open air tile at the edge of the building, one story above ground.
Expected behavior
The stepladder should be placed on the level below (and it is) but should not produce an error message.
Screenshots
No response
Versions and configuration
- OS: Windows
- OS Version: 10.0.19044.2251 (21H2)
- Game Version: 579e201 [64-bit]
- Graphics Version: Tiles
- Game Language: System language []
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], No Fungal Growth [no_fungal_growth], Bionic Professions [package_bionic_professions] ]
Additional context
No response
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.
Can confirm, did exactly that
- OS: Windows
- OS Version: 10.0.19044.2364 (21H2)
- Game Version: 7f881d8 [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], No Fungal Growth [no_fungal_growth], Bionic Professions [package_bionic_professions] ]
/Confirm
- OS: Windows
- OS Version: 10.0.19045.4291 (22H2)
- Game Version: cdda-experimental-2024-05-12-1705 39e2afa [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] ]
Note this issue does not occur when the ladder is placed as a climbing aid (ie, examining a ledge or moving into a ledge with a ladder in inventory). In this case a climbing aid rule is invoked and the ladder is placed on the ground below.
This happens when you push f_bench
and otherwise normal furniture off z-levels, as they also lack the ALLOW_ON_OPEN_AIR
flag.
Do note that, seemingly the only purpose of the ALLOW_ON_OPEN_AIR
flag is to avoid the error. There's the FLOATS_IN_AIR
flag for when you want the furniture to float.
Tangential:
When I was working on the series of PRs that introduced the climbing aid category, I was interested in tracking down the logic that governs open-air furniture. At the time I couldn't manage to find the code responsible for making furniture fall down when there is no floor immediately beneath it.
I was investigating the possibility of changes like making the "30-foot" rope or grappling hook span multiple Z-levels as you'd expect it to, and climbing one Z-level at a time on these furnishings. This could provide for interesting maneuvers like rappelling through a third-story window from the roof of a four-story building. At that time I also chatted with another contributor who wanted to implement climbable hazards (such as an elevator cable) in collapsing towers. I set aside this line of inquiry because there's currently no way for furniture to support other furniture on a higher level or support a player in an "open air" space.
I think I saw falling furniture somewhere in do_turn... Let this be my promise of short investigation.
https://github.com/CleverRaven/Cataclysm-DDA/blob/71a9cbb56084ac63577dff9bcaf95de604d2057d/src/map.h#L2030-L2038
There is the drop_furniture
that apparently handles falling furniture.
This is how the implementation starts: https://github.com/CleverRaven/Cataclysm-DDA/blob/71a9cbb56084ac63577dff9bcaf95de604d2057d/src/map.cpp#L2971-L2975
Is this what you were looking for? Or did you find this already @EvanBalster ?