mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-03 21:00:19 +00:00
# Conflicts: # code/__defines/holomap.dm # code/__defines/mobs.dm # code/_helpers/icons.dm # code/_helpers/unsorted.dm # code/_onclick/hud/hud.dm # code/_onclick/item_attack.dm # code/controllers/Processes/supply.dm # code/controllers/subsystems/planets.dm # code/datums/supplypacks/munitions.dm # code/datums/supplypacks/science.dm # code/datums/supplypacks/security.dm # code/datums/supplypacks/supply.dm # code/game/area/Space Station 13 areas.dm # code/game/atoms_movable.dm # code/game/machinery/autolathe.dm # code/game/machinery/doors/door.dm # code/game/machinery/jukebox.dm # code/game/machinery/recharger.dm # code/game/machinery/vending.dm # code/game/mecha/equipment/tools/medical_tools.dm # code/game/mecha/equipment/weapons/weapons.dm # code/game/objects/items/devices/PDA/PDA.dm # code/game/objects/items/devices/megaphone.dm # code/game/objects/items/poi_items.dm # code/game/objects/items/weapons/implants/implantlanguage.dm # code/game/objects/items/weapons/storage/firstaid.dm # code/game/objects/items/weapons/tools/weldingtool.dm # code/game/objects/structures/flora/trees.dm # code/game/objects/structures/plasticflaps.dm # code/game/supplyshuttle.dm # code/game/turfs/simulated/wall_attacks.dm # code/modules/admin/admin_verbs.dm # code/modules/assembly/infrared.dm # code/modules/client/client procs.dm # code/modules/client/preference_setup/loadout/loadout_utility.dm # code/modules/client/preferences.dm # code/modules/clothing/suits/miscellaneous.dm # code/modules/holomap/holomap_datum.dm # code/modules/holomap/station_holomap.dm # code/modules/integrated_electronics/core/printer.dm # code/modules/mining/machine_processing.dm # code/modules/mob/living/carbon/human/human_defense.dm # code/modules/mob/living/carbon/human/species/virtual_reality/avatar.dm # code/modules/mob/living/death.dm # code/modules/mob/living/silicon/ai/ai.dm # code/modules/mob/living/silicon/pai/pai.dm # code/modules/mob/living/silicon/robot/robot.dm # code/modules/mob/living/simple_animal/animals/parrot.dm # code/modules/mob/mob_movement.dm # code/modules/organs/organ_external.dm # code/modules/organs/organ_icon.dm # code/modules/organs/subtypes/standard.dm # code/modules/planet/weather.dm # code/modules/power/cable.dm # code/modules/power/fusion/core/core_control.dm # code/modules/power/fusion/fuel_assembly/fuel_control.dm # code/modules/power/fusion/gyrotron/gyrotron_control.dm # code/modules/projectiles/gun.dm # code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm # config/names/first_name_skrell.txt # config/names/last_name_skrell.txt # icons/mob/head.dmi # icons/mob/robots.dmi # icons/mob/species/tajaran/helmet.dmi # icons/obj/ammo.dmi # icons/obj/gun.dmi # icons/obj/mining.dmi # icons/obj/projectiles.dmi # icons/obj/rig_modules.dmi # icons/obj/surgery.dmi # icons/turf/walls.dmi # maps/southern_cross/southern_cross-1.dmm # maps/southern_cross/southern_cross-3.dmm # maps/southern_cross/southern_cross-6.dmm # maps/southern_cross/southern_cross-8.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1A.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1B.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1C.dmm # maps/submaps/surface_submaps/mountains/crashedcontainmentshuttle.dmm # maps/submaps/surface_submaps/mountains/deadspy.dmm # maps/submaps/surface_submaps/mountains/mountains_areas.dm # maps/submaps/surface_submaps/plains/Thiefc.dmm # maps/~map_system/maps.dm # vorestation.dme
211 lines
5.5 KiB
Plaintext
211 lines
5.5 KiB
Plaintext
/obj/item/device/radio/intercom
|
|
name = "station intercom (General)"
|
|
desc = "Talk through this."
|
|
icon = 'icons/obj/radio_vr.dmi' //VOREStation Edit - New Icon
|
|
icon_state = "intercom"
|
|
plane = TURF_PLANE
|
|
layer = ABOVE_TURF_LAYER
|
|
anchored = 1
|
|
w_class = ITEMSIZE_LARGE
|
|
canhear_range = 2
|
|
flags = CONDUCT | NOBLOODY
|
|
var/circuit = /obj/item/weapon/circuitboard/intercom
|
|
var/number = 0
|
|
var/last_tick //used to delay the powercheck
|
|
var/wiresexposed = 0
|
|
|
|
/obj/item/device/radio/intercom/custom
|
|
name = "station intercom (Custom)"
|
|
broadcasting = 0
|
|
listening = 0
|
|
|
|
/obj/item/device/radio/intercom/interrogation
|
|
name = "station intercom (Interrogation)"
|
|
frequency = 1449
|
|
|
|
/obj/item/device/radio/intercom/private
|
|
name = "station intercom (Private)"
|
|
frequency = AI_FREQ
|
|
|
|
/obj/item/device/radio/intercom/specops
|
|
name = "\improper Spec Ops intercom"
|
|
frequency = ERT_FREQ
|
|
subspace_transmission = 1
|
|
centComm = 1
|
|
|
|
/obj/item/device/radio/intercom/department
|
|
canhear_range = 5
|
|
broadcasting = 0
|
|
listening = 1
|
|
|
|
/obj/item/device/radio/intercom/department/medbay
|
|
name = "station intercom (Medbay)"
|
|
icon_state = "medintercom"
|
|
frequency = MED_I_FREQ
|
|
|
|
/obj/item/device/radio/intercom/department/security
|
|
name = "station intercom (Security)"
|
|
icon_state = "secintercom"
|
|
frequency = SEC_I_FREQ
|
|
|
|
/obj/item/device/radio/intercom/entertainment
|
|
name = "entertainment intercom"
|
|
frequency = ENT_FREQ
|
|
|
|
/obj/item/device/radio/intercom/omni
|
|
name = "global announcer"
|
|
/obj/item/device/radio/intercom/omni/initialize()
|
|
channels = radiochannels.Copy()
|
|
return ..()
|
|
|
|
/obj/item/device/radio/intercom/New()
|
|
..()
|
|
processing_objects += src
|
|
circuit = new circuit(src)
|
|
|
|
/obj/item/device/radio/intercom/department/medbay/New()
|
|
..()
|
|
internal_channels = default_medbay_channels.Copy()
|
|
|
|
/obj/item/device/radio/intercom/department/security/New()
|
|
..()
|
|
internal_channels = list(
|
|
num2text(PUB_FREQ) = list(),
|
|
num2text(SEC_I_FREQ) = list(access_security)
|
|
)
|
|
|
|
/obj/item/device/radio/intercom/entertainment/New()
|
|
..()
|
|
internal_channels = list(
|
|
num2text(PUB_FREQ) = list(),
|
|
num2text(ENT_FREQ) = list()
|
|
)
|
|
|
|
/obj/item/device/radio/intercom/syndicate
|
|
name = "illicit intercom"
|
|
desc = "Talk through this. Evilly"
|
|
frequency = SYND_FREQ
|
|
subspace_transmission = 1
|
|
syndie = 1
|
|
|
|
/obj/item/device/radio/intercom/syndicate/New()
|
|
..()
|
|
internal_channels[num2text(SYND_FREQ)] = list(access_syndicate)
|
|
|
|
/obj/item/device/radio/intercom/raider
|
|
name = "illicit intercom"
|
|
desc = "Pirate radio, but not in the usual sense of the word."
|
|
frequency = RAID_FREQ
|
|
subspace_transmission = 1
|
|
syndie = 1
|
|
|
|
/obj/item/device/radio/intercom/raider/New()
|
|
..()
|
|
internal_channels[num2text(RAID_FREQ)] = list(access_syndicate)
|
|
|
|
/obj/item/device/radio/intercom/Destroy()
|
|
processing_objects -= src
|
|
return ..()
|
|
|
|
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
|
|
src.add_fingerprint(user)
|
|
spawn (0)
|
|
attack_self(user)
|
|
|
|
/obj/item/device/radio/intercom/attack_hand(mob/user as mob)
|
|
src.add_fingerprint(user)
|
|
spawn (0)
|
|
attack_self(user)
|
|
|
|
/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
|
|
add_fingerprint(user)
|
|
if(W.is_screwdriver()) // Opening the intercom up.
|
|
wiresexposed = !wiresexposed
|
|
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
|
|
playsound(src, W.usesound, 50, 1)
|
|
if(wiresexposed)
|
|
if(!on)
|
|
icon_state = "intercom-p_open"
|
|
else
|
|
icon_state = "intercom_open"
|
|
else
|
|
icon_state = "intercom"
|
|
return
|
|
if(wiresexposed && W.is_wirecutter())
|
|
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
|
|
playsound(src, W.usesound, 50, 1)
|
|
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
|
var/obj/structure/frame/A = new /obj/structure/frame(src.loc)
|
|
var/obj/item/weapon/circuitboard/M = circuit
|
|
A.frame_type = M.board_type
|
|
A.pixel_x = pixel_x
|
|
A.pixel_y = pixel_y
|
|
A.circuit = M
|
|
A.set_dir(dir)
|
|
A.anchored = 1
|
|
A.state = 2
|
|
A.update_icon()
|
|
M.deconstruct(src)
|
|
qdel(src)
|
|
else
|
|
src.attack_hand(user)
|
|
return
|
|
|
|
/obj/item/device/radio/intercom/receive_range(freq, level)
|
|
if (!on)
|
|
return -1
|
|
if(!(0 in level))
|
|
var/turf/position = get_turf(src)
|
|
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
|
|
|
|
return canhear_range
|
|
|
|
/obj/item/device/radio/intercom/process()
|
|
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
|
|
last_tick = world.timeofday
|
|
|
|
if(!src.loc)
|
|
on = 0
|
|
else
|
|
var/area/A = get_area(src)
|
|
if(!A)
|
|
on = 0
|
|
else
|
|
on = A.powered(EQUIP) // set "on" to the power status
|
|
|
|
if(!on)
|
|
if(wiresexposed)
|
|
icon_state = "intercom-p_open"
|
|
else
|
|
icon_state = "intercom-p"
|
|
else
|
|
if(wiresexposed)
|
|
icon_state = "intercom_open"
|
|
else
|
|
icon_state = initial(icon_state)
|
|
|
|
/obj/item/device/radio/intercom/locked
|
|
var/locked_frequency
|
|
|
|
/obj/item/device/radio/intercom/locked/set_frequency(var/frequency)
|
|
if(frequency == locked_frequency)
|
|
..(locked_frequency)
|
|
|
|
/obj/item/device/radio/intercom/locked/list_channels()
|
|
return ""
|
|
|
|
/obj/item/device/radio/intercom/locked/ai_private
|
|
name = "\improper AI intercom"
|
|
frequency = AI_FREQ
|
|
broadcasting = 1
|
|
listening = 1
|
|
|
|
/obj/item/device/radio/intercom/locked/confessional
|
|
name = "confessional intercom"
|
|
frequency = 1480 |