Module TransponderUnit
Broadcasts data to radars, that can access more information if their transponder tags are matching.
Element class: CombatDefense
Extends: Element > ElementWithState > ElementWithToggle
Functions
| activate () | Activate the transponder. | 
| deactivate () | Deactivate the transponder. | 
| isActive () | Checks if the transponder is active. | 
| setTags (tags) | Set the tags list with up to 8 entries. | 
| getTags (tags) | Returns the tag list. | 
| setSignalIn (plug, state) | Set the value of a signal in the specified IN plug of the element. | 
| getSignalIn (plug) | Return the value of a signal in the specified IN plug of the element. | 
| EVENT_toggled (active) | Deprecated: Event: Emitted when the transponder is started or stopped. | 
| EVENT_onToggled (active) | Event: Emitted when the transponder is started or stopped. | 
| mockRegisterToggled (callback, active) | Mock only, not in-game: Register a handler for the in-game `toggled(active)` event. | 
| mockDoToggled (active) | Mock only, not in-game: Simulates the transponder changing state. | 
| mockGetClosure () | Mock only, not in-game: Bundles the object into a closure so functions can be called with "." instead of ":". | 
Functions
- activate ()
 - Activate the transponder.
 - deactivate ()
 - Deactivate the transponder.
 - isActive ()
 - 
    Checks if the transponder is active.
    
Returns:
- 
           0/1
        1 if the transponder is active, 0 otherwise.
    
 
 - setTags (tags)
 - 
    Set the tags list with up to 8 entries.  Returns 1 if the application was successful, 0 if the tag format is invalid.
Note: It can take half a second or more for an update to apply. Also, providing too many tags truncates the list instead of returning 0, but spaces in tags aren't allowed.
Parameters:
- tags list List of up to 8 transponder tag strings.
 
Returns:
- 
           0/1
        1 if transponder tags were set, 0 if an error occurred.
    
 
 - getTags (tags)
 - 
    Returns the tag list.
    
Parameters:
- tags
 
Returns:
- 
           list
        List of up to 8 transponder tag strings.
    
 
 - setSignalIn (plug, state)
 - 
    Set the value of a signal in the specified IN plug of the element.
Valid plug names are:
- "in" for the in signal (seems to have no actual effect when modified this way).
 
Parameters:
- plug string A valid plug name to set.
 - state 0/1 The plug signal state
 
 - getSignalIn (plug)
 - 
    Return the value of a signal in the specified IN plug of the element.
Valid plug names are:
- "in" for the in signal.
 
Parameters:
- plug string A valid plug name to query.
 
Returns:
- 
           0/1
        The plug signal state
    
 
 - EVENT_toggled (active)
 - 
    Deprecated: Event: Emitted when the transponder is started or stopped.
Note: This is documentation on an event handler, not a callable method.
This event is deprecated: EVENT_onToggled should be used instead.
Parameters:
- active 0/1 1 if the element was activated, 0 otherwise.
 
See also:
 - EVENT_onToggled (active)
 - 
    Event: Emitted when the transponder is started or stopped.
Note: This is documentation on an event handler, not a callable method.
Parameters:
- active 0/1 1 if the element was activated, 0 otherwise.
 
 - mockRegisterToggled (callback, active)
 - 
    Mock only, not in-game: Register a handler for the in-game `toggled(active)` event.
    
Parameters:
- callback function The function to call when the shield state changes.
 - active string The state to filter for or "*" for all.
 
Returns:
- 
           int
        The index of the callback.
    
 
See also:
 - mockDoToggled (active)
 - 
    Mock only, not in-game: Simulates the transponder changing state.
Note: The state updates after the event handlers are called.
Parameters:
- active 0/1 The new state, 0 for off, 1 for on.
 
 - mockGetClosure ()
 - 
    Mock only, not in-game: Bundles the object into a closure so functions can be called with "." instead of ":".
    
Returns:
- 
           table
        A table encompasing the api calls of object.
    
 
See also: