mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 18:47:20 +01:00
Merge pull request #2538 from Crazylemon64/miner_announce
Additional Requests Console Functionality
This commit is contained in:
@@ -708,6 +708,9 @@ var/global/mulebot_count = 0
|
||||
|
||||
if(load) // if loaded, unload at target
|
||||
speak("Destination <b>[destination]</b> reached. Unloading [load].", radio_name)
|
||||
if(istype(load, /obj/structure/closet/crate))
|
||||
var/obj/structure/closet/crate/C = load
|
||||
C.notifyRecipient(destination)
|
||||
unload(loaddir)
|
||||
else
|
||||
// not loaded
|
||||
@@ -865,10 +868,6 @@ var/global/mulebot_count = 0
|
||||
delivery_beacons = new()
|
||||
delivery_beacons[signal.data["beacon"] ] = signal.source
|
||||
|
||||
// send a radio signal with a single data key/value pair
|
||||
/obj/machinery/bot/mulebot/post_signal(var/freq, var/key, var/value)
|
||||
post_signal_multiple(freq, list("[key]" = value) )
|
||||
|
||||
// send a radio signal with multiple data key/values
|
||||
/obj/machinery/bot/mulebot/post_signal_multiple(var/freq, var/list/keyval)
|
||||
|
||||
|
||||
@@ -62,8 +62,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
if(icon_state != "req_comp_off")
|
||||
icon_state = "req_comp_off"
|
||||
else
|
||||
if(icon_state == "req_comp_off")
|
||||
icon_state = "req_comp[newmessagepriority]"
|
||||
icon_state = "req_comp[newmessagepriority]"
|
||||
|
||||
/obj/machinery/requests_console/New()
|
||||
..()
|
||||
@@ -262,3 +261,26 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
announcement.announcer = ""
|
||||
if(mainmenu)
|
||||
screen = RCS_MAINMENU
|
||||
|
||||
/obj/machinery/requests_console/proc/createMessage(source, title, message, priority)
|
||||
var/linkedSender
|
||||
if(istype(source, /obj/machinery/requests_console))
|
||||
var/obj/machinery/requests_console/sender = source
|
||||
linkedSender = "<a href='?src=\ref[src];write=[ckey(sender.department)]'[sender.department]</a>"
|
||||
else
|
||||
capitalize(source)
|
||||
linkedSender = source
|
||||
capitalize(title)
|
||||
if(src.newmessagepriority < priority)
|
||||
src.newmessagepriority = priority
|
||||
update_icon()
|
||||
if(!src.silent)
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
state(title)
|
||||
|
||||
switch(priority)
|
||||
if(2) // High
|
||||
src.message_log += "<span class='bad'>High Priority</span><BR><b>From:</b> [linkedSender]<BR>[message]"
|
||||
else // Normal
|
||||
src.message_log += "<b>From:</b> [linkedSender]<BR>[message]"
|
||||
set_light(2)
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
|
||||
var/rigged = 0
|
||||
var/obj/item/weapon/paper/manifest/manifest
|
||||
// A list of beacon names that the crate will announce the arrival of, when delivered.
|
||||
var/list/announce_beacons = list()
|
||||
|
||||
/obj/structure/closet/crate/New()
|
||||
..()
|
||||
@@ -212,6 +214,14 @@
|
||||
src.toggle(user)
|
||||
return
|
||||
|
||||
// Called when a crate is delivered by MULE at a location, for notifying purposes
|
||||
/obj/structure/closet/crate/proc/notifyRecipient(var/destination)
|
||||
var/msg = "[capitalize(name)] has arrived at [destination]."
|
||||
if(destination in announce_beacons)
|
||||
for(var/obj/machinery/requests_console/D in allConsoles)
|
||||
if(D.department in src.announce_beacons[destination])
|
||||
D.createMessage(name, "Your Crate has Arrived!", msg, 1)
|
||||
|
||||
/obj/structure/closet/crate/secure
|
||||
desc = "A secure crate."
|
||||
name = "Secure crate"
|
||||
|
||||
@@ -322,9 +322,14 @@ var/list/mechtoys = list(
|
||||
slip.info +="CONTENTS:<br><ul>"
|
||||
|
||||
//spawn the stuff, finish generating the manifest while you're at it
|
||||
if(SP.access)
|
||||
A:req_access = list()
|
||||
A:req_access += text2num(SP.access)
|
||||
if(istype(A, /obj/structure/closet/crate))
|
||||
var/obj/structure/closet/crate/C = A
|
||||
if(SP.access)
|
||||
C.req_access = list()
|
||||
C.req_access += text2num(SP.access)
|
||||
|
||||
if(SP.announce_beacons)
|
||||
C.announce_beacons = SP.announce_beacons
|
||||
|
||||
var/list/contains
|
||||
if(istype(SP,/datum/supply_packs/misc/randomised))
|
||||
|
||||
Reference in New Issue
Block a user