sendshader.lua

main 20 lines · 451 bytes Raw
Alex Alex Commit Client Upload Part 1 19/10/2026 00:04
1local OPCODE = 47 -- change this
2function init()
3 ProtocolGame.registerOpcode(OPCODE, setMapShader)
4end
5
6function terminate()
7 ProtocolGame.unregisterOpcode(OPCODE)
8end
9
10function setMapShader(protocol, msg)
11 local map = modules.game_interface.getMapPanel()
12 local action = msg:getU8()
13 local shader = msg:getString()
14
15 if action == 1 then
16 map:setShader(shader)
17 else
18 map:setShader('Default')
19 end
20end
Top