Skip to content

Commit

Permalink
Adds Professor DUMMY to the CMO office, accessible by the CMO and the…
Browse files Browse the repository at this point in the history
… SEA (#5874)

# About the pull request

Adds a new wall cabinet to the CMO's office called the "professor dummy
cabinet". It contains Professor DUMMY and its tablet: it is a tool for
new nurses(!!) and doctors to learn medical treatment, including
surgery.

The locker can only be opened by the CMO or the SEA (not even the CO can
open it). It cannot be flashbanged, melted, or slashed.

There is a hefty warning for everyone when the dummy falls out, in case
someone destroys the closet in a creative way:


![image](https://github.com/cmss13-devs/cmss13/assets/49321394/632c6bff-02dc-428b-9d21-4f5acedd9db8)

The dummy and its tablet dust upon hijack impact, to avoid either side
having a godmoded mob.

# Explain why it's good for the game

It is a tool for new medical personnel to practice on. It can also ease
boredom if the round is going too smoothly for marines.

# Testing Photographs and Procedure

Setting up the tablet and hijacking. (The dummy no longer spawns in the
Morgue but in the CMO office).

<details>
<summary>Screenshots & Videos</summary>


https://github.com/cmss13-devs/cmss13/assets/49321394/563db21d-ebc2-41e0-a8e8-764f9b8aa61b

</details>


# Changelog

:cl:
add: Added a professor dummy cabinet to the CMO office, containing
Professor DUMMY and its control tablet. It is a tool to teach new
medical personnel with. The cabinet is accessible by the CMO and the SEA
only.
/:cl:

---------

Co-authored-by: Drathek <[email protected]>
  • Loading branch information
Vicacrov and Drulikar committed Mar 5, 2024
1 parent 4e0ce85 commit f3544c5
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 12 deletions.
26 changes: 19 additions & 7 deletions code/game/objects/items/devices/dummy_tablet.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/item/device/professor_dummy_tablet
icon = 'icons/obj/items/devices.dmi'
name = "Professor DUMMY tablet"
name = "\improper Professor DUMMY tablet"
desc = "A Professor DUMMY Control Tablet."
suffix = "\[3\]"
icon_state = "Cotablet"
Expand All @@ -21,23 +21,35 @@
*/
/obj/item/device/professor_dummy_tablet/proc/is_adjacent_to_dummy(mob/user)
if (get_dist(linked_dummy, user) > 1)
to_chat(user, "You are too far away to use the tablet.")
to_chat(user, SPAN_WARNING("You are too far away from the dummy to use its tablet."))
return FALSE

return TRUE

/obj/item/device/professor_dummy_tablet/proc/link_mob(mob/living/carbon/human/H)
linked_dummy = H
/obj/item/device/professor_dummy_tablet/proc/link_dummy(mob/living/carbon/human/dummy_to_link)
if(dummy_to_link)
linked_dummy = dummy_to_link
RegisterSignal(linked_dummy, COMSIG_PARENT_QDELETING, PROC_REF(self_delete))
return

/obj/item/device/professor_dummy_tablet/proc/self_delete()
SIGNAL_HANDLER

UnregisterSignal(linked_dummy, COMSIG_PARENT_QDELETING)
linked_dummy = null
if(isstorage(loc))
var/obj/item/storage/storage = loc
storage.remove_from_storage(src, get_turf(src))
qdel(src)

/obj/item/device/professor_dummy_tablet/attack_self(mob/user as mob)
..()
interact(user)

/obj/item/device/professor_dummy_tablet/interact(mob/user as mob)
if (isnull(linked_dummy))
if(isnull(linked_dummy))
return

if (!is_adjacent_to_dummy(user))
if(!is_adjacent_to_dummy(user))
return

user.set_interaction(src)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,63 @@
. = ..()
new /obj/item/storage/surgical_tray(src)
new /obj/item/roller/surgical(src)

/obj/structure/closet/secure_closet/professor_dummy
name = "professor dummy cabinet"
desc = "An ultrasafe cabinet containing Professor DUMMY and its tablet. Only accessible by Chief Medical Officers and Senior Listed Advisors."
icon_state = "surgical_wall_locked"
icon_closed = "surgical_wall_unlocked"
icon_locked = "surgical_wall_locked"
icon_opened = "surgical_wall_open"
icon_broken = "surgical_wall_spark"
health = null // Unbreakable
unacidable = TRUE
unslashable = TRUE
store_mobs = TRUE
wall_mounted = TRUE

/obj/structure/closet/secure_closet/professor_dummy/Initialize()
. = ..()
var/mob/living/carbon/human/dummy/professor_dummy/spawned_dummy = new(src)
var/datum/equipment_preset/dummy_preset = /datum/equipment_preset/other/professor_dummy
arm_equipment(spawned_dummy, initial(dummy_preset.name), TRUE, FALSE)

/obj/structure/closet/secure_closet/professor_dummy/togglelock(mob/living/user)
if(user.job == JOB_CMO || user.job == JOB_SEA)
return ..()

to_chat(user, SPAN_WARNING("Only the [JOB_CMO] or the [JOB_SEA] can toggle this lock."))

/obj/structure/closet/secure_closet/professor_dummy/dump_contents()
if(locate(/mob/living/carbon/human/dummy/professor_dummy) in src)
visible_message(SPAN_HIGHDANGER("Professor DUMMY should only be used for teaching medical personnel, exclusively done by the [JOB_CMO] or the [JOB_SEA]. Do not abuse it."))
return ..()

/obj/structure/closet/secure_closet/professor_dummy/close()
for(var/mob/mob in loc)
if(!istype(mob, /mob/living/carbon/human/dummy/professor_dummy))
visible_message(SPAN_WARNING("[src] won't budge!"))
return
..()

// Force locking upon closing it
locked = TRUE
update_icon()

/obj/structure/closet/secure_closet/professor_dummy/flashbang(datum/source, obj/item/explosive/grenade/flashbang/FB)
return

/obj/structure/closet/secure_closet/professor_dummy/proc/check_and_destroy_dummy()
var/mob/dummy = locate(/mob/living/carbon/human/dummy/professor_dummy) in src
if(dummy)
visible_message(SPAN_DANGER("Something in [src] blows apart!"))
playsound(src, 'sound/effects/metal_crash.ogg', 25, 1)
qdel(dummy)

/obj/structure/closet/secure_closet/professor_dummy/emp_act(severity)
check_and_destroy_dummy()
..()

/obj/structure/closet/secure_closet/professor_dummy/ex_act(severity)
check_and_destroy_dummy()
..()
3 changes: 1 addition & 2 deletions code/modules/gear_presets/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,6 @@
var/datum/preferences/A = new
A.randomize_appearance(new_human)


/datum/equipment_preset/other/professor_dummy/load_race(mob/living/carbon/human/new_human)
. = ..()
//Can't hug the dummy! Otherwise it's basically human...
Expand All @@ -870,7 +869,7 @@

/datum/equipment_preset/other/professor_dummy/load_gear(mob/living/carbon/human/new_human)
var/obj/item/device/professor_dummy_tablet/tablet = new /obj/item/device/professor_dummy_tablet(new_human)
tablet.link_mob(new_human)
tablet.link_dummy(new_human)
new_human.equip_to_slot_or_del(tablet, WEAR_R_HAND)

new_human.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical, WEAR_BODY)
Expand Down
16 changes: 15 additions & 1 deletion code/modules/mob/living/carbon/human/human_dummy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,25 @@ GLOBAL_LIST_EMPTY(dummy_mob_list)
/mob/living/carbon/human/dummy/add_to_all_mob_huds()
return


/mob/living/carbon/human/dummy/tutorial // Effectively an even more disabled dummy

/mob/living/carbon/human/dummy/tutorial/Initialize(mapload)
. = ..()
status_flags = GODMODE
ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_TUTORIAL)
anchored = TRUE

// Professor Dummy, used by CMOs and SEAs to teach new nurses/doctors
/mob/living/carbon/human/dummy/professor_dummy/Initialize(mapload)
. = ..()
RegisterSignal(SSdcs, COMSIG_GLOB_HIJACK_LANDED, PROC_REF(destroy_upon_hijack))

/mob/living/carbon/human/dummy/professor_dummy/proc/destroy_upon_hijack()
SIGNAL_HANDLER

visible_message(SPAN_WARNING("The [src] suddenly disintegrates!"))
dust(create_cause_data("hijack autodelete"))

/mob/living/carbon/human/dummy/professor_dummy/Destroy()
UnregisterSignal(src, COMSIG_GLOB_HIJACK_LANDED)
return ..()
7 changes: 5 additions & 2 deletions maps/map_files/USS_Almayer/USS_Almayer.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -7481,6 +7481,9 @@
pixel_y = 16
},
/obj/item/clothing/accessory/stethoscope,
/obj/structure/closet/secure_closet/professor_dummy{
pixel_x = -32
},
/turf/open/floor/almayer{
dir = 8;
icon_state = "sterile_green_corner"
Expand Down Expand Up @@ -19276,9 +19279,9 @@
},
/area/almayer/medical/morgue)
"cnZ" = (
/obj/item/tool/surgery/hemostat,
/obj/item/tool/surgery/scalpel,
/obj/structure/surface/table/reinforced/prison,
/obj/item/tool/surgery/scalpel,
/obj/item/tool/surgery/hemostat,
/turf/open/floor/almayer{
dir = 8;
icon_state = "sterile_green_corner"
Expand Down

0 comments on commit f3544c5

Please sign in to comment.