aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/experimental/depends.txt
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-10-17 22:42:48 -0400
committerkwolekr <kwolekr@minetest.net>2015-10-24 02:31:23 -0400
commit964be640cb1072b122e5047ddfed19907c6b9dab (patch)
tree4e400e2774d999b5457ed8031274199958401bf7 /games/minimal/mods/experimental/depends.txt
parent59fa117d13ba881f6f5e77c94f5a4ce6adb9647f (diff)
downloadminetest-964be640cb1072b122e5047ddfed19907c6b9dab.tar.gz
minetest-964be640cb1072b122e5047ddfed19907c6b9dab.tar.bz2
minetest-964be640cb1072b122e5047ddfed19907c6b9dab.zip
Fix some threading things and add additional thread unittests
- Fix thread name reset on start() - Fully reset thread state on kill() - Add unittests to check for correct object states under various circumstances
Diffstat (limited to 'games/minimal/mods/experimental/depends.txt')
0 files changed, 0 insertions, 0 deletions
quot;" if ppos then pp="POS"..minetest.pos_to_string(ppos) end local form = "size[10,10]button[0,0;2,1;run;Run InitCode]button[2,0;2,1;cls;Clear S]" .."button[4,0;2,1;save;Save] button[6,0;2,1;del;Delete Env.] field[8.1,0.5;2,1;punchpos;Last punched position;"..pp.."]" .."textarea[0.2,1;10,10;code;Environment initialization code;"..minetest.formspec_escape(code).."]" .."label[0,9.8;"..err.."]" return form end core.register_chatcommand("env_setup", { params = "<environment name>", description = "Set up and modify AdvTrains LuaAutomation environment", privs = {atlatc=true}, func = function(name, param) local env=atlatc.envs[param] if not env then return false,"Invalid environment name!" end minetest.show_formspec(name, "atlatc_envsetup_"..param, get_init_form(env, name)) return true end, }) core.register_chatcommand("env_create", { params = "<environment name>", description = "Create an AdvTrains LuaAutomation environment", privs = {atlatc=true}, func = function(name, param) if not param or param=="" then return false, "Name required!" end if atlatc.envs[param] then return false, "Environment already exists!" end atlatc.envs[param] = atlatc.env_new(param) return true, "Created environment '"..param.."'. Use '/env_setup "..param.."' to define global initialization code, or start building LuaATC components!" end, }) minetest.register_on_player_receive_fields(function(player, formname, fields) local pname=player:get_player_name() if not minetest.check_player_privs(pname, {atlatc=true}) then return end local envname=string.match(formname, "^atlatc_delconfirm_(.+)$") if envname and fields.sure=="YES" then atlatc.envs[envname]=nil minetest.chat_send_player(pname, "Environment deleted!") return