-
-
Notifications
You must be signed in to change notification settings - Fork 380
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
WIP lore/worldbuilding/station lobby #5283
Draft
joonicks
wants to merge
11
commits into
pioneerspacesim:master
Choose a base branch
from
joonicks:lore
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
49348dd
it begins
joonicks bf062b7
more examples
joonicks 8864f02
nolanglore
joonicks ad4559b
starsystem subdirs & station name in filename
joonicks 21a4b97
keep world related files close together
joonicks 843d1c7
shipbay + 1
joonicks 37d6b32
textwrap
joonicks 5022d0a
station visuaID
joonicks 02f33b6
oopsie earth mars olympus mons
joonicks 5f04813
incremental changes
joonicks 58166b7
musk station
joonicks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"SOL_MARS_CYDONIA" : { | ||
"description" : "", | ||
"message" : "Home of the core systems number one gravball team, the Little Green Men." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,28 +228,24 @@ end | |
|
||
local function drawPlayerInfo() | ||
local station = Game.player:GetDockedWith() | ||
if not station or not shipDef then return end | ||
|
||
if(not (station and shipDef)) then return end | ||
|
||
local tech_certified | ||
|
||
if station.techLevel == 11 then | ||
tech_certified = l.TECH_CERTIFIED_MILITARY | ||
else | ||
tech_certified = string.interp(l.TECH_CERTIFIED, { tech_level = station.techLevel}) | ||
end | ||
|
||
local station_docks = string.interp(l.STATION_DOCKS, { total_docking_pads = string.format("%d", station.numDocks),}) | ||
local substrings = { shipbay = station:GetAssignedBayNumber(Game.player), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The bays go from 1 up so I think this should probably be: |
||
bays = string.format("%d", station.numDocks), | ||
tech_level = station.techLevel } | ||
|
||
local tech_certified = (station.techLevel >= 11) and l.TECH_CERTIFIED_MILITARY or string.interp(l.TECH_CERTIFIED, substrings) | ||
local station_docks = string.interp(l.STATION_DOCKS, substrings) | ||
local orbit_period = station.path:GetSystemBody().orbitPeriod | ||
|
||
local station_frameBody = Space.GetBody(station.path:GetSystemBody().parent.index) | ||
local local_gravity_pressure = "" | ||
if station.type == "STARPORT_SURFACE" then | ||
if station.path:GetSystemBody().parent.hasAtmosphere then | ||
local_gravity_pressure = string.format(l.STATION_LOCAL_GRAVITY_PRESSURE, (station.path:GetSystemBody().parent.gravity/9.8), station_frameBody:GetAtmosphericState(station)) | ||
local local_conditions = "" | ||
if station.isGroundStation then | ||
local myBody = station.path:GetSystemBody() | ||
if myBody.parent.hasAtmosphere then | ||
local parentBody = Space.GetBody(myBody.parent.index) | ||
local_conditions = string.format(l.STATION_LOCAL_GRAVITY_PRESSURE, (myBody.parent.gravity/9.8), parentBody:GetAtmosphericState(station)) | ||
else | ||
local_gravity_pressure = string.format(l.STATION_LOCAL_GRAVITY, (station.path:GetSystemBody().parent.gravity/9.8)) | ||
local_conditions = string.format(l.STATION_LOCAL_GRAVITY, (myBody.parent.gravity/9.8)) | ||
end | ||
end | ||
|
||
|
@@ -266,16 +262,22 @@ local function drawPlayerInfo() | |
local infoColumnWidth = conReg.x - widgetSizes.faceSize.x - widgetSizes.windowPadding.x*3 | ||
local lobbyMenuHeight = widgetSizes.buttonSizeBase.y*3 + widgetSizes.itemSpacing.y*3 + widgetSizes.windowPadding.y*2 | ||
local lobbyMenuAtBottom = (conReg.y - widgetSizes.faceSize.y > lobbyMenuHeight + widgetSizes.windowPadding.x*2) | ||
|
||
local tabLines = { { tech_certified, "" }, { station_docks, "" } } | ||
if station_orbit_info ~= "" then | ||
table.insert(tabLines, { station_orbit_info, "" }) | ||
end | ||
if local_conditions ~= "" then | ||
table.insert(tabLines, { local_conditions, "" }) | ||
end | ||
ui.child("Wrapper", Vector2(0, lobbyMenuAtBottom and -lobbyMenuHeight or 0), {}, function() | ||
ui.child("PlayerShipFuel", Vector2(infoColumnWidth, 0), {"AlwaysUseWindowPadding"}, function() | ||
local curPos = ui.getCursorPos() | ||
textTable.withHeading(station.label, orbiteer.xlarge, { | ||
{ tech_certified, "" }, | ||
{ station_docks, "" }, | ||
{ station_orbit_info, "" }, | ||
{ local_gravity_pressure, ""}, | ||
}) | ||
textTable.withHeading(station.label, orbiteer.xlarge, tabLines ) | ||
if station.lore then | ||
local lorelang = Lang.GetResource("lore") | ||
ui.separator() | ||
ui.text(lorelang[station.lore]) | ||
end | ||
|
||
if not lobbyMenuAtBottom then | ||
lobbyMenu(Vector2(curPos.x, conReg.y - lobbyMenuHeight)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"techLevel" : { | ||
"value" : "10" | ||
}, | ||
"lore" : { | ||
"value" : "SOL_MARS_CYDONIA" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea! Is the "out of bays" part necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know but see the diff, how many bays there are in the station was all there was before, I only added the shipbay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, then I realized that you replace the line, not adding another about the pads. Sorry