mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
AI Remote Control Fixes (#20198)
Fixes https://github.com/Aurorastation/Aurora.3/issues/13267 Fixes https://github.com/Aurorastation/Aurora.3/issues/16881 Fixes https://github.com/Aurorastation/Aurora.3/issues/14039 Fixes https://github.com/Aurorastation/Aurora.3/issues/14062 Also adds QoL where pressing eject on remote controlled mechs exits remote control. --------- Co-authored-by: Ben10083 <Ben10083@users.noreply.github.com>
This commit is contained in:
@@ -21,7 +21,7 @@ var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/proc/core,
|
||||
/mob/living/silicon/ai/proc/pick_icon,
|
||||
/mob/living/silicon/ai/proc/sensor_mode,
|
||||
/mob/living/silicon/ai/proc/remote_control_shell,
|
||||
/mob/living/silicon/ai/proc/remote_control,
|
||||
/mob/living/silicon/ai/proc/show_laws_verb,
|
||||
/mob/living/silicon/ai/proc/toggle_acceleration,
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light,
|
||||
@@ -800,14 +800,33 @@ var/list/ai_verbs_default = list(
|
||||
set desc = "Augment visual feed with internal sensor overlays"
|
||||
toggle_sensor_mode()
|
||||
|
||||
/mob/living/silicon/ai/proc/remote_control_shell()
|
||||
set name = "Remote Control Shell"
|
||||
/// Retrieves all mobs assigned to REMOTE_AI_ROBOT or REMOTE_AI_MECH and allows the user to select one to control using SSvirtualreality
|
||||
/mob/living/silicon/ai/proc/remote_control()
|
||||
set name = "Remote Control"
|
||||
set category = "AI Commands"
|
||||
set desc = "Remotely control any active shells on your AI shell network."
|
||||
set desc = "Remotely control any active shells or mechs on your AI network."
|
||||
|
||||
if(check_unable(AI_CHECK_WIRELESS))
|
||||
return
|
||||
SSvirtualreality.bound_selection(src, REMOTE_AI_ROBOT)
|
||||
|
||||
// Grab from relevant networks
|
||||
var/list/remote_shell = SSvirtualreality.bound_choices(src, REMOTE_AI_ROBOT)
|
||||
var/list/remote_mech = SSvirtualreality.mech_choices(src, REMOTE_AI_MECH)
|
||||
var/list/remote = flatten_list(list(remote_shell, remote_mech))
|
||||
|
||||
if(!length(remote))
|
||||
to_chat(usr, SPAN_WARNING("No active remote units are available."))
|
||||
return
|
||||
var/choice = tgui_input_list(usr, "Please select what to take over.", "Remote Control Selection", remote)
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
// Transfer
|
||||
if(choice in remote_mech)
|
||||
var/mob/living/heavy_vehicle/chosen_mech = remote_mech[choice]
|
||||
SSvirtualreality.mind_transfer(src, chosen_mech.pilots[1]) // the first pilot
|
||||
else
|
||||
SSvirtualreality.mind_transfer(src, choice)
|
||||
|
||||
/mob/living/silicon/ai/proc/toggle_hologram_movement()
|
||||
set name = "Toggle Hologram Movement"
|
||||
|
||||
@@ -332,6 +332,13 @@
|
||||
spawn(3)//A slight delay to let us finish walking out from under the door
|
||||
layer = initial(layer)
|
||||
|
||||
/mob/living/simple_animal/spiderbot/zMove(direction)
|
||||
if(istype(loc, /mob/living/heavy_vehicle))
|
||||
var/mob/living/heavy_vehicle/mech = loc
|
||||
mech.zMove(direction)
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/spiderbot/get_bullet_impact_effect_type(var/def_zone)
|
||||
return BULLET_IMPACT_METAL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user