Instructions/Has Like Component

From Desynced Wiki

Test the relation of an equipped (!) component instance to some component type.

The relation is NOT hierarchically unidirectional (not what programmers would expect from "derivative relations").

It is unclear so far if the "likeliness" is determined by a common construction ingredient like the "Small Turret" or if some other relation mechanism (like being a "turret" or being a "mining tool") is applied. Since the game has a lot of purposes for things and a lot of attributes those can hold, is remains to be clarified what of those possibilities is actually used for this script function as a means of differentiating versus unifying the components.

For example, the following derivative relations hold:

  • "Viral Turret" is like "Small Advanced Turret" is like "Small Turret", but also like "Pulse Laser" and "Photon Cannon" (all have a common "ancestor" ingredient: "Small Turret")
  • "Laser Mining Tool" is like "Miner"


Has Like Component
     File:Instructions-Has Like Component.png
     Checks Unit for a component type
Lua ID has_like_component
Category Flow
Icon Count Item.png
Argument One: Type Input
Argument One: Name Component
Argument One: Description Component
Argument Two: Type Input
Argument Two: Name Unit
Argument Two: Description The unit to check for (if not self)
Argument Two: Data Type entity
Argument Three: Type Exec
Argument Three: Name Failed
Argument Three: Description Failed