31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| from typing import Set
 | |
| 
 | |
| from .data import Alliance, Attribute, CloakState, DisplayType, TargetType
 | |
| 
 | |
| IS_STRUCTURE: int = Attribute.Structure.value
 | |
| IS_LIGHT: int = Attribute.Light.value
 | |
| IS_ARMORED: int = Attribute.Armored.value
 | |
| IS_BIOLOGICAL: int = Attribute.Biological.value
 | |
| IS_MECHANICAL: int = Attribute.Mechanical.value
 | |
| IS_MASSIVE: int = Attribute.Massive.value
 | |
| IS_PSIONIC: int = Attribute.Psionic.value
 | |
| TARGET_GROUND: Set[int] = {TargetType.Ground.value, TargetType.Any.value}
 | |
| TARGET_AIR: Set[int] = {TargetType.Air.value, TargetType.Any.value}
 | |
| TARGET_BOTH = TARGET_GROUND | TARGET_AIR
 | |
| IS_SNAPSHOT = DisplayType.Snapshot.value
 | |
| IS_VISIBLE = DisplayType.Visible.value
 | |
| IS_PLACEHOLDER = DisplayType.Placeholder.value
 | |
| IS_MINE = Alliance.Self.value
 | |
| IS_ENEMY = Alliance.Enemy.value
 | |
| IS_CLOAKED: Set[int] = {CloakState.Cloaked.value, CloakState.CloakedDetected.value, CloakState.CloakedAllied.value}
 | |
| IS_REVEALED: int = CloakState.CloakedDetected.value
 | |
| CAN_BE_ATTACKED: Set[int] = {CloakState.NotCloaked.value, CloakState.CloakedDetected.value}
 | |
| 
 | |
| TARGET_HELPER = {
 | |
|     1: "no target",
 | |
|     2: "Point2",
 | |
|     3: "Unit",
 | |
|     4: "Point2 or Unit",
 | |
|     5: "Point2 or no target",
 | |
| }
 | 
