|
|
@ -53,7 +53,6 @@ public static final function bool IsEnabled() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Enables feature of given class. |
|
|
|
// Enables feature of given class. |
|
|
|
// To disable a feature simply use 'Destroy'. |
|
|
|
|
|
|
|
public static final function Feature EnableMe() |
|
|
|
public static final function Feature EnableMe() |
|
|
|
{ |
|
|
|
{ |
|
|
|
local Feature newInstance; |
|
|
|
local Feature newInstance; |
|
|
@ -67,6 +66,18 @@ public static final function Feature EnableMe() |
|
|
|
return newInstance; |
|
|
|
return newInstance; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final function bool DisableMe() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
local Feature myself; |
|
|
|
|
|
|
|
myself = Feature(GetInstance()); |
|
|
|
|
|
|
|
if (myself != none) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
myself.Destroy(); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Event functions that are called when |
|
|
|
// Event functions that are called when |
|
|
|
protected function OnEnabled(){} |
|
|
|
protected function OnEnabled(){} |
|
|
|
protected function OnDisabled(){} |
|
|
|
protected function OnDisabled(){} |
|
|
@ -98,6 +109,7 @@ protected function OnDestroyed() |
|
|
|
defaultproperties |
|
|
|
defaultproperties |
|
|
|
{ |
|
|
|
{ |
|
|
|
autoEnable = false |
|
|
|
autoEnable = false |
|
|
|
|
|
|
|
DrawType = DT_None |
|
|
|
// Prevent spawning this feature by any other means than 'EnableMe()'. |
|
|
|
// Prevent spawning this feature by any other means than 'EnableMe()'. |
|
|
|
blockSpawning = true |
|
|
|
blockSpawning = true |
|
|
|
// Features are server-only actors |
|
|
|
// Features are server-only actors |
|
|
|