aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
AgeCommit message (Collapse)Author
2017-04-06[CSM] Add function to get the server protocol version. (#5529)red-001
2017-04-06Move LINT process in dedicated shell & fixLoic Blot
Move lint to dedicated shell permit to use it from your shell easily to check what is wrong Also fix recent regressions in code style
2017-04-06[CSM] Add support for positional audio. (#5516)red-001
Fixes parts of #5389.
2017-04-04[CSM] Add local node meta reference. (#5508)red-001
2017-04-01[CSM] Add function and chat command to disconnect from server. (#5487)red-001
2017-03-31Fix clang-format Columns WidthLoic Blot
Also fix l_client.cpp/h and remove them from whitelist
2017-03-29l_minimap: don't show minimap if configuration doesn't allow itLoïc Blot
2017-03-22[CSM] Add function to get player names in range (#5435)bigfoot547
* [CSM] Add function to get currently connected player names
2017-03-19Refactor Game class (part 2) (#5422)Loïc Blot
* showPauseMenu is now part of game * remove many flags parameters passed to game functions, use the member. * rename VolatileRunFlags to GameUIFlags (this will permit to share structure with client and CSM * updatePointedThing: remove pointer ref, we already have the pointer in rundata * move some attributes outside of VolatileRunFlags after renaming, to game class * rename statustext to m_statustext * make some const variables static * All those changes permit to reduce a little bit function class cost and will permit to interface CSM with some interesting Game flags * Expose GameUIFlags to client * Client now have GameUIFlags parameter and setters for other classes * Fix minimap show/hide in Lua because we now have access to the real flag
2017-03-17[CSM] Fix minimap problems (#5405)Loïc Blot
This fixes issue #5404
2017-03-17[CSM] Add core.get_timeofday & core.get_day_count env calls (#5401)Loïc Blot
* [CSM] Add core.get_timeofday & core.get_day_count env calls * [CSM] Add core.get_node_level, core.get_node_max_level, core.find_node_near
2017-03-16[CSM] Add minimap API modifiers (#5399)Loïc Blot
* 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
2017-03-16Add ModStorageAPI to client side modding (#5396)Loïc Blot
mod storage is located into user_path / client / mod_storage
2017-03-16Get biome list: Downgrade missing biome message to infostreamparamat
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.
2017-03-13Add `get_wielded_item`red-001
2017-03-13[CSM] Add `get_node` and `get_node_or_nil`red-001
2017-03-13[CSM] storage + fixesLoic Blot
2017-03-13[CSM] Add local formspecs. (#5094)red-001
2017-03-13[CSM] sound_play & sound_stop support + client_lua_api doc (#5096)Loïc Blot
* 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
2017-03-13[CSM] Add client-sided chat commands (#5092)red-001
2017-03-13[CSM] Add method that display chat to client-sided lua. (#5089) (#5091)red-001
* squashed: [Client-sided scripting] Don't register functions that don't work. (#5091)
2017-03-13[CSM] Client side moddingLoic Blot
* 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
2017-03-11Light calculation: New bulk node lighting codeDániel Juhász
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.
2017-02-08Add ModMetadata API (#5131)Loïc Blot
* 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
2017-02-07Fix incompatibility of ItemStack.to_table() introduced by stack metarubenwardy
2017-02-04Add ItemStack key-value meta storagerubenwardy
2017-02-04Derive NodeMetaRef from MetaDataRefrubenwardy
2017-02-04Make NodeMetaRef::getmeta a non-static memberrubenwardy
2017-02-03Serverlist: Add ping indicators (#5164)kilbith
2017-01-28from_table: Fix crash for missing inventory or fieldSmallJoker
2017-01-27Implement player attribute backend (#4155)Loïc Blot
* 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).
2017-01-24Initialize TileAnimationParams to prevent crashes/bugs for legacy ↵sfan5
invocations of add_particle{,spawner} (fixes #5108)
2017-01-21Revert "Detach the player from entities on death." (#5087)Loïc Blot
2017-01-21Add Entity get_texture_mod() to Lua APIsapier
Send texture modifier to clients connecting later too
2017-01-21Detach the player from entities on death. (#5077)red-001
2017-01-18Add particle animation, glowsfan5
This is implemented by reusing and extending the TileAnimation code for the methods used by particles.
2017-01-17Fix typo in alias for deprecated settexturemodsapier
2017-01-16Rename ObjectRef methods to be consistent and predictablerubenwardy
2017-01-11Make nametag removable with set_nametag_attributes (#5021)Rui
2017-01-11Performance fix + SAO factorizationRogier
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>
2017-01-09Add staticdata parameter to add_entity (#5009)Rui
* Add staticdata parameter to add_entity * Add add_entity_with_staticdata to core.features
2017-01-09Environment & IGameDef code refactoring (#4985)Ner'zhul
* 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
2017-01-08Move ServerEnvironment to dedicated cpp/header filesLoic Blot
* also cleanup some unneeded inclusions
2017-01-01Breath cheat fix: server sideLoic Blot
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
2016-12-28Dont compare short with bool (#4963)adrido
Fixes a compiler warning on MSVC
2016-12-21Fix warning reported by clang (possible bug in Settings lua api)sfan5
2016-12-20Mod security: Allow read-only access to all mod pathsShadowNinja
2016-12-08Simple decorations: Fix range check for deco->deco_param2Auke Kok
Allow any int value, and properly range check it before casting.
2016-12-07Simple deco: Allow setting param2 value on placementAuke Kok
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.
2016-11-28Allow restricting detached inventories to one playersfan5
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.