5 Feb 2025 |
lewri | Me too | 18:55:27 |
lewri | The weight of benefit outweighs the downsides | 18:55:52 |
albertfree | I can do the cpp change, I just don't know the best way to handle it | 18:56:12 |
albertfree | One way is to check walls as well, instead of only (I would guess) traversable edges | 18:56:55 |
albertfree | or it can adapt traversable edges as you build and destroy walls | 18:57:23 |
albertfree | The former during path-finding thus | 18:57:45 |
albertfree | although I would have to check what it really does, I don't remember that | 18:58:17 |
albertfree | I guess it depends on other uses of traverasable edges | 18:58:57 |
albertfree | eg with side-objects? No idea how that is done | 18:59:48 |
albertfree | But anyway, until cpp gets fixed the best option is perhaps more updatePathFinding(), I think | 19:01:07 |
albertfree | Hmm, updatePathFinding() destroys all non-traversable edges where there is not a wall, unless there are more graphics that count as wall | 19:05:08 |
albertfree | or Lua must add thos again after the call | 19:05:49 |
albertfree | Looks like more digging is needed first | 19:06:59 |
albertfree | We also have World:resetSideObjects at line 2551 | 20:14:46 |
albertfree | which fixes the travel flags for objects in rooms that were edited | 20:15:28 |
albertfree | if map:getCellFlags(x, y)[passable_flag] == true then <-- and such magic for querying flags | 20:18:01 |
albertfree | map:setCellFlags(x, y, flags) and this for setting | 20:18:39 |
albertfree | So perhaps updatePathFinding should only be used for empty maps? Sionce it destroys all passable information except for the walls | 20:19:47 |
lewri | Isn't it used as part of Map being told of a new object | 22:14:35 |
6 Feb 2025 |
albertfree | Lua sets travel flags in that case | 19:15:18 |
albertfree | ie the stuff in world | 19:17:13 |
Matroftt | Where does object check if a cursor hovers it? | 21:04:28 |
Matroftt | For example, hovering it will make dynamic info appear | 21:05:17 |
albertfree | I don't quite know where that happens, probably somewhere with the mouse cursor position | 21:12:03 |
albertfree | There is a hit-test function with the sprites, that allows questions like "what sprite is visible at this (x, y) coordinate?" | 21:13:10 |
albertfree | Another way in is from the "back". Find a message, find where it gets selected for display, and then (probably repeatedly) find the function that calls that code. | 21:14:45 |
7 Feb 2025 |
| vinbruk joined the room. | 04:28:08 |
| vinbruk | 04:57:04 |
8 Feb 2025 |
| raven.penfold changed their profile picture. | 01:43:53 |
| hyp0chondria. joined the room. | 13:41:46 |