Complete lab, quest, garrison, and energy tickets
This commit is contained in:
parent
d413d1da9f
commit
0f7edff15a
20 changed files with 238 additions and 45 deletions
26
core/CombatTarget.gd
Normal file
26
core/CombatTarget.gd
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
class_name CombatTarget
|
||||
extends RefCounted
|
||||
|
||||
# One opt-in contract for anything a player weapon may deliberately attack.
|
||||
# Aim assist, autonomous garrisons and projectile impacts all consume the same
|
||||
# group, so a new target composition does not need a concrete-type branch in
|
||||
# each combat system.
|
||||
const GROUP: StringName = &"player_weapon_targets"
|
||||
const PRIORITY_META: StringName = &"player_weapon_target_priority"
|
||||
|
||||
# A garrison protects its post before mining nearby debris. Distances still
|
||||
# decide between targets at the same priority.
|
||||
const RESOURCE_PRIORITY: int = 0
|
||||
const DANGER_PRIORITY: int = 100
|
||||
|
||||
|
||||
static func register(node: Node, priority: int = RESOURCE_PRIORITY) -> void:
|
||||
if node == null:
|
||||
return
|
||||
node.add_to_group(GROUP)
|
||||
node.set_meta(PRIORITY_META, priority)
|
||||
|
||||
|
||||
static func priority(node: Node) -> int:
|
||||
return int(node.get_meta(PRIORITY_META, RESOURCE_PRIORITY)) if node != null \
|
||||
else RESOURCE_PRIORITY
|
||||
1
core/CombatTarget.gd.uid
Normal file
1
core/CombatTarget.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://pgp5qd13xgro
|
||||
|
|
@ -242,6 +242,14 @@ const CHAIN: Array = [
|
|||
"done": "Three kinds of world surveyed. Not one of them holds any sign of the convoy.",
|
||||
"important": true,
|
||||
},
|
||||
{
|
||||
"id": "propulser",
|
||||
"title": "A LONGER REACH",
|
||||
"objective": "Build an Energy Propulser vessel",
|
||||
"goal": {"kind": GOAL_FLEET_VESSEL, "vessel": "distorder", "count": 1},
|
||||
"brief": "The trail may run far beyond this cluster. Unlock an Energy Propulser at the ship lab, build one at the yard, and crew it. Its drive will let the whole fleet search faster.",
|
||||
"done": "The Energy Propulser is in formation. We can cast the search wider now.",
|
||||
},
|
||||
{
|
||||
"id": "trail",
|
||||
"title": "THE TRAIL",
|
||||
|
|
|
|||
Loading…
Reference in a new issue