Improved station traffic control communications#4987
Improved station traffic control communications#4987sturnclaw merged 15 commits intopioneerspacesim:masterfrom WKFO:stationatc
Conversation
|
Would we also want to be able to ask ground stations for the local gravity and atmospheric pressure readings without requesting landing? I don't know how I would code that yet, but wanted to ask anyway. |
|
@WKFO imho this data can be viewed in the database, is it worth bothering the dispatcher? |
|
Real airports provide pressure data for planes to calibrate their altimeters, as well as wind/gust data on runway approach. We don't have such things of course, but I wanted to give Pioneer a similar flight sim-y feeling. I see it as more of a world building element rather than gameplay. (So if databases are not available/faulty for some reason and ship instruments are wrong, the station readings will be what you trust) This was my reasoning, and I don't know if it is worth it or not, this is why I'm asking you guys :) |
My first thought when I saw this was the flight sims I used to play, and I love the idea. I think it's also a chance to introduce some flavor too, if that's something of interest. I can't remember which flight sim it was, but one would do some interesting things like: I think things like that, and what you are doing here go a long way to feeling like you're interacting with someone at a station rather than landing at a completely automated facility. |
impaktor
left a comment
There was a problem hiding this comment.
Looks good, I've made som suggestions, not required changes.
data/lang/core/en.json
Outdated
| }, | ||
| "WATCH_FOR_TRAFFIC_ON_APPROACH": { | ||
| "description": "", | ||
| "message": "Please watch for traffic on your approach." |
There was a problem hiding this comment.
native speakers: is "look out for" better than "watch for"? Both OK?
EDIT:
<sturnclaw> "please be aware of traffic" if you want to be stuffy, "please
watch for traffic" if you want to sound semi-formal. I doubt ATC
would be saying "please look for traffic", as it's not directive
enough. [08:48]
<sturnclaw> "watch" somewhat implies "keep a watch for" traffic as in
avoidance, whereas "look" can be interpreted to mean "go find
traffic" with the intent to crash into it :D
There was a problem hiding this comment.
"Please mind the traffic on your approach"?
| }, | ||
| "LAUNCH_PERMISSION_GRANTED_DEPART_QUICK": { | ||
| "description": "", | ||
| "message": "Permission granted. Please do not clutter the landing area and depart quickly." |
There was a problem hiding this comment.
Maybe "please do not loiter ..." is more apt, than "clutter"?
There was a problem hiding this comment.
Actually, looking at the code, this is for when the station is under heavy load, which is a nice touch, but maybe it should be crammed in there as well, like "We're close to maximum traffic (docking?) capacity, please do not clutter/loiter ...."
Actually, perhaps "landing area" should be "docking (area?)", which might work better with both planet side and orbital stations? Does one dock with ground stations? Maybe just nitpicking...
There was a problem hiding this comment.
I had the same "docking"/"landing" dilemma here, and space stations have pads instead of docking ports, so I went with "landing".
src/SpaceStation.cpp
Outdated
| outMsg += " " + stringf(Lang::STATION_GRAV, formatarg("grav", gravity, "f.2")); | ||
| } | ||
| } | ||
| if (GetNearbyTraffic(50000) > 0) { //50km |
There was a problem hiding this comment.
The nearby traffic variable in lua side is 20km, and here 50km? Ignore this comment if this is correct, I'm not doing a detailed reading of the code.
There was a problem hiding this comment.
I don't quite remember if I did that 20km on purpose... They should probably be equal.
There was a problem hiding this comment.
Is it possible to share the variable, so it's imported across c++/lua side? Or maybe that's overkill?
There was a problem hiding this comment.
It looks like that requires some brain effort, so I'm not figuring it out today. I just changed the value to 50km for now.
There was a problem hiding this comment.
The orbital SOI is 20km, maybe that's why?
|
I have quite some informal-ish strings ready to be included into the station comms, but they stand out a bit too much among the generic random messages and I would rather have them when we have a way to classify the formality/cheesiness of a space station traffic controller via factions and/or lawlessness (or maybe even put some of them as easter eggs). I'm not going to implement it in this PR or probably any time soon, but just as a note, I'm leaving this comment here. |
src/SpaceStation.cpp
Outdated
| sd.maxOffset = std::max((pPort->maxShipSize / 2 - bboxRad), float(pPort->maxShipSize / 5.0)); | ||
| sd.maxOffset *= sd.maxOffset; | ||
| outMsg = stringf(Lang::CLEARANCE_GRANTED_BAY_N, formatarg("bay", i + 1)); | ||
| if (this->IsGroundStation()) { |
There was a problem hiding this comment.
I would prefer that this logic be moved into Lua and triggered with an onDockingClearanceGranted / onDockingClearanceDenied event. This reduces code duplication and moves the code that's merely concerned with pretty-printing the UI away from the code that's responsible for determining whether docking is even possible.
There was a problem hiding this comment.
Okay, I'll see what I can do.
sturnclaw
left a comment
There was a problem hiding this comment.
I went ahead and refactored the way we handle docking clearance messages to move it to Lua; looking back, it was a bit harder of a task than I originally envisioned.
Feel free to give it a look over and let me know if I messed anything up. At this point, I like where this PR is at and I'm good to merge it in when you are.
|
A quick playtest shows that when requesting docking clearance, the Comms.Message output shows ship's atmospheric pressure instead of the station's. I don't get why though, the code looked good to me. (Should say "...pressure is 0.80 atm") Also the gravity value shown is in m/s^2, not g. We need to divide it by 9.80665 (or rounded-up 9.81) to get it in unit g. |
|
Yep, I totally missed dividing gravity, my bad. I'll take a look at the pressure issue; I'm not sure what's going on there either. |
|
I'm using the exact same method call that you are to display pressure when docked; I'm not sure what's going on there. For now, I'll say that this PR is good to merge (once conflicts are cleared up), and we'll adjust that behavior going forward. |
- Expose a few SpaceStation methods to Lua - Refactor LuaEvent to support pushing zero to three args to Lua
- Remove some strings from core/ - Add formatters for Gravity(g) and Pressure(atm)

Calm down, I just came back with a fresh repository.
When player requests launch, actually talk to them
Give a heads up for traffic during departure
Give a heads up for traffic during approach
If a ground station, provide local gravity and atmosphere information
Give a heads up upon entering and exiting the family friendly "no weapons, no trash dumping" airspace
Display local gravity and pressure on station lobby