things with stuff (#6233)
* buncha things from upstream * datums globals, onclick * datums * game folder, holy shit mirror bot why * modules * icons * dme * compiles cleanly * tools purge * updates maps * double check just because. and wew lad * incidentally, this needs more work first * some things * weh * sound cleanup and icons * reeeee * compile issues * oh look, fresh code sync * cleans up some unused icons * dirty vars * reeeeeeeeeeeeeeee * wew lad. fuck off with this already
This commit is contained in:
@@ -36,6 +36,9 @@
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(occupant)
|
||||
ui_interact(user)
|
||||
else
|
||||
@@ -44,15 +47,12 @@
|
||||
else
|
||||
open_machine()
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/relaymove(mob/user)
|
||||
open_machine()
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/container_resist(mob/living/user)
|
||||
open_machine()
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/Destroy()
|
||||
open_machine()
|
||||
cleanup_vr_human()
|
||||
@@ -64,11 +64,9 @@
|
||||
you_die_in_the_game_you_die_for_real = TRUE
|
||||
sparks.start()
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/update_icon()
|
||||
icon_state = "[initial(icon_state)][state_open ? "-open" : ""]"
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/open_machine()
|
||||
if(!state_open)
|
||||
if(vr_human)
|
||||
@@ -77,20 +75,17 @@
|
||||
SStgui.close_user_uis(occupant, src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/close_machine()
|
||||
..()
|
||||
if(occupant)
|
||||
ui_interact(occupant)
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "vr_sleeper", "VR Sleeper", 475, 340, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
@@ -131,7 +126,6 @@
|
||||
open_machine()
|
||||
. = TRUE
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
if(vr_human && !QDELETED(vr_human))
|
||||
@@ -149,11 +143,9 @@
|
||||
data["isoccupant"] = (user == occupant)
|
||||
return data
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/proc/get_vr_spawnpoint() //proc so it can be overriden for team games or something
|
||||
return safepick(available_vr_spawnpoints[vr_category])
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/proc/build_virtual_human(mob/living/carbon/human/H, location, transfer = TRUE)
|
||||
if(H)
|
||||
cleanup_vr_human()
|
||||
@@ -176,13 +168,11 @@
|
||||
|
||||
/obj/machinery/vr_sleeper/proc/cleanup_vr_human()
|
||||
if(vr_human)
|
||||
vr_human.death(0)
|
||||
|
||||
vr_human.death(FALSE)
|
||||
|
||||
/obj/effect/landmark/vr_spawn //places you can spawn in VR, auto selected by the vr_sleeper during get_vr_spawnpoint()
|
||||
var/vr_category = "default" //So we can have specific sleepers, eg: "Basketball VR Sleeper", etc.
|
||||
|
||||
|
||||
/datum/outfit/vr_basic
|
||||
name = "basic vr"
|
||||
uniform = /obj/item/clothing/under/color/random
|
||||
|
||||
Reference in New Issue
Block a user