summaryrefslogtreecommitdiff
path: root/src/script
Commit message (Collapse)AuthorAge
* [CSM] Add minimap API modifiers (#5399)Loïc Blot2017-03-16
| | | | | | | | * Rename Mapper (too generic) to Minimap * Add lua functions to get/set position, angle, mode for minimap * Client: rename m_mapper to m_minimap * Add minimap to core.ui namespace (core.ui.minimap) * Add various functions to manage minimap (show, hide, toggle_shape) * Cleanup trivial declaration in client
* Add ModStorageAPI to client side modding (#5396)Loïc Blot2017-03-16
| | | mod storage is located into user_path / client / mod_storage
* Get biome list: Downgrade missing biome message to infostreamparamat2017-03-16
| | | | | | | | | | It is harmless for a biome listed in an ore or decoration registration to be missing. Now that we are registering certain biomes or not based on options (such as floatland biomes), the biome lists in ore and decoration registrations trigger these error messages, avoiding these error messages would need a large amount of duplication of ore and decoration registrations.
* Add `get_wielded_item`red-0012017-03-13
|
* [CSM] Add enable_client_modding param (default: false)nerzhul2017-03-13
|
* [CSM] Add `on_punchnode` callbackred-0012017-03-13
|
* [CSM] Add `get_node` and `get_node_or_nil`red-0012017-03-13
|
* [CSM] Add `on_dignode` callback (#5140)red-0012017-03-13
|
* [CSM] storage + fixesLoic Blot2017-03-13
|
* [CSM] Improve security for client-sided mods (#5100)red-0012017-03-13
|
* [CSM] Add local formspecs. (#5094)red-0012017-03-13
|
* [CSM] sound_play & sound_stop support + client_lua_api doc (#5096)Loïc Blot2017-03-13
| | | | | | | | | | * squashed: CSM: Implement register_globalstep * Re-use fatal error mechanism from server to disconnect client on CSM error * Little client functions cleanups * squashed: CSM: add core.after function * core.after is shared code between client & server * ModApiUtil get_us_time feature enabled for client
* [CSM] Add client-sided chat commands (#5092)red-0012017-03-13
|
* [CSM] Add on_death, on_hp_modification & oh_damage_taken callbacks (#5093)Loïc Blot2017-03-13
| | | | | | * Add on_death callback * Add on_hp_modification & on_damage_taken callbacks * move preview code to preview.lua
* [CSM] Add method that display chat to client-sided lua. (#5089) (#5091)red-0012017-03-13
| | | | * squashed: [Client-sided scripting] Don't register functions that don't work. (#5091)
* [CSM] Client side moddingLoic Blot2017-03-13
| | | | | | | | | | * rename GameScripting to ServerScripting * Make getBuiltinLuaPath static serverside * Add on_shutdown callback * Add on_receiving_chat_message & on_sending_chat_message callbacks * ScriptApiBase: use IGameDef instead of Server This permits to share common attribute between client & server * Enable mod security in client side modding without conditions
* Light calculation: New bulk node lighting codeDániel Juhász2017-03-11
| | | | | | | | | | | This commit introduces a new bulk node lighting algorithm to minimize lighting bugs during l-system tree generation, schematic placement and non-mapgen-object lua voxelmanip light calculation. If the block above the changed area is not loaded, it gets loaded to avoid lighting bugs. Light is updated as soon as write_to_map is called on a voxel manipulator, therefore update_map does nothing.
* Fix wrong meta key in item meta on ItemStack constructionrubenwardy2017-02-22
|
* Add ModMetadata API (#5131)Loïc Blot2017-02-08
| | | | | | | * mod can create a ModMetadata object where store its values and retrieve it. * Modmetadata object can only be fetched at mod loading * Save when modified using same time as map interval or at server stop * add helper function to get mod storage path * ModMetadata has exactly same calls than all every other Metadata
* Fix incompatibility of ItemStack.to_table() introduced by stack metarubenwardy2017-02-07
|
* Add ItemStack key-value meta storagerubenwardy2017-02-04
|
* Derive NodeMetaRef from MetaDataRefrubenwardy2017-02-04
|
* Make NodeMetaRef::getmeta a non-static memberrubenwardy2017-02-04
|
* Serverlist: Add ping indicators (#5164)kilbith2017-02-03
|
* Tell on_punch to expect a return valueDuane Robertson2017-02-01
| | | | | The return value should be interpreted as a boolean saying whether the lua on_punch function handled damage or the system needs to.
* from_table: Fix crash for missing inventory or fieldSmallJoker2017-01-28
|
* Make entity on_punch have same signature and behaviour as player on_punchsapier2017-01-28
|
* Implement player attribute backend (#4155)Loïc Blot2017-01-27
| | | | | | | | | | | | | | | * This backend permit mods to store extra players attributes to a common interface. * Add the obj:set_attribute(attr, value) Lua call * Add the obj:get_attribute(attr) Lua call Examples: * player:set_attribute("home:home", "10,25,-78") * player:get_attribute("default:mana") Attributes are saved as a json in the player file in extended_attributes key They are saved only if a modification on the attributes occurs and loaded when emergePlayer is called (they are attached to PlayerSAO).
* Initialize TileAnimationParams to prevent crashes/bugs for legacy ↵sfan52017-01-24
| | | | invocations of add_particle{,spawner} (fixes #5108)
* Add hardware node coloring. Includes:Dániel Juhász2017-01-23
| | | | | | - Increase ContentFeatures serialization version - Color property and palettes for nodes - paramtype2 = "color", "colored facedir" or "colored wallmounted"
* Remove os.exit from the Lua secure sandbox (#5090)Loïc Blot2017-01-21
| | | | | os.exit will exit not using proper resource liberation paths. Mods should call the proper exit mod using our API
* Revert "Detach the player from entities on death." (#5087)Loïc Blot2017-01-21
|
* Add Entity get_texture_mod() to Lua APIsapier2017-01-21
| | | | Send texture modifier to clients connecting later too
* Detach the player from entities on death. (#5077)red-0012017-01-21
|
* Add particle animation, glowsfan52017-01-18
| | | | | This is implemented by reusing and extending the TileAnimation code for the methods used by particles.
* Fix typo in alias for deprecated settexturemodsapier2017-01-17
|
* Rename ObjectRef methods to be consistent and predictablerubenwardy2017-01-16
|
* Added lua tracebacks to some errors where you have been blind to what… (#5043)sapier2017-01-15
| | | | * Added lua tracebacks to some errors where you have been blind to what actually went wrong
* Make nametag removable with set_nametag_attributes (#5021)Rui2017-01-11
|
* Performance fix + SAO factorizationRogier2017-01-11
| | | | | | | | | | Original credits goes to @Rogier-5 * Merge common attributes between LuaEntitySAO & PlayerSAO to UnitSAO * Make some functions const * Improve some lists performance by returning const ref Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
* Add staticdata parameter to add_entity (#5009)Rui2017-01-09
| | | | | * Add staticdata parameter to add_entity * Add add_entity_with_staticdata to core.features
* Environment & IGameDef code refactoring (#4985)Ner'zhul2017-01-09
| | | | | | | | | | | | | | | | | | | | | * Environment code refactoring * Cleanup includes & class declarations in client & server environment to improve build speed * ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts. * Cleanup IGameDef * Move ITextureSource* IGameDef::getTextureSource() to Client only. * Also move ITextureSource *IGameDef::tsrc() helper * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call * drop unused emerge() call * cleanup server unused functions (mentionned before) * Drop one unused parameter from ContentFeatures::updateTextures * move checkLocalPrivilege to Client * Remove some unnecessary casts * create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it * Fix some comments * Change required IGameDef to Server/Client pointers * Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects * Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu * drop ClientMap::sectorWasDrawn which is unused
* Move ServerEnvironment to dedicated cpp/header filesLoic Blot2017-01-08
| | | | * also cleanup some unneeded inclusions
* Add 2D sheet animation for nodessfan52017-01-02
|
* Move TileAnimation code to seperate filesfan52017-01-02
|
* Breath cheat fix: server sideLoic Blot2017-01-01
| | | | | | | | | Breath is now handled server side. Changing this behaviour required some modifications to core: * Ignore TOSERVER_BREATH package, marking it as obsolete * Clients doesn't send the breath to server anymore * Use PlayerSAO pointer instead of peer_id in Server::SendPlayerBreath to prevent a useless lookup (little perf gain) * drop a useless static_cast in emergePlayer
* Dont compare short with bool (#4963)adrido2016-12-28
| | | Fixes a compiler warning on MSVC
* Make minetest abort on lua panicRogier2016-12-24
| | | | | | | Currently, lua does a regular exit() after a lua panic, which can make a problem hard to debug. Invoking FATAL_ERROR() instead will print some useful information, and abort() minetest, so that a debugger can be used to analyze the situation.
* Fix warning reported by clang (possible bug in Settings lua api)sfan52016-12-21
|
* Security: Fix resolving of some relative pathsShadowNinja2016-12-20
| | | | | | | | | | | | | Trying to resolve a path with RemoveRelativePathComponents that can't be resolved without leaving leading parent components (e.g. "../worlds/foo" or "bar/../../worlds/foo") will fail. To work around this, we leave the relative components and simply remove the trailing components one at a time, and bail out when we find a parent component. This will still fail for paths like "worlds/foo/noexist/../auth.txt" (the path before the last parent component must not exist), but this is fine since you won't be able to open a file with a path like that anyways (the O.S. will determine that the path doesn't exist. Try `cat /a/../etc/passwd`).