diff --git a/code/datums/supplypacks/misc_vr.dm b/code/datums/supplypacks/misc_vr.dm index 628f07451ce..0c039871325 100644 --- a/code/datums/supplypacks/misc_vr.dm +++ b/code/datums/supplypacks/misc_vr.dm @@ -180,3 +180,12 @@ access_pilot ) one_access = TRUE + +/datum/supply_pack/misc/emergency_beacons + name = "emergency locator beacons (x4)" + contains = list( + /obj/item/device/emergency_beacon = 4 + ) + cost = 20 + containertype = /obj/structure/closet/crate + containername = "emergency beacons crate" \ No newline at end of file diff --git a/code/game/objects/items/devices/e_beacon.dm b/code/game/objects/items/devices/e_beacon.dm new file mode 100644 index 00000000000..7db165554f4 --- /dev/null +++ b/code/game/objects/items/devices/e_beacon.dm @@ -0,0 +1,29 @@ +/obj/item/device/emergency_beacon + name = "personal emergency beacon" + desc = "The hardy PersonaL Emergency Beacon, or PLEB, is a simple device that, once activated, sends out a wideband distress signal that can punch through almost all forms of interference. They are commonly issued to miners and remote exploration teams who may find themselves in need of means to call for assistance whilst being out of conventional communications range." + icon = 'icons/obj/device_vr.dmi' + icon_state = "e_beacon_off" + var/beacon_active = FALSE + var/list/levels_for_distress + +/obj/item/device/emergency_beacon/attack_self(mob/user) + if(!beacon_active) + var/answer = tgui_alert(user, "Would you like to activate this personal emergency beacon?","\The [src]", list("Yes", "No")) + if(answer == "No") + return + else if(do_after(user, (5 SECONDS))) //short delay, so they can still abort if they want to + user.visible_message("[user] activates \the [src]!","You activate \the [src]!") + beacon_active = TRUE + icon_state = "e_beacon_active" + admin_chat_message(message = "'[user?.ckey || "Unknown"]' activated a personal emergency beacon", color = "#FF2222") //VOREStation Add + var/message = "This is an automated distress signal from a MIL-DTL-93352-compliant personal emergency beacon transmitting on [PUB_FREQ*0.1]kHz. \ + This beacon was activated in '\the [get_area(src)]' at X[src.loc.x],Y[src.loc.y]. Due to the limited signal strength, no further information can be provided at this time. \ + Per the Interplanetary Convention on Space SAR, those receiving this message must attempt rescue, \ + or relay the message to those who can." + + if(!levels_for_distress) + levels_for_distress = list(1) + for(var/zlevel in levels_for_distress) + priority_announcement.Announce(message, new_title = "Automated Personal Distress Signal", new_sound = 'sound/AI/sos.ogg', zlevel = zlevel) + else + to_chat(user,"\The [src] is already active, or is otherwise malfunctioning. There's nothing you can do but wait. And possibly pray.") \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm index 4fc7725bf64..de063521af7 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm @@ -86,6 +86,7 @@ /obj/item/clothing/glasses/material, /obj/item/clothing/suit/storage/hooded/wintercoat/miner, /obj/item/clothing/shoes/boots/winter/mining, + /obj/item/device/emergency_beacon, /obj/item/stack/marker_beacon/thirty) /obj/structure/closet/secure_closet/miner/Initialize() diff --git a/icons/obj/device_vr.dmi b/icons/obj/device_vr.dmi index 43f66107829..ab5c3e87ec1 100644 Binary files a/icons/obj/device_vr.dmi and b/icons/obj/device_vr.dmi differ diff --git a/vorestation.dme b/vorestation.dme index fb311b0f686..b2656539752 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1201,6 +1201,7 @@ #include "code\game\objects\items\devices\debugger.dm" #include "code\game\objects\items\devices\defib.dm" #include "code\game\objects\items\devices\denecrotizer_vr.dm" +#include "code\game\objects\items\devices\e_beacon.dm" #include "code\game\objects\items\devices\flash.dm" #include "code\game\objects\items\devices\flash_vr.dm" #include "code\game\objects\items\devices\flashlight.dm"