aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
AgeCommit message (Collapse)Author
2017-04-22lua: remove core.cause_error call (#5637)Loïc Blot
it was used in minimal to trigger core crash, not very useful
2017-04-20Light update for map blocksDániel Juhász
This is not really different from the light update of a voxel manipulator. This update does not assume that the lighting was correct before, therefore it is useful for correction. Also expose this function to the Lua API for light correction, and allow voxel manipulators not to update the light.
2017-04-19Fix various copy instead of const ref reported by cppcheck (#5615)Loïc Blot
* Also remove InventoryList::peekItem unused function * Fix some post increment to preincrement reported by cppcheck
2017-04-17Sneak: Add option for old move codeparamat
Temporary option for the old move code for specific old sneak behaviour. Enabled by setting the added 'new move' physics override to false. By default 'new move' is true.
2017-04-15Implement delayed server shutdown with cancelation (#4664)Loïc Blot
2017-04-15Minimap: Do a double-typecast to fix compiling with MSVCSmallJoker
2017-04-14[CSM] Add function to set minimap shape (#5569)bigfoot547
* [CSM] Add function to set minimap shape Also deprecates `toggle_shape`. * Oh fish, I messed that one up! * Fix Style * Sorry, I missed something I still had the `luamethod` call in there! * Add getters * Remove extra line * Remove useless variable Please review again @nerzhul . Thanks! * Satisfy nerzhul
2017-04-12Fix inability to change metadata using stack:to_table() (#5547)numberZero
2017-04-11Replace occurrence of luaL_reg in l_localplayer (#5566)t0ny2
Related to commit 41c5483. Replace a final occurrence of luaL_reg in src/script/lua_api/l_localplayer.cpp
2017-04-10Clang-format styles fixes since previous commitLoïc Blot
2017-04-10Clang format: fix LINT on old PR which doesn't have LINT enabledLoic Blot
2017-04-08LocalPlayer api luaVincent Glize
2017-04-08Hardware coloring for itemstacksDániel Juhász
Adds the possibility to colorize item stacks based on their metadata. In the item/node definition you can specify palette (an image file) and color (fallback color if the item has no palette or metadata). Then you can add palette_index to the metadata. Dropped itemstacks with different colors do not merge.
2017-04-08Replace luaL_reg with luaL_Reg as recent LuaJIT dropped the Lua 5.0 compat ↵Loïc Blot
(#5541) We are bundling Lua5.1 which has same macro
2017-04-07Pass clang-format on 14 trivial header files fixesLoic Blot
Also remove them from whitelist
2017-04-07Clang-format: fix some header files and remove them from whitelistLoic Blot
2017-04-06LINT: Switch whitelist check from egrep to awkLoïc Blot
Bonus: make CI happy with the last rules fix
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