aboutsummaryrefslogtreecommitdiff
path: root/po/ca
Commit message (Expand)AuthorAge
* Update translation filesupdatepo.sh2021-02-23
* Update translation filesupdatepo.sh2021-01-30
* Update translation filesupdatepo.sh2020-06-13
* Update translation filesupdatepo.sh2020-04-03
* Update translation sourcesrubenwardy2020-01-24
* Update translation stringsupdatepo.sh2019-10-12
* Update from Weblate (hacky)Translators2019-10-12
* Update translation stringsupdatepo.sh2019-09-09
* Run updatepo.shTranslations2019-02-24
* Update minetest.conf.example, settings strings and locale files (#8230)Wuzzy2019-02-14
* Run updatepo.shTranslation2019-02-14
* Cleanup translation filesLoïc Blot2019-01-28
* Update translationsTranslations2019-01-27
* Run updatepo.shTranslations2019-01-06
* Update translations from WeblateTranslations2019-01-06
* Update minetest.conf.example and run updatepo.sh (#7947)Update Script2018-12-09
* Add translation of LANG_CODE in all languagesEkdohibs2017-08-24
* Fix updatepo.sh and run it.Ekdohibs2017-08-24
* Run updatepo.shLoic Blot2017-05-21
* Footsteps without view bobbing (#5645)Louis Pearson2017-04-25
* Run updatepo.shest312016-12-14
* Translated using Weblate (Catalan)tonibm192016-12-14
* Translated using Weblate (Catalan)Roc Humet2016-12-14
* Run updatepo.shest312016-08-30
* Run updatepo.shest312016-07-12
* Run updatepo.shest312016-05-05
* Translated using Weblate (Catalan)Joan Ciprià Moreno Teodoro2016-05-01
* Translated using Weblate (Catalan)Joan Ciprià Moreno Teodoro2016-03-25
* Update po files, minetest.conf.example and settings_translation_file.cppest312016-02-27
* Translated using Weblate (Catalan)Joan Ciprià Moreno2016-02-27
* Translated using Weblate (Catalan)Joan Ciprià Moreno2015-11-15
* Translated using Weblate (Catalan)Joan Ciprià Moreno2015-11-15
* Translated using Weblate (Catalan)Joan Ciprià Moreno2015-11-15
* Translated using Weblate (Catalan)Joan Ciprià Moreno2015-11-15
* Translated using Weblate (Catalan)Joan Ciprià Moreno2015-11-15
span class="hl slc">// Get minetest.registered_globalsteps lua_getglobal(L, "minetest"); lua_getfield(L, -1, "registered_globalsteps"); // Call callbacks lua_pushnumber(L, dtime); script_run_callbacks(L, 1, RUN_CALLBACKS_MODE_FIRST); } void ScriptApiEnv::environment_OnMapgenInit(MapgenParams *mgparams) { SCRIPTAPI_PRECHECKHEADER // Get minetest.registered_on_mapgen_inits lua_getglobal(L, "minetest"); lua_getfield(L, -1, "registered_on_mapgen_inits"); // Call callbacks lua_newtable(L); lua_pushstring(L, mgparams->mg_name.c_str()); lua_setfield(L, -2, "mgname"); lua_pushinteger(L, mgparams->seed); lua_setfield(L, -2, "seed"); lua_pushinteger(L, mgparams->water_level); lua_setfield(L, -2, "water_level"); std::string flagstr = writeFlagString(mgparams->flags, flagdesc_mapgen); lua_pushstring(L, flagstr.c_str()); lua_setfield(L, -2, "flags"); script_run_callbacks(L, 1, RUN_CALLBACKS_MODE_FIRST); } void ScriptApiEnv::initializeEnvironment(ServerEnvironment *env) { SCRIPTAPI_PRECHECKHEADER verbosestream<<"scriptapi_add_environment"<<std::endl; setEnv(env); /* Add ActiveBlockModifiers to environment */ // Get minetest.registered_abms lua_getglobal(L, "minetest"); lua_getfield(L, -1, "registered_abms"); luaL_checktype(L, -1, LUA_TTABLE); int registered_abms = lua_gettop(L); if(lua_istable(L, registered_abms)){ int table = lua_gettop(L); lua_pushnil(L); while(lua_next(L, table) != 0){ // key at index -2 and value at index -1 int id = lua_tonumber(L, -2); int current_abm = lua_gettop(L); std::set<std::string> trigger_contents; lua_getfield(L, current_abm, "nodenames"); if(lua_istable(L, -1)){ int table = lua_gettop(L); lua_pushnil(L); while(lua_next(L, table) != 0){ // key at index -2 and value at index -1 luaL_checktype(L, -1, LUA_TSTRING); trigger_contents.insert(lua_tostring(L, -1)); // removes value, keeps key for next iteration lua_pop(L, 1); } } else if(lua_isstring(L, -1)){ trigger_contents.insert(lua_tostring(L, -1)); } lua_pop(L, 1); std::set<std::string> required_neighbors; lua_getfield(L, current_abm, "neighbors"); if(lua_istable(L, -1)){ int table = lua_gettop(L); lua_pushnil(L); while(lua_next(L, table) != 0){ // key at index -2 and value at index -1 luaL_checktype(L, -1, LUA_TSTRING); required_neighbors.insert(lua_tostring(L, -1)); // removes value, keeps key for next iteration lua_pop(L, 1); } } else if(lua_isstring(L, -1)){ required_neighbors.insert(lua_tostring(L, -1)); } lua_pop(L, 1); float trigger_interval = 10.0; getfloatfield(L, current_abm, "interval", trigger_interval); int trigger_chance = 50; getintfield(L, current_abm, "chance", trigger_chance); LuaABM *abm = new LuaABM(L, id, trigger_contents, required_neighbors, trigger_interval, trigger_chance); env->addActiveBlockModifier(abm); // removes value, keeps key for next iteration lua_pop(L, 1); } } lua_pop(L, 1); }