File size: 559 Bytes
24b81cb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
class PluginVariables extends PluginBase
{
	void PluginVariables()
	{
		m_Id = 0;
		m_Variables = new map<int, string>;
		//				("variable name")
		RegisterVariable("varNote");
		RegisterVariable("varColor");
		
	}

	void ~PluginVariables()
	{
	}
	
	void RegisterVariable(string name)
	{
		m_Id++;
		m_Variables.Set(m_Id,name);//REWORK.V maybe have 2 maps, one with key
		
	}

	int m_Id;
	ref map<int, string> m_Variables;

	string GetName(int id)
	{
		return m_Variables.Get(id);
	}

	int GetID(string name)
	{
		return m_Variables.GetKeyByValue(name);
	}
}