aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
AgeCommit message (Collapse)Author
2017-05-02Set sky API: Add bool for clouds in front of custom skyboxparamat
Default true. Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API. Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of 'm_visible' (whether normal sky is visible).
2017-05-03Sneak: Improve and fix various thingsSmallJoker
Remove useless `got_teleported`. Fix jitter when walking against the sneak limits. Fix damage evading on sneak ladders.
2017-05-03Sound API: Add fading soundsBrandon
2017-04-30Add clouds APIBen Deutsch
2017-04-29Fix visual slide issue with set_detach, fixes #5620shivajiva101
2017-04-29[CSM] add screenshot api lua (#5674)Vincent Glize
* [CSM] add screenshot api lua
2017-04-27Allow scripts to get the client protocol version in non-debug builds. (#5649)red-001
2017-04-25Rename Scripting API files for consistencyShadowNinja
2017-04-25Fix various points reported by cppcheck (#5656)Loïc Blot
* Fix various performance issues reported by cppcheck + code style (CI) * Make CI happy with code style on master * guiFileSelectMenu: remove useless includes * some performance fixes pointed by cppcheck * remove some useless casts * TextDest: remove unused setFormSpec function * Fix various iterator post-increment reported by cppcheck
2017-04-23Player data to Database (#5475)Loïc Blot
* Player data to Database Add player data into databases (SQLite3 & PG only) PostgreSQL & SQLite: better POO Design for databases Add --migrate-players argument to server + deprecation warning * Remove players directory if empty
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.