forked from FAForever/fa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefaultBuffField.lua
34 lines (30 loc) · 1.19 KB
/
DefaultBuffField.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
31
32
33
34
#****************************************************************************
#**
#** File : /lua/DefaultBuffField.lua
#** Author(s): Brute51
#**
#** Summary : Medium level buff field class
#**
#****************************************************************************
#**
#** READ DOCUMENTATION BEFORE USING THIS!!
#**
#****************************************************************************
local Game = import('/lua/game.lua')
local BuffField = import('/lua/sim/BuffField.lua').BuffField
DefaultBuffField = Class(BuffField) {
FieldVisualEmitter = '/effects/emitters/seraphim_regenerative_aura_01_emit.bp',
OnCreate = function(self)
local bp = self:GetBlueprint()
if bp.EnabledOnCreate then
# a warning of obsoleteness. delete this in v5
WARN('BuffField: obsolete blueprint variable "EnabledOnCreate" used in '..repr(self.Name)..'. Use "InitiallyEnabled" instead.')
end
BuffField.OnCreate(self)
end,
# old code. Remove in CBFP v5
Create = function(self, Owner, BuffFieldName)
WARN('BuffField: Create() is a not used anymore. Use OnCreate() instead.')
# remark: OnCreate runs automatically
end,
}