mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Ports /tg/ spatial grid system, refactors telecomms, destroys lag (#15140)
This commit is contained in:
@@ -175,14 +175,13 @@
|
||||
|
||||
/obj/item/device/assembly_holder/Initialize(mapload, ...)
|
||||
. = ..()
|
||||
listening_objects += src
|
||||
become_hearing_sensitive()
|
||||
|
||||
/obj/item/device/assembly_holder/Destroy()
|
||||
if(a_left)
|
||||
a_left.holder = null
|
||||
if(a_right)
|
||||
a_right.holder = null
|
||||
listening_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/assembly_holder/hear_talk(mob/living/M, msg, verb, datum/language/speaking)
|
||||
@@ -243,4 +242,4 @@
|
||||
name = "[initial(name)] ([tmr.time] secs)"
|
||||
to_chat(usr, SPAN_NOTICE("Timer set to [tmr.time] seconds."))
|
||||
else
|
||||
to_chat(usr, SPAN_WARNING("You cannot do this while [usr.stat ? "unconscious/dead" : "restrained"]."))
|
||||
to_chat(usr, SPAN_WARNING("You cannot do this while [usr.stat ? "unconscious/dead" : "restrained"]."))
|
||||
|
||||
@@ -11,10 +11,9 @@
|
||||
|
||||
/obj/item/device/assembly/voice/Initialize(mapload, ...)
|
||||
. = ..()
|
||||
listening_objects += src
|
||||
become_hearing_sensitive()
|
||||
|
||||
/obj/item/device/assembly/voice/Destroy()
|
||||
listening_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/assembly/voice/hear_talk(mob/living/M, msg)
|
||||
@@ -41,4 +40,4 @@
|
||||
|
||||
/obj/item/device/assembly/voice/toggle_secure()
|
||||
. = ..()
|
||||
listening = FALSE
|
||||
listening = FALSE
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
/atom/proc/balloon_alert_to_viewers(message, self_message, vision_distance = 7, list/ignored_mobs)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
var/list/hearers = list()
|
||||
var/list/objs = list()
|
||||
get_mobs_or_objs_in_view(get_turf(src), vision_distance, hearers, objs, ONLY_GHOSTS_IN_VIEW)
|
||||
// This has to be unlinted because the linter thinks that oranges ears will add reagents and call send_asset
|
||||
// which violates SHOULD_NOT_SLEEP(TRUE)
|
||||
var/list/hearers = UNLINT(get_hearers_in_view(vision_distance, src))
|
||||
hearers -= ignored_mobs
|
||||
|
||||
for(var/mob/hearer as anything in hearers - src)
|
||||
|
||||
@@ -88,9 +88,7 @@
|
||||
// It handles items shipped for bounties.
|
||||
/datum/controller/subsystem/cargo/proc/bounty_ship_item_and_contents(atom/movable/AM, dry_run=FALSE)
|
||||
var/list/matched_one = FALSE
|
||||
var/list/contents = list()
|
||||
contents += AM
|
||||
contents += AM.GetAllContents()
|
||||
var/list/contents = AM.GetAllContents()
|
||||
for(var/thing in reverseRange(contents))
|
||||
var/matched_this = FALSE
|
||||
for(var/datum/bounty/B in bounties_list)
|
||||
@@ -227,4 +225,3 @@
|
||||
if(B.claimed)
|
||||
++count
|
||||
return count
|
||||
|
||||
|
||||
@@ -30,9 +30,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
var/sold_str = ""
|
||||
var/cost = 0
|
||||
|
||||
var/list/contents = list()
|
||||
contents += AM //Also add the container object
|
||||
contents += AM.GetAllContents()
|
||||
var/list/contents = AM.GetAllContents()
|
||||
|
||||
// We go backwards, so it'll be innermost objects sold first
|
||||
for(var/i in reverseRange(contents))
|
||||
|
||||
@@ -138,7 +138,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
|
||||
/obj/effect/map_effect/portal/master/Initialize()
|
||||
LAZYADD(all_portal_masters, src)
|
||||
LAZYADD(listening_objects, src)
|
||||
become_hearing_sensitive()
|
||||
find_lines()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
@@ -150,7 +150,6 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
|
||||
/obj/effect/map_effect/portal/master/Destroy()
|
||||
LAZYREMOVE(all_portal_masters, src)
|
||||
LAZYREMOVE(listening_objects, src)
|
||||
for(var/thing in portal_lines)
|
||||
qdel(thing)
|
||||
return ..()
|
||||
@@ -232,12 +231,9 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
if(!counterpart)
|
||||
return
|
||||
var/turf/T = counterpart.get_focused_turf()
|
||||
var/list/mobs_to_relay = list()
|
||||
var/list/objs = list()
|
||||
get_mobs_or_objs_in_view(T, world.view, mobs_to_relay, objs)
|
||||
var/list/mobs_to_relay = get_hearers_in_view(world.view, T)
|
||||
|
||||
for(var/thing in mobs_to_relay)
|
||||
var/mob/mob = thing
|
||||
for(var/mob/mob in mobs_to_relay)
|
||||
var/rendered = span("message", "[text]")
|
||||
mob.show_message(rendered)
|
||||
|
||||
@@ -249,12 +245,9 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
return
|
||||
var/rendered = span("message", "[msg]")
|
||||
var/turf/T = counterpart.get_focused_turf()
|
||||
var/list/mobs_to_relay = list()
|
||||
var/list/objs = list()
|
||||
get_mobs_or_objs_in_view(T, world.view, mobs_to_relay, objs)
|
||||
var/list/mobs_to_relay = get_hearers_in_view(world.view, T)
|
||||
|
||||
for(var/thing in mobs_to_relay)
|
||||
var/mob/mob = thing
|
||||
for(var/mob/mob in mobs_to_relay)
|
||||
mob.show_message(rendered)
|
||||
|
||||
..()
|
||||
@@ -264,12 +257,9 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
if(!counterpart)
|
||||
return
|
||||
var/turf/T = counterpart.get_focused_turf()
|
||||
var/list/mobs_to_relay = list()
|
||||
var/list/objs = list()
|
||||
get_mobs_or_objs_in_view(T, world.view, mobs_to_relay, objs)
|
||||
var/list/mobs_to_relay = get_hearers_in_view(world.view, T)
|
||||
|
||||
for(var/thing in mobs_to_relay)
|
||||
var/mob/mob = thing
|
||||
for(var/mob/mob in mobs_to_relay)
|
||||
var/accent_icon = M.get_accent_icon(speaking, src)
|
||||
var/name_used = M.GetVoice()
|
||||
var/rendered = null
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
to_chat(A, "<br>")
|
||||
to_chat(A, "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT</b></span>")
|
||||
to_chat(A, "<br>")
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/T in SSmachinery.all_telecomms)
|
||||
T.emp_act(1)
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
|
||||
|
||||
/datum/event/communications_blackout/start()
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/T in SSmachinery.all_telecomms)
|
||||
if(T.z in affecting_z)
|
||||
T.emp_act(1)
|
||||
|
||||
@@ -87,14 +87,13 @@
|
||||
target.add_ion_law(law)
|
||||
target.show_laws()
|
||||
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
MS.spamfilter.Cut()
|
||||
var/i
|
||||
for (i = 1, i <= MS.spamfilter_limit, i++)
|
||||
MS.spamfilter += pick("kitty","HONK","rev","malf","liberty","freedom","drugs", "[current_map.station_short]", \
|
||||
"admin","ponies","heresy","meow","Pun Pun","monkey","Ian","moron","pizza","message","spam",\
|
||||
"director", "Hello", "Hi!"," ","nuke","crate","dwarf","xeno")
|
||||
for (var/obj/machinery/telecomms/message_server/MS in SSmachinery.all_telecomms)
|
||||
MS.spamfilter.Cut()
|
||||
var/i
|
||||
for (i = 1, i <= MS.spamfilter_limit, i++)
|
||||
MS.spamfilter += pick("kitty","HONK","rev","malf","liberty","freedom","drugs", "[current_map.station_short]", \
|
||||
"admin","ponies","heresy","meow","Pun Pun","monkey","Ian","moron","pizza","message","spam",\
|
||||
"director", "Hello", "Hi!"," ","nuke","crate","dwarf","xeno")
|
||||
|
||||
/datum/event/ionstorm/tick()
|
||||
if(botEmagChance)
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
Notifications will be sent as updates occur.<br>"
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
|
||||
for(var/obj/machinery/message_server/MS in SSmachinery.processing)
|
||||
if(!MS.active) continue
|
||||
for(var/obj/machinery/telecomms/message_server/MS in SSmachinery.all_telecomms)
|
||||
if(!MS.use_power) continue
|
||||
MS.send_rc_message("Executive Officer's Desk", my_department, message, "", "", 2)
|
||||
|
||||
|
||||
@@ -61,6 +61,6 @@
|
||||
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
|
||||
for(var/obj/machinery/message_server/MS in SSmachinery.processing)
|
||||
if(!MS.active) continue
|
||||
for(var/obj/machinery/telecomms/message_server/MS in SSmachinery.all_telecomms)
|
||||
if(!MS.use_power) continue
|
||||
MS.send_rc_message("Executive Officer's Desk", my_department, message, "", "", 2)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if(areas && areas.len > 0)
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [worldtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
|
||||
for(var/obj/machinery/message_server/MS in SSmachinery.processing)
|
||||
for(var/obj/machinery/telecomms/message_server/MS in SSmachinery.all_telecomms)
|
||||
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
|
||||
for(var/mob/living/silicon/ai/A in player_list)
|
||||
to_chat(A, "<span class='danger'>Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].</span>")
|
||||
|
||||
@@ -320,7 +320,8 @@ em {font-style: normal; font-weight: bold;}
|
||||
.centradio {color: #7272a7;}
|
||||
.airadio {color: #ec00ec;}
|
||||
.entradio {color: #cfcfcf;}
|
||||
.shipradio {color: #8b4cd8;}
|
||||
.hailradio {color: #8b4cd8;}
|
||||
.shipradio {color: #738465;}
|
||||
|
||||
.secradio {color: #e21111;}
|
||||
.engradio {color: #cc7b01;}
|
||||
|
||||
@@ -317,7 +317,8 @@ em {font-style: normal;font-weight: bold;}
|
||||
.centradio {color: #5C5C8A;}
|
||||
.airadio {color: #FF00FF;}
|
||||
.entradio {color: #bd893c;}
|
||||
.shipradio {color: #7331c4;}
|
||||
.hailradio {color: #7331c4;}
|
||||
.shipradio {color: #738465;}
|
||||
|
||||
.secradio {color: #A30000;}
|
||||
.engradio {color: #A66300;}
|
||||
|
||||
@@ -286,7 +286,8 @@ em {font-style: normal; font-weight: bold;}
|
||||
.centradio {color: #5C5C8A;}
|
||||
.airadio {color: #FF00FF;}
|
||||
.entradio {color: #bd893c;}
|
||||
.shipradio {color: #7331c4;}
|
||||
.hailradio {color: #7331c4;}
|
||||
.shipradio {color: #738465;}
|
||||
|
||||
.secradio {color: #A30000;}
|
||||
.engradio {color: #A66300;}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
UNSETEMPTY(pilots)
|
||||
|
||||
if(radio)
|
||||
radio.on = (head?.radio && head.radio.is_functional() && get_cell())
|
||||
radio.set_on(head?.radio && head.radio.is_functional() && get_cell())
|
||||
|
||||
if(camera)
|
||||
camera.status = (head?.camera && head.camera.is_functional())
|
||||
|
||||
@@ -459,10 +459,9 @@
|
||||
|
||||
/obj/item/integrated_circuit/input/microphone/Initialize()
|
||||
. = ..()
|
||||
listening_objects |= src
|
||||
become_hearing_sensitive()
|
||||
|
||||
/obj/item/integrated_circuit/input/microphone/Destroy()
|
||||
listening_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/integrated_circuit/input/microphone/hear_talk(mob/living/M, msg, var/verb="says", datum/language/speaking=null)
|
||||
|
||||
@@ -65,6 +65,8 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
|
||||
var/stored_index = 1
|
||||
var/list/atoms_to_initialise = list()
|
||||
var/has_expanded_world_maxx = FALSE
|
||||
var/has_expanded_world_maxy = FALSE
|
||||
|
||||
while(dmmRegex.Find(tfile, stored_index))
|
||||
stored_index = dmmRegex.next
|
||||
@@ -104,6 +106,7 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
continue
|
||||
else
|
||||
world.maxz = zcrd //create a new z_level if needed
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, world.maxz)
|
||||
if(!no_changeturf)
|
||||
WARNING("Z-level expansion occurred without no_changeturf set, this may cause problems when /turf/post_change is called.")
|
||||
|
||||
@@ -130,6 +133,7 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
if(!cropMap && ycrd > world.maxy)
|
||||
if(!measureOnly)
|
||||
world.maxy = ycrd // Expand Y here. X is expanded in the loop below
|
||||
has_expanded_world_maxy = TRUE
|
||||
bounds[MAP_MAXY] = max(bounds[MAP_MAXY], Clamp(ycrd, y_lower, y_upper))
|
||||
else
|
||||
bounds[MAP_MAXY] = max(bounds[MAP_MAXY], Clamp(min(ycrd, world.maxy), y_lower, y_upper))
|
||||
@@ -154,6 +158,7 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
break
|
||||
else
|
||||
world.maxx = xcrd
|
||||
has_expanded_world_maxx = TRUE
|
||||
|
||||
if(xcrd >= 1)
|
||||
var/model_key = copytext(line, tpos, tpos + key_len)
|
||||
@@ -182,10 +187,13 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
else
|
||||
if(!measureOnly)
|
||||
if(!no_changeturf)
|
||||
for(var/t in block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]), locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])))
|
||||
var/turf/T = t
|
||||
for(var/turf/T as anything in block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]), locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])))
|
||||
//we do this after we load everything in. if we don't; we'll have weird atmos bugs regarding atmos adjacent turfs
|
||||
T.post_change(FALSE)
|
||||
|
||||
if(has_expanded_world_maxx || has_expanded_world_maxy)
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_EXPANDED_WORLD_BOUNDS, has_expanded_world_maxx, has_expanded_world_maxy)
|
||||
|
||||
var/datum/map_load_metadata/M = new
|
||||
M.bounds = bounds
|
||||
M.atoms_to_initialise = atoms_to_initialise
|
||||
|
||||
@@ -325,7 +325,9 @@ swapmap
|
||||
x2+=x1-1
|
||||
y2+=y1-1
|
||||
z2+=z1-1
|
||||
world.maxz=max(z2,world.maxz) // stretch z if necessary
|
||||
if(z2 > world.maxz)
|
||||
world.maxz = z2 // stretch z if necessary
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, world.maxz)
|
||||
if(!ischunk)
|
||||
swapmaps_loaded[src]=null
|
||||
swapmaps_byname[id]=src
|
||||
|
||||
@@ -71,6 +71,9 @@ var/list/mineral_can_smooth_with = list(
|
||||
|
||||
turfs += src
|
||||
|
||||
if(isStationLevel(z))
|
||||
station_turfs += src
|
||||
|
||||
if(dynamic_lighting)
|
||||
luminosity = 0
|
||||
else
|
||||
@@ -197,6 +200,9 @@ var/list/mineral_can_smooth_with = list(
|
||||
|
||||
turfs += src
|
||||
|
||||
if(isStationLevel(z))
|
||||
station_turfs += src
|
||||
|
||||
if(dynamic_lighting)
|
||||
luminosity = 0
|
||||
else
|
||||
@@ -638,6 +644,9 @@ var/list/asteroid_floor_smooth = list(
|
||||
|
||||
turfs += src
|
||||
|
||||
if(isStationLevel(z))
|
||||
station_turfs += src
|
||||
|
||||
if(dynamic_lighting)
|
||||
luminosity = 0
|
||||
else
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
. = list()
|
||||
var/turf/pos = get_turf(source)
|
||||
if(pos)
|
||||
for(var/turf/T in hear(range, pos))
|
||||
for(var/turf/T in get_hear(range, pos))
|
||||
. += T
|
||||
|
||||
#undef UPDATE_BUFFER
|
||||
#undef UPDATE_BUFFER
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
if(vr_mob)
|
||||
to_chat(vr_mob, "[time] [message]")
|
||||
|
||||
/mob/proc/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/part_c, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="")
|
||||
/mob/proc/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/part_c, var/mob/speaker = null, var/hard_to_hear = 0)
|
||||
if(!client && !vr_mob)
|
||||
return
|
||||
|
||||
@@ -165,13 +165,8 @@
|
||||
else
|
||||
speaker_name = "Unknown"
|
||||
|
||||
if(istype(speaker, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = speaker
|
||||
if(H.voice)
|
||||
speaker_name = H.voice
|
||||
|
||||
if(vname)
|
||||
speaker_name = vname
|
||||
if(ishuman(speaker) && speaker.GetVoice() != real_name)
|
||||
speaker_name = speaker.GetVoice()
|
||||
|
||||
if(hard_to_hear)
|
||||
speaker_name = "Unknown"
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
/obj/item/device/mmi/radio_enabled/Initialize()
|
||||
. = ..()
|
||||
radio = new(src)//Spawns a radio inside the MMI.
|
||||
radio.broadcasting = TRUE//So it's broadcasting from the start.
|
||||
radio.set_broadcasting(TRUE) //So it's broadcasting from the start.
|
||||
|
||||
//Allows the brain to toggle the radio functions.
|
||||
/obj/item/device/mmi/radio_enabled/verb/Toggle_Broadcasting()
|
||||
@@ -249,8 +249,8 @@
|
||||
if(brainmob.stat)//Only the brainmob will trigger these so no further check is necessary.
|
||||
to_chat(brainmob, "Can't do that while incapacitated or dead.")
|
||||
|
||||
radio.broadcasting = radio.broadcasting==1 ? 0 : 1
|
||||
to_chat(brainmob, SPAN_NOTICE("Radio is [radio.broadcasting==1 ? "now" : "no longer"] broadcasting."))
|
||||
radio.set_broadcasting(!radio.get_broadcasting())
|
||||
to_chat(brainmob, SPAN_NOTICE("Radio is [radio.get_broadcasting() ? "now" : "no longer"] broadcasting."))
|
||||
|
||||
/obj/item/device/mmi/radio_enabled/verb/Toggle_Listening()
|
||||
set name = "Toggle Listening"
|
||||
@@ -262,8 +262,8 @@
|
||||
if(brainmob.stat)
|
||||
to_chat(brainmob, "Can't do that while incapacitated or dead.")
|
||||
|
||||
radio.listening = radio.listening==1 ? 0 : 1
|
||||
to_chat(brainmob, SPAN_NOTICE("Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast."))
|
||||
radio.set_listening(!radio.get_listening())
|
||||
to_chat(brainmob, SPAN_NOTICE("Radio is [radio.get_listening() ? "now" : "no longer"] receiving broadcast."))
|
||||
|
||||
/obj/item/device/mmi/emp_act(severity)
|
||||
if(!brainmob)
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
return headsets[headsets[1]]
|
||||
return null
|
||||
|
||||
/mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, successful_radio, whisper, var/is_singing = FALSE)
|
||||
/mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, whisper, var/is_singing = FALSE)
|
||||
if(!whisper && (paralysis || InStasis()))
|
||||
whisper(message, speaking)
|
||||
return TRUE
|
||||
@@ -170,53 +170,48 @@
|
||||
for(var/obj/item/device/radio/intercom/I in view(1))
|
||||
I.add_fingerprint(src)
|
||||
used_radios += I
|
||||
if(I.talk_into(src, message, null, verb, speaking))
|
||||
successful_radio += I
|
||||
I.talk_into(src, message, null, verb, speaking)
|
||||
if("headset")
|
||||
var/obj/item/device/radio/R = get_radio()
|
||||
if(R)
|
||||
used_radios += R
|
||||
if(R.talk_into(src, message, null, verb, speaking))
|
||||
successful_radio += R
|
||||
R.talk_into(src, message, null, verb, speaking)
|
||||
if("right ear")
|
||||
var/obj/item/device/radio/R
|
||||
var/has_radio = 0
|
||||
var/has_radio = FALSE
|
||||
if(istype(r_ear,/obj/item/device/radio))
|
||||
R = r_ear
|
||||
has_radio = 1
|
||||
has_radio = TRUE
|
||||
if(istype(r_hand, /obj/item/device/radio))
|
||||
R = r_hand
|
||||
has_radio = 1
|
||||
has_radio = TRUE
|
||||
if(has_radio)
|
||||
used_radios += R
|
||||
if(R.talk_into(src,message,null,verb,speaking))
|
||||
successful_radio += R
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
if("left ear")
|
||||
var/obj/item/device/radio/R
|
||||
var/has_radio = 0
|
||||
var/has_radio = FALSE
|
||||
if(istype(l_ear, /obj/item/device/radio))
|
||||
R = l_ear
|
||||
has_radio = 1
|
||||
has_radio = TRUE
|
||||
if(istype(l_hand, /obj/item/device/radio))
|
||||
R = l_hand
|
||||
has_radio = 1
|
||||
has_radio = TRUE
|
||||
if(has_radio)
|
||||
used_radios += R
|
||||
if(R.talk_into(src,message,null,verb,speaking))
|
||||
successful_radio += R
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
if("wrist")
|
||||
var/obj/item/device/radio/R
|
||||
var/has_radio = 0
|
||||
var/has_radio = FALSE
|
||||
if(istype(wrists,/obj/item/device/radio))
|
||||
R = wrists
|
||||
has_radio = 1
|
||||
has_radio = TRUE
|
||||
if(istype(r_hand, /obj/item/device/radio))
|
||||
R = wrists
|
||||
has_radio = 1
|
||||
has_radio = TRUE
|
||||
if(has_radio)
|
||||
used_radios += R
|
||||
if(R.talk_into(src,message,null,verb,speaking))
|
||||
successful_radio += R
|
||||
R.talk_into(src,message,null,verb,speaking)
|
||||
if("whisper")
|
||||
whisper(message, speaking, is_singing)
|
||||
return TRUE
|
||||
@@ -224,8 +219,7 @@
|
||||
var/obj/item/device/radio/R = get_radio()
|
||||
if(R)
|
||||
used_radios += R
|
||||
if(R.talk_into(src, message, message_mode, verb, speaking))
|
||||
successful_radio += R
|
||||
R.talk_into(src, message, message_mode, verb, speaking)
|
||||
|
||||
/mob/living/carbon/human/handle_speech_sound()
|
||||
var/list/returns = ..()
|
||||
|
||||
@@ -16,7 +16,7 @@ var/list/department_radio_keys = list(
|
||||
":x" = "Raider", ".x" = "Raider",
|
||||
":b" = "Burglar", ".b" = "Burglar",
|
||||
":j" = "Bluespace", ".j" = "Bluespace",
|
||||
":y" = "Ship", ".y" = "Ship",
|
||||
":y" = "Hailing", ".y" = "Hailing",
|
||||
":q" = "Ninja", ".q" = "Ninja",
|
||||
":u" = "Operations", ".u" = "Operations",
|
||||
":v" = "Service", ".v" = "Service",
|
||||
@@ -39,7 +39,7 @@ var/list/department_radio_keys = list(
|
||||
":X" = "Raider", ".X" = "Raider",
|
||||
":B" = "Burglar", ".B" = "Burglar",
|
||||
":J" = "Bluespace", ".J" = "Bluespace",
|
||||
":Y" = "Ship", ".Y" = "Ship",
|
||||
":Y" = "Hailing", ".Y" = "Hailing",
|
||||
":Q" = "Ninja", ".Q" = "Ninja",
|
||||
":U" = "Operations", ".U" = "Operations",
|
||||
":V" = "Service", ".V" = "Service",
|
||||
@@ -129,16 +129,17 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
/mob/living/proc/get_stutter_verbs()
|
||||
return list("stammers", "stutters")
|
||||
|
||||
/mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, successful_radio, whisper)
|
||||
/mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, whisper)
|
||||
if(message_mode == "intercom")
|
||||
for(var/obj/item/device/radio/intercom/I in view(1, null))
|
||||
for(var/obj/item/device/radio/intercom/I in view(1, src))
|
||||
used_radios += I
|
||||
if(I.talk_into(src, message, verb, speaking))
|
||||
successful_radio += I
|
||||
I.talk_into(src, message, verb, speaking)
|
||||
|
||||
if(message_mode == "whisper" && !whisper)
|
||||
whisper(message, speaking)
|
||||
return TRUE
|
||||
return 0
|
||||
|
||||
return FALSE
|
||||
|
||||
/mob/living/proc/handle_speech_sound()
|
||||
var/list/returns[3]
|
||||
@@ -250,34 +251,28 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
return say_signlang(message, pick(speaking.signlang_verb), speaking, speaking.sign_adv_length)
|
||||
|
||||
var/list/obj/item/used_radios = new
|
||||
var/list/successful_radio = new // passes a list because standard vars don't work when passed
|
||||
if(handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, successful_radio, whisper, is_singing))
|
||||
return 1
|
||||
if(handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, whisper, is_singing))
|
||||
return TRUE
|
||||
|
||||
var/list/handle_v = handle_speech_sound()
|
||||
var/sound/speech_sound = handle_v[1]
|
||||
var/sound_vol = handle_v[2]
|
||||
var/italics = handle_v[3]
|
||||
|
||||
|
||||
|
||||
//speaking into radios
|
||||
if(length(used_radios))
|
||||
italics = 1
|
||||
message_range = 1
|
||||
if(speaking)
|
||||
message_range = speaking.get_talkinto_msg_range(message)
|
||||
var/msg
|
||||
if(!speaking || !(speaking.flags & NO_TALK_MSG))
|
||||
msg = "<span class='notice'>\The [src] [length(successful_radio) ? "talks into" : "tries talking into"] \the [used_radios[1]]</span>."
|
||||
for(var/mob/living/M in hearers(5, src) - src)
|
||||
if(msg)
|
||||
M.show_message(msg)
|
||||
var/msg = SPAN_NOTICE("\The [src] talks into \the [used_radios[1]].")
|
||||
for (var/mob/living/L in get_hearers_in_view(5, src) - src)
|
||||
L.show_message(msg)
|
||||
if(speech_sound)
|
||||
sound_vol *= 0.5
|
||||
|
||||
var/list/listening = list()
|
||||
var/list/listening_obj = list()
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if(whisper)
|
||||
@@ -296,14 +291,21 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
italics = 1
|
||||
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
|
||||
|
||||
get_mobs_or_objs_in_view(T, message_range, listening, listening_obj, ghost_hearing)
|
||||
listening = get_hearers_in_view(message_range, src)
|
||||
|
||||
if(client)
|
||||
for (var/mob/player_mob in player_list)
|
||||
if(!player_mob || player_mob.stat != DEAD || (player_mob in listening))
|
||||
continue
|
||||
if(player_mob.client?.prefs.toggles & CHAT_GHOSTEARS)
|
||||
listening |= player_mob
|
||||
|
||||
var/list/hear_clients = list()
|
||||
for(var/m in listening)
|
||||
var/mob/M = m
|
||||
for(var/mob/M in listening)
|
||||
var/heard_say = M.hear_say(message, verb, speaking, alt_name, italics, src, speech_sound, sound_vol, get_font_size_modifier())
|
||||
if(heard_say && M.client)
|
||||
hear_clients += M.client
|
||||
listening -= M
|
||||
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image(get_talk_bubble(),src,"h[speech_bubble_test]")
|
||||
@@ -313,7 +315,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
|
||||
var/bypass_listen_obj = (speaking && (speaking.flags & PASSLISTENOBJ))
|
||||
if(!bypass_listen_obj)
|
||||
for(var/obj/O as anything in listening_obj)
|
||||
for(var/obj/O as anything in listening)
|
||||
if(O) //It's possible that it could be deleted in the meantime.
|
||||
INVOKE_ASYNC(O, /obj/.proc/hear_talk, src, message, verb, speaking)
|
||||
|
||||
|
||||
@@ -136,9 +136,9 @@
|
||||
|
||||
if(common_radio)
|
||||
if(!is_component_functioning("radio"))
|
||||
common_radio.on = FALSE
|
||||
common_radio.set_on(FALSE)
|
||||
else
|
||||
common_radio.on = TRUE
|
||||
common_radio.set_on(TRUE)
|
||||
|
||||
if(is_component_functioning("camera"))
|
||||
blinded = FALSE
|
||||
@@ -342,4 +342,4 @@
|
||||
|
||||
/mob/living/silicon/robot/fire_act()
|
||||
if(!on_fire) // Silicons don't gain stacks from hotspots, but hotspots can ignite them.
|
||||
IgniteMob()
|
||||
IgniteMob()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
returns[4] = world.view
|
||||
return returns
|
||||
|
||||
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, successful_radio, whisper)
|
||||
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, whisper)
|
||||
if(message_mode == "whisper" && !whisper)
|
||||
whisper(message, speaking)
|
||||
return TRUE
|
||||
@@ -36,7 +36,7 @@
|
||||
/mob/living/silicon/robot/drone/handle_message_mode()
|
||||
return null
|
||||
|
||||
/mob/living/silicon/ai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, successful_radio, whisper)
|
||||
/mob/living/silicon/ai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, whisper)
|
||||
if(message_mode == "whisper" && !whisper)
|
||||
whisper(message, speaking)
|
||||
return TRUE
|
||||
@@ -52,7 +52,7 @@
|
||||
log_say("[key_name(src)] : [message]",ckey=key_name(src))
|
||||
return ai_radio.talk_into(src, message, message_mode, verb, speaking)
|
||||
|
||||
/mob/living/silicon/pai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, successful_radio, whisper)
|
||||
/mob/living/silicon/pai/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, whisper)
|
||||
if(message_mode)
|
||||
if(message_mode == "whisper" && !whisper)
|
||||
whisper(message, speaking)
|
||||
@@ -120,7 +120,7 @@
|
||||
var/turf/T = get_turf(H)
|
||||
|
||||
if(T)
|
||||
var/list/hear = hear(7, T)
|
||||
var/list/hear = get_hear(7, T)
|
||||
var/list/hearturfs = list()
|
||||
|
||||
for(var/I in hear)
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
/mob/living/simple_animal/spiderbot/get_bullet_impact_effect_type(var/def_zone)
|
||||
return BULLET_IMPACT_METAL
|
||||
|
||||
/mob/living/simple_animal/spiderbot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, successful_radio, whisper)
|
||||
/mob/living/simple_animal/spiderbot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name, whisper)
|
||||
switch(message_mode)
|
||||
if("whisper")
|
||||
if(!whisper)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
/mob/living/simple_animal/hostile/hivebotbeacon/proc/generate_warp_destinations()
|
||||
|
||||
destinations.Cut()
|
||||
for(var/turf/simulated/floor/T in circlerange(src,10))
|
||||
for(var/turf/simulated/floor/T in circle_range(src,10))
|
||||
if(turf_clear(T))
|
||||
destinations += T
|
||||
var/area/A = get_area(src)
|
||||
@@ -271,4 +271,4 @@
|
||||
#undef RAPID
|
||||
#undef BOMBER
|
||||
#undef GUARDIAN
|
||||
#undef HARVESTER
|
||||
#undef HARVESTER
|
||||
|
||||
@@ -90,6 +90,9 @@
|
||||
winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")
|
||||
MOB_STOP_THINKING(src)
|
||||
|
||||
clear_important_client_contents(client)
|
||||
enable_client_mobs_in_contents(client)
|
||||
|
||||
update_client_color()
|
||||
add_click_catcher()
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
disconnect_time = world.realtime
|
||||
log_access("Logout: [key_name(src)]",ckey=key_name(src))
|
||||
SSfeedback.update_status()
|
||||
if(client)
|
||||
clear_important_client_contents(client)
|
||||
|
||||
if(admin_datums[src.ckey])
|
||||
var/datum/admins/A = admin_datums[src.ckey]
|
||||
|
||||
+10
-20
@@ -79,7 +79,9 @@
|
||||
if (!ckey && mob_thinks)
|
||||
MOB_START_THINKING(src)
|
||||
|
||||
/mob/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
||||
become_hearing_sensitive()
|
||||
|
||||
/mob/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
||||
|
||||
if(!client) return
|
||||
|
||||
@@ -196,29 +198,17 @@
|
||||
// deaf_message (optional) is what deaf people will see.
|
||||
// hearing_distance (optional) is the range, how many tiles away the message can be heard.
|
||||
/mob/audible_message(var/message, var/deaf_message, var/hearing_distance, var/self_message, var/ghost_hearing = GHOSTS_ALL_HEAR)
|
||||
if(!hearing_distance)
|
||||
hearing_distance = world.view
|
||||
|
||||
var/range = world.view
|
||||
if(hearing_distance)
|
||||
range = hearing_distance
|
||||
var/list/hearers = get_hearers_in_view(hearing_distance, src)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
var/list/mobs = list()
|
||||
var/list/objs = list()
|
||||
get_mobs_or_objs_in_view(T, range, mobs, objs, ghost_hearing)
|
||||
|
||||
|
||||
for(var/m in mobs)
|
||||
var/mob/M = m
|
||||
if(self_message && M==src)
|
||||
M.show_message("[get_accent_icon(null, M)] [self_message]", 2, deaf_message, 1)
|
||||
for (var/atom/movable/AM as anything in hearers)
|
||||
if(self_message && AM == src)
|
||||
AM.show_message("[get_accent_icon(null, src)] [self_message]", 2, deaf_message, 1)
|
||||
continue
|
||||
|
||||
M.show_message("[get_accent_icon(null, M)] [message]", 2, deaf_message,1)
|
||||
|
||||
for(var/o in objs)
|
||||
var/obj/O = o
|
||||
O.show_message("[get_accent_icon(null, src)] [message]", 2, deaf_message, 1)
|
||||
AM.show_message("[get_accent_icon(null, src)] [message]", 2, deaf_message, 1)
|
||||
|
||||
/mob/proc/findname(msg)
|
||||
for(var/mob/M in mob_list)
|
||||
|
||||
@@ -86,7 +86,6 @@
|
||||
|
||||
/obj/item/modular_computer/Initialize()
|
||||
. = ..()
|
||||
listener = new(LISTENER_MODULAR_COMPUTER, src)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
install_default_hardware()
|
||||
if(hard_drive)
|
||||
@@ -104,9 +103,7 @@
|
||||
for(var/obj/item/computer_hardware/CH in src.get_all_components())
|
||||
uninstall_component(null, CH)
|
||||
qdel(CH)
|
||||
listening_objects -= src
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
QDEL_NULL(listener)
|
||||
QDEL_NULL(soundloop)
|
||||
return ..()
|
||||
|
||||
@@ -502,4 +499,4 @@
|
||||
|
||||
/obj/item/modular_computer/on_slotmove(var/mob/living/user, slot)
|
||||
. = ..(user, slot)
|
||||
BITSET(user.hud_updateflag, ID_HUD) //Same reasoning as for IDs
|
||||
BITSET(user.hud_updateflag, ID_HUD) //Same reasoning as for IDs
|
||||
|
||||
@@ -334,5 +334,4 @@
|
||||
return
|
||||
if(P.focused_conv)
|
||||
P.focused_conv.cl_send(P, text, M)
|
||||
if(listening)
|
||||
registered_message = text
|
||||
registered_message = text
|
||||
|
||||
@@ -80,9 +80,6 @@
|
||||
var/obj/item/device/paicard/personal_ai // Personal AI, can control the device via a verb when installed
|
||||
var/obj/item/computer_hardware/flashlight/flashlight
|
||||
|
||||
var/listener/listener //Listener needed for things
|
||||
|
||||
var/listening = FALSE //For listening to mob say.
|
||||
var/registered_message = ""
|
||||
|
||||
charge_failure_message = " does not have a battery installed."
|
||||
|
||||
@@ -172,9 +172,12 @@
|
||||
if(!input || !can_still_topic())
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
program.computer.listening = TRUE
|
||||
var/was_hearing = HAS_TRAIT(program.computer, TRAIT_HEARING_SENSITIVE)
|
||||
if(!was_hearing)
|
||||
program.computer.become_hearing_sensitive()
|
||||
usr.say(input)
|
||||
program.computer.listening = FALSE
|
||||
if(!was_hearing)
|
||||
program.computer.lose_hearing_sensitivity()
|
||||
var/affected_zlevels = GetConnectedZlevels(GET_Z(program.computer))
|
||||
crew_announcement.Announce(program.computer.registered_message, zlevels = affected_zlevels)
|
||||
set_announcement_cooldown(TRUE)
|
||||
|
||||
@@ -80,10 +80,9 @@
|
||||
user.visible_message("[SPAN_BOLD("\The [user]")] taps on [user.get_pronoun("his")] [computer.lexical_name]'s screen.")
|
||||
if(focused_conv == conv)
|
||||
focused_conv = null
|
||||
listening_objects -= computer
|
||||
else
|
||||
focused_conv = conv
|
||||
listening_objects |= computer
|
||||
computer.become_hearing_sensitive()
|
||||
SSvueui.check_uis_for_change(src)
|
||||
if(href_list["join"])
|
||||
var/datum/ntnet_conversation/conv = locate(href_list["join"]["target"])
|
||||
|
||||
@@ -38,12 +38,9 @@
|
||||
data["_PC"] = headerdata
|
||||
. = data
|
||||
|
||||
var/datum/signal/signal
|
||||
signal = telecomms_process_active(user.loc.z)
|
||||
|
||||
VUEUI_SET_CHECK(data["isAI"], isAI(user), ., data)
|
||||
data["crewmembers"] = list()
|
||||
if(signal.data["done"] == 1)
|
||||
if(SSradio.telecomms_ping(computer))
|
||||
for(var/z_level in current_map.map_levels)
|
||||
data["crewmembers"] += crew_repository.health_data(z_level)
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
return
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
|
||||
data["listening"] = host.radio.broadcasting
|
||||
data["frequency"] = format_frequency(host.radio.frequency)
|
||||
data["listening"] = host.radio.get_broadcasting()
|
||||
data["frequency"] = format_frequency(host.radio.get_frequency())
|
||||
VUEUI_SET_CHECK_IFNOTSET(data["radio_range"], host.radio.canhear_range, ., data)
|
||||
host.radio.canhear_range = data["radio_range"]
|
||||
|
||||
|
||||
@@ -37,13 +37,10 @@
|
||||
// Gather data for computer header
|
||||
data["_PC"] = get_header_data(data["_PC"])
|
||||
|
||||
var/datum/signal/signal
|
||||
signal = telecomms_process_active(user.loc.z)
|
||||
|
||||
var/list/mechs = list()
|
||||
var/list/robots = list()
|
||||
|
||||
if(signal.data["done"])
|
||||
if(SSradio.telecomms_ping(computer))
|
||||
for(var/mech in SSvirtualreality.mechs[REMOTE_PRISON_MECH])
|
||||
var/mob/living/heavy_vehicle/M = mech
|
||||
|
||||
|
||||
@@ -16,13 +16,10 @@
|
||||
var/list/data = host.initial_data()
|
||||
|
||||
// This checks if TCOMS is online using the test proc. If it isn't, the suit sensor data isn't loaded.
|
||||
var/datum/signal/signal
|
||||
signal = telecomms_process_active(user.loc.z)
|
||||
data["signal"] = 0
|
||||
if(signal.data["done"] == 1)
|
||||
data["signal"] = SSradio.telecomms_ping(host)
|
||||
if(data["signal"])
|
||||
data["isAI"] = isAI(user)
|
||||
data["crewmembers"] = list()
|
||||
data["signal"] = 1
|
||||
for(var/z_level in current_map.map_levels)
|
||||
data["crewmembers"] += crew_repository.health_data(z_level)
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
. = ..()
|
||||
src.server = server
|
||||
|
||||
/datum/ntsl2_program/tcomm/proc/process_message(var/datum/signal/signal, var/callback = null)
|
||||
/datum/ntsl2_program/tcomm/proc/process_message(var/datum/signal/subspace/vocal/signal, var/callback = null)
|
||||
var/datum/language/signal_language = signal.data["language"]
|
||||
SSntsl2.send_task("tcom/process", list(
|
||||
id = id,
|
||||
@@ -64,7 +64,7 @@
|
||||
source = html_decode(signal.data["name"]),
|
||||
job = html_decode(signal.data["job"]),
|
||||
pass = !(signal.data["reject"]),
|
||||
verb = signal.data["verb"],
|
||||
verb = signal.data["say_verb"],
|
||||
language = signal_language.name,
|
||||
reference = ref(signal)
|
||||
)
|
||||
@@ -82,36 +82,31 @@
|
||||
}
|
||||
]*/
|
||||
|
||||
/datum/ntsl2_program/tcomm/proc/retrieve_messages(var/callback = null)
|
||||
/datum/ntsl2_program/tcomm/proc/retrieve_messages(callback = null)
|
||||
SSntsl2.send_task("tcom/get", callback = CALLBACK(src, .proc/_finish_retrieve_messages, callback))
|
||||
|
||||
/datum/ntsl2_program/tcomm/proc/_finish_retrieve_messages(var/callback = null, var/data)
|
||||
/datum/ntsl2_program/tcomm/proc/_finish_retrieve_messages(callback = null, data)
|
||||
if(data)
|
||||
var/list/signals = json_decode(data)
|
||||
for(var/sl in signals)
|
||||
var/list/S = sl
|
||||
var/datum/signal/sig = null
|
||||
if(S["reference"])
|
||||
sig = locate(S["reference"])
|
||||
if(istype(sig))
|
||||
var/datum/language/L = all_languages[S["language"]]
|
||||
if(!L || !(L.flags & TCOMSSIM))
|
||||
L = all_languages[LANGUAGE_TCB]
|
||||
sig.data["message"] = S["content"]
|
||||
sig.frequency = S["freq"] || PUB_FREQ
|
||||
sig.data["name"] = html_encode(S["source"])
|
||||
sig.data["realname"] = html_encode(S["source"])
|
||||
sig.data["job"] = html_encode(S["job"])
|
||||
sig.data["reject"] = !S["pass"]
|
||||
sig.data["verb"] = html_encode(S["verb"])
|
||||
sig.data["language"] = L
|
||||
sig.data["vmessage"] = html_encode(S["content"])
|
||||
sig.data["vname"] = html_encode(S["source"])
|
||||
sig.data["vmask"] = 0
|
||||
else
|
||||
sig = new()
|
||||
sig.data["server"] = server
|
||||
sig.tcombroadcast(html_encode(S["content"]), S["freq"], html_encode(S["source"]), html_encode(S["job"]), html_encode(S["verb"]), S["language"])
|
||||
var/datum/signal/subspace/vocal/sig = locate(S["reference"])
|
||||
if(!istype(sig))
|
||||
continue
|
||||
|
||||
var/datum/language/L = all_languages[S["language"]]
|
||||
if(!L || !(L.flags & TCOMSSIM))
|
||||
L = all_languages[LANGUAGE_TCB]
|
||||
|
||||
sig.frequency = S["freq"] || PUB_FREQ
|
||||
|
||||
sig.data["name"] = html_encode(S["source"])
|
||||
sig.data["job"] = html_encode(S["job"])
|
||||
sig.data["message"] = S["content"]
|
||||
sig.data["language"] = L
|
||||
sig.data["say_verb"] = html_encode(S["verb"])
|
||||
sig.data["reject"] = !S["pass"]
|
||||
|
||||
var/datum/callback/cb = callback
|
||||
if(istype(cb))
|
||||
cb.InvokeAsync()
|
||||
cb.InvokeAsync()
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
|
||||
world.maxz++
|
||||
forceMove(locate(1,1,world.maxz))
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, world.maxz)
|
||||
|
||||
if(LAZYLEN(possible_themes))
|
||||
var/datum/exoplanet_theme/T = pick(possible_themes)
|
||||
|
||||
@@ -33,6 +33,9 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
|
||||
var/obj/effect/overmap/targeting
|
||||
var/obj/machinery/leviathan_safeguard/levi_safeguard
|
||||
|
||||
var/comms_support = FALSE // Whether ghostroles attached to this overmap object spawn with comms
|
||||
var/comms_name = "shipboard" // Snowflake name to apply to comms equipment ("shipboard radio headset", "intercom (shipboard)", "shipboard telecommunications mainframe"), etc.
|
||||
|
||||
/obj/effect/overmap/visitable/Initialize()
|
||||
. = ..()
|
||||
if(. == INITIALIZE_HINT_QDEL)
|
||||
@@ -65,7 +68,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
|
||||
for(var/obj/machinery/hologram/holopad/H as anything in SSmachinery.all_holopads)
|
||||
if(H.linked == src)
|
||||
H.linked = null
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/T in SSmachinery.all_telecomms)
|
||||
if(T.linked == src)
|
||||
T.linked = null
|
||||
if(entry_points)
|
||||
@@ -83,7 +86,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
|
||||
/obj/effect/overmap/visitable/proc/populate_sector_objects()
|
||||
for(var/obj/machinery/hologram/holopad/H as anything in SSmachinery.all_holopads)
|
||||
H.attempt_hook_up(src)
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/T in SSmachinery.all_telecomms)
|
||||
T.attempt_hook_up(src)
|
||||
|
||||
/obj/effect/overmap/visitable/proc/get_areas()
|
||||
@@ -190,7 +193,8 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
|
||||
testing("Building overmap...")
|
||||
world.maxz++
|
||||
current_map.overmap_z = world.maxz
|
||||
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, world.maxz)
|
||||
|
||||
testing("Putting overmap on [current_map.overmap_z]")
|
||||
var/area/overmap/A = new
|
||||
global.map_overmap = A
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
for(var/i = 0 to multiz)
|
||||
world.maxz++
|
||||
map_z += world.maxz
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, world.maxz)
|
||||
|
||||
var/turf/center_loc = locate(round(world.maxx/2), round(world.maxy/2), world.maxz)
|
||||
landmark = new (center_loc, shuttle)
|
||||
@@ -168,4 +169,4 @@
|
||||
if(SHIP_STATUS_TRANSIT)
|
||||
return "Maneuvering under secondary thrust."
|
||||
if(SHIP_STATUS_OVERMAP)
|
||||
return "In open space."
|
||||
return "In open space."
|
||||
|
||||
@@ -37,6 +37,8 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
|
||||
|
||||
var/list/consoles
|
||||
|
||||
comms_support = TRUE
|
||||
|
||||
/obj/effect/overmap/visitable/ship/Initialize()
|
||||
. = ..()
|
||||
glide_size = world.icon_size
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
if(stability <= 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/power/am_control_unit/proc/toggle_power()
|
||||
/obj/machinery/power/am_control_unit/toggle_power()
|
||||
active = !active
|
||||
if(active)
|
||||
update_use_power(POWER_USE_ACTIVE)
|
||||
|
||||
@@ -142,7 +142,7 @@ var/global/list/rad_collectors = list()
|
||||
add_overlay("on")
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/toggle_power()
|
||||
/obj/machinery/power/rad_collector/toggle_power()
|
||||
active = !active
|
||||
if(active)
|
||||
icon_state = "ca_on"
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/toggle_power(mob/user)
|
||||
/obj/machinery/particle_accelerator/control_box/toggle_power(mob/user)
|
||||
src.active = !src.active
|
||||
investigate_log("turned [active?"<span class='warning'>ON</span>":"<font color='green'>OFF</font>"] by [user ? user.key : "outside forces"]","singulo")
|
||||
message_admins("PA Control Computer turned [active ?"ON":"OFF"] by [key_name(user, TRUE, highlight_special = TRUE)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
|
||||
@@ -88,13 +88,12 @@
|
||||
|
||||
/obj/item/gun/energy/lawgiver/Initialize()
|
||||
. = ..()
|
||||
listening_objects += src
|
||||
become_hearing_sensitive()
|
||||
power_supply = new /obj/item/cell/device/variable(src, 2000)
|
||||
var/datum/firemode/new_mode = firemodes[sel_mode]
|
||||
new_mode.apply_to(src)
|
||||
|
||||
/obj/item/gun/energy/lawgiver/Destroy()
|
||||
listening_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/lawgiver/proc/play_message()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/datum/event/minispasm/start()
|
||||
var/list/victims = list()
|
||||
for(var/obj/item/device/radio/radio in listening_objects)
|
||||
if(radio.on)
|
||||
if(radio.is_on())
|
||||
for(var/mob/living/victim in range(radio.canhear_range, radio.loc))
|
||||
if(isnull(victims[victim]) && victim.stat == CONSCIOUS && !isdeaf(victim))
|
||||
victims[victim] = radio
|
||||
|
||||
@@ -1105,7 +1105,7 @@
|
||||
addtimer(CALLBACK(src, .proc/do_reaction, holder), 50)
|
||||
|
||||
/datum/chemical_reaction/slime/teleportation/proc/do_reaction(var/datum/reagents/holder)
|
||||
for(var/atom/movable/AM in circlerange(get_turf(holder.my_atom),7))
|
||||
for(var/atom/movable/AM in circle_range(get_turf(holder.my_atom),7))
|
||||
if(AM.anchored)
|
||||
continue
|
||||
var/area/A = random_station_area()
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
name = "Hub Mainframe"
|
||||
build_path = /obj/item/circuitboard/telecomms/hub
|
||||
|
||||
/datum/design/circuit/tcom/relay
|
||||
name = "Relay Mainframe"
|
||||
req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 4, TECH_BLUESPACE = 3)
|
||||
build_path = /obj/item/circuitboard/telecomms/relay
|
||||
|
||||
/datum/design/circuit/tcom/broadcaster
|
||||
name = "Subspace Broadcaster"
|
||||
req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4, TECH_BLUESPACE = 2)
|
||||
@@ -36,4 +31,4 @@
|
||||
/datum/design/circuit/tcom/ntnet_relay
|
||||
name = "NTNet Quantum Relay"
|
||||
req_tech = list(TECH_DATA = 4)
|
||||
build_path = /obj/item/circuitboard/ntnet_relay
|
||||
build_path = /obj/item/circuitboard/ntnet_relay
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
#define MESSAGE_SERVER_SPAM_REJECT 1
|
||||
#define MESSAGE_SERVER_DEFAULT_SPAM_LIMIT 10
|
||||
|
||||
var/global/list/obj/machinery/message_server/message_servers = list()
|
||||
|
||||
/datum/data_pda_msg
|
||||
var/recipient = "Unspecified" //name of the person
|
||||
var/sender = "Unspecified" //name of the sender
|
||||
var/message = "Blank" //transferred message
|
||||
|
||||
/datum/data_pda_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "")
|
||||
|
||||
if(param_rec)
|
||||
recipient = param_rec
|
||||
if(param_sender)
|
||||
sender = param_sender
|
||||
if(param_message)
|
||||
message = param_message
|
||||
|
||||
/datum/data_rc_msg
|
||||
var/rec_dpt = "Unspecified" //name of the person
|
||||
var/send_dpt = "Unspecified" //name of the sender
|
||||
var/message = "Blank" //transferred message
|
||||
var/stamp = "Unstamped"
|
||||
var/id_auth = "Unauthenticated"
|
||||
var/priority = "Normal"
|
||||
|
||||
/datum/data_rc_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "",var/param_stamp = "",var/param_id_auth = "",var/param_priority)
|
||||
if(param_rec)
|
||||
rec_dpt = param_rec
|
||||
if(param_sender)
|
||||
send_dpt = param_sender
|
||||
if(param_message)
|
||||
message = param_message
|
||||
if(param_stamp)
|
||||
stamp = param_stamp
|
||||
if(param_id_auth)
|
||||
id_auth = param_id_auth
|
||||
if(param_priority)
|
||||
switch(param_priority)
|
||||
if(1)
|
||||
priority = "Normal"
|
||||
if(2)
|
||||
priority = "High"
|
||||
if(3)
|
||||
priority = "Extreme"
|
||||
else
|
||||
priority = "Undetermined"
|
||||
|
||||
/obj/machinery/message_server
|
||||
icon = 'icons/obj/machines/research.dmi'
|
||||
icon_state = "server"
|
||||
name = "messaging server"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
|
||||
var/list/datum/data_pda_msg/pda_msgs = list()
|
||||
var/list/datum/data_rc_msg/rc_msgs = list()
|
||||
var/active = 1
|
||||
var/decryptkey = "password"
|
||||
|
||||
//Spam filtering stuff
|
||||
var/list/spamfilter = list("You have won", "your prize", "male enhancement", "shitcurity", \
|
||||
"are happy to inform you", "account number", "enter your PIN")
|
||||
//Messages having theese tokens will be rejected by server. Case sensitive
|
||||
var/spamfilter_limit = MESSAGE_SERVER_DEFAULT_SPAM_LIMIT //Maximal amount of tokens
|
||||
|
||||
/obj/machinery/message_server/New()
|
||||
message_servers += src
|
||||
decryptkey = GenerateKey()
|
||||
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/message_server/Destroy()
|
||||
message_servers -= src
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/message_server/proc/GenerateKey()
|
||||
//Feel free to move to Helpers.
|
||||
var/newKey
|
||||
newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le")
|
||||
newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai")
|
||||
newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
|
||||
return newKey
|
||||
|
||||
/obj/machinery/message_server/process()
|
||||
//if(decryptkey == "password")
|
||||
// decryptkey = generateKey()
|
||||
if(active && (stat & (BROKEN|NOPOWER)))
|
||||
active = 0
|
||||
return
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "")
|
||||
var/result
|
||||
for (var/token in spamfilter)
|
||||
if (findtextEx(message,token))
|
||||
message = "<font color=\"red\">[message]</font>" //Rejected messages will be indicated by red color.
|
||||
result = token //Token caused rejection (if there are multiple, last will be chosen)
|
||||
pda_msgs += new/datum/data_pda_msg(recipient,sender,message)
|
||||
return result
|
||||
|
||||
/obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1)
|
||||
rc_msgs += new/datum/data_rc_msg(recipient,sender,message,stamp,id_auth)
|
||||
var/authmsg = "[message]<br>"
|
||||
if (id_auth)
|
||||
authmsg += "[id_auth]<br>"
|
||||
if (stamp)
|
||||
authmsg += "[stamp]<br>"
|
||||
for (var/obj/machinery/requests_console/Console in allConsoles)
|
||||
if (ckey(Console.department) == ckey(recipient))
|
||||
if(Console.inoperable())
|
||||
Console.message_log += "<B>Message lost due to console failure.</B><BR>Please contact [station_name()] system adminsitrator or AI for technical assistance.<BR>"
|
||||
continue
|
||||
if(Console.newmessagepriority < priority)
|
||||
Console.newmessagepriority = priority
|
||||
Console.icon_state = "req_comp[priority]"
|
||||
switch(priority)
|
||||
if(2)
|
||||
if(!Console.silent)
|
||||
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
Console.audible_message(text("[icon2html(Console, viewers(get_turf(Console)))] *The Requests Console beeps: 'PRIORITY Alert in [sender]'"),,5)
|
||||
Console.message_log += "<B><span class='warning'>High Priority message from <A href='?src=\ref[Console];write=[sender]'>[sender]</A></span></B><BR>[authmsg]"
|
||||
for(var/obj/item/modular_computer/pda in Console.alert_pdas)
|
||||
var/pda_message = "A high priority message has arrived!"
|
||||
pda.get_notification(pda_message, 1, "[Console.department] Requests Console")
|
||||
else
|
||||
if(!Console.silent)
|
||||
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
Console.audible_message(text("[icon2html(Console, viewers(get_turf(Console)))] *The Requests Console beeps: 'Message from [sender]'"),,4)
|
||||
Console.message_log += "<B>Message from <A href='?src=\ref[Console];write=[sender]'>[sender]</A></B><BR>[authmsg]"
|
||||
for(var/obj/item/modular_computer/pda in Console.alert_pdas)
|
||||
var/pda_message = "A message has arrived!"
|
||||
pda.get_notification(pda_message, 1, "[Console.department] Requests Console")
|
||||
Console.set_light(2)
|
||||
|
||||
|
||||
/obj/machinery/message_server/attack_hand(user as mob)
|
||||
// to_chat(user, "\blue There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentCom delays.")
|
||||
to_chat(user, "You toggle request console message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]")
|
||||
active = !active
|
||||
update_icon()
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/message_server/attackby(obj/item/O as obj, mob/living/user as mob)
|
||||
if (active && !(stat & (BROKEN|NOPOWER)) && (spamfilter_limit < MESSAGE_SERVER_DEFAULT_SPAM_LIMIT*2) && \
|
||||
istype(O,/obj/item/circuitboard/message_monitor))
|
||||
spamfilter_limit += round(MESSAGE_SERVER_DEFAULT_SPAM_LIMIT / 2)
|
||||
user.drop_from_inventory(O,get_turf(src))
|
||||
qdel(O)
|
||||
to_chat(user, "You install additional memory and processors into message server. Its filtering capabilities been enhanced.")
|
||||
else
|
||||
..(O, user)
|
||||
|
||||
/obj/machinery/message_server/update_icon()
|
||||
if((stat & (BROKEN|NOPOWER)))
|
||||
icon_state = "server-nopower"
|
||||
else if (!active)
|
||||
icon_state = "server-off"
|
||||
else
|
||||
icon_state = "server-on"
|
||||
|
||||
var/obj/machinery/blackbox_recorder/blackbox
|
||||
|
||||
/obj/machinery/blackbox_recorder
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "blackbox"
|
||||
name = "blackbox recorder"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
|
||||
// Note: actual logging has been moved to SSfeedback.
|
||||
|
||||
//Only one can exist in the world!
|
||||
/obj/machinery/blackbox_recorder/Initialize()
|
||||
. = ..()
|
||||
if(blackbox)
|
||||
if(istype(blackbox,/obj/machinery/blackbox_recorder))
|
||||
qdel(src)
|
||||
blackbox = src
|
||||
|
||||
/obj/machinery/blackbox_recorder/Destroy()
|
||||
feedback_set_details("blackbox_destroyed","true")
|
||||
feedback_set("blackbox_destroyed",1)
|
||||
return ..()
|
||||
@@ -27,11 +27,10 @@
|
||||
/obj/item/clothing/mask/gas/poltergeist/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
listening_objects += src
|
||||
become_hearing_sensitive()
|
||||
|
||||
/obj/item/clothing/mask/gas/poltergeist/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
listening_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/mask/gas/poltergeist/process()
|
||||
@@ -67,11 +66,10 @@
|
||||
/obj/item/vampiric/New()
|
||||
..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
listening_objects += src
|
||||
become_hearing_sensitive()
|
||||
|
||||
/obj/item/vampiric/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
listening_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/vampiric/process()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
//scan radios in the world to try and find one
|
||||
var/cur_dist = 999
|
||||
for(var/obj/item/device/radio/beacon/R in world)
|
||||
if(R.z == src.z && R.frequency == src.frequency)
|
||||
if(R.z == src.z && R.get_frequency() == src.frequency)
|
||||
var/check_dist = get_dist(src,R)
|
||||
if(check_dist < cur_dist)
|
||||
cur_dist = check_dist
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/* -- Execute the compiled code -- */
|
||||
|
||||
proc/Run(var/datum/signal/signal)
|
||||
proc/Run(var/datum/signal/subspace/vocal/signal)
|
||||
|
||||
if(!ready)
|
||||
return
|
||||
@@ -107,7 +107,7 @@
|
||||
@param job: The name of the job.
|
||||
@param language: The language used for the broadcast
|
||||
*/
|
||||
interpreter.SetProc("broadcast", "tcombroadcast", signal, list("message", "freq", "source", "job", "language"))
|
||||
interpreter.SetProc("broadcast", "broadcast", signal, list("message", "freq", "source", "job", "language"))
|
||||
|
||||
/*
|
||||
-> Store a value permanently to the server machine (not the actual game hosting machine, the ingame machine)
|
||||
@@ -235,7 +235,3 @@ datum/signal
|
||||
|
||||
else
|
||||
S.memory[address] = value
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
var/obj/machinery/keycard_auth/event_source
|
||||
var/mob/event_triggered_by
|
||||
var/mob/event_confirmed_by
|
||||
var/listening = FALSE
|
||||
var/recorded_message = ""
|
||||
//1 = select event
|
||||
//2 = authenticate
|
||||
@@ -120,7 +119,7 @@
|
||||
recorded_message = ""
|
||||
|
||||
/obj/machinery/keycard_auth/hear_talk(mob/M, text, verb, datum/language/speaking)
|
||||
if(event == "Distress Beacon" && listening && M == event_triggered_by)
|
||||
if(event == "Distress Beacon" && M == event_triggered_by)
|
||||
recorded_message = text
|
||||
|
||||
/obj/machinery/keycard_auth/proc/broadcast_request(var/mob/user)
|
||||
@@ -128,9 +127,9 @@
|
||||
if(event == "Distress Beacon" && user)
|
||||
distress_message = input(user, "Enter a distress message that other vessels will receive.", "Distress Beacon")
|
||||
if(distress_message)
|
||||
listening = TRUE
|
||||
become_hearing_sensitive()
|
||||
user.say(distress_message)
|
||||
listening = FALSE
|
||||
lose_hearing_sensitivity()
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("The beacon refuses to launch without a message!"))
|
||||
reset()
|
||||
|
||||
Reference in New Issue
Block a user