aboutsummaryrefslogtreecommitdiff
path: root/games/devtest
Commit message (Expand)AuthorAge
* Fix number of tool uses being off by 1..32767 (#11110)Wuzzy2021-10-31
* Add no_texture.png as fallback for unspecified texturesWuzzy2021-10-20
* Add embedded PNG texture modifier (#11498)hecks2021-10-13
* Split liquid_viscosity to liquid_viscosity and move_resistance (#10810)Wuzzy2021-10-01
* Chop game background in mainmenu (#10796)Lars Müller2021-09-14
* Add a simple PNG image encoder with Lua API (#11485)hecks2021-07-29
* Add bold, italic and monospace font styling for HUD text elements (#11478)sfan52021-07-27
* Add wallmounted support for plantlike and plantlike_rooted nodes (#11379)Wuzzy2021-07-15
* Fix rotation for falling mesh degrotate nodes (#11159)Wuzzy2021-04-28
* Fix devtest Lua errorsfan52021-04-21
* Put torch/signlike node on floor if no paramtype2 (#11074)Wuzzy2021-04-20
* Devtest: Remove testnodes_show_fallback_imageWuzzy2021-04-05
* Degrotate support for mesh nodes (#7840)Vitaliy2021-03-30
* DevTest: Formspec tests, children getter, better lighttool (#10918)Wuzzy2021-03-16
* Devtest: Fix missing log level in minetest.log (#11068)Wuzzy2021-03-15
* Allow overwriting media files of dependencies (#10752)DS2021-02-23
* Fix wrong reported item counts for inventory actions using Shift-Move (#10930)Lars Müller2021-02-21
* Add nametag background setting and object property (#10937)rubenwardy2021-02-17
* Fix short_description fallback order (#10943)rubenwardy2021-02-17
* Fix animation_image support in scroll containersJean-Patrick Guerrero2021-02-08
* Devtest: Remove bumpmap/parallax occl. test nodes (#10902)Wuzzy2021-02-04
* Fix list spacing and size (again) (#10869)Vincent Robinson2021-02-02
* devtest: Fix deprecated alpha usagesfan52021-01-29
* Drop never documented 'alpha' property from nodedefsfan52021-01-29
* Make hypertext and textarea have proper scroll event propagation. (#10860)Vincent Robinson2021-01-23
* FormSpec: Add list spacing, slot size, and noclip (#10083)Vincent Robinson2021-01-23
* Allow "liquid" and "flowingliquid" drawtypes even if liquidtype=none (#10737)Wuzzy2021-01-21
* Add on_deactivate callback for luaentities (#10723)hecks2021-01-02
* DevTest: Add food item to test food replacement (#10642)Wuzzy2020-12-18
* Semi-transparent background for nametags (#10152)Zughy2020-12-14
* Various documentation fixes (#10692)SmallJoker2020-12-10
* Fix falling image of torchlike if paramtype2="none" (#10612)Wuzzy2020-11-15
* Add model[] formspec element (#10320)SmallJoker2020-11-04
* Shaders for Android (GLES 2) (#10506)Vitaliy2020-10-25
* Devtest: Automatically enable zoom capability (#10493)Paramat2020-10-20
* Devtest hand tool: Update capabilities, add creative mode capabilities (#10484)Paramat2020-10-13
* Add bumpmapping and parallax occlusion testing nodes to devtest (#9242)HybridDog2020-10-09
* Add a short_description to be used by mods (#8980)DS2020-10-09
* Add minetest.get_artificial_light and minetest.get_natural_light (#5680)HybridDog2020-10-06
* Lua API: Add register_on_chatcommand to SSM and CSM (#7862)Elijah Duffy2020-10-03
* Devtest: Extend tooltips of many items and tools (#10312)Wuzzy2020-09-04
* Scale inventory image for scaled allfaces nodes (#10225)Wuzzy2020-09-04
* Make bgcolor tint button background images (#9818)Hugues Ross2020-08-29
* Load media from subfolders (#9065)DS2020-08-20
* Fix precision not working in hud_change (#10186)Lars Müller2020-08-12
* content_cao: Support texture animation for upright_sprite (#10020)sfan52020-07-30
* Fix undeclared global in devtest (#10133)Wuzzy2020-07-02
* Make shading of CAOs optional (#10033)Danila Shutov2020-06-16
* devtest: Improve tool and formspec usabilitysfan52020-06-08
* Devtest: Fix missing/incorrect liquid properties (#9955)Wuzzy2020-05-30
hl opt">); bool ate = lua_toboolean(L, -1); return ate; } void ScriptApiClient::on_damage_taken(int32_t damage_amount) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_chat_messages lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_damage_taken"); // Call callbacks lua_pushinteger(L, damage_amount); runCallbacks(1, RUN_CALLBACKS_MODE_OR_SC); } void ScriptApiClient::on_hp_modification(int32_t newhp) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_chat_messages lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_hp_modification"); // Call callbacks lua_pushinteger(L, newhp); runCallbacks(1, RUN_CALLBACKS_MODE_OR_SC); } void ScriptApiClient::on_death() { SCRIPTAPI_PRECHECKHEADER // Get registered shutdown hooks lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_death"); // Call callbacks runCallbacks(0, RUN_CALLBACKS_MODE_FIRST); } void ScriptApiClient::environment_step(float dtime) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_globalsteps lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_globalsteps"); // Call callbacks lua_pushnumber(L, dtime); try { runCallbacks(1, RUN_CALLBACKS_MODE_FIRST); } catch (LuaError &e) { getClient()->setFatalError(std::string("Client environment_step: ") + e.what() + "\n" + script_get_backtrace(L)); } } void ScriptApiClient::on_formspec_input(const std::string &formname, const StringMap &fields) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_chat_messages lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_formspec_input"); // Call callbacks // param 1 lua_pushstring(L, formname.c_str()); // param 2 lua_newtable(L); StringMap::const_iterator it; for (it = fields.begin(); it != fields.end(); ++it) { const std::string &name = it->first; const std::string &value = it->second; lua_pushstring(L, name.c_str()); lua_pushlstring(L, value.c_str(), value.size()); lua_settable(L, -3); } runCallbacks(2, RUN_CALLBACKS_MODE_OR_SC); } bool ScriptApiClient::on_dignode(v3s16 p, MapNode node) { SCRIPTAPI_PRECHECKHEADER INodeDefManager *ndef = getClient()->ndef(); // Get core.registered_on_dignode lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_dignode"); // Push data push_v3s16(L, p); pushnode(L, node, ndef); // Call functions runCallbacks(2, RUN_CALLBACKS_MODE_OR); return lua_toboolean(L, -1); } bool ScriptApiClient::on_punchnode(v3s16 p, MapNode node) { SCRIPTAPI_PRECHECKHEADER INodeDefManager *ndef = getClient()->ndef(); // Get core.registered_on_punchgnode lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_punchnode"); // Push data push_v3s16(L, p); pushnode(L, node, ndef); // Call functions runCallbacks(2, RUN_CALLBACKS_MODE_OR); bool blocked = lua_toboolean(L, -1); return blocked; } bool ScriptApiClient::on_placenode(const PointedThing &pointed, const ItemDefinition &item) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_placenode lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_placenode"); // Push data push_pointed_thing(L, pointed, true); push_item_definition(L, item); // Call functions runCallbacks(2, RUN_CALLBACKS_MODE_OR); return lua_toboolean(L, -1); } bool ScriptApiClient::on_item_use(const ItemStack &item, const PointedThing &pointed) { SCRIPTAPI_PRECHECKHEADER // Get core.registered_on_item_use lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_item_use"); // Push data LuaItemStack::create(L, item); push_pointed_thing(L, pointed, true); // Call functions runCallbacks(2, RUN_CALLBACKS_MODE_OR); return lua_toboolean(L, -1); } void ScriptApiClient::setEnv(ClientEnvironment *env) { ScriptApiBase::setEnv(env); }