mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
Radiojammer Stationbound Blocking (#10246)
* AI Firedoor Rebalance * Update geeves-because-the-question-is-incorrect.yml * improve the implementation considerably * Update geeves-because-the-question-is-incorrect.yml * put this back * jammer UI
This commit is contained in:
@@ -297,6 +297,8 @@
|
||||
icon_state = "tvalvenopower"
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/digital/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/digital/attack_hand(mob/user as mob)
|
||||
@@ -437,6 +439,8 @@
|
||||
icon_state = "tvalvemnopower"
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/mirrored/digital/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/mirrored/digital/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/freezer/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/freezer/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -87,6 +87,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/heater/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -230,6 +230,8 @@
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/atmospherics/valve/digital/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/valve/digital/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -125,3 +125,7 @@ var/list/DEPT_FREQS_ASSOC = list(
|
||||
#define RADIO_MULEBOT "radio_mulebot"
|
||||
#define RADIO_MAGNETS "radio_magnet"
|
||||
#define RADIO_ARRIVALS "radio_arrvl"
|
||||
|
||||
#define JAMMER_OFF -1
|
||||
#define JAMMER_ALL 1 // affects ALL wireless streams
|
||||
#define JAMMER_SYNTHETIC 2 // affects only synthetic wireless connections (attack_ai)
|
||||
@@ -296,6 +296,8 @@
|
||||
*/
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attack_ai(user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.add_hiddenprint(user)
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
@@ -216,6 +216,8 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/sleeper/attack_ai(var/mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/sleeper/attackby(var/obj/item/I, var/mob/user)
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/ai_slipper/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/ai_slipper/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -448,6 +448,8 @@
|
||||
frequency.post_signal(src, alert_signal)
|
||||
|
||||
/obj/machinery/alarm/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/alarm/attack_hand(mob/user)
|
||||
|
||||
@@ -300,6 +300,8 @@ update_flag
|
||||
SSnanoui.update_uis(src) // Update all NanoUIs attached to src
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -116,6 +116,8 @@
|
||||
return air_contents
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/pump/attack_ai(var/mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.add_hiddenprint(user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
@@ -92,6 +92,8 @@
|
||||
return air_contents
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/attack_ai(var/mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.add_hiddenprint(user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
@@ -310,6 +310,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_ai(var/mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_hand(var/mob/user)
|
||||
|
||||
@@ -129,6 +129,8 @@
|
||||
turn_on()
|
||||
|
||||
/obj/machinery/bot/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/bot/attack_hand(var/mob/living/carbon/human/user)
|
||||
|
||||
@@ -156,6 +156,8 @@
|
||||
|
||||
|
||||
/obj/machinery/bot/mulebot/attack_ai(var/mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
interact(user, 1)
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/button/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/button/attackby(obj/item/W, mob/user as mob)
|
||||
|
||||
@@ -188,6 +188,8 @@
|
||||
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
|
||||
if (!istype(user))
|
||||
return
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if (!src.can_use())
|
||||
return
|
||||
user.eyeobj.setLoc(get_turf(src))
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/clonepod/attack_ai(mob/user as mob)
|
||||
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
add_hiddenprint(user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
break
|
||||
|
||||
/obj/machinery/computer/operating/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
chosen_prize.forceMove(src.loc)
|
||||
|
||||
/obj/machinery/computer/arcade/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/arcade/emp_act(severity)
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
density = 0
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
current_network = network[1]
|
||||
|
||||
/obj/machinery/computer/security/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/security/check_eye(var/mob/user as mob)
|
||||
|
||||
@@ -100,6 +100,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cloning/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/cloning/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -86,6 +86,8 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/guestpass/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -232,6 +232,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/message_monitor/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/message_monitor/proc/BruteForce(mob/user as mob)
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/pod/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/pod/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/robotics/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/robotics/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
alarm_monitor = null
|
||||
|
||||
/obj/machinery/computer/station_alert/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/station_alert/attack_hand(mob/user)
|
||||
|
||||
@@ -45,10 +45,12 @@ var/global/list/frozen_crew = list()
|
||||
storage_name = "Robotic Storage Control"
|
||||
allow_items = FALSE
|
||||
|
||||
/obj/machinery/computer/cryopod/attack_ai()
|
||||
src.attack_hand()
|
||||
/obj/machinery/computer/cryopod/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/cryopod/attack_hand(mob/user = usr)
|
||||
/obj/machinery/computer/cryopod/attack_hand(mob/user)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
active_power_usage = 4
|
||||
|
||||
/obj/machinery/button/remote/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if(wires & 2)
|
||||
return src.attack_hand(user)
|
||||
else
|
||||
|
||||
@@ -255,6 +255,8 @@
|
||||
do_animate("deny")
|
||||
|
||||
/obj/machinery/door/airlock/centcom/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attackby(null, user)
|
||||
|
||||
/obj/machinery/door/airlock/centcom/take_damage()
|
||||
@@ -292,6 +294,8 @@ obj/machinery/door/airlock/glass_centcom/attackby(obj/item/I, mob/user)
|
||||
do_animate("deny")
|
||||
|
||||
/obj/machinery/door/airlock/glass_centcom/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attackby(null, user)
|
||||
|
||||
/obj/machinery/door/airlock/glass_centcom/take_damage()
|
||||
@@ -834,6 +838,8 @@ About the new airlock wires panel:
|
||||
playsound(src.loc, 'sound/machines/hydraulic_short.ogg', 50, 0)
|
||||
|
||||
/obj/machinery/door/airlock/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/door/airlock/ui_interact(mob/user)
|
||||
|
||||
@@ -182,6 +182,8 @@
|
||||
|
||||
//Allows AIs to use door_timer, see human attack_hand function below
|
||||
/obj/machinery/door_timer/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
// Allows humans to use door_timer
|
||||
|
||||
@@ -274,8 +274,10 @@
|
||||
take_damage(tforce)
|
||||
return
|
||||
|
||||
/obj/machinery/door/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
/obj/machinery/door/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/door/attack_hand(mob/user as mob)
|
||||
if(src.operating > 0 || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
if(alarmed && density && lockdown && !allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access denied. Please wait for authorities to arrive, or for the alert to clear.</span>")
|
||||
return
|
||||
else
|
||||
else if(Adjacent(user))
|
||||
user.visible_message("[user] [density ? "open" : "close"]s \an [src].",\
|
||||
"You [density ? "open" : "close"] \the [src].",\
|
||||
"You hear a beep, and a door opening.")
|
||||
|
||||
@@ -33,6 +33,8 @@ obj/machinery/embedded_controller/radio/Destroy()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/embedded_controller/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if(checks_for_access)
|
||||
if(!allowed(user))
|
||||
to_chat(user, SPAN_WARNING("Access Denied."))
|
||||
|
||||
@@ -78,9 +78,6 @@
|
||||
src.alarm() // added check of detector status here
|
||||
return
|
||||
|
||||
/obj/machinery/firealarm/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/firealarm/bullet_act()
|
||||
return src.alarm()
|
||||
|
||||
|
||||
@@ -59,7 +59,9 @@
|
||||
user.visible_message("<span class='warning'>[user] has connected the [src]'s flashbulb!</span>", "<span class='warning'>You connect the [src]'s flashbulb!</span>")
|
||||
|
||||
//Let the AI trigger them directly.
|
||||
/obj/machinery/flasher/attack_ai()
|
||||
/obj/machinery/flasher/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if (src.anchored)
|
||||
return src.flash()
|
||||
else
|
||||
|
||||
@@ -183,6 +183,9 @@ Possible to do for anyone motivated enough:
|
||||
/obj/machinery/hologram/holopad/attack_ai(mob/living/silicon/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
attack_hand(user)
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/igniter/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/igniter/attack_hand(mob/user as mob)
|
||||
@@ -108,11 +110,11 @@
|
||||
user.visible_message("<span class='warning'>[user] has reconnected the [src]!</span>", "<span class='warning'>You fix the connection to the [src].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/sparker/attack_ai()
|
||||
/obj/machinery/sparker/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if (anchored)
|
||||
return ignite()
|
||||
else
|
||||
return
|
||||
|
||||
/obj/machinery/sparker/proc/ignite()
|
||||
if (!powered())
|
||||
|
||||
@@ -148,6 +148,8 @@ datum/track/New(var/title_name, var/audio)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/media/jukebox/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/media/jukebox/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -243,6 +243,8 @@ Class Procs:
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if(isrobot(user))
|
||||
// For some reason attack_robot doesn't work
|
||||
// This is to stop robots from using cameras to remotely control machines.
|
||||
|
||||
@@ -235,6 +235,8 @@
|
||||
|
||||
|
||||
/obj/machinery/magnetic_controller/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/magnetic_controller/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -126,6 +126,8 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do
|
||||
return
|
||||
|
||||
/obj/machinery/navbeacon/attack_ai(var/mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
interact(user, 1)
|
||||
|
||||
/obj/machinery/navbeacon/attack_hand(var/mob/user)
|
||||
|
||||
@@ -147,6 +147,8 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
return
|
||||
|
||||
/obj/machinery/newscaster/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/newscaster/attack_hand(mob/user as mob) //########### THE MAIN BEEF IS HERE! And in the proc below this...############
|
||||
@@ -759,9 +761,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
to_chat(user, "<span class='notice'>This does nothing.</span>")
|
||||
src.update_icon()
|
||||
|
||||
/obj/machinery/newscaster/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user) //or maybe it'll have some special functions? No idea.
|
||||
|
||||
/datum/news_photo
|
||||
var/is_synth = 0
|
||||
var/obj/item/photo/photo = null
|
||||
|
||||
@@ -196,6 +196,8 @@
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/porta_turret/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/porta_turret/attack_hand(mob/user)
|
||||
|
||||
@@ -76,6 +76,8 @@ var/list/ai_status_emotions = list(
|
||||
return ..()
|
||||
|
||||
/obj/machinery/ai_status_display/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
var/emote = get_ai_emotion(user)
|
||||
src.emotion = emote
|
||||
src.update()
|
||||
|
||||
@@ -185,6 +185,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/suit_cycler/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/suit_cycler/attackby(obj/item/I, mob/user)
|
||||
|
||||
@@ -542,4 +542,6 @@
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
@@ -103,6 +103,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/telecomms/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/telecomms/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -77,7 +77,9 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/station/attack_ai()
|
||||
/obj/machinery/teleport/station/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/computer/teleporter/attack_hand(user as mob)
|
||||
@@ -235,9 +237,6 @@
|
||||
/obj/machinery/teleport/station/attackby(var/obj/item/W)
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/teleport/station/attack_ai()
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/teleport/station/attack_hand()
|
||||
if(engaged)
|
||||
src.disengage()
|
||||
|
||||
@@ -114,6 +114,8 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/turretid/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if(isLocked(user))
|
||||
return
|
||||
|
||||
|
||||
@@ -504,6 +504,8 @@
|
||||
SSeconomy.add_transaction_log(vendor_account,T)
|
||||
|
||||
/obj/machinery/vending/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/vending/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -108,6 +108,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
INVOKE_ASYNC(src, /obj/item/.proc/attack_self, user)
|
||||
|
||||
|
||||
@@ -1,59 +1,82 @@
|
||||
//Global list for housing active radiojammers:
|
||||
var/list/active_radio_jammers = list()
|
||||
|
||||
proc/within_jamming_range(var/atom/test) // tests if an object is near a radio jammer
|
||||
if (active_radio_jammers && active_radio_jammers.len)
|
||||
for (var/obj/item/device/radiojammer/Jammer in active_radio_jammers)
|
||||
if (get_dist(test, Jammer) <= Jammer.radius)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
// tests if an object is near a radio jammer
|
||||
// if need_all_blocked is false, the jammer only needs to be on JAMMER_SYNTHETIC to work
|
||||
/proc/within_jamming_range(var/atom/test, var/need_all_blocked = TRUE)
|
||||
if(length(active_radio_jammers))
|
||||
var/turf/our_turf = get_turf(test)
|
||||
for(var/obj/item/device/radiojammer/J in active_radio_jammers)
|
||||
var/turf/jammer_turf = get_turf(J)
|
||||
if(our_turf.z != jammer_turf.z)
|
||||
continue
|
||||
if(get_dist(our_turf, jammer_turf) <= J.radius)
|
||||
if(need_all_blocked && J.active != JAMMER_ALL)
|
||||
continue
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/device/radiojammer
|
||||
name = "radio jammer"
|
||||
desc = "A small, inconspicious looking item with an 'ON/OFF' toggle."
|
||||
desc_info = "Use in-hand to activate or deactivate, alt-click while adjacent or in-hand to toggle whether it blocks all wireless signals, or just stationbound wireless interfacing."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "shield0"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
var/active = 0
|
||||
var/active = JAMMER_OFF
|
||||
var/radius = 7
|
||||
var/icon_state_active = "shield1"
|
||||
var/icon_state_inactive = "shield0"
|
||||
|
||||
/obj/item/device/radiojammer/active
|
||||
active = JAMMER_ALL
|
||||
|
||||
/obj/item/device/radiojammer/New()
|
||||
..()
|
||||
update()
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/radiojammer/Destroy()
|
||||
if (active)
|
||||
active_radio_jammers -= src
|
||||
active_radio_jammers -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radiojammer/attack_self(mob/user)
|
||||
var/datum/vueui/ui = SSvueui.get_open_ui(user, src)
|
||||
if(!ui)
|
||||
ui = new(user, src, "devices-jammer", 200, 200, capitalize_first_letters(name))
|
||||
ui.open()
|
||||
|
||||
/obj/item/device/radiojammer/attack_self()
|
||||
toggle()
|
||||
/obj/item/device/radiojammer/vueui_data_change(var/list/data, var/mob/user, var/datum/vueui/ui)
|
||||
if(!data)
|
||||
data = list()
|
||||
|
||||
VUEUI_SET_CHECK(data["active"], active, ., data)
|
||||
|
||||
/obj/item/device/radiojammer/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if(href_list["set_active"])
|
||||
active = text2num(href_list["set_active"])
|
||||
update_icon()
|
||||
|
||||
var/datum/vueui/ui = SSvueui.get_open_ui(usr, src)
|
||||
ui.check_for_change()
|
||||
|
||||
/obj/item/device/radiojammer/emp_act()
|
||||
toggle()
|
||||
|
||||
|
||||
/obj/item/device/radiojammer/proc/toggle()
|
||||
if (active)
|
||||
to_chat(usr, "<span class='notice'>You deactivate \the [src].</span>")
|
||||
/obj/item/device/radiojammer/proc/toggle(var/mob/user)
|
||||
if(active)
|
||||
if(user)
|
||||
to_chat(user, SPAN_NOTICE("You deactivate \the [src]."))
|
||||
active = JAMMER_OFF
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You activate \the [src].</span>")
|
||||
set_active(!active)
|
||||
if(user)
|
||||
to_chat(user, SPAN_NOTICE("You activate \the [src]."))
|
||||
active = JAMMER_ALL
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/radiojammer/proc/set_active(var/new_value)
|
||||
active = new_value
|
||||
update()
|
||||
|
||||
|
||||
/obj/item/device/radiojammer/proc/update()
|
||||
if (active)
|
||||
/obj/item/device/radiojammer/update_icon()
|
||||
if(active > 0)
|
||||
active_radio_jammers += src
|
||||
icon_state = icon_state_active
|
||||
else
|
||||
@@ -64,6 +87,7 @@ proc/within_jamming_range(var/atom/test) // tests if an object is near a radio j
|
||||
/obj/item/device/radiojammer/improvised
|
||||
name = "improvised radio jammer"
|
||||
desc = "An awkward bundle of wires, batteries, and radio transmitters."
|
||||
desc_info = "Use in-hand to activate or deactivate."
|
||||
var/obj/item/cell/cell
|
||||
var/obj/item/device/assembly_holder/assembly_holder
|
||||
// 10 seconds of operation on a standard cell. 200 (roughly 3 minutes) on a super cap.
|
||||
@@ -98,8 +122,9 @@ proc/within_jamming_range(var/atom/test) // tests if an object is near a radio j
|
||||
var/delta = (current - last_updated) / 10.0 // delta in seconds
|
||||
last_updated = current
|
||||
if (!cell.use(delta * power_drain_per_second))
|
||||
set_active(0)
|
||||
active = JAMMER_OFF
|
||||
cell.charge = 0 // drain the last of the battery
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/radiojammer/improvised/attackby(obj/item/W as obj, mob/user as mob)
|
||||
@@ -109,21 +134,25 @@ proc/within_jamming_range(var/atom/test) // tests if an object is near a radio j
|
||||
user.put_in_hands(cell)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/radiojammer/improvised/set_active(var/new_value)
|
||||
if (new_value == 1)
|
||||
if (!cell || !cell.charge)
|
||||
/obj/item/device/radiojammer/improvised/toggle(mob/user)
|
||||
if(!active)
|
||||
if(!cell)
|
||||
if(user)
|
||||
to_chat(user, SPAN_WARNING("\The [src] has no cell!"))
|
||||
return
|
||||
if(!cell.charge)
|
||||
if(user)
|
||||
to_chat(user, SPAN_WARNING("\The [src]'s battery is completely empty!"))
|
||||
return
|
||||
return ..()
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/device/radiojammer/improvised/update()
|
||||
if (active)
|
||||
/obj/item/device/radiojammer/improvised/update_icon()
|
||||
if(active > 0)
|
||||
active_radio_jammers += src
|
||||
icon_state = icon_state_active
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
last_updated = world.time
|
||||
else
|
||||
active_radio_jammers -= src
|
||||
icon_state = initial(icon_state)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
@@ -53,6 +53,8 @@ THAT STUPID GAME KIT
|
||||
src.data = dat
|
||||
|
||||
/obj/item/game_kit/attack_ai(mob/user as mob, unused, flag)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user, unused, flag)
|
||||
|
||||
/obj/item/game_kit/attack_hand(mob/user as mob, unused, flag)
|
||||
|
||||
@@ -78,6 +78,12 @@
|
||||
/obj/proc/CouldNotUseTopic(var/mob/user)
|
||||
// Nada
|
||||
|
||||
/obj/proc/ai_can_interact(var/mob/user)
|
||||
if(!Adjacent(user) && within_jamming_range(src, FALSE)) // if not adjacent to it, it uses wireless signal
|
||||
to_chat(user, SPAN_WARNING("Something in the area of \the [src] is blocking the remote signal!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/proc/is_used_on(obj/O, mob/user)
|
||||
|
||||
/obj/assume_air(datum/gas_mixture/giver)
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_ai(var/mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
toggle_lock(user)
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_hand(var/mob/user)
|
||||
|
||||
@@ -161,9 +161,8 @@
|
||||
/obj/structure/inflatable/door/attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
else if(isrobot(user) && Adjacent(user)) //but cyborgs can
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/inflatable/door/attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
@@ -72,9 +72,8 @@
|
||||
/obj/structure/simple_door/attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
else if(isrobot(user) && Adjacent(user)) //but cyborgs can
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/simple_door/attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
@@ -542,6 +542,8 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/chakraconsole/attack_ai(user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chakraconsole/attack_hand(user as mob)
|
||||
|
||||
@@ -367,6 +367,8 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -124,6 +124,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/dnaforensics/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/dnaforensics/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
linkedholodeck = locate(linkedholodeck_area)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
finished_task()
|
||||
|
||||
/obj/machinery/botany/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/botany/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -188,6 +188,8 @@
|
||||
set_light(4, 1, LIGHT_COLOR_LAVA)
|
||||
|
||||
/obj/machinery/mining/drill/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/mining/drill/attackby(obj/item/O, mob/user)
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
..()
|
||||
|
||||
/mob/living/bot/attack_ai(mob/user)
|
||||
if(within_jamming_range(src, FALSE))
|
||||
to_chat(user, SPAN_WARNING("Something in the area of \the [src] is blocking the remote signal!"))
|
||||
return FALSE
|
||||
if(pAI)
|
||||
to_chat(user, SPAN_WARNING("\The [src] contains a pAI and cannot be remotely controlled."))
|
||||
return
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
var/obj/machinery/drone_fabricator/dronefab
|
||||
|
||||
/obj/machinery/computer/drone_control/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/drone_control/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -182,6 +182,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/attack_ai(var/mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if(anchored)
|
||||
return attack_self(user)
|
||||
return ..()
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
|
||||
|
||||
/obj/machinery/photocopier/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/am_engine/attack_ai(var/mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.add_hiddenprint(user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
to_chat(user, "<span class='bad'>It seems to be offline.</span>")
|
||||
|
||||
/obj/machinery/power/breakerbox/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if(update_locked)
|
||||
to_chat(user, "<span class='bad'>System locked. Please try again later.</span>")
|
||||
return
|
||||
|
||||
@@ -143,6 +143,8 @@
|
||||
add_avail(effective_gen)
|
||||
|
||||
/obj/machinery/power/generator/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/power/generator/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
|
||||
|
||||
/obj/machinery/power/generator_type2/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
interact(user)
|
||||
|
||||
|
||||
@@ -424,6 +424,8 @@
|
||||
// ai attack - make lights flicker, because why not
|
||||
|
||||
/obj/machinery/light/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.flicker(1)
|
||||
return
|
||||
|
||||
|
||||
@@ -319,6 +319,8 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/vueui_data_change(var/list/data, var/mob/user, var/datum/vueui/ui)
|
||||
|
||||
@@ -297,6 +297,8 @@
|
||||
|
||||
|
||||
/obj/machinery/power/smes/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
add_hiddenprint(user)
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
@@ -103,7 +103,9 @@
|
||||
// Proc: attack_ai()
|
||||
// Parameters: None
|
||||
// Description: AI requires the RCON wire to be intact to operate the SMES.
|
||||
/obj/machinery/power/smes/buildable/attack_ai()
|
||||
/obj/machinery/power/smes/buildable/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
if(RCon)
|
||||
..()
|
||||
else // RCON wire cut
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
addtimer(CALLBACK(src, .proc/deploy), 100)
|
||||
|
||||
/obj/structure/droppod_door/attack_ai(var/mob/user)
|
||||
if(!user.Adjacent(src))
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
|
||||
@@ -218,6 +218,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
@@ -381,6 +383,8 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/reagentgrinder/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -176,6 +176,8 @@
|
||||
return 1 // update UIs attached to this object
|
||||
|
||||
/obj/machinery/chemical_dispenser/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/chemical_dispenser/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -294,6 +294,8 @@
|
||||
|
||||
// ai as human but can't flush
|
||||
/obj/machinery/disposal/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
interact(user, 1)
|
||||
|
||||
// human interact with machine
|
||||
|
||||
@@ -86,6 +86,8 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/shield_gen/attack_ai(user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/shield_gen/attack_hand(mob/user)
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/shuttle_control/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/shuttle_control/attack_ghost(var/mob/abstract/observer/user)
|
||||
|
||||
@@ -340,6 +340,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/power/supermatter/attack_ai(mob/user as mob)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/power/supermatter/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/telescience/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/telescience/attack_hand(mob/user)
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
return ..(mapload)
|
||||
|
||||
/obj/structure/lift/attack_ai(var/mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/lift/attack_generic(var/mob/user)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Radiojammers now also block wireless access to various objects stationbounds (AIs, Cyborgs) can access, such as doors, firedoors, and so forth. Being adjacent to the object will negate this."
|
||||
- rscadd: "Non-improvised radiojammers can now be configured to only block stationbound signals. When set to all, it stops everything it did before, as well as stationbounds."
|
||||
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div>
|
||||
<h3>Jammer Level:</h3>
|
||||
<div>
|
||||
<vui-button :class="{selected: active == 1}" :params="{ set_active: 1 }">Block All</vui-button>
|
||||
</div>
|
||||
<div>
|
||||
<vui-button :class="{selected: active == 2}" :params="{ set_active: 2 }">Block Synthetics</vui-button>
|
||||
</div>
|
||||
<div>
|
||||
<vui-button :class="{selected: active == -1}" :params="{ set_active: -1 }">Block Nothing</vui-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return this.$root.$data.state;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user