-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMRadius_naive.lua
30 lines (23 loc) · 950 Bytes
/
CMRadius_naive.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
local cr = {}
local path = {'Custom', 'Freezing Field Radius Naive'}
cr.enabled = Menu.AddOptionBool(path, 'Show', false)
Menu.AddMenuIcon(path, '~/Custom/freezingField.png')
-- https://cartierfam.xyz/storage/freezingField.png
local freezingField = 'modifier_crystal_maiden_freezing_field'
Engine.ExecuteCommand('dota_range_display 0')
function cr.OnModifierCreate(ent, mod)
if not Menu.IsEnabled(cr.enabled) then return end
if Modifier.GetName(mod) ~= freezingField then return end
Engine.ExecuteCommand('dota_range_display 810')
end
function cr.OnModifierDestroy(ent, mod)
if not Menu.IsEnabled(cr.enabled) then return end
if Modifier.GetName(mod) ~= freezingField then return end
Engine.ExecuteCommand('dota_range_display 0')
end
function cr.OnMenuOptionChange(option, oldValue, newValue)
if option == cr.enabled and newValue == 0 then
Engine.ExecuteCommand('dota_range_display 0')
end
end
return cr