mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-29 00:01:29 +00:00
ENH - allow movement while phone is open
Add Config.Phone.AllowMovement and route it through the central focus resolver. Keep camera and attention overlays authoritative over movement input, document the setting, and cover the focus-state combinations.
This commit is contained in:
@@ -16,6 +16,7 @@ Config.Command = "phone"
|
||||
Config.Phone = {
|
||||
Item = "phone",
|
||||
Unique = true, -- true: data follows each phone item; false: one persistent phone per character
|
||||
AllowMovement = true, -- true: game input stays active while the mobile phone is open
|
||||
DevelopmentCommand = true,
|
||||
DeviceName = "iFruit Phone",
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ function SkyPhoneFocus.Resolve(state)
|
||||
or state.payphone_focus
|
||||
or state.sim_picker_open
|
||||
or (state.camera_active and state.camera_nui_focused),
|
||||
keep_input = false,
|
||||
keep_input = state.is_open and state.allow_movement and not state.camera_active,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -292,6 +292,7 @@ end
|
||||
local function update_nui_focus()
|
||||
local focus = SkyPhoneFocus.Resolve({
|
||||
activity_suspended = activity_suspended,
|
||||
allow_movement = Config.Phone.AllowMovement,
|
||||
call_focus = call_focus,
|
||||
camera_active = camera_active,
|
||||
camera_nui_focused = camera_nui_focused,
|
||||
|
||||
Reference in New Issue
Block a user