Add space-time distorder vessel and fleet speed fader (#59)
GameState.fleet_speed_multiplier (1.0-3.0) is applied at the point of
use - Fleet's cruise anchor and Ship's own max_speed/acceleration -
rather than baked into stored stats, so a stat upgrade researched
mid-boost can't corrupt the base value and the fader takes effect
immediately with no re-apply step.
Ship.arrive_radius is scaled by the same multiplier: at higher speeds
each physics tick covers a proportionally larger step, and once that
step outgrows a fixed arrive_radius the ship can overshoot its
snap-to-target zone every tick while chasing a target that's now also
receding faster - visible as the fleet stretching apart under boost.
Scaling it preserves the same "snaps onto its slot" tightness at any
boost level that 1.0x already has.
SpeedFader.gd is a self-contained vertical drag control (TouchJoystick's
raw-touch idiom, not _gui_input) that writes straight to the autoload
rather than reporting a value for something else to apply. It also
resets the multiplier to 1.0 the instant fleet.has_capability("distorder")
goes false, so a fleet can never be left permanently boosted by a vessel
it no longer has.
VesselDistorderComponent carries no per-shot behaviour (energy drain
while boosted is #62) - its presence is what matters. Registered in
VesselDefinitions, wired into the crafter/hangar/ship-lab menus per
#57's note (5/5/6 -> 6/6/7 columns).
This commit is contained in:
parent
ed46cd77e6
commit
116e0f97d3
14 changed files with 675 additions and 86 deletions
|
|
@ -32,12 +32,14 @@ const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd")
|
|||
get_node("../UI/LabMenu/VesselA"), get_node("../UI/LabMenu/VesselB"),
|
||||
get_node("../UI/LabMenu/VesselC"), get_node("../UI/LabMenu/VesselD"),
|
||||
get_node("../UI/LabMenu/VesselE"), get_node("../UI/LabMenu/VesselF"),
|
||||
get_node("../UI/LabMenu/VesselG"),
|
||||
]
|
||||
@onready var lab_vessel_label: Label = get_node("../UI/LabMenu/VesselLabel")
|
||||
@onready var lab_vessel_labels: Array = [
|
||||
get_node("../UI/LabMenu/VesselALabel"), get_node("../UI/LabMenu/VesselBLabel"),
|
||||
get_node("../UI/LabMenu/VesselCLabel"), get_node("../UI/LabMenu/VesselDLabel"),
|
||||
get_node("../UI/LabMenu/VesselELabel"), get_node("../UI/LabMenu/VesselFLabel"),
|
||||
get_node("../UI/LabMenu/VesselGLabel"),
|
||||
]
|
||||
@onready var lab_detail: Label = get_node("../UI/LabMenu/DetailLabel")
|
||||
@onready var lab_status: Label = get_node("../UI/LabMenu/StatusLabel")
|
||||
|
|
@ -67,6 +69,7 @@ const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd")
|
|||
get_node("../UI/HangarMenu/AvailableGasBomber"),
|
||||
get_node("../UI/HangarMenu/AvailableCarrier"),
|
||||
get_node("../UI/HangarMenu/AvailableLaser"),
|
||||
get_node("../UI/HangarMenu/AvailableDistorder"),
|
||||
]
|
||||
@onready var hangar_available_labels: Array = [
|
||||
get_node("../UI/HangarMenu/AvailableInterceptorLabel"),
|
||||
|
|
@ -74,6 +77,7 @@ const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd")
|
|||
get_node("../UI/HangarMenu/AvailableGasBomberLabel"),
|
||||
get_node("../UI/HangarMenu/AvailableCarrierLabel"),
|
||||
get_node("../UI/HangarMenu/AvailableLaserLabel"),
|
||||
get_node("../UI/HangarMenu/AvailableDistorderLabel"),
|
||||
]
|
||||
@onready var hangar_fleet_slots: Array = [
|
||||
get_node("../UI/HangarMenu/FleetInterceptor"),
|
||||
|
|
@ -81,6 +85,7 @@ const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd")
|
|||
get_node("../UI/HangarMenu/FleetGasBomber"),
|
||||
get_node("../UI/HangarMenu/FleetCarrier"),
|
||||
get_node("../UI/HangarMenu/FleetLaser"),
|
||||
get_node("../UI/HangarMenu/FleetDistorder"),
|
||||
]
|
||||
@onready var hangar_fleet_labels: Array = [
|
||||
get_node("../UI/HangarMenu/FleetInterceptorLabel"),
|
||||
|
|
@ -88,6 +93,7 @@ const VESSEL_DEFINITIONS = preload("res://VesselDefinitions.gd")
|
|||
get_node("../UI/HangarMenu/FleetGasBomberLabel"),
|
||||
get_node("../UI/HangarMenu/FleetCarrierLabel"),
|
||||
get_node("../UI/HangarMenu/FleetLaserLabel"),
|
||||
get_node("../UI/HangarMenu/FleetDistorderLabel"),
|
||||
]
|
||||
var build_menu_entries: Array = []
|
||||
|
||||
|
|
@ -117,13 +123,15 @@ var lab_building_id: int = 0
|
|||
@onready var craft_carrier_label: Label = get_node("../UI/CraftMenu/CarrierLabel")
|
||||
@onready var craft_laser_button: IconButton = get_node("../UI/CraftMenu/LaserButton")
|
||||
@onready var craft_laser_label: Label = get_node("../UI/CraftMenu/LaserLabel")
|
||||
@onready var craft_distorder_button: IconButton = get_node("../UI/CraftMenu/DistorderButton")
|
||||
@onready var craft_distorder_label: Label = get_node("../UI/CraftMenu/DistorderLabel")
|
||||
@onready var craft_vessel_buttons: Array = [
|
||||
craft_interceptor_button, craft_shield_button, craft_gas_bomber_button, craft_carrier_button,
|
||||
craft_laser_button,
|
||||
craft_laser_button, craft_distorder_button,
|
||||
]
|
||||
@onready var craft_vessel_labels: Array = [
|
||||
craft_interceptor_label, craft_shield_label, craft_gas_bomber_label, craft_carrier_label,
|
||||
craft_laser_label,
|
||||
craft_laser_label, craft_distorder_label,
|
||||
]
|
||||
|
||||
# --- the transfer panel (#24) ---------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue