New Living Quarters Lift Sprites + Cryopod Sounds (#13951)

This commit is contained in:
Wowzewow (Wezzy)
2022-05-22 19:50:57 +02:00
committed by GitHub
parent 782ccb83a4
commit a66bdf0b4a
9 changed files with 138 additions and 164 deletions
+96 -161
View File
@@ -200,12 +200,13 @@ var/global/list/frozen_crew = list()
density = TRUE
anchored = TRUE
dir = WEST
var/base_icon_state = "body_scanner"
var/occupied_icon_state = "body_scanner-closed"
var/on_store_message = "has entered long-term storage."
var/on_store_message = "has entered"
var/on_store_location = "long-term storage"
var/on_store_name = "Cryogenic Oversight"
var/on_enter_occupant_message = "You feel cool air surround you. You go numb as your senses turn inward."
var/on_enter_sound = 'sound/machines/cryopod/cryopod_enter.ogg'
var/on_exit_sound = 'sound/machines/cryopod/cryopod_exit.ogg'
var/on_store_sound = 'sound/machines/cryopod/cryopod_store.ogg'
var/allow_occupant_types = list(/mob/living/carbon/human)
var/disallow_occupant_types = list()
@@ -238,10 +239,10 @@ var/global/list/frozen_crew = list()
desc = "A storage unit for robots."
icon = 'icons/obj/robot_storage.dmi'
icon_state = "pod"
base_icon_state = "pod"
occupied_icon_state = "pod-closed"
on_store_message = "has entered robotic storage."
on_store_location = "robotic storage"
on_store_name = "Robotic Storage Oversight"
on_enter_sound = 'sound/machines/cryopod/lift_enter.ogg'
on_exit_sound = 'sound/machines/cryopod/lift_exit.ogg'
on_enter_occupant_message = "The storage unit broadcasts a sleep signal to you. Your systems start to shut down, and you enter low-power mode."
allow_occupant_types = list(/mob/living/silicon/robot)
disallow_occupant_types = list(/mob/living/silicon/robot/drone)
@@ -250,14 +251,40 @@ var/global/list/frozen_crew = list()
name = "living quarters lift"
desc = "A lift heading to the ship's living quarters."
icon = 'icons/obj/crew_quarters_lift.dmi'
icon_state = "lift_open"
base_icon_state = "lift_open"
occupied_icon_state = "lift_occupied"
on_store_message = "has departed for the living quarters."
icon_state = "pod"
on_store_message = "has departed for"
on_store_location = "the living quarters"
on_store_name = "Living Quarters Oversight"
on_enter_sound = 'sound/machines/cryopod/lift_enter.ogg'
on_exit_sound = 'sound/machines/cryopod/lift_exit.ogg'
on_enter_occupant_message = "The elevator door closes slowly, ready to bring you down to the living quarters."
disallow_occupant_types = list(/mob/living/silicon/robot)
/obj/machinery/cryopod/living_quarters/update_icon()
cut_overlays()
var/image/I = image(icon, "pod_top")
I.layer = 5.021
add_overlay(I)
if(occupant)
I = image(icon, "pod_back")
I.layer = 5
add_overlay(I)
name = "[name] ([occupant])"
I = image(occupant.icon, occupant.icon_state, dir = SOUTH)
I.overlays = occupant.overlays
I.layer = 5
I.pixel_z = 11
add_overlay(I)
I = image(icon, "pod_door")
I.layer = 5
add_overlay(I)
else
name = initial(name)
/obj/machinery/cryopod/Destroy()
if(occupant)
occupant.forceMove(loc)
@@ -266,14 +293,13 @@ var/global/list/frozen_crew = list()
/obj/machinery/cryopod/Initialize()
. = ..()
icon_state = base_icon_state
update_icon()
find_control_computer()
/obj/machinery/cryopod/examine(mob/user)
..(user)
if(occupant)
to_chat(user, SPAN_NOTICE("<b>[occupant]</b> [occupant.get_pronoun("is")] inside \the [src]."))
to_chat(user, SPAN_NOTICE("<b>[occupant]</b> [occupant.get_pronoun("is")] inside \the [initial(name)]."))
/obj/machinery/cryopod/can_hold_dropped_items()
return FALSE
@@ -376,8 +402,9 @@ var/global/list/frozen_crew = list()
else
W.forceMove(T)
global_announcer.autosay("[occupant.real_name], [occupant.mind.role_alt_title], [on_store_message]", "[on_store_name]")
visible_message(SPAN_NOTICE("\The [src] hums and hisses as it moves [occupant] into storage."))
global_announcer.autosay("[occupant.real_name], [occupant.mind.role_alt_title], [on_store_message] [on_store_location].", "[on_store_name]")
visible_message(SPAN_NOTICE("\The [src] hums and hisses as it moves [occupant] to [on_store_location]."))
playsound(loc, on_store_sound, 25)
frozen_crew += occupant
// Let SSjobs handle the rest.
@@ -395,120 +422,79 @@ var/global/list/frozen_crew = list()
if(!check_occupant_allowed(G.affecting))
return TRUE
var/willing = FALSE //We don't want to allow people to be forced into despawning.
var/mob/living/M = G.affecting
var/bucklestatus = M.bucklecheck(user)
if(!bucklestatus)
return TRUE
if(M.client)
var/original_loc = M.loc
if(alert(M, "Would you like to enter long-term storage?", , "Yes", "No") == "Yes")
if(!M || !G || !G.affecting || M.loc != original_loc)
return TRUE
willing = TRUE
else
willing = TRUE
if(willing)
user.visible_message(SPAN_NOTICE("\The [user] starts putting \the [G.affecting] into \the [src]."), SPAN_NOTICE("You start putting [G.affecting] into [src]."), range = 3)
if(do_after(user, 20))
if(!M || !G || !G.affecting)
return TRUE
M.forceMove(src)
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
update_icon()
to_chat(M, SPAN_NOTICE("[on_enter_occupant_message]"))
to_chat(M, SPAN_DANGER("Press Ghost in the OOC tab to leave, your character will shortly be removed from the round and the slot you occupy will be freed."))
set_occupant(M)
if(isipc(M))
save_ipc_tag(M)
// Book keeping!
var/turf/location = get_turf(src)
log_admin("[key_name_admin(M)] has entered a stasis pod. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)",ckey=key_name(M))
message_admins("<span class='notice'>[key_name_admin(M)] has entered a stasis pod.</span>")
//Despawning occurs when process() is called with an occupant without a client.
src.add_fingerprint(M)
return TRUE
go_in(user, M)
return TRUE
/obj/machinery/cryopod/MouseDrop_T(atom/movable/O, mob/living/user)
if(!istype(user))
return
if(!check_occupant_allowed(O))
return
if(occupant)
to_chat(user, SPAN_WARNING("\The [src] is in use."))
var/mob/living/M = O
go_in(user, M)
/obj/machinery/cryopod/verb/move_inside()
set name = "Enter Pod"
set category = "Object"
set src in oview(1)
if(use_check_and_message(usr) || !check_occupant_allowed(usr))
return
var/mob/living/L = O
var/bucklestatus = L.bucklecheck(user)
if(!bucklestatus) //We must make sure the person is unbuckled before they go in
return
go_in(usr, usr, TRUE) //if you're going in of your own volition, you're probably willing
if(L.stat == DEAD)
to_chat(user, SPAN_WARNING("Dead people can not be put into stasis."))
/obj/machinery/cryopod/proc/go_in(mob/user, mob/living/M, var/willing = FALSE) // user refers to the person doing the putting into, M refers to the person being put in
if(!M.bucklecheck(user)) //We must make sure the person is unbuckled before they go in
return
for(var/mob/living/carbon/slime/M in range(1, L))
if(M.victim == L)
to_chat(usr, SPAN_WARNING("[L.name] will not fit into the cryo pod because they have a slime latched onto their head."))
if(M.stat == DEAD)
to_chat(user, SPAN_WARNING("Dead people can not be put into \the [src]."))
return
for(var/mob/living/carbon/slime/S in range(1, M))
if(S.victim == M)
to_chat(usr, SPAN_WARNING("[M.name] will not fit into \the [src] because they have a slime latched onto their head!"))
if(S.victim == user)
to_chat(usr, SPAN_WARNING("You cannot fit into \the [src] do this while a slime is latched onto your head!"))
return
var/willing = FALSE //We don't want to allow people to be forced into despawning.
if(L.client)
var/original_loc = L.loc
if(alert(L, "Would you like to enter stasis?", , "Yes", "No") == "Yes")
if(!L || L.loc != original_loc)
if(!willing && M.client)
var/original_loc = M.loc
if(alert(M, "Would you like to enter [on_store_location]?", , "Yes", "No") == "Yes")
if(!M || M.loc != original_loc)
return
willing = TRUE
else
willing = TRUE
if(willing)
if(L == user)
user.visible_message(SPAN_NOTICE("\The [user] starts climbing into \the [src]."), SPAN_NOTICE("You start climbing into \the [src]."), range = 3)
else
user.visible_message(SPAN_NOTICE("\The [user] starts putting \the [L] into \the [src]."), SPAN_NOTICE("You start putting \the [L] into \the [src]."), range = 3)
if(!willing)
return
if(do_after(user, 20))
if(!L)
return
user.visible_message(SPAN_NOTICE("\The [user] starts [M == user ? "climbing into" : "putting \the [M] into"] \the [name]."), SPAN_NOTICE("You start [M == user ? "climbing into" : "putting \the [M] into"] \the [name]."), range = 3)
if(do_after(user, 20))
if(!M)
return TRUE
L.forceMove(src)
if(occupant)
to_chat(user, SPAN_WARNING("\The [src] is already in use."))
else
to_chat(user, SPAN_NOTICE("You stop [M == user ? "climbing into" : "putting \the [M] into"] \the [name]."))
return
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
else
to_chat(user, SPAN_NOTICE("You stop [L == user ? "climbing into" : "putting [L] into"] \the [name]."))
return
to_chat(M, SPAN_NOTICE("[on_enter_occupant_message]"))
playsound(loc, on_enter_sound, 25)
to_chat(M, SPAN_DANGER("Press Ghost in the OOC tab to leave, your character will shortly be removed from the round and the slot you occupy will be freed."))
set_occupant(M)
to_chat(L, SPAN_NOTICE("[on_enter_occupant_message]"))
to_chat(L, SPAN_DANGER("Press Ghost in the OOC tab to leave, your character will shortly be removed from the round and the slot you occupy will be freed."))
set_occupant(L)
update_icon()
if(isipc(M))
save_ipc_tag(M)
if(isipc(L))
save_ipc_tag(L)
// Book keeping!
var/turf/location = get_turf(src)
log_admin("[key_name_admin(M)] has entered a [initial(src.name)].",ckey=key_name(M))
message_admins("<span class='notice'>[key_name_admin(M)] has entered a [initial(src.name)].(<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)</span>")
// Book keeping!
var/turf/location = get_turf(src)
log_admin("[key_name_admin(L)] has entered a stasis pod.",ckey=key_name(L))
message_admins("<span class='notice'>[key_name_admin(L)] has entered a stasis pod.(<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)</span>")
//Despawning occurs when process() is called with an occupant without a client.
src.add_fingerprint(L)
return
//Despawning occurs when process() is called with an occupant without a client.
src.add_fingerprint(user)
/obj/machinery/cryopod/verb/eject()
set name = "Eject Pod"
@@ -529,58 +515,6 @@ var/global/list/frozen_crew = list()
src.go_out()
add_fingerprint(usr)
name = initial(name)
update_icon()
/obj/machinery/cryopod/verb/move_inside()
set name = "Enter Pod"
set category = "Object"
set src in oview(1)
if(use_check_and_message(usr) || !check_occupant_allowed(usr))
return
if(src.occupant)
to_chat(usr, SPAN_WARNING("\The [src] is in use."))
return
for(var/mob/living/carbon/slime/M in range(1,usr))
if(M.victim == usr)
to_chat(usr, SPAN_WARNING("You cannot do this while a slime is latched onto you!"))
return
usr.visible_message(SPAN_NOTICE("[usr] starts climbing into [src]."), SPAN_NOTICE("You start climbing into [src]."), range = 3)
if(do_after(usr, 20))
if(!usr || !usr.client)
return
if(occupant)
to_chat(usr, SPAN_WARNING("\The [src] is in use."))
return
set_occupant(usr)
update_icon()
to_chat(usr, SPAN_NOTICE("[on_enter_occupant_message]"))
to_chat(usr, SPAN_DANGER("Press Ghost in the OOC tab to leave, your character will shortly be removed from the round and the slot you occupy will be freed."))
if(isipc(usr))
var/choice = alert(usr, "Would you like to save your tag data?", "Tag Persistence", "Yes", "No")
if(choice == "Yes")
var/mob/living/carbon/human/H = usr
var/obj/item/organ/internal/ipc_tag/tag = H.organs_by_name[BP_IPCTAG]
if(tag)
H.client.prefs.machine_ownership_status = tag.ownership_info
H.client.prefs.machine_serial_number = tag.serial_number
H.client.prefs.citizenship = tag.citizenship_info
H.client.prefs.machine_tag_status = TRUE
else if(isnull(tag) || !tag)
H.client.prefs.machine_tag_status = FALSE
H.client.prefs.save_character()
H.client.prefs.save_preferences()
src.add_fingerprint(usr)
/obj/machinery/cryopod/proc/go_out()
if(!occupant)
@@ -592,6 +526,7 @@ var/global/list/frozen_crew = list()
occupant.forceMove(get_turf(src))
occupant = null
playsound(loc, on_exit_sound, 25)
update_icon()
/obj/machinery/cryopod/proc/set_occupant(var/mob/living/carbon/occupant)
@@ -605,12 +540,12 @@ var/global/list/frozen_crew = list()
update_icon()
/obj/machinery/cryopod/update_icon()
flick(src, "[initial(icon_state)]-anim")
if(occupant)
name = "[name] ([occupant])"
icon_state = occupied_icon_state
else
icon_state = base_icon_state
name = initial(name)
icon_state = "[initial(icon_state)][occupant ? "-closed" : ""]"
/obj/machinery/cryopod/relaymove(var/mob/user)
go_out()
-3
View File
@@ -1,3 +0,0 @@
Delete-after: true
author: Wowzewow (Wezzy) & listerla
changes: []
+42
View File
@@ -0,0 +1,42 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: Wowzewow (Wezzy)
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Adds new sprites for Living Quarters Lifts."
- soundadd: "Adds new sounds for cryo, lifts, and robotic storage."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.