Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(code): Add HUD display for Solar Power and Solar Wind #164

Open
wants to merge 25 commits into
base: experimental
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bca70cb
Feat(code): Add HUD display for Solar Power and Solar Wind
MadisonianX Dec 2, 2024
1a7205f
Update source/Engine.cpp
MadisonianX Dec 2, 2024
058ea58
Update data/human/outfits.txt
MadisonianX Dec 2, 2024
17268d1
Feat(code): Add HUD display for Solar Power and Solar Wind
MadisonianX Dec 2, 2024
11bb06f
Update sales.txt
MadisonianX Dec 2, 2024
c82cfd7
update interface data to child of top left anchor
MadisonianX Dec 3, 2024
32c5fca
Merge branch 'endless-sky:experimental' into System-Solar-Display
MadisonianX Dec 4, 2024
ef6cb45
Merge branch 'experimental' into System-Solar-Display
Zitchas Dec 9, 2024
98ee2e5
Merge branch 'experimental' into System-Solar-Display
Zitchas Dec 11, 2024
5386f2d
Update data/human/sales.txt
MadisonianX Dec 14, 2024
057bbe1
Update Engine.cpp
MadisonianX Dec 14, 2024
8778f8a
Update outfits.txt
MadisonianX Dec 14, 2024
fc98542
Update tooltips.txt
MadisonianX Dec 14, 2024
4aeb0a8
Update sales.txt
MadisonianX Dec 14, 2024
db6e58a
Update interfaces.txt
MadisonianX Dec 14, 2024
13edc2a
Merge branch 'endless-sky:experimental' into System-Solar-Display
MadisonianX Dec 15, 2024
22b7f56
Merge branch 'endless-sky:experimental' into System-Solar-Display
MadisonianX Dec 16, 2024
b9d08c9
Update data/_ui/interfaces.txt
MadisonianX Dec 24, 2024
d2685d7
Update data/_ui/interfaces.txt
MadisonianX Dec 24, 2024
415079e
Update data/_ui/interfaces.txt
MadisonianX Dec 24, 2024
593d1ed
Merge branch 'experimental' into System-Solar-Display
Zitchas Jan 2, 2025
7e1ab27
Adding a template copyright
Zitchas Jan 2, 2025
702ba44
Update copyright
Zitchas Jan 21, 2025
995fedb
Merge branch 'experimental' into System-Solar-Display
Zitchas Jan 21, 2025
fa14bcd
Merge branch 'experimental' into System-Solar-Display
Zitchas Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions data/_ui/tooltips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ tip "asteroid scan power:"
tip "atmosphere scan:"
`This type of scanning cannot be performed by your ship, but this outfit might be useful for certain missions.`

tip "solar scan:"
`Allows scanning of stellar objects to determine their precise power output for display on the HUD.`

tip "ramscoop scan:"
`Allows scanning of stellar objects to determine their precise wind output for display on the HUD.`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`Allows scanning of stellar objects to determine their precise wind output for display on the HUD.`
`Allows scanning of stellar objects to determine their precise solar wind output for display on the HUD.`


tip "bunks:"
`The number of people (passengers or crew) your ship can hold.`

Expand Down
2 changes: 1 addition & 1 deletion data/human/outfits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ outfit "Astronomical Scanner"
"energy consumption" .1
"solar scan" 1
"ramscoop scan" 1
description " An astronomical scanner provides data on the system's total solar power and wind output, allowing captains to see which systems are best for solar collection or ramscoop usage."
description "An astronomical scanner provides data on the system's total solar power and wind output, allowing captains to see which systems are best for solar collection or ramscoop usage."


outfit "Surveillance Pod"
Expand Down
4 changes: 3 additions & 1 deletion data/human/sales.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ outfitter "Deep Sky Basics"
"A370 Atomic Thruster"
"A375 Atomic Steering"
"AR120 Reverse Thruster"

"Astronomical Scanner"

outfitter "Deep Sky Advanced"
"Ramscoop"
"LP144a Battery Pack"
Expand Down Expand Up @@ -350,6 +351,7 @@ outfitter "Deep Sky Advanced"
"In-flight Mass Display"
"Hyperjump Fuel Display"
"Fuel Bar Hyperjump Display"
"Astronomical Scanner"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are a good place for this outfit for now, although in the future it might be more interesting to have it in its own outfitter and have it only available from a few worlds that mention having universities or astronomy studies, and tie it into some research missions from said places.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have it in Deep Sky Basics and Deep Sky Advanced currently, is just Advanced preferred?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably just advanced, I think.


outfitter "Lovelace Basics"
"Anti-Missile Turret"
Expand Down
10 changes: 5 additions & 5 deletions source/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,15 +791,15 @@ void Engine::Step(bool isActive)
info.SetString("flagship solar", to_string(flagshipSolar));
}
// Display combined Solar Power for system
int displaySystemPower = (flagship->DisplaySystemSolar() * 100); // Combined system Solar Power multiplied to not display decimal stats
if(displaySystemPower >= 0.01 && flagship->Attributes().Get("solar scan")) // Requires solar scan to display
int displaySystemPower = (flagship->DisplaySystemSolar() * 100); // Multiplied to better display decimal inputs
if(displaySystemPower >= 0.01 && flagship->Attributes().Get("solar scan"))
MadisonianX marked this conversation as resolved.
Show resolved Hide resolved
{
info.SetCondition("system solar display");
info.SetString("system solar", to_string(displaySystemPower));
}
// Display combined Sold Wind for system
int displaySystemWind = (flagship->DisplaySystemWind() * 100); // Combined system Solar Wind multiplied to not display decimal stats
if(displaySystemWind >= 0.01 && flagship->Attributes().Get("ramscoop scan")) // Requires ramscoop scan to display
// Display combined Solar Wind for system
int displaySystemWind = (flagship->DisplaySystemWind() * 100); // Multiplied to better display decimal inputs
if(displaySystemWind >= 0.01 && flagship->Attributes().Get("ramscoop scan"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be less confusing to call this "wind scan" or perhaps "solar wind scan"; although in following with my comment about the solar scan, maybe "wind sensor" or "solar wind sensor"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sensor is fine, preferably "solar power sensor" and "solar wind sensor" so it's precise in what attribute each is sensing. Or if making them separate attributes is overkill then just "solar sensor"; I was just following the example of the tactical and strategic scanner modularity.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally like having them as separate values. :) could be good to have some fraction that just tracks, say, solar power.

{
info.SetCondition("system wind display");
info.SetString("system wind", to_string(displaySystemWind));
Expand Down
Loading