Reply to rnd's review of this mod at <viewtopic.php?f=10&t=15334&start=125#p233995
First of all, thanks for reviewing this mod!
rnd wrote:1. good messages when configuring: what needs to be done
My goal was to make using the machines fool-proof, and to stop cluttering the chat. This has been motivated by the fact that many players have no clue how the machiens work on @test@ and it errors can easily sneak in.
That having said, if anyone has difficulties in using my machines, please write a complaint here.
rnd wrote:2. can use several locked chests put vertically in same line as shop
This has been reimplemented from the most recent vendor mod, so this feature was quite mandatory. ;-)
Interestingly, version 1.02 of vendor also kinda supported connected chests in the X and Z axis, but this was not documented and caused a lot of bugs. I only reimplemented vertical stacking for simplicity; I think also supporting the other directions is too complicated and too confusing to use.
rnd wrote:3. good texture
4. texture changes to indicate shop needs attention
Thanks, I wanted to make sure the machine's state is visible from afar. One of the frustrating things in Just Test and @test@ is that you have to check out all machines manually which can get tedious if you have lots of machines.
Also, I hate the original textures because they look way too similar to chests. ;-)
1. it checks constantly - every 5 seconds for chest and materials
-> better: check/update only when player right click/punch it
Personally, I like that machines auto-update from time to time. Because players are lazy; without an auto-update, players could refill a chest, forget to update the machine manually and the machine will thus appear to be “off” indefinitely. :-(
But I am aware of possible performance issues. I have thought about this auto-updating by myselves. I have planned to test whether this regular checking has a serious impact on performance. Maybe 5 seconds is too fast, I am not sure. Maybe any interval is too much, I have no idea. This needs to be tested.
A clean way would be if I could detect instantly when a player is modifying chest contents WITHOUT overwriting the chest definition. I'm afraid this is not possible.
By the way, the machines already support being updated after punching.
2. dont like the fact you are limited to currency ( can be set by server owner for all shops but not by shop owner?).
I already addressed this concern in this thread.
3. featuritis - why you need stuff like jokes and then have to handle all that "joking".. also 48kbytes for this vendor mod - simple shop has just 5 kb and cleaner code
The feature you are talking about doesn't take much of the overall code. I also don't know what your standards on “code cleaniness” are and I don't know why I should obey them. ;-) (OK, maybe I could write a few comments.) Also, 48 KiB is still pretty lightweight. Trying to reduce source code file size is foolish; file size of media files is MUCH more relevant and blows up much faster.
While I agree the feature you talk about could be removed without problem and is non-essential, I don't see a real problem in having it; it doesn't cause maintenance trouble and only takes a rather minor part of the code.
I consider all other features to be essential to this mod.
For example, there's a reason why I support machines to allow/reject worn tools. This feature may seem like a luxury at first. But without this feature, there would be no way to buy new tools for guaranteed, so any tool you buy could be badly damaged and vending machines could screw you badly. This is simply neccessary complexity.
Besides, the “easy” in “easyvend” refers to “easy to use”, not necessarily “easy code”.
4. ERROR[Main]: ServerError: Lua: Runtime error from mod 'easyvend' in callback node_on_dig(): ...\minetest0414server\bin\..\mods\easyvend/easyvend.lua:854: at
tempt to index local 'chest' (a nil value)