Commit Graph

16 Commits

Author SHA1 Message Date
Elijah Duffy
7d3641021b
Lua API: Add register_on_chatcommand to SSM and CSM (#7862)
Allows catching a chatcommand call just after the command and the
parameters are parsed but before its existence is checked and before the
corresponding function is run. Returning `true` from a callback function
will prevent default handling of the command leaving mods to handle the
command manually.
2020-10-03 17:38:08 +01:00
Loïc Blot
ccc3af128c
CSM/SSM: Add on_mods_loaded callback (#7411)
* CSM/SSM: Add on_mods_loaded callback
2018-06-06 12:53:59 +02:00
red-001
49ff1d2ea8 [CSM] Remove on_connect callback (#6941)
Fixes #6939
2018-01-21 18:27:27 +01:00
Vincent Glize
4e19791cde [CSM] Add callback on open inventory (#5793) 2017-10-02 22:09:49 +02:00
Loïc Blot
6f1c907204 Implement mod communication channels (#6351)
Implement network communication for channels

* Implement ModChannel manager server side to route incoming messages from clients to other clients
* Add signal handler switch on client & ModChannelMgr on client to handle channels
* Add Lua API bindings + client packet sending + unittests
* Implement server message sending
* Add callback from received message handler to Lua API using registration method
2017-09-26 00:11:20 +02:00
DS
44495ea719 CSM: Fix documentation error for register_on_*_chat_messages (#5917) 2017-06-09 15:48:04 +02:00
red-001
5ebf8f9450 [CSM] add on_item_use (#5544) 2017-05-06 21:12:44 +02:00
Vincent Glize
dc5bc6cac7 [CSM] Add event on_place_node API lua (#5548)
* [CSM] Add event on_place_node API lua
2017-04-29 12:08:16 +02:00
Vincent Glize
f73534640a [CSM] Add event on_connect player API lua (#5540)
* Add event on_connect player API lua
2017-04-08 08:20:30 +02:00
red-001
0727bb3ddd [CSM] Add on_punchnode callback 2017-03-13 23:56:05 +01:00
red-001
073f5cf03d [CSM] Add on_dignode callback (#5140) 2017-03-13 23:56:05 +01:00
red-001
a50d07d39a [CSM] Improve security for client-sided mods (#5100) 2017-03-13 23:56:05 +01:00
red-001
c42c53fccf [CSM] Add local formspecs. (#5094) 2017-03-13 23:56:05 +01:00
Loïc Blot
2c19d51409 [CSM] sound_play & sound_stop support + client_lua_api doc (#5096)
* 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 23:56:05 +01:00
Loïc Blot
9978f5af82 [CSM] Add on_death, on_hp_modification & oh_damage_taken callbacks (#5093)
* Add on_death callback
* Add on_hp_modification & on_damage_taken callbacks
* move preview code to preview.lua
2017-03-13 23:56:05 +01:00
Loic Blot
2efae3ffd7 [CSM] Client side modding
* 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-13 23:56:05 +01:00