Open SarcophagusTablets opened 1 year ago
Had a look into this - the terrain used is t_glass_roof which is spawning as expected, it is just marked as having tr_ledge which means it is treated as open air - removing tr_ledge means you can walk across without issue - the question is should you be able to walk across a skylight?
{ "type": "terrain", "id": "t_glass_roof", "name": "skylight", "description": "A giant sheet of glass inserted into the roof, lets light pass through.", "symbol": "o", "looks_like": "t_linoleum_white", "color": "cyan", "move_cost": 2, "trap": "tr_ledge", "flags": [ "TRANSPARENT", "NO_FLOOR", "INDOORS" ], "bash": { "str_min": 3, "str_max": 6, "sound": "glass braking!", "sound_fail": "whack!", "bash_below": true } }
it is just marked as having tr_ledge which means it is treated as open air
If I recall, that's a hack to allow it to let light through. For some dumb reason skylights don't properly work unless it counts as not even having a floor at all.
Ah that makes sense, although it looks like leaving the flags set is letting light through even with the ledges removed - I have closed the curtains on both levels in the room and appear to still be getting light, however blowing up the skylight then causes flat roof to spawn below it in mid air as in the third pic (though this appears to be linked to bash below possibly? It happens if you blow up the roof too)
Anyways, if we want walkable skylights I think removing tr_ledge will still let light through, however I wonder if it would be worth creating a FRAGILE_FLOOR tag that gives a warning and then either breaks immediately if the player\NPC is over a certain weight (transforming with tr_ledge) or has a certain chance of breaking every time it is stepped on? Could be used for other things too (farm shed roofs etc.)
Ah actually perhaps not a tag but a trap, create a new one in trapfunc.cpp
Describe the bug
As in the title, roof seems to be lacking in some parts of the mansion.
There are other places where this happens, like in cathedrals, so I suspect there's some roof tile type that is bugged out (I don't know much about mapgen currently, though tried looking at jsons).
Steps To Reproduce
Screenshots
Versions and configuration
Additional context
No response