technic icon indicating copy to clipboard operation
technic copied to clipboard

Log every inventory actions

Open Emojigit opened this issue 10 months ago • 2 comments

This PR adds logging functions to every inventory action. The existing logging functions for chests are also improved. This PR is ready for review.

Emojigit avatar Apr 19 '24 22:04 Emojigit

Error → spec/api_spec.lua @ 6
CNC API
api.lua:386: attempt to index global 'technic' (a nil value)

Just use technic_cnc.use_technic to check if technic namespace is usable with CNC. Technic is optional dependency for CNC, it also works without technic mod. Both cases are tested: with and without technic mod.

S-S-X avatar Apr 20 '24 00:04 S-S-X

The technic.machine_on_inventory_* functions don't need to return functions, you can use minetest.get_node(pos).name to get the node name.

OgelGames avatar Apr 20 '24 03:04 OgelGames

For some reason, pipeworks is requiring fakelib... That's why mtt failed.

Emojigit avatar Jun 04 '24 09:06 Emojigit

For some reason, pipeworks is requiring fakelib... That's why mtt failed.

Yeah, you can ignore that, i'll create another PR to add that dependency :+1:

EDIT: https://github.com/mt-mods/technic/pull/365 (or add the line here, i don't mind either way :shrug:)

BuckarooBanzay avatar Jun 04 '24 20:06 BuckarooBanzay

Do you think it would be a good idea to handle non-player actions like default does? With all the extra logging, there's going to be a lot of spam from pipeworks moving items.

https://github.com/minetest/minetest_game/blob/511619253facd524df75ae44537d7b2c4e30a8db/mods/default/functions.lua#L729-L745

OgelGames avatar Jun 05 '24 04:06 OgelGames

I've created a new issue about my suggestion, so I'm merging this.

OgelGames avatar Jun 12 '24 04:06 OgelGames