Merge remote-tracking branch 'citadel/master' into mobility_flags
This commit is contained in:
@@ -93,6 +93,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
var/underline_flag = TRUE //flag for underline
|
||||
|
||||
var/list/blocked_pdas
|
||||
|
||||
/obj/item/pda/suicide_act(mob/living/carbon/user)
|
||||
var/deathMessage = msg_input(user)
|
||||
if (!deathMessage)
|
||||
@@ -387,7 +389,10 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
for (var/obj/item/pda/P in sortNames(get_viewable_pdas()))
|
||||
if (P == src)
|
||||
continue
|
||||
dat += "<li><a href='byond://?src=[REF(src)];choice=Message;target=[REF(P)]'>[P]</a>"
|
||||
if(P.owner in blocked_pdas)
|
||||
dat += "<li><a href='byond://?src=[REF(src)];choice=unblock_pda;target=[P.owner]'>(BLOCKED - CLICK TO UNBLOCK) [P]</a>"
|
||||
else
|
||||
dat += "<li><a href='byond://?src=[REF(src)];choice=Message;target=[REF(P)]'>[P]</a>"
|
||||
if(cartridge)
|
||||
dat += cartridge.message_special(P)
|
||||
dat += "</li>"
|
||||
@@ -646,6 +651,15 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if("MessageAll")
|
||||
send_to_all(U)
|
||||
|
||||
if("toggle_block")
|
||||
toggle_blocking(usr, href_list["target"])
|
||||
|
||||
if("block_pda")
|
||||
block_pda(usr, href_list["target"])
|
||||
|
||||
if("unblock_pda")
|
||||
unblock_pda(usr, href_list["target"])
|
||||
|
||||
if("cart")
|
||||
if(cartridge)
|
||||
cartridge.special(U, href_list)
|
||||
@@ -744,9 +758,16 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
message += "\nSent from my PDA"
|
||||
// Send the signal
|
||||
var/list/string_targets = list()
|
||||
for (var/obj/item/pda/P in targets)
|
||||
if (P.owner && P.ownjob) // != src is checked by the UI
|
||||
var/list/string_blocked
|
||||
for(var/obj/item/pda/P in targets)
|
||||
if(owner in P.blocked_pdas)
|
||||
LAZYADD(string_blocked, P.owner)
|
||||
continue
|
||||
if(P.owner && P.ownjob) // != src is checked by the UI
|
||||
string_targets += "[P.owner] ([P.ownjob])"
|
||||
if(string_blocked)
|
||||
string_blocked = english_list(string_blocked)
|
||||
to_chat(user, "<span class='warning'>[icon2html(src, user)] The following recipients have blocked your message: [string_blocked].</span>")
|
||||
for (var/obj/machinery/computer/message_monitor/M in targets)
|
||||
// In case of "Reply" to a message from a console, this will make the
|
||||
// message be logged successfully. If the console is impersonating
|
||||
@@ -779,12 +800,13 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
tnote += "<i><b>→ To [target_text]:</b></i><br>[signal.format_message()]<br>"
|
||||
// Show it to ghosts
|
||||
var/ghost_message = "<span class='name'>[owner] </span><span class='game say'>PDA Message</span> --> <span class='name'>[target_text]</span>: <span class='message'>[signal.format_message(TRUE)]</span>"
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
|
||||
for(var/i in GLOB.dead_mob_list)
|
||||
var/mob/M = i
|
||||
if(M?.client && M.client.prefs.chat_toggles & CHAT_GHOSTPDA)
|
||||
to_chat(M, "[FOLLOW_LINK(M, user)] [ghost_message]")
|
||||
// Log in the talk log
|
||||
user.log_talk(message, LOG_PDA, tag="PDA: [initial(name)] to [target_text]")
|
||||
to_chat(user, "<span class='info'>Message sent to [target_text]: \"[emoji_message]\"</span>")
|
||||
// Log in the talk log
|
||||
user.log_talk(message, LOG_PDA, tag="PDA: [initial(name)] to [target_text] (BLOCKED:[string_blocked])")
|
||||
if (!silent)
|
||||
playsound(src, 'sound/machines/terminal_success.ogg', 15, 1)
|
||||
// Reset the photo
|
||||
@@ -794,8 +816,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
last_everyone = world.time
|
||||
|
||||
/obj/item/pda/proc/receive_message(datum/signal/subspace/pda/signal)
|
||||
tnote += "<i><b>← From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(signal.source)]'>[signal.data["name"]]</a> ([signal.data["job"]]):</b></i><br>[signal.format_message()]<br>"
|
||||
|
||||
tnote += "<i><b>← From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(signal.source)]'>[signal.data["name"]]</a> ([signal.data["job"]]):</b></i> <a href='byond://?src=[REF(src)];choice=toggle_block;target=[signal.data["name"]]'>(BLOCK/UNBLOCK)</a><br>[signal.format_message()]<br>"
|
||||
if (!silent)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
audible_message("[icon2html(src, hearers(src))] *[ttone]*", null, 3)
|
||||
@@ -814,7 +835,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
hrefstart = "<a href='?src=[REF(L)];track=[html_encode(signal.data["name"])]'>"
|
||||
hrefend = "</a>"
|
||||
|
||||
to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[signal.format_message(TRUE)] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(signal.source)]'>Reply</a>)")
|
||||
to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[signal.format_message(TRUE)] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(signal.source)]'>Reply</a>) <a href='byond://?src=[REF(src)];choice=toggle_block;target=[signal.data["name"]]'>(BLOCK/UNBLOCK)</a>")
|
||||
|
||||
update_icon(TRUE)
|
||||
|
||||
@@ -827,6 +848,20 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
/obj/item/pda/proc/create_message(mob/living/U, obj/item/pda/P)
|
||||
send_message(U,list(P))
|
||||
|
||||
/obj/item/pda/proc/toggle_blocking(mob/user, target)
|
||||
if(target in blocked_pdas)
|
||||
unblock_pda(user, target)
|
||||
else
|
||||
block_pda(user, target)
|
||||
|
||||
/obj/item/pda/proc/block_pda(mob/user, target)
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] [target] blocked from messages. Use the messenger PDA list to unblock.</span>")
|
||||
LAZYOR(blocked_pdas, target)
|
||||
|
||||
/obj/item/pda/proc/unblock_pda(mob/user, target)
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] [target] unblocked from messages.</span>")
|
||||
LAZYREMOVE(blocked_pdas, target)
|
||||
|
||||
/obj/item/pda/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(id)
|
||||
@@ -1172,4 +1207,4 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
#undef PDA_OVERLAY_ID
|
||||
#undef PDA_OVERLAY_ITEM
|
||||
#undef PDA_OVERLAY_LIGHT
|
||||
#undef PDA_OVERLAY_PAI
|
||||
#undef PDA_OVERLAY_PAI
|
||||
|
||||
@@ -326,7 +326,7 @@ Code:
|
||||
|
||||
if(active1 in GLOB.data_core.general)
|
||||
menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]<br>"
|
||||
menu += "Sex: [active1.fields["sex"]]<br>"
|
||||
menu += "Sex: [active1.fields["gender"]]<br>"
|
||||
menu += "Age: [active1.fields["age"]]<br>"
|
||||
menu += "Rank: [active1.fields["rank"]]<br>"
|
||||
menu += "Fingerprint: [active1.fields["fingerprint"]]<br>"
|
||||
@@ -370,7 +370,7 @@ Code:
|
||||
|
||||
if(active1 in GLOB.data_core.general)
|
||||
menu += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]<br>"
|
||||
menu += "Sex: [active1.fields["sex"]]<br>"
|
||||
menu += "Sex: [active1.fields["gender"]]<br>"
|
||||
menu += "Age: [active1.fields["age"]]<br>"
|
||||
menu += "Rank: [active1.fields["rank"]]<br>"
|
||||
menu += "Fingerprint: [active1.fields["fingerprint"]]<br>"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/forcefield_projector
|
||||
name = "forcefield projector"
|
||||
desc = "An experimental device that can create several forcefields at a distance."
|
||||
desc = "An experimental device that can create several forcefields at a short distance."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "signmaker_forcefield"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
@@ -14,7 +14,7 @@
|
||||
var/shield_integrity = 250
|
||||
var/max_fields = 3
|
||||
var/list/current_fields
|
||||
var/field_distance_limit = 7
|
||||
var/field_distance_limit = 2
|
||||
|
||||
/obj/item/forcefield_projector/afterattack(atom/target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
|
||||
@@ -26,6 +26,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
slot_flags = ITEM_SLOT_EARS
|
||||
var/obj/item/encryptionkey/keyslot2 = null
|
||||
dog_fashion = null
|
||||
var/bowman = FALSE
|
||||
|
||||
/obj/item/radio/headset/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins putting \the [src]'s antenna up [user.p_their()] nose! It looks like [user.p_theyre()] trying to give [user.p_them()]self cancer!</span>")
|
||||
@@ -52,6 +53,11 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
else
|
||||
. += "<span class='notice'>A small screen on the headset flashes, it's too small to read without holding or wearing the headset.</span>"
|
||||
|
||||
/obj/item/radio/headset/ComponentInitialize()
|
||||
. = ..()
|
||||
if (bowman)
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
|
||||
/obj/item/radio/headset/Initialize()
|
||||
. = ..()
|
||||
recalculateChannels()
|
||||
@@ -81,10 +87,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs."
|
||||
icon_state = "syndie_headset"
|
||||
item_state = "syndie_headset"
|
||||
|
||||
/obj/item/radio/headset/syndicate/alt/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
bowman = TRUE
|
||||
|
||||
/obj/item/radio/headset/syndicate/alt/leader
|
||||
name = "team leader headset"
|
||||
@@ -112,10 +115,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
desc = "This is used by your elite security force. Protects ears from flashbangs."
|
||||
icon_state = "sec_headset_alt"
|
||||
item_state = "sec_headset_alt"
|
||||
|
||||
/obj/item/radio/headset/headset_sec/alt/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
bowman = TRUE
|
||||
|
||||
/obj/item/radio/headset/headset_eng
|
||||
name = "engineering radio headset"
|
||||
@@ -161,10 +161,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
desc = "The headset of the boss. Protects ears from flashbangs."
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
/obj/item/radio/headset/heads/captain/alt/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
bowman = TRUE
|
||||
|
||||
/obj/item/radio/headset/heads/rd
|
||||
name = "\proper the research director's headset"
|
||||
@@ -183,10 +180,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs."
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
/obj/item/radio/headset/heads/hos/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
bowman = TRUE
|
||||
|
||||
/obj/item/radio/headset/heads/ce
|
||||
name = "\proper the chief engineer's headset"
|
||||
@@ -258,10 +252,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
icon_state = "cent_headset_alt"
|
||||
item_state = "cent_headset_alt"
|
||||
keyslot = null
|
||||
|
||||
/obj/item/radio/headset/headset_cent/alt/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
bowman = TRUE
|
||||
|
||||
/obj/item/radio/headset/ai
|
||||
name = "\proper Integrated Subspace Transceiver "
|
||||
@@ -273,7 +264,11 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
|
||||
/obj/item/radio/headset/attackby(obj/item/W, mob/user, params)
|
||||
user.set_machine(src)
|
||||
|
||||
if (istype(W,/obj/item/headsetupgrader))
|
||||
if (!bowman)
|
||||
to_chat(user,"<span class='notice'>You upgrade [src].</span>")
|
||||
bowmanize()
|
||||
qdel(W)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(keyslot || keyslot2)
|
||||
for(var/ch_name in channels)
|
||||
@@ -341,3 +336,24 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
use_command = !use_command
|
||||
to_chat(user, "<span class='notice'>You toggle high-volume mode [use_command ? "on" : "off"].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/radio/headset/proc/bowmanize()
|
||||
cut_overlays()
|
||||
var/icon/yeas = icon(icon,icon_state)
|
||||
icon_state = "antenna_alt"
|
||||
var/mutable_appearance/center = mutable_appearance(icon,"center_alt")
|
||||
center.color = yeas.GetPixel(15,18)
|
||||
var/mutable_appearance/centeralt = mutable_appearance(icon,"centeralt_alt")
|
||||
centeralt.color = yeas.GetPixel(14,22)
|
||||
var/mutable_appearance/centercenter = mutable_appearance(icon,"centercenter_alt")
|
||||
centercenter.color = yeas.GetPixel(13,19)
|
||||
var/mutable_appearance/centerpixel = mutable_appearance(icon,"centerpixel_alt")
|
||||
centerpixel.color = yeas.GetPixel(13,21)
|
||||
add_overlay(center)
|
||||
add_overlay(centeralt)
|
||||
add_overlay(centercenter)
|
||||
add_overlay(centerpixel)
|
||||
name = replacetext(name,"headset", "bowman headset")
|
||||
desc = "[desc] Protects ears from flashbangs."
|
||||
bowman = TRUE
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
|
||||
|
||||
@@ -251,3 +251,9 @@ effective or pretty fucking useless.
|
||||
else
|
||||
GLOB.active_jammers -= src
|
||||
update_icon()
|
||||
|
||||
/obj/item/headsetupgrader
|
||||
name = "headset upgrader"
|
||||
desc = "A tool that can be used to upgrade a normal headset to be able to protect from flashbangs."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "headset_upgrade"
|
||||
|
||||
Reference in New Issue
Block a user