upload files

This commit is contained in:
SandPoot
2021-02-18 14:47:10 -03:00
parent 4e18044450
commit cf2e70671a
182 changed files with 552 additions and 528 deletions
@@ -80,7 +80,7 @@
ref = REF(pda)
)
data_out["message_logs"] += list(data)
return data_out
/obj/machinery/computer/message_monitor/ui_data(mob/user)
@@ -119,7 +119,7 @@
if(!linkedServer)
data_out["selected"] = null
return data_out
data_out["selected"] = list(
name = linkedServer.name,
id = linkedServer.id,
@@ -156,7 +156,7 @@
if(LAZYLEN(machinelist) > 0)
message = "FAILED: Cannot probe when buffer full"
return
for(var/obj/machinery/telecomms/message_server/T in GLOB.telecomms_list)
if(T.network == network)
LAZYADD(machinelist, T)
@@ -206,7 +206,7 @@
message = "NOTICE: Decryption key set."
return
message = incorrectkey
if("hack")
if(!(linkedServer.on && (linkedServer.toggled != FALSE)))
message = noserver
@@ -225,7 +225,7 @@
else if(!(linkedServer.on && (linkedServer.toggled != FALSE)))
message = noserver
return
var/datum/data_ref = locate(params["ref"])
if(istype(data_ref, /datum/data_rc_msg))
LAZYREMOVE(linkedServer.rc_msgs, data_ref)
@@ -258,7 +258,7 @@
else if(!(linkedServer.on && (linkedServer.toggled != FALSE)))
message = noserver
return
if("reset" in params)
ResetMessage()
return
@@ -311,7 +311,7 @@
return
custommessage = M
return
if("recepient" in params)
// Get out list of viable PDAs
var/list/obj/item/pda/sendPDAs = get_viewable_pdas()
@@ -324,8 +324,8 @@
update_static_data(usr)
/obj/machinery/computer/message_monitor/attackby(obj/item/O, mob/living/user, params)
if(istype(O, /obj/item/screwdriver) && CHECK_BITFIELD(obj_flags, EMAGGED))
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
if(O.tool_behaviour == TOOL_SCREWDRIVER && CHECK_BITFIELD(obj_flags, EMAGGED))
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
//Why this though, you should make it emag to a board level. (i wont do it)
to_chat(user, "<span class='warning'>It is too hot to mess with!</span>")
else
@@ -11,7 +11,7 @@
/obj/machinery/telecomms/attackby(obj/item/P, mob/user, params)
var/icon_closed = initial(icon_state)
var/icon_open = "[initial(icon_state)]_o"
if(!on)
icon_closed = "[initial(icon_state)]_off"
icon_open = "[initial(icon_state)]_o_off"
@@ -19,7 +19,7 @@
if(default_deconstruction_screwdriver(user, icon_open, icon_closed, P))
return
// Using a multitool lets you access the receiver's interface
else if(istype(P, /obj/item/multitool))
else if(P.tool_behaviour == TOOL_MULTITOOL)
attack_hand(user)
else if(default_deconstruction_crowbar(P))
@@ -42,7 +42,7 @@
. = list() //cpypaste from the vending bus
.["notice"] = temp
.["multitool"] = FALSE
var/obj/item/multitool/P = get_multitool(user)
var/obj/item/P = get_multitool(user)
if(P)
.["multitool"] = TRUE
.["multitool_buf"] = null //to clean the list!
@@ -113,7 +113,7 @@
if("network" in params)
if(!canAccess(usr))
return
var/newnet = sanitize(sanitize_text(params["network"], network))
var/newnet = sanitize(sanitize_text(params["network"], network))
if(length(newnet) > 15)
temp = "-% Too many characters in new network tag. %-"
return
@@ -122,19 +122,19 @@
temp = "-% New network tag assigned: \"[network]\" %-"
return
if("multitool")
var/obj/item/multitool/P = get_multitool(usr)
var/obj/item/P = get_multitool(usr)
if("Link" in params)
if(!canAccess(usr))
return
if(!istype(P))
if(!P.tool_behaviour == TOOL_MULTITOOL)
temp = "-% Unable to acquire buffer %-"
return
var/obj/machinery/telecomms/T = P.buffer
if(!istype(T) || T == src)
temp = "-% Unable to acquire buffer %-"
return
if(!(src in T.links))
LAZYADD(T.links, src)
@@ -158,7 +158,7 @@
return
P.buffer = src
temp = "% Successfully stored [REF(P.buffer)] [P.buffer.name] in buffer %-"
temp = "% Successfully stored [REF(P.buffer)] [P.buffer] in buffer %-"
if("unlink")
var/obj/machinery/telecomms/T = locate(params["value"])
@@ -167,7 +167,7 @@
if(!istype(T))
temp = "-% Unable to locate machine to unlink from, try again. %-"
return
temp = "-% Removed [REF(T)] [T.name] from linked entities. %-"
if(T.links) //lazyrem makes blank list null, which is good but some might cause runtime ee's
T.links.Remove(src)
@@ -198,7 +198,7 @@
var/x = text2num(params["remove"])
temp = "-% Removed frequency filter [x] %-"
freq_listening.Remove(x)
/obj/machinery/telecomms/relay/ui_act(action, params)
..()
switch(action)
@@ -243,7 +243,11 @@
// Check if the user can use it.
/obj/machinery/telecomms/proc/canInteract(mob/user)
if(hasSiliconAccessInArea(user) || istype(user.get_active_held_item(), /obj/item/multitool))
var/get = user.get_active_held_item()
var/obj/item/I = get
if(I.tool_behaviour == TOOL_MULTITOOL)
return TRUE
if(hasSiliconAccessInArea(user))
return TRUE
return FALSE
// Check if the user is nearby and has a multitool.
@@ -256,14 +260,16 @@
/obj/machinery/telecomms/proc/get_multitool(mob/user)
if(!canInteract(user))
return null
var/obj/item/multitool/P = user.get_active_held_item()
var/obj/item/P = user.get_active_held_item()
// Is the ref not a null? and is it the actual type?
if(istype(P))
if(P.tool_behaviour == TOOL_MULTITOOL)
return P
else if(isAI(user))
var/mob/living/silicon/ai/U = user
P = U.aiMulti
else if(iscyborg(user) && in_range(user, src))
if(istype(user.get_active_held_item(), /obj/item/multitool))
P = user.get_active_held_item()
var/get = user.get_active_held_item()
var/obj/item/I = get
if(I.tool_behaviour == TOOL_MULTITOOL)
I = user.get_active_held_item()
return P
@@ -38,5 +38,5 @@
signal.broadcast()
/obj/machinery/telecomms/allinone/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/multitool))
if(P.tool_behaviour == TOOL_MULTITOOL)
return attack_hand(user)