aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
Commit message (Collapse)AuthorAge
* Don't throw a error when writing JSON failsShadowNinja2013-12-18
|
* Add 'minetest.write_json'ShadowNinja2013-12-18
|
* Handle LuaErrors in Lua -> C++ calls on LuaJITShadowNinja2013-12-18
|
* Add map feature generation notify Lua APIkwolekr2013-12-14
|
* Make line_of_sight return blocking node positionstujones112013-12-12
|
* Implement search tab and version pickersapier2013-12-11
|
* Fix leak and possible segfault in minetest.set_mapgen_paramskwolekr2013-12-08
|
* Use a table in set_physics_override()PilzAdam2013-12-03
|
* Add sneak and sneak_glitch to set_physics_override()PilzAdam2013-12-03
|
* Fix broken async locking in release buildsapier2013-12-03
|
* Fix MinGW buildSfan52013-12-01
|
* Cleanup jthread and fix win32 buildsapier2013-12-01
|
* Decoration: Add schematic Y-slice probability supportkwolekr2013-12-01
|
* Add error handler to async stepShadowNinja2013-11-30
|
* Optimize table creationShadowNinja2013-11-30
|
* Add minetest.swap_nodeNovatux2013-11-30
|
* Fix MSVC build.Ilya Zhuravlev2013-11-30
|
* LuaVoxelManip: Add area parameters back to calc_lighting and set_lighting, ↵kwolekr2013-11-30
| | | | made optional this time; also fixed a slight bug with night values being ignored
* LuaVoxelManip: Add get_light_data() and set_light_data()kwolekr2013-11-30
|
* Fixed potential NULL pointer and leak when setting node metadataMetaDucky2013-11-29
|
* Fix broken thread stop handlingsapier2013-11-30
|
* Fix old gcc buildsapier2013-11-29
|
* Fix modstore/favourites hang by adding asynchronous lua job supportsapier2013-11-29
|
* Rollback fixes and get_node_actionsShadowNinja2013-11-27
|
* Fix line_of_sight (AGAIN)sapier2013-11-25
|
* LuaVoxelManip: Update parameter index of set_lighting()kwolekr2013-11-21
|
* Fix issue #1009 (minetest.get_connected_players() returns non-existing players)kwolekr2013-11-17
|
* Decoration: Stop DecoSimple::resolveNodeNames from complaining about no node ↵kwolekr2013-11-17
| | | | | | | | name if decolist is used Fix warning message for spawnby nodes Prevent type-punning warning caused by casting enum to int
* Fix invalid listname and listsize not handled correctly in set_sizesapier2013-11-16
|
* Pass a errfunc to lua_pcall to get a tracebackShadowNinja2013-11-15
|
* Fix invalid usage of temporary object in mainmenu json conversionsapier2013-11-11
|
* Add set_name(), set_count(), set_wear() and set_metadata() to Lua ItemStackPilzAdam2013-09-28
|
* Show git hash in version string at top left corner of windowKahrl2013-09-28
|
* Re-fix hud_change stat argument retrievalkwolekr2013-09-26
| | | | | Conflicts: src/script/lua_api/l_object.cpp
* Fix some warnings and other minor detailskwolekr2013-09-16
|
* Weather: Clean up getHeat/getHumidity somewhatkwolekr2013-09-16
|
* Allow non-string arguments for minetest.is_yes()PilzAdam2013-09-10
|
* Add Settings interface for LuaPilzAdam2013-09-10
|
* Add minetest.get_gametime() API function, that returns the number of seconds ↵Novatux2013-09-08
| | | | since the world was created.
* Use player:set_hotbar_image() instead of hardcoded hotbar.pngPilzAdam2013-09-05
|
* Add minetest.parse_json, engine.parse_jsonKahrl2013-09-02
|
* Fix umlauts/special character issue in lua gettextBlockMen2013-08-19
|
* Allow SIGINT to kill mainmenu againKahrl2013-08-19
|
* Add translation for main menusapier2013-08-17
| | | | Add engine.gettext() and remove gettext() calls in guiFormspecMenu.cpp
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
|
* Decoration: Fix schematic probability mess with new MTS file versionkwolekr2013-08-11
|
* Add replacements to schematicsPilzAdam2013-08-03
|
* Allow multiple 'wherein' nodes in oredefPilzAdam2013-08-02
|
* Better snow fall, finite liquid transform, leveled nodes apiproller2013-07-28
|
* Weather supportproller2013-07-27
|
/span>name) const; v3f getV3F(const std::string &name) const; u32 getFlagStr(const std::string &name, const FlagDesc *flagdesc, u32 *flagmask) const; // N.B. if getStruct() is used to read a non-POD aggregate type, // the behavior is undefined. bool getStruct(const std::string &name, const std::string &format, void *out, size_t olen) const; bool getNoiseParams(const std::string &name, NoiseParams &np) const; bool getNoiseParamsFromValue(const std::string &name, NoiseParams &np) const; bool getNoiseParamsFromGroup(const std::string &name, NoiseParams &np) const; // return all keys used std::vector<std::string> getNames() const; bool exists(const std::string &name) const; /*************************************** * Getters that don't throw exceptions * ***************************************/ bool getEntryNoEx(const std::string &name, SettingsEntry &val) const; bool getEntryDefaultNoEx(const std::string &name, SettingsEntry &val) const; bool getGroupNoEx(const std::string &name, Settings *&val) const; bool getNoEx(const std::string &name, std::string &val) const; bool getDefaultNoEx(const std::string &name, std::string &val) const; bool getFlag(const std::string &name) const; bool getU16NoEx(const std::string &name, u16 &val) const; bool getS16NoEx(const std::string &name, s16 &val) const; bool getS32NoEx(const std::string &name, s32 &val) const; bool getU64NoEx(const std::string &name, u64 &val) const; bool getFloatNoEx(const std::string &name, float &val) const; bool getV2FNoEx(const std::string &name, v2f &val) const; bool getV3FNoEx(const std::string &name, v3f &val) const; // N.B. getFlagStrNoEx() does not set val, but merely modifies it. Thus, // val must be initialized before using getFlagStrNoEx(). The intention of // this is to simplify modifying a flags field from a default value. bool getFlagStrNoEx(const std::string &name, u32 &val, FlagDesc *flagdesc) const; /*********** * Setters * ***********/ // N.B. Groups not allocated with new must be set to NULL in the settings // tree before object destruction. bool setEntry(const std::string &name, const void *entry, bool set_group, bool set_default); bool set(const std::string &name, const std::string &value); bool setDefault(const std::string &name, const std::string &value); bool setGroup(const std::string &name, Settings *group); bool setGroupDefault(const std::string &name, Settings *group); bool setBool(const std::string &name, bool value); bool setS16(const std::string &name, s16 value); bool setU16(const std::string &name, u16 value); bool setS32(const std::string &name, s32 value); bool setU64(const std::string &name, u64 value); bool setFloat(const std::string &name, float value); bool setV2F(const std::string &name, v2f value); bool setV3F(const std::string &name, v3f value); bool setFlagStr(const std::string &name, u32 flags, const FlagDesc *flagdesc, u32 flagmask); bool setNoiseParams(const std::string &name, const NoiseParams &np, bool set_default=false); // N.B. if setStruct() is used to write a non-POD aggregate type, // the behavior is undefined. bool setStruct(const std::string &name, const std::string &format, void *value); // remove a setting bool remove(const std::string &name); void clear(); void clearDefaults(); void updateValue(const Settings &other, const std::string &name); void update(const Settings &other); void registerChangedCallback(const std::string &name, SettingsChangedCallback cbf, void *userdata = NULL); void deregisterChangedCallback(const std::string &name, SettingsChangedCallback cbf, void *userdata = NULL); private: void updateNoLock(const Settings &other); void clearNoLock(); void clearDefaultsNoLock(); void doCallbacks(const std::string &name) const; SettingEntries m_settings; SettingEntries m_defaults; SettingsCallbackMap m_callbacks; mutable std::mutex m_callback_mutex; // All methods that access m_settings/m_defaults directly should lock this. mutable std::mutex m_mutex; };