mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
conflict resolution
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
||||
*
|
||||
*/
|
||||
|
||||
/obj/item/device/debugger
|
||||
icon = 'icons/obj/hacktool.dmi'
|
||||
name = "debugger"
|
||||
desc = "Used to debug electronic equipment."
|
||||
icon_state = "hacktool-g"
|
||||
flags = CONDUCT
|
||||
force = 5.0
|
||||
w_class = 2
|
||||
throwforce = 5.0
|
||||
throw_range = 15
|
||||
throw_speed = 3
|
||||
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
|
||||
|
||||
/obj/item/device/debugger/is_used_on(obj/O, mob/user)
|
||||
if(istype(O, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = O
|
||||
if(A.emagged || A.malfhack)
|
||||
to_chat(user, "\red There is a software error with the device.")
|
||||
else
|
||||
to_chat(user, "\blue The device's software appears to be fine.")
|
||||
return 1
|
||||
if(istype(O, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = O
|
||||
if(D.operating == -1)
|
||||
to_chat(user, "\red There is a software error with the device.")
|
||||
else
|
||||
to_chat(user, "\blue The device's software appears to be fine.")
|
||||
return 1
|
||||
else if(istype(O, /obj/machinery))
|
||||
var/obj/machinery/A = O
|
||||
if(A.emagged)
|
||||
to_chat(user, "\red There is a software error with the device.")
|
||||
else
|
||||
to_chat(user, "\blue The device's software appears to be fine.")
|
||||
return 1
|
||||
@@ -128,8 +128,8 @@
|
||||
to_chat(S, "<span class='warning'>Your sensors were overloaded by a laser!</span>")
|
||||
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
|
||||
|
||||
S.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='orange'>Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
|
||||
S.create_attack_log("<font color='orange'>Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])</font>")
|
||||
user.create_attack_log("<font color='orange'>Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
|
||||
log_attack("<font color='orange'>[user.name] ([user.ckey]) Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
|
||||
else
|
||||
outmsg = "<span class='notice'>You fail to overload [S] by shining [src] at their sensors.</span>"
|
||||
@@ -142,7 +142,7 @@
|
||||
outmsg = "<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>"
|
||||
|
||||
log_admin("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer")
|
||||
user.attack_log += text("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer")
|
||||
user.create_attack_log("[user.name] ([user.ckey]) EMPd a camera with a laser pointer")
|
||||
else
|
||||
outmsg = "<span class='info'>You missed the lens of [C] with [src].</span>"
|
||||
|
||||
|
||||
@@ -63,18 +63,16 @@
|
||||
return RADIO_CONNECTION_FAIL
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
|
||||
if(aiOverride)
|
||||
return ..(freq, level)
|
||||
|
||||
/obj/item/device/radio/headset/is_listening()
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(H.l_ear == src || H.r_ear == src)
|
||||
return ..(freq, level)
|
||||
else if(isanimal(loc))
|
||||
// frankly, all the ones with inventory are small enough to not warrant snowflaking the slot check somehow
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
return ..()
|
||||
else if(isanimal(loc) || isAI(loc))
|
||||
return ..()
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/device/radio/headset/alt
|
||||
name = "bowman headset"
|
||||
@@ -304,10 +302,10 @@
|
||||
var/myAi = null // Atlantis: Reference back to the AI which has this radio.
|
||||
var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
|
||||
|
||||
/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level)
|
||||
/obj/item/device/radio/headset/heads/ai_integrated/is_listening()
|
||||
if(disabledAi)
|
||||
return -1 //Transciever Disabled.
|
||||
return ..(freq, level, 1)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -120,15 +120,13 @@
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||
if(!on)
|
||||
if(!is_listening())
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
// TODO: Integrate radio with the space manager
|
||||
if(isnull(position) || !(position.z in level))
|
||||
return -1
|
||||
if(!src.listening)
|
||||
return -1
|
||||
if(freq in ANTAG_FREQS)
|
||||
if(!(src.syndie))
|
||||
return -1//Prevents broadcast of messages over devices lacking the encryption
|
||||
|
||||
@@ -71,6 +71,7 @@ var/global/list/default_medbay_channels = list(
|
||||
initialize()
|
||||
|
||||
internal_channels = default_internal_channels.Copy()
|
||||
global_radios |= src
|
||||
|
||||
/obj/item/device/radio/Destroy()
|
||||
qdel(wires)
|
||||
@@ -80,6 +81,7 @@ var/global/list/default_medbay_channels = list(
|
||||
for(var/ch_name in channels)
|
||||
radio_controller.remove_object(src, radiochannels[ch_name])
|
||||
patch_link = null
|
||||
global_radios -= src
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -532,19 +534,15 @@ var/global/list/default_medbay_channels = list(
|
||||
// what the range is in which mobs will hear the radio
|
||||
// returns: -1 if can't receive, range otherwise
|
||||
|
||||
if(!wires || wires.IsIndexCut(WIRE_RECEIVE))
|
||||
return -1
|
||||
if(!listening)
|
||||
if(!is_listening())
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(!position || !(position.z in level))
|
||||
return -1
|
||||
if(freq in ANTAG_FREQS)
|
||||
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
if(!(syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
return -1
|
||||
if(!on)
|
||||
return -1
|
||||
if(!freq) //recieved on main frequency
|
||||
if(!listening)
|
||||
return -1
|
||||
@@ -561,11 +559,26 @@ var/global/list/default_medbay_channels = list(
|
||||
return canhear_range
|
||||
|
||||
/obj/item/device/radio/proc/send_hear(freq, level)
|
||||
|
||||
var/range = receive_range(freq, level)
|
||||
if(range > -1)
|
||||
return get_mobs_in_view(canhear_range, src)
|
||||
|
||||
/obj/item/device/radio/proc/is_listening()
|
||||
var/is_listening = TRUE
|
||||
if(!on)
|
||||
is_listening = FALSE
|
||||
if(!wires || wires.IsIndexCut(WIRE_RECEIVE))
|
||||
is_listening = FALSE
|
||||
if(!listening)
|
||||
is_listening = FALSE
|
||||
|
||||
return is_listening
|
||||
|
||||
/obj/item/device/radio/proc/send_announcement()
|
||||
if(is_listening())
|
||||
return get_mobs_in_view(canhear_range, src)
|
||||
|
||||
return null
|
||||
|
||||
/obj/item/device/radio/examine(mob/user, var/distance = -1)
|
||||
. = ..(user, distance)
|
||||
|
||||
Reference in New Issue
Block a user