VR, Remote Mechs and Remote Robots (#7523)

Adds VR functionality, subsystem and a command VR system.
This commit is contained in:
Geeves
2020-01-12 14:09:48 +01:00
committed by Matt Atlas
parent 8e71fe07c2
commit 2fed43a871
20 changed files with 579 additions and 49 deletions
+17 -1
View File
@@ -1,4 +1,5 @@
/mob/living/carbon/human/gib()
vr_disconnect()
for(var/obj/item/organ/I in internal_organs)
I.removed()
@@ -18,6 +19,8 @@
gibs(loc, viruses, dna, null, species.flesh_color, species.blood_color)
/mob/living/carbon/human/dust()
vr_disconnect()
if(species)
..(species.dusted_anim, species.remains_type)
else
@@ -25,7 +28,10 @@
/mob/living/carbon/human/death(gibbed)
if(stat == DEAD) return
if(stat == DEAD)
return
vr_disconnect()
BITSET(hud_updateflag, HEALTH_HUD)
BITSET(hud_updateflag, STATUS_HUD)
@@ -104,3 +110,13 @@
status_flags |= DISFIGURED
update_body(0)
return
/mob/living/carbon/human/proc/vr_disconnect()
// Come out of VR right before you die, how depressing - geeves
// Also come out of VR if your VR body dies
if(vr_mob || old_mob)
body_return()
if(remote_network)
SSvirtualreality.remove_robot(src, remote_network)
remote_network = null
@@ -104,6 +104,44 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin)
/mob/living/carbon/human/industrial_xion/Initialize(mapload)
. = ..(mapload, "Xion Industrial Frame")
/mob/living/carbon/human/industrial_xion_remote/Initialize(mapload)
. = ..(mapload, "Remote Xion Industrial Frame")
real_name = "Remote Robot [pick("Delta", "Theta", "Alpha")]-[rand(0, 999)]"
name = real_name
dna.real_name = real_name
if(mind)
mind.name = real_name
remote_network = "remoterobots"
SSvirtualreality.add_robot(src, remote_network)
/mob/living/carbon/human/industrial_xion_remote_mech/Initialize(mapload)
. = ..(mapload, "Remote Xion Industrial Frame")
real_name = "Remote Pilot [pick("Delta", "Theta", "Alpha")]-[rand(0, 999)]"
name = real_name
dna.real_name = real_name
if(mind)
mind.name = real_name
/mob/living/carbon/human/industrial_xion_remote_bunker/Initialize(mapload)
. = ..(mapload, "Remote Xion Industrial Frame")
real_name = "Remote Robot [pick("Greaves", "Chamberlain", "Slater")]-[rand(0, 999)]"
name = real_name
dna.real_name = real_name
if(mind)
mind.name = real_name
equip_to_slot_or_del(new /obj/item/clothing/under/assistantformal(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(src), slot_shoes)
equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_com(src), slot_l_ear)
remote_network = "bunkerrobots"
SSvirtualreality.add_robot(src, remote_network)
/mob/living/carbon/human/industrial_zenghu/Initialize(mapload)
. = ..(mapload, "Zeng-Hu Mobility Frame")
@@ -113,6 +151,35 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin)
/mob/living/carbon/human/unbranded_frame/Initialize(mapload)
. = ..(mapload, "Unbranded Frame")
/mob/living/carbon/human/unbranded_frame_remote/Initialize(mapload)
. = ..(mapload, "Remote Unbranded Frame")
real_name = "Remote Robot [pick("Delta", "Theta", "Alpha")]-[rand(0, 999)]"
name = real_name
dna.real_name = real_name
if(mind)
mind.name = real_name
remote_network = "remoterobots"
SSvirtualreality.add_robot(src, remote_network)
/mob/living/carbon/human/unbranded_frame_remote_bunker/Initialize(mapload)
. = ..(mapload, "Remote Unbranded Frame")
real_name = "Remote Robot [pick("Greaves", "Chamberlain", "Slater")]-[rand(0, 999)]"
name = real_name
dna.real_name = real_name
if(mind)
mind.name = real_name
equip_to_slot_or_del(new /obj/item/clothing/under/assistantformal(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(src), slot_shoes)
equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_com(src), slot_l_ear)
remote_network = "bunkerrobots"
SSvirtualreality.add_robot(src, remote_network)
/mob/living/carbon/human/terminator/Initialize(mapload)
. = ..(mapload, "Military Frame")
add_language(LANGUAGE_SOL_COMMON, 1)
@@ -380,6 +380,17 @@
BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/industrial/xion)
)
/datum/species/machine/industrial/xion/remote
name = "Remote Xion Industrial Frame"
short_name = "rem_xmf"
has_organ = list(
BP_BRAIN = /obj/item/organ/internal/mmi_holder/circuit,
BP_CELL = /obj/item/organ/internal/cell,
BP_OPTICS = /obj/item/organ/internal/eyes/optical_sensor,
BP_IPCTAG = /obj/item/organ/internal/ipc_tag
)
/datum/species/machine/industrial/xion/get_light_color(mob/living/carbon/human/H)
if (istype(H))
return rgb(H.r_eyes, H.g_eyes, H.b_eyes)
@@ -511,6 +522,18 @@
/mob/living/carbon/human/proc/self_diagnostics
)
/datum/species/machine/unbranded/remote
name = "Remote Unbranded Frame"
short_name = "rem_unbran"
name_plural = "Remote Unbranded Frames"
has_organ = list(
BP_BRAIN = /obj/item/organ/internal/mmi_holder/circuit,
BP_CELL = /obj/item/organ/internal/cell,
BP_OPTICS = /obj/item/organ/internal/eyes/optical_sensor,
BP_IPCTAG = /obj/item/organ/internal/ipc_tag
)
/datum/species/machine/unbranded/get_light_color(mob/living/carbon/human/H)
if (istype(H))
return rgb(H.r_eyes, H.g_eyes, H.b_eyes)
@@ -8,6 +8,9 @@
var/hud_updateflag = 0
// Virtual Reality
var/remote_network // The network this mob is attached to, used in virtual reality and remote control things
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm