Object <- RuleAction <- LocalRuleAction |
|
|
ComputeRuleText Copying Finalize PerformRule |
|
ActionObject OperationToExecute ValueData |
| Field | Type | |
|---|---|---|
| LocalRuleAction: | actionType: | Unsigned |
| actionObject: | Object | |
| operationToExecute: | OperationNumber | |
| valueData: | Unsigned | |
| ownsActionObject: | Boolean |
instance LocalRuleAction tag; actionType: 0; actionObject: nilObject; operationToExecute: nilOperation; valueData: 0; ownsActionObject: false; end instance;
Define Class LocalRuleAction; inherits from RuleAction; field actionType: Unsigned; field actionObject: Object, weak; field operationToExecute: OperationNumber, getter; field valueData: Unsigned, getter; field ownsActionObject: Boolean; // set this to true when a temporary object list is used to set the action object attribute ActionObject: Object; // the object on which the rule will be performed; // if ownsActionObject is false, setter does normal set field; // otherwise, setter sets field with a copy of the object attribute OperationToExecute: OperationNumber; // operation that the rule should perform when it fires attribute ValueData: Unsigned; // used for rules that have time limits or set values // actionDeleteOld specifies a timeIndexRange for things to delete // actionPlaySoundFor plays a sound for a specified duration // actionSetMax sets new maximum value for actionObject overrides Copying; // if ownsActionObject is false, just calls inherited; // otherwise, makes a copy of actionObject near self overrides Finalize; // if ownsActionObject is false, just calls inherited; // otherwise, destroys the actionObject overrides PerformRule; overrides ComputeRuleText; end class;