| Time |
Nick |
Message |
| 01:25 |
|
SFENCE joined #luanti-dev |
| 01:51 |
|
YuGiOhJCJ joined #luanti-dev |
| 02:43 |
|
Noisytoot joined #luanti-dev |
| 02:58 |
|
SFENCE joined #luanti-dev |
| 04:00 |
|
MTDiscord joined #luanti-dev |
| 04:05 |
|
Alias joined #luanti-dev |
| 04:26 |
|
diceLibrarian joined #luanti-dev |
| 04:31 |
|
SFENCE joined #luanti-dev |
| 07:04 |
|
SFENCE joined #luanti-dev |
| 07:19 |
|
SFENCE joined #luanti-dev |
| 07:32 |
|
SFENCE joined #luanti-dev |
| 10:31 |
|
YuGiOhJCJ joined #luanti-dev |
| 14:06 |
|
SFENCE joined #luanti-dev |
| 15:25 |
|
SFENCE joined #luanti-dev |
| 16:09 |
|
crazylad joined #luanti-dev |
| 16:09 |
|
crazylad joined #luanti-dev |
| 16:27 |
|
SFENCE joined #luanti-dev |
| 17:04 |
|
SFENCE joined #luanti-dev |
| 17:15 |
|
jonadab joined #luanti-dev |
| 18:18 |
|
YuGiOhJCJ joined #luanti-dev |
| 18:28 |
|
SFENCE joined #luanti-dev |
| 19:29 |
sfan5 |
why does IDropAction inherit from MoveAction |
| 19:29 |
|
SFENCE joined #luanti-dev |
| 19:36 |
Krock |
Will push https://pastebin.com/raw/WbCjiiXb in 15 minutes, fixes #17027 |
| 19:36 |
ShadowBot |
https://github.com/luanti-org/luanti/issues/17027 -- #16538 Broke inventory visuals |
| 19:37 |
sfan5 |
can we just change that to build using std::string? stringstreams are bad |
| 19:37 |
Krock |
sure. |
| 19:39 |
Krock |
--> https://pastebin.com/raw/jpynWz6i tested locally, works too. |
| 19:40 |
sfan5 |
lgtm |
| 19:41 |
Krock |
sfan5: I suppose the inheritance is because MoveAction provides the from_* members which are needed for dropping |
| 19:41 |
Krock |
and in a sense you're actually moving the item |
| 19:44 |
Krock |
and at some point this really needs a unittest |
| 19:45 |
sfan5 |
well there's no target inventory |
| 19:46 |
sfan5 |
I'm trying to write an unit test but |
| 19:46 |
sfan5 |
2026-03-16 20:44:30: ERROR[Main]: Item "default:takeput_cb_1" not defined |
| 19:46 |
sfan5 |
also I can't wrap my head around the "patterns" in test_moveaction.lua |
| 19:47 |
Krock |
it just logs when which callback was called |
| 19:48 |
sfan5 |
local PATTERN_SWAP = { 8, "allow_%w", 4, "on_take", 2, "on_put", 2 } |
| 19:48 |
sfan5 |
8x allow_%w, 4x on_take, 2x on_put, what's the last 2 for?? |
| 19:49 |
Krock |
8 is the sum over all callbacks |
| 19:49 |
Krock |
then then name, count |
| 19:49 |
Krock |
This is stupid. I should've implemented it differently |
| 19:49 |
sfan5 |
so it's actually 4x allow_%w |
| 19:49 |
sfan5 |
the comment is wrong then |
| 19:50 |
Krock |
2x allow, 1x take 1x put |
| 19:50 |
Krock |
which gives 4 in total, see check on L11 |
| 19:50 |
Krock |
the loop that checks against the order then starts from index 2 |
| 19:51 |
sfan5 |
hey it worked now |
| 19:52 |
Krock |
I'd just remove the first index and the check on L11. it's pointless. |
| 19:53 |
Krock |
or flatten the entire thing |
| 19:57 |
Krock |
Pushing fix patch ... |
| 20:10 |
sfan5 |
Krock: I added tests to the PR |
| 20:11 |
sfan5 |
not totally comprehensive but they would have caught the bug |
| 20:58 |
MTDiscord |
<herowl> Honestly, why does something that is supposedly an interface inherit from something that isn't an interface? |
| 21:03 |
Krock |
some questions arising from the coding practices of past contributors cannot easily be answered |
| 21:31 |
|
SFENCE joined #luanti-dev |
| 22:17 |
|
turtleman joined #luanti-dev |
| 23:16 |
MTDiscord |
<josiah_wi> What do you mean by interface? |
| 23:33 |
|
panwolfram joined #luanti-dev |