-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsm_condition.lua
19 lines (19 loc) · 908 Bytes
/
sm_condition.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- Condition template:
local sm_condition = class('sm_condition')
-- Initialize new class, - gets called when :new(..) is called
function sm_condition:initialize()
ml_error("Implement a 'function sm_condition:initialize()' in your sm_condition: "..tostring(self.uid))
end
-- Save the condition data into a table and returns that
function sm_condition:Save()
ml_error("Implement a 'function sm_condition:Save()' in your sm_condition: "..tostring(self.uid))
end
-- Evaluates the condition, returns "true" / "false".
function sm_condition:Evaluate(skill,context)
ml_error("Implement a 'function sm_condition:Evaluate()' in your sm_condition: "..tostring(self.uid))
end
-- Renders the condition UI
function sm_condition:Render()
ml_error("Implement a 'function sm_condition:Render()' in your sm_condition: "..tostring(self.uid))
end
_G['sm_condition'] = sm_condition -- so others can init their condition