# inline script that generalizes some code for combat computers

size = small
icon = $COMPUTER_ICON$
icon_frame = 1
power = $POWER$

inline_script = {
	script = ship_components_general/esc_inlines_uses_bio_ships_conditional
	EXTRA_CONDITION = ESC_ship_uses_$SHIP_COMBAT_ROLE$_computers
	EXTRA_CONDITION_VALUE = yes
	EVAL_TARGET = $IS_BIOSHIP_COMPUTER$
}

inline_script = {
	script = component_costs/shorthands/esc_inlines_standard_cost
	COMPONENT_TYPE = COMPUTER
	SIZE = s
	TIER = 2
	STRATEGIC_RESOURCE_TYPE = $STRATEGIC_RESOURCE_TYPE$
}

component_set = "combat_computers"
prerequisites = { "$PREREQUISITE$" }

ai_weight = {
	weight = $COMPONENT_WEIGHT$
	### AI shouldn't use this component if it can't afford at least some upgrades right away
	modifier = {
		factor = 0.0
		no_resource_for_component = { RESOURCE = $STRATEGIC_RESOURCE_TYPE$ }
	}
}
