Remote Mech Revision (#8903)

The AI can now remotely control mechs in its network. It has one mapped in near its core.
    Messages received by your old body will now reach your VR body (does not affect Skrell Srom).
    Exosuit pilots can now interact with elevator panels without having to get out.
    Robotics and RnD can now create remote controlled mechs. The control centre is in the protolathe, while the exosuit upgrade is in the circuit imprinter.
    Mechs can no longer be dismantled if it has a pilot in it.
    Dismantling a mech now takes a while.
This commit is contained in:
Geeves
2020-05-30 15:20:16 +02:00
committed by GitHub
parent aa39c8ca42
commit 19b1ddb869
37 changed files with 878 additions and 2937 deletions

View File

@@ -0,0 +1,34 @@
/obj/item/remote_mecha
name = "standard exosuit remote upgrade"
desc = "A device that, when inserted into an exosuit, allows it to be remotely piloted."
icon = 'icons/obj/modular_components.dmi'
icon_state = "aislot"
origin_tech = list(TECH_BLUESPACE = 3, TECH_MATERIAL = 4, TECH_DATA = 4)
w_class = ITEMSIZE_SMALL
var/mech_remote_network = "remotemechs"
var/hardpoint_lock = FALSE // Whether mechs that receive this upgrade gets locked
var/dummy_path = /mob/living/simple_animal/spiderbot
/obj/item/remote_mecha/examine(mob/user)
. = ..()
to_chat(user, FONT_SMALL(SPAN_WARNING("This exosuit upgrade cannot be undone if applied!")))
if(Adjacent(user))
var/message = "Applying \the [src] <b>will [hardpoint_lock ? "" : "not"]</b> lock the hardpoints[hardpoint_lock ? ", preventing further modification" : ""]."
to_chat(user, FONT_SMALL(SPAN_NOTICE(message)))
/obj/item/remote_mecha/penal
name = "penal exosuit remote upgrade"
desc = "A device that, when inserted into an exosuit, allows it to be remotely piloted. Intended for prison networks."
mech_remote_network = "prisonmechs"
hardpoint_lock = TRUE
/obj/item/remote_mecha/penal/examine(mob/user)
. = ..()
if(Adjacent(user))
to_chat(user, FONT_SMALL(SPAN_NOTICE("Applying \the [src] will additionally add the mech to the security penal network, where they can remotely monitor and shut it down.")))
/obj/item/remote_mecha/ai
name = "AI exosuit remote upgrade"
desc = "A device that, when inserted into an exosuit, allows it to be remotely piloted by the artificial intelligence."
mech_remote_network = "aimechs"
dummy_path = /mob/living/simple_animal/spiderbot/ai

View File

@@ -346,7 +346,29 @@
else
if(user.a_intent != I_HURT)
if(thing.ismultitool())
if(istype(thing, /obj/item/remote_mecha))
if(length(pilots))
to_chat(user, SPAN_WARNING("You can't apply this upgrade while \the [src] has occupants!"))
return
if(!maintenance_protocols)
to_chat(user, SPAN_WARNING("You are unable to apply this upgrade while \the [src]'s maintenance protocols are not active."))
return
user.visible_message(SPAN_NOTICE("\The [user] begins installing \the [thing] into \the [src]..."), SPAN_NOTICE("You begin installing the [thing] into \the [src]..."))
if(do_after(user, 30, TRUE, src))
if(length(pilots))
to_chat(user, SPAN_WARNING("You can't apply this upgrade while \the [src] has occupants!"))
return
if(!maintenance_protocols)
to_chat(user, SPAN_WARNING("You are unable to apply this upgrade while \the [src]'s maintenance protocols are not active."))
return
var/obj/item/remote_mecha/RM = thing
user.visible_message(SPAN_NOTICE("\The [user] installs \the [thing] into \the [src]."), SPAN_NOTICE("You install the [thing] into \the [src]."))
remote_network = RM.mech_remote_network
does_hardpoint_lock = RM.hardpoint_lock
dummy_type = RM.dummy_path
become_remote()
qdel(thing)
else if(thing.ismultitool())
if(hardpoints_locked)
to_chat(user, "<span class='warning'>Hardpoint system access is disabled.</span>")
return
@@ -364,12 +386,23 @@
return
else if(thing.iswrench())
if(!maintenance_protocols)
to_chat(user, "<span class='warning'>The securing bolts are not visible while maintenance protocols are disabled.</span>")
if(length(pilots))
to_chat(user, SPAN_WARNING("You can't disassemble \the [src] while it has a pilot!"))
return
if(!maintenance_protocols)
to_chat(user, SPAN_WARNING("The securing bolts are not visible while maintenance protocols are disabled."))
return
user.visible_message(SPAN_NOTICE("\The [user] starts dismantling \the [src]..."), SPAN_NOTICE("You start disassembling \the [src]..."))
if(do_after(user, 30, TRUE, src))
if(length(pilots))
to_chat(user, SPAN_WARNING("You can't disassemble \the [src] while it has a pilot!"))
return
if(!maintenance_protocols)
to_chat(user, SPAN_WARNING("The securing bolts are not visible while maintenance protocols are disabled."))
return
user.visible_message(SPAN_NOTICE("\The [user] dismantles \the [src]."), SPAN_NOTICE("You disassemble \the [src]."))
dismantle()
return
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
dismantle()
return
else if(thing.iswelder())
if(!getBruteLoss())
return

View File

@@ -1,13 +1,14 @@
// Big stompy robots.
/mob/living/heavy_vehicle
name = "exosuit"
density = 1
opacity = 1
anchored = 1
density = TRUE
opacity = TRUE
anchored = TRUE
status_flags = PASSEMOTES
a_intent = I_HURT
mob_size = MOB_LARGE
mob_push_flags = ALLMOBS
can_buckle = FALSE
var/decal
var/emp_damage = 0
@@ -24,7 +25,7 @@
// Access updating/container.
var/obj/item/card/id/access_card
var/list/saved_access = list()
var/sync_access = 1
var/sync_access = TRUE
// Mob currently piloting the mech.
var/list/pilots
@@ -32,7 +33,9 @@
// Remote control stuff
var/remote = FALSE // Spawns a robotic pilot to be remote controlled
var/mob/living/carbon/human/industrial_xion_remote_mech/dummy // The remote controlled dummy
var/does_hardpoint_lock = TRUE
var/mob/living/simple_animal/spiderbot/dummy // The remote controlled dummy
var/dummy_type = /mob/living/simple_animal/spiderbot
var/dummy_colour
// Visible external components. Not strictly accurately named for non-humanoid machines (submarines) but w/e
@@ -56,8 +59,8 @@
var/material/material
// Cockpit access vars.
var/hatch_closed = 0
var/hatch_locked = 0
var/hatch_closed = FALSE
var/hatch_locked = FALSE
var/force_locked = FALSE // Is it possible to unlock the hatch?
var/use_air = FALSE
@@ -241,16 +244,20 @@
remote = TRUE
name = name + " \"[pick("Jaeger", "Reaver", "Templar", "Juggernaut", "Basilisk")]-[rand(0, 999)]\""
if(remote_network)
SSvirtualreality.add_mech(src, remote_network)
else
if(!remote_network)
remote_network = "remotemechs"
SSvirtualreality.add_mech(src, remote_network)
SSvirtualreality.add_mech(src, remote_network)
if(hatch_closed)
hatch_closed = FALSE
dummy = new /mob/living/carbon/human/industrial_xion_remote_mech(get_turf(src))
dummy = new dummy_type(get_turf(src))
dummy.real_name = "Remote-Bot"
dummy.name = dummy.real_name
dummy.mmi = new /obj/item/device/mmi(dummy) // this is literally just because i luck the aesthetics - geeves
dummy.verbs -= /mob/living/proc/ventcrawl
dummy.verbs -= /mob/living/proc/hide
dummy.update_icon()
if(dummy_colour)
dummy.color = dummy_colour
enter(dummy, TRUE)
@@ -258,5 +265,7 @@
if(!hatch_closed)
hatch_closed = TRUE
hatch_locked = TRUE
hardpoints_locked = TRUE
force_locked = TRUE
if(does_hardpoint_lock)
hardpoints_locked = TRUE
force_locked = TRUE
update_icon()

View File

@@ -19,6 +19,7 @@
name = "remote mining mecha"
dummy_colour = "#ffc44f"
remote_network = "remotemechs"
does_hardpoint_lock = FALSE
/mob/living/heavy_vehicle/premade/miner/remote_prison
name = "penal mining mecha"

View File

@@ -152,8 +152,17 @@
name = "remote power loader"
dummy_colour = "#ffc44f"
remote_network = "remotemechs"
does_hardpoint_lock = FALSE
/mob/living/heavy_vehicle/premade/ripley/remote_prison
name = "penal power loader"
dummy_colour = "#302e2b"
remote_network = "prisonmechs"
remote_network = "prisonmechs"
/mob/living/heavy_vehicle/premade/ripley/remote_ai
name = "stationbound power loader"
e_color = COLOR_GREEN_GRAY
dummy_colour = COLOR_GREEN_GRAY
dummy_type = /mob/living/simple_animal/spiderbot/ai
remote_network = "aimechs"
does_hardpoint_lock = FALSE