Prompts (game/scripts/prompts.gd) holds every key-naming prompt: on a phone (MobilePort.active()) it says each in touch words, elsewhere exactly the old string. World labels drop the key (Gather, Repair, Upgrade to, Upgrades, Shop), the build ghost says Place / Dismantle, the build bar's line is "Place · Rotate · Dismantle · Done" and its slots drop the number keys, the cutscenes say "Hold to skip" / "Tap to skip", the tip footer says "× hides tips", and the tutorial's tips and the first morning's sign name the thumbs (sides from TouchSticks), Use, Build, Place, Fear, Bomb, Patch, the hotbar, and the backpack. MobilePort gains the `forced` test override. game/tests/mobile/prompts_test.gd checks every phone string and that the desktop strings are byte for byte as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
1.4 KiB
GDScript
27 lines
1.4 KiB
GDScript
class_name MobilePort
|
|
extends RefCounted
|
|
## The phone build's switches (the iOS preset in export_presets.cfg; docs/ios-test-port.md):
|
|
## * active(): a phone (the "mobile" feature). The farm keeps its standard materials (Main
|
|
## doesn't add ToonLook: the outline needs Forward+, phones run the Mobile renderer), the 3D
|
|
## view renders at GameSettings.resolution_scale instead of pixelated, co-op is hidden (the
|
|
## main menu's button and the settings' Co-op section), two thumbsticks move and attack
|
|
## (TouchSticks), and leaving the app pauses the game.
|
|
## The microphone is never opened (audio/driver/enable_input.mobile in project.godot).
|
|
## * perf_test(): the iOS preset's "perf_test" feature. Main adds PerfTest (the frame-time
|
|
## readout and test buttons), and CampaignDebug's jumps work in that release build.
|
|
## On desktop, `-- --mobile` and `-- --perf-test` after the usual arguments turn the same switches
|
|
## on, to see the phone build without a phone (add --rendering-method mobile for its renderer).
|
|
|
|
|
|
## Tests: -1 detects the platform, 0 forces desktop, 1 forces a phone.
|
|
static var forced := -1
|
|
|
|
|
|
static func active() -> bool:
|
|
if forced >= 0:
|
|
return forced == 1
|
|
return OS.has_feature("mobile") or "--mobile" in OS.get_cmdline_user_args()
|
|
|
|
|
|
static func perf_test() -> bool:
|
|
return OS.has_feature("perf_test") or "--perf-test" in OS.get_cmdline_user_args()
|