From 6ab8e8f459ce3e84c472879e215c824cf15b25b3 Mon Sep 17 00:00:00 2001 From: tibetiroka <68112292+tibetiroka@users.noreply.github.com> Date: Mon, 11 Nov 2024 02:24:56 +0100 Subject: [PATCH] fix(ui): Fix duplicated display of the new fuel attributes and make their tooltips work (#10771) --- data/_ui/tooltips.txt | 7 ++----- source/Outfit.cpp | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/data/_ui/tooltips.txt b/data/_ui/tooltips.txt index ccd6f06fd173..004df656a22d 100644 --- a/data/_ui/tooltips.txt +++ b/data/_ui/tooltips.txt @@ -438,13 +438,10 @@ tip "scramble resistance heat:" tip "jump speed:" `The maximum velocity the ship can jump at.` -tip "jump fuel:" - `Fuel consumed when jumping between systems using this drive.` - -tip "hyperdrive fuel" +tip "hyperdrive fuel:" `Fuel consumed when jumping between systems using this hyperdrive.` -tip "jump drive fuel" +tip "jump drive fuel:" `Fuel consumed when jumping between systems using this jump drive.` tip "jump range:" diff --git a/source/Outfit.cpp b/source/Outfit.cpp index 6fe5b3025b1e..bcd41cd0f22a 100644 --- a/source/Outfit.cpp +++ b/source/Outfit.cpp @@ -347,6 +347,8 @@ void Outfit::Load(const DataNode &node) double jumpFuel = attributes.Get("jump fuel"); attributes["jump drive fuel"] = (jumpFuel > 0. ? jumpFuel : DEFAULT_JUMP_DRIVE_COST); } + if(attributes.Get("jump fuel")) + attributes["jump fuel"] = 0.; // Only outfits with the jump drive and jump range attributes can // use the jump range, so only keep track of the jump range on