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
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=15 format=3]
|
||||
[gd_scene load_steps=16 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://GameController.gd" id="1"]
|
||||
[ext_resource type="Script" path="res://LunarBackground.gd" id="2"]
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
[ext_resource type="Script" path="res://ResourceReadout.gd" id="9"]
|
||||
[ext_resource type="Script" path="res://GasBombController.gd" id="14"]
|
||||
[ext_resource type="Script" path="res://LaserController.gd" id="16"]
|
||||
[ext_resource type="Script" path="res://SpeedFader.gd" id="17"]
|
||||
[ext_resource type="Script" path="res://CaptureLabel.gd" id="15"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="1"]
|
||||
|
|
@ -157,6 +158,30 @@ script = ExtResource("7")
|
|||
glow_color = Color(0.06, 0.32, 0.5, 1)
|
||||
core_color = Color(0.02, 0.09, 0.15, 1)
|
||||
|
||||
[node name="SpeedFader" type="Control" parent="UI"]
|
||||
visible = false
|
||||
mouse_filter = 2
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -94
|
||||
offset_right = -24
|
||||
offset_top = 740
|
||||
offset_bottom = 920
|
||||
script = ExtResource("17")
|
||||
glow_color = Color(0.5, 0.18, 0.6, 1)
|
||||
core_color = Color(0.02, 0.09, 0.15, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="UI/SpeedFader"]
|
||||
mouse_filter = 2
|
||||
offset_left = -20
|
||||
offset_right = 90
|
||||
offset_top = -32
|
||||
offset_bottom = -4
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_colors/font_color = Color(0.7, 0.3, 1, 1)
|
||||
horizontal_alignment = 1
|
||||
text = "x1.0"
|
||||
|
||||
[node name="LaserButton" type="Control" parent="UI"]
|
||||
visible = false
|
||||
mouse_filter = 2
|
||||
|
|
|
|||
Loading…
Reference in a new issue