Random Chitchat 2012-2016
Is http://mc-server.xoft.cz/LuaAPI/ still automaticly updated? I'm missing the new cBlockArea functions
Thanks given by:
No, I have to update it manually ever since I moved out of the flat - I don't have a home server anymore. I'm thinking of tasking my second RasPi with this, as well as compiling and uploading the executables to the Gallery RasPi.

Now with bearbin's builds gone offline, it will be even more difficult, I wanted to just download the API docs built on his server, but without it, I'll have to compile and run the server myself in order to generate the docs.
Thanks given by: NiLSPACE
I need volunteers. I have changed the CheckBasicStyle.lua script so that it can check individual files and even the files specifically being committed in Git. This comes handy as a git pre-commit hook - whenever you commit to git, CheckBasicStyle will check your commit before allowing you to actually commit it. And now I need people to test it out Smile

To enable:
Update your repo (the support has just been added)
Go to your .git/hooks folder, create a text file "pre-commit" there with the following contents:
Code:
#!/bin/sh

# Redirect output to stderr:
exec 1>&2

# Check the style of the files being committed:
exec src/CheckBasicStyle.lua -g
This is all it should take. If you want to disable the checks, just rename / remove the file.

Let me know how it works for you.

I've found one problem so far, but I consider it a highly unlikely scenario:
If you edit a file, stage it for commit, then edit it again and finally commit, Git will commit the staged version, while CheckBasicStyle will check the edited version. Is there anyone who actually uses this scenario? (I hope not Smile
Thanks given by: LogicParrot
The script seems Linux only. Is that the case?
Thanks given by:
It actually works on Windows, too, because Git takes the needed Linux tools with it. At least the version of MsysGit I'm using; perhaps other clients need a different script.
Thanks given by:
Small question to ChunkStay. Does it only loads the chunk(s) or are the chunk(s) always loaded until the server is stopped?
Thanks given by:
The chunks unload when they aren't needed anymore. In this case, when the functions finished doing their thing.
Thanks given by:
There's a slight difference between Lua API's cWorld:ChunkStay() function, and the C++'s cChunkStay object:

cChunkStay object basically locks chunks in memory - a chunk that is listed in any active cChunkStay will not get unloaded. When the cChunkStay object is deactivated / destroyed, the chunk is released from this lock, it can be unloaded again. If a chunk is part of multiple cChunkStays, all of them need to be deactivated before the chunk is allowed to unload.

The cWorld:ChunkStay API function queues all the specified chunks to be loaded / generated, and then calls the specified callback; as soon as the callback returns, the chunks are no longer locked in memory and can be unloaded.
Thanks given by:
I've only just caught up but the hook script can be a lot simpler:
Code:
#!/usr/sh
src/CheckBasicStyle.lua 1>&2 -g
Thanks given by:
The DigitalOcean auto-creation system now works properly, after a kernel upgrade. I think it even auto-updates the server too.
Thanks given by:




Users browsing this thread: 9 Guest(s)