Fix console text input and route give through ship commissioning
- ConsoleView appended the control characters text input delivers (\b, \r),
so Backspace inserted a glyph and Enter's \r got every command refused
since d503f076 made the parser refuse instead of strip. Control characters
are no longer text; Backspace deletes like Delete.
- give reports an unknown name or a full cargo bay. A ship hull is refused
unless docked, and when docked is commissioned through
ActionGameManager.CommissionShip, the primitive TradeMenu.Buy now uses: a
bare player ship moored at the docked entity, no docking bay. Non-ship
hulls are refused.
- Record play smoke results for steps 3-6 and the docking bay finding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c6430c93e4
commit
f935c29b4b
4 changed files with 82 additions and 6 deletions
|
|
@ -50,7 +50,9 @@ public class ConsoleView : MonoBehaviour {
|
|||
|
||||
Keyboard.current.onTextInput += c =>
|
||||
{
|
||||
if (!Visible || c == '`') return;
|
||||
// Text input also delivers control characters (backspace as '\b', enter as '\r'); editing keys are
|
||||
// handled in Update, so only printable characters are text.
|
||||
if (!Visible || c == '`' || char.IsControl(c)) return;
|
||||
InputString += c;
|
||||
};
|
||||
InputString = "";
|
||||
|
|
@ -81,7 +83,7 @@ public class ConsoleView : MonoBehaviour {
|
|||
|
||||
if (!Visible) return;
|
||||
|
||||
if(keyboard.deleteKey.wasPressedThisFrame && InputString.Length>0)
|
||||
if((keyboard.backspaceKey.wasPressedThisFrame || keyboard.deleteKey.wasPressedThisFrame) && InputString.Length>0)
|
||||
{
|
||||
InputString = InputString.Substring(0, InputString.Length - 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue