{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest/issues/3440","repository_url":"https://api.github.com/repos/minetest/minetest","labels_url":"https://api.github.com/repos/minetest/minetest/issues/3440/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/3440/comments","events_url":"https://api.github.com/repos/minetest/minetest/issues/3440/events","html_url":"https://github.com/minetest/minetest/issues/3440","id":121231929,"number":3440,"title":"CSM: Ability to inject from server-side mod","user":{"login":"jogag","id":13770245,"avatar_url":"https://avatars2.githubusercontent.com/u/13770245?v=3","gravatar_id":"","url":"https://api.github.com/users/jogag","html_url":"https://github.com/jogag","followers_url":"https://api.github.com/users/jogag/followers","following_url":"https://api.github.com/users/jogag/following{/other_user}","gists_url":"https://api.github.com/users/jogag/gists{/gist_id}","starred_url":"https://api.github.com/users/jogag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jogag/subscriptions","organizations_url":"https://api.github.com/users/jogag/orgs","repos_url":"https://api.github.com/users/jogag/repos","events_url":"https://api.github.com/users/jogag/events{/privacy}","received_events_url":"https://api.github.com/users/jogag/received_events","type":"User","site_admin":false},"labels":[{"id":218642176,"url":"https://api.github.com/repos/minetest/minetest/labels/Bounty","name":"Bounty","color":"00adff","default":false},{"id":108307769,"url":"https://api.github.com/repos/minetest/minetest/labels/Feature%20request","name":"Feature request","color":"207de5","default":false},{"id":11426245,"url":"https://api.github.com/repos/minetest/minetest/labels/Non-trivial","name":"Non-trivial","color":"e144d8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":43,"created_at":"2015-12-09T12:57:22Z","updated_at":"2017-04-29T15:02:16Z","closed_at":null,"body":"Mods should be able to work both server-side and client-side.\r\nMobs, entities, mesecons, HUDs and other laggy things should be processed by a client if a player is near them and then sent to server just if needed (e.g. there's another player near that).\r\nThe client side feature could be used by adding a `client` folder inside mods with the scripts that should be sent to clients like media files.\r\nThen servers can trigger functions in client-side files, e.g:\r\n\r\n``` lua\r\n-- Server (init.lua)\r\nfunction feedback(player,param) -- player param always passed\r\n  print(\"Received from \"..player..\": \"..dump(param))\r\nend\r\nlocal arg = \"example\" -- parameter to send\r\nminetest.call_client_function_all(\"something\", arg) -- to all players\r\nminetest.call_client_function_player(\"jogag\", \"something\", arg) -- to one player\r\nminetest.call_client_function_player({\"jogag\",\"someone\"}, \"something\", arg) -- to some players\r\n-- Clients (client/init.lua)\r\nfunction something(param)\r\n  minetest.show_chat_message(\"From server: \"..dump(param)) -- implementing some client API?\r\n  minetest.call_server_function(\"feedback\",param)\r\nend\r\n```\r\n\r\n[![Bountysource](https://api.bountysource.com/badge/issue?issue_id=28979384)](https://www.bountysource.com/issues/28979384-client-side-lua-scripting?utm_source=28979384&utm_medium=shield&utm_campaign=ISSUE_BADGE)\r\n\r\n- [x] Client side Lua environment\r\n- [ ] Server mods can define Lua scripts to run on the client\r\n- [ ] Custom client side prediction:\r\n    - [ ] players\r\n    - [ ] entities\r\n- [ ] Better GUI\r\n- [ ] Better HUD\r\n- [ ] Keybinding\r\n"},"comment":{"url":"https://api.github.com/repos/minetest/minetest/issues/comments/298174215","html_url":"https://github.com/minetest/minetest/issues/3440#issuecomment-298174215","issue_url":"https://api.github.com/repos/minetest/minetest/issues/3440","id":298174215,"user":{"login":"nerzhul","id":119752,"avatar_url":"https://avatars3.githubusercontent.com/u/119752?v=3","gravatar_id":"","url":"https://api.github.com/users/nerzhul","html_url":"https://github.com/nerzhul","followers_url":"https://api.github.com/users/nerzhul/followers","following_url":"https://api.github.com/users/nerzhul/following{/other_user}","gists_url":"https://api.github.com/users/nerzhul/gists{/gist_id}","starred_url":"https://api.github.com/users/nerzhul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerzhul/subscriptions","organizations_url":"https://api.github.com/users/nerzhul/orgs","repos_url":"https://api.github.com/users/nerzhul/repos","events_url":"https://api.github.com/users/nerzhul/events{/privacy}","received_events_url":"https://api.github.com/users/nerzhul/received_events","type":"User","site_admin":false},"created_at":"2017-04-29T15:02:16Z","updated_at":"2017-04-29T15:02:16Z","body":"@neoascetic how can that be claimed ? i added to aborted not because bounty, but it's not the main issue."}}
{"actor":{"display_login":"nerzhul"}}