mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Adds a new tool for GMs to create props for events in form of fake PDA conversation logs (#7717)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
var/m_hidden = 0 // Is the PDA hidden from the PDA list?
|
||||
var/active_conversation = null // New variable that allows us to only view a single conversation.
|
||||
var/list/conversations = list() // For keeping up with who we have PDA messsages from.
|
||||
var/list/fakepdas = list() //So that fake PDAs show up in conversations for props. Namedlist of "fakeName" = fakeRef
|
||||
|
||||
/datum/data/pda/app/messenger/start()
|
||||
. = ..()
|
||||
@@ -42,6 +43,8 @@
|
||||
convopdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "1")))
|
||||
else
|
||||
pdas.Add(list(list("Name" = "[P]", "Reference" = "\ref[P]", "Detonate" = "[P.detonate]", "inconvo" = "0")))
|
||||
for(var/fakeRef in fakepdas)
|
||||
convopdas.Add(list(list("Name" = "[fakepdas[fakeRef]]", "Reference" = "[fakeRef]", "Detonate" = "0", "inconvo" = "1")))
|
||||
|
||||
data["convopdas"] = convopdas
|
||||
data["pdas"] = pdas
|
||||
@@ -241,4 +244,14 @@
|
||||
for(var/obj/item/device/pda/target in targets)
|
||||
var/datum/data/pda/app/messenger/P = target.find_program(/datum/data/pda/app/messenger)
|
||||
if(P)
|
||||
P.receive_message(modified_message, "\ref[M]")
|
||||
P.receive_message(modified_message, "\ref[M]")
|
||||
|
||||
/*
|
||||
Generalized proc to handle GM fake prop messages, or future fake prop messages from mapping landmarks.
|
||||
We need a separate proc for this due to the "target" component and creation of a fake conversation entry.
|
||||
Invoked by /obj/item/device/pda/proc/createPropFakeConversation_admin(var/mob/M)
|
||||
*/
|
||||
/datum/data/pda/app/messenger/proc/createFakeMessage(fakeName, fakeRef, fakeJob, sent, message)
|
||||
receive_message(list("sent" = sent, "owner" = "[fakeName]", "job" = "[fakeJob]", "message" = "[message]", "target" = "[fakeRef]"), fakeRef)
|
||||
if(!fakepdas[fakeRef])
|
||||
fakepdas[fakeRef] = fakeName
|
||||
|
||||
Reference in New Issue
Block a user