Merge branch 'master' into instrument-tgui-n-optimization

This commit is contained in:
mochi
2020-09-14 20:04:48 +02:00
566 changed files with 13581 additions and 11293 deletions
@@ -191,7 +191,7 @@
if(CanUse(U))
if(!Use(U))
return
to_chat(U, "<span class='notice'>You replace [target.fitting] with [src].</span>")
to_chat(U, "<span class='notice'>You replace the light [target.fitting] with [src].</span>")
if(target.status != LIGHT_EMPTY)
AddShards(1, U)
@@ -18,13 +18,6 @@
name = "syndicate personal AI device"
faction = list("syndicate")
/obj/item/paicard/relaymove(var/mob/user, var/direction)
if(user.stat || user.stunned)
return
var/obj/item/rig/rig = get_rig()
if(istype(rig))
rig.forced_move(direction, user)
/obj/item/paicard/New()
..()
overlays += "pai-off"
@@ -186,10 +186,10 @@
update_icon()
START_PROCESSING(SSobj, src)
for(var/i, i<= 5, i++)
wires.UpdateCut(i,1)
wires.on_cut(i, 1)
/obj/item/radio/intercom/wirecutter_act(mob/user, obj/item/I)
if(!(buildstage == 3 && b_stat && wires.IsAllCut()))
if(!(buildstage == 3 && b_stat && wires.is_all_cut()))
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
@@ -270,4 +270,4 @@
/obj/item/radio/intercom/locked/prison/New()
..()
wires.CutWireIndex(RADIO_WIRE_TRANSMIT)
wires.cut(WIRE_RADIO_TRANSMIT)
+16 -9
View File
@@ -76,6 +76,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
GLOB.global_radios |= src
/obj/item/radio/Destroy()
SStgui.close_uis(wires)
QDEL_NULL(wires)
if(SSradio)
SSradio.remove_object(src, frequency)
@@ -127,8 +128,8 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
data["freq"] = format_frequency(frequency)
data["rawfreq"] = num2text(frequency)
data["mic_cut"] = (wires.IsIndexCut(RADIO_WIRE_TRANSMIT) || wires.IsIndexCut(RADIO_WIRE_SIGNAL))
data["spk_cut"] = (wires.IsIndexCut(RADIO_WIRE_RECEIVE) || wires.IsIndexCut(RADIO_WIRE_SIGNAL))
data["mic_cut"] = (wires.is_cut(WIRE_RADIO_TRANSMIT) || wires.is_cut(WIRE_RADIO_SIGNAL))
data["spk_cut"] = (wires.is_cut(WIRE_RADIO_RECEIVER) || wires.is_cut(WIRE_RADIO_SIGNAL))
var/list/chanlist = list_channels(user)
if(islist(chanlist) && chanlist.len)
@@ -184,10 +185,10 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
return can_admin_interact()
/obj/item/radio/proc/ToggleBroadcast()
broadcasting = !broadcasting && !(wires.IsIndexCut(RADIO_WIRE_TRANSMIT) || wires.IsIndexCut(RADIO_WIRE_SIGNAL))
broadcasting = !broadcasting && !(wires.is_cut(WIRE_RADIO_TRANSMIT) || wires.is_cut(WIRE_RADIO_SIGNAL))
/obj/item/radio/proc/ToggleReception()
listening = !listening && !(wires.IsIndexCut(RADIO_WIRE_RECEIVE) || wires.IsIndexCut(RADIO_WIRE_SIGNAL))
listening = !listening && !(wires.is_cut(WIRE_RADIO_RECEIVER) || wires.is_cut(WIRE_RADIO_SIGNAL))
/obj/item/radio/Topic(href, href_list)
if(..())
@@ -226,7 +227,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
channels[chan_name] |= FREQ_LISTENING
. = 1
else if(href_list["spec_freq"])
var freq = href_list["spec_freq"]
var/freq = href_list["spec_freq"]
if(has_channel_access(usr, freq))
set_frequency(text2num(freq))
. = 1
@@ -325,7 +326,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
// If we were to send to a channel we don't have, drop it.
return RADIO_CONNECTION_FAIL
/obj/item/radio/talk_into(mob/living/M as mob, list/message_pieces, channel, var/verb = "says")
/obj/item/radio/talk_into(mob/living/M as mob, list/message_pieces, channel, verbage = "says")
if(!on)
return 0 // the device has to be on
// Fix for permacell radios, but kinda eh about actually fixing them.
@@ -334,7 +335,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
// Uncommenting this. To the above comment:
// The permacell radios aren't suppose to be able to transmit, this isn't a bug and this "fix" is just making radio wires useless. -Giacom
if(wires.IsIndexCut(RADIO_WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
if(wires.is_cut(WIRE_RADIO_TRANSMIT)) // The device has to have all its wires and shit intact
return 0
if(!M.IsVocal())
@@ -411,11 +412,16 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
jobname = "Unknown"
voicemask = TRUE
// Copy the message pieces so we can safely edit comms line without affecting the actual line
var/list/message_pieces_copy = list()
for(var/datum/multilingual_say_piece/S in message_pieces)
message_pieces_copy += new /datum/multilingual_say_piece(S.speaking, S.message)
// Make us a message datum!
var/datum/tcomms_message/tcm = new
tcm.sender_name = displayname
tcm.sender_job = jobname
tcm.message_pieces = message_pieces
tcm.message_pieces = message_pieces_copy
tcm.source_level = position.z
tcm.freq = connection.frequency
tcm.vmask = voicemask
@@ -423,6 +429,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
tcm.connection = connection
tcm.vname = M.voice_name
tcm.sender = M
tcm.verbage = verbage
// Now put that through the stuff
var/handled = FALSE
if(connection)
@@ -509,7 +516,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
var/is_listening = TRUE
if(!on)
is_listening = FALSE
if(!wires || wires.IsIndexCut(RADIO_WIRE_RECEIVE))
if(!wires || wires.is_cut(WIRE_RADIO_RECEIVER))
is_listening = FALSE
if(!listening)
is_listening = FALSE
+1 -1
View File
@@ -72,7 +72,7 @@ REAGENT SCANNER
var/turf/U = O.loc
if(U && U.intact)
O.invisibility = 101
O.alpha = 255
O.alpha = 255
for(var/mob/living/M in T.contents)
var/oldalpha = M.alpha
if(M.alpha < 255 && istype(M))