diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index 6124138aeb..7caf263611 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -7,14 +7,14 @@
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
desc = "Regulates the transfer of air between two tanks."
w_class = WEIGHT_CLASS_BULKY
+ var/ui_x = 310
+ var/ui_y = 320
var/obj/item/tank/tank_one
var/obj/item/tank/tank_two
var/obj/item/assembly/attached_device
var/mob/attacher = null
var/valve_open = FALSE
- var/toggle = 1
- var/ui_x = 310
- var/ui_y = 320
+ var/toggle = TRUE
/obj/item/transfer_valve/IsAssemblyHolder()
return TRUE
@@ -59,7 +59,7 @@
attacher = user
return
-//Attached device memes
+//These keep attached devices synced up, for example a TTV with a mouse trap being found in a bag so it's triggered, or moving the TTV with an infrared beam sensor to update the beam's direction.
/obj/item/transfer_valve/Move()
. = ..()
if(attached_device)
@@ -79,58 +79,14 @@
if(attached_device)
attached_device.Crossed(AM)
-/obj/item/transfer_valve/attack_hand()//Triggers mousetraps
+//Triggers mousetraps
+/obj/item/transfer_valve/attack_hand()
. = ..()
if(.)
return
if(attached_device)
attached_device.attack_hand()
-//These keep attached devices synced up, for example a TTV with a mouse trap being found in a bag so it's triggered, or moving the TTV with an infrared beam sensor to update the beam's direction.
-
-
-/obj/item/transfer_valve/attack_self(mob/user)
- user.set_machine(src)
- var/dat = {" Valve properties:
- Attachment one: [tank_one] [tank_one ? "Remove" : ""]
- Attachment two: [tank_two] [tank_two ? "Remove" : ""]
- Valve attachment: [attached_device ? "[attached_device]" : "None"] [attached_device ? "Remove" : ""]
- Valve status: [ valve_open ? "ClosedOpen" : "ClosedOpen"]"}
-
- var/datum/browser/popup = new(user, "trans_valve", name)
- popup.set_content(dat)
- popup.open()
- return
-
-/obj/item/transfer_valve/Topic(href, href_list)
- ..()
- if(!usr.canUseTopic(src))
- return
- if(tank_one && href_list["tankone"])
- split_gases()
- valve_open = FALSE
- tank_one.forceMove(drop_location())
- tank_one = null
- update_icon()
- else if(tank_two && href_list["tanktwo"])
- split_gases()
- valve_open = FALSE
- tank_two.forceMove(drop_location())
- tank_two = null
- update_icon()
- else if(href_list["open"])
- toggle_valve()
- else if(attached_device)
- if(href_list["rem_device"])
- attached_device.on_detach()
- attached_device = null
- update_icon()
- if(href_list["device"])
- attached_device.attack_self(usr)
-
- attack_self(usr)
- add_fingerprint(usr)
-
/obj/item/transfer_valve/proc/process_activation(obj/item/D)
if(toggle)
toggle = FALSE
@@ -142,7 +98,6 @@
/obj/item/transfer_valve/update_icon()
cut_overlays()
- underlays = null
if(!tank_one && !tank_two && !attached_device)
icon_state = "valve_1"
@@ -152,9 +107,13 @@
if(tank_one)
add_overlay("[tank_one.icon_state]")
if(tank_two)
- var/icon/J = new(icon, icon_state = "[tank_two.icon_state]")
- J.Shift(WEST, 13)
- underlays += J
+ var/mutable_appearance/J = mutable_appearance(icon, icon_state = "[tank_two.icon_state]")
+ var/matrix/T = matrix()
+ T.Translate(-13, 0)
+ J.transform = T
+ underlays = list(J)
+ else
+ underlays = null
if(attached_device)
add_overlay("device")
if(istype(attached_device, /obj/item/assembly/infra))
@@ -192,7 +151,6 @@
Exadv1: I know this isn't how it's going to work, but this was just to check
it explodes properly when it gets a signal (and it does).
*/
-
/obj/item/transfer_valve/proc/toggle_valve()
if(!valve_open && tank_one && tank_two)
valve_open = TRUE
@@ -218,7 +176,6 @@
admin_bomber_message = " - Last touched by: [ADMIN_LOOKUPFLW(bomber)]"
bomber_message = " - Last touched by: [key_name_admin(bomber)]"
-
var/admin_bomb_message = "Bomb valve opened in [ADMIN_VERBOSEJMP(bombturf)][admin_attachment_message][admin_bomber_message]"
GLOB.bombers += admin_bomb_message
message_admins(admin_bomb_message, 0, 1)
@@ -232,9 +189,10 @@
split_gases()
valve_open = FALSE
update_icon()
-
-// this doesn't do anything but the timer etc. expects it to be here
-// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
+/*
+ This doesn't do anything but the timer etc. expects it to be here
+ eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
+*/
/obj/item/transfer_valve/proc/c_state()
return
diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm
index 49fb70f072..fdad89eeaf 100644
--- a/code/modules/VR/vr_sleeper.dm
+++ b/code/modules/VR/vr_sleeper.dm
@@ -113,10 +113,12 @@
to_chat(occupant, "The virtual world does not support the creation of new virtual avatars, aborting transfer")
else
to_chat(vr_mob, "Transfer successful! You are now playing as [vr_mob] in VR!")
+ M.ui_close(M) //The UI can get stuck open while in VR, which can be annoying
. = TRUE
if("delete_avatar")
if(!occupant || usr == occupant)
if(vr_mob)
+ SStgui.try_update_ui(occupant, src)
cleanup_vr_mob()
else
to_chat(usr, "The VR Sleeper's safeties prevent you from doing that.")
diff --git a/config/game_options.txt b/config/game_options.txt
index f65c1bfff5..02b598bf94 100644
--- a/config/game_options.txt
+++ b/config/game_options.txt
@@ -303,7 +303,7 @@ MINIMUM_SECBORG_ALERT 3
#ROUNDSTART_AWAY
## Uncomment to load one of the virtual reality levels from vr_config at roundstart.
-#ROUNDSTART_VR
+ROUNDSTART_VR
## How long the delay is before the Away Mission gate opens. Default is half an hour.
## 600 is one minute.
diff --git a/config/vr_config.txt b/config/vr_config.txt
index 0c6354f8fe..0e8532eba5 100644
--- a/config/vr_config.txt
+++ b/config/vr_config.txt
@@ -8,6 +8,6 @@
#Do NOT tick the maps during compile -- the game uses this list to decide which map to load. Ticking the maps will result in them ALL being loaded at once.
#DO tick the associated code file for the virtual reality levels you are enabling. Otherwise, the map will be trying to reference objects which do not exist, which will cause runtime errors!
-#_maps/RandomZLevels/VR/murderdome.dmm
-#_maps/RandomZLevels/VR/snowdin_VR.dmm
-#_maps/RandomZLevels/VR/syndicate_trainer.dmm
\ No newline at end of file
+_maps/RandomZLevels/VR/murderdome.dmm
+_maps/RandomZLevels/VR/snowdin_VR.dmm
+_maps/RandomZLevels/VR/syndicate_trainer.dmm
\ No newline at end of file
diff --git a/tgui/packages/tgui/interfaces/SyndContractor.js b/tgui/packages/tgui/interfaces/SyndContractor.js
index f717d681e2..0e9129cb4b 100644
--- a/tgui/packages/tgui/interfaces/SyndContractor.js
+++ b/tgui/packages/tgui/interfaces/SyndContractor.js
@@ -303,7 +303,7 @@ const ContractsTab = (props, context) => {
return (
{
)}
- {...!!data.vr_avatar && (
+ {data.vr_avatar && (
{
)
|| ("You need to be inside the VR sleeper to connect to VR")}
- {!!data.vr_avatar && (
+ {data.can_delete_avatar && (