summaryrefslogtreecommitdiff
path: root/src/script
Commit message (Collapse)AuthorAge
* 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`).
* Mod security: Allow read-only access to all mod pathsShadowNinja2016-12-20
|
* Simple decorations: Fix range check for deco->deco_param2Auke Kok2016-12-08
| | | | Allow any int value, and properly range check it before casting.
* Simple deco: Allow setting param2 value on placementAuke Kok2016-12-07
| | | | | | | | | | | | | Schematics can already be placed with a param2 value, but not simple 1-node plant decorations of the simple type. This adds a `param2` field to the simple deco type that is checked to be between 0 and 255, and put to the placed node at mapgen. This can be used to put a degrotate value in, or e.g. a fill value for leveltype nodes, or a place_param2 value at mapgen placement, or vary the shape of meshoptions plantlike drawtype.
* Allow restricting detached inventories to one playersfan52016-11-28
| | | | | | | This combats the problem of sending the hundreds of "creative" / "armor" or whatever detached invs that exist on popular servers to each and every player on join or on change of said invs.
* Limit light_source in the engine (#4814)juhdanad2016-11-28
| | | Since light_source>15 causes crash, it must be limited.
* Fix secure io.linesShadowNinja2016-11-24
| | | | | It used to drop all of the return values from the insecure version of the function.
* Fix secure io.open without modeShadowNinja2016-11-24
|
* Revert "Adding particle blend, glow and animation (#4705)"sfan52016-11-14
| | | | This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
* Adding particle blend, glow and animation (#4705)Foghrye42016-11-15
|
* Fix crash when attached object no longer existsRogier2016-11-13
| | | | | | | | | | Active objects that are attached to other objects are not safe from deletion. As a result, the parent object may have a reference to an id of a child's that no longer exists. If at some point an attempt is made to manipulate the child, enviromment->getActiveObject(child-id) returns NULL. Using the NULL pointer causes the crash...
* Fix memory leak in ::safeLoadFile (#4730)Zeno-2016-11-05
|
* Add minetest.get_server_uptime() function to Lua API (#4702)Brandon2016-11-02
| | | Add minetest.get_server_uptime() function to Lua API
* Add version APIShadowNinja2016-10-31
|
* Lua voxelmanip: Add optional buffer param for 'get param2 data'paramat2016-10-31
| | | | Update lua_api.txt.
* Fix overloading problems mentioned by clangLoic Blot2016-10-30
|
* PlayerSAO/LocalPlayer refactor: (#4612)Ner'zhul2016-10-30
| | | | | | | | | | | | | | | | | * Create UnitSAO, a common part between PlayerSAO & LuaEntitySAO * Move breath to PlayerSAO & LocalPlayer * Migrate m_yaw from (Remote)Player & LuaEntitySAO to UnitSAO * Migrate m_yaw from Player to LocalPlayer for client * Move some functions outside of player class to PlayerSAO/RemotePlayer or LocalPlayer depending on which class needs it * Move pitch to LocalPlayer & PlayerSAO * Move m_position from Player to LocalPlayer * Move camera_barely_in_ceiling to LocalPlayer as it's used only there * use PlayerSAO::m_base_position for Server side positions * remove a unused variable * ServerActiveObject::setPos now uses const ref * use ServerEnv::loadPlayer unconditionnaly as it creates RemotePlayer only if it's not already loaded * Move hp from Player to LocalPlayer * Move m_hp from LuaEntitySAO to UnitSAO * Use m_hp from PlayerSAO/UnitSAO instead of RemotePlayer