mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01:00
Cooler intercom (#8902)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
var/number = 0
|
||||
var/obj/machinery/abstract/intercom_listener/power_interface
|
||||
var/radio_sound = null
|
||||
clickvol = 40
|
||||
|
||||
/obj/item/device/radio/intercom/custom
|
||||
name = "station intercom (Custom)"
|
||||
@@ -48,6 +49,7 @@
|
||||
/obj/item/device/radio/intercom/Initialize()
|
||||
. = ..()
|
||||
power_interface = new(loc, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/radio/intercom/department/medbay/Initialize()
|
||||
. = ..()
|
||||
@@ -129,10 +131,23 @@
|
||||
..(dest)
|
||||
|
||||
/obj/item/device/radio/intercom/update_icon()
|
||||
if (on)
|
||||
icon_state = "intercom"
|
||||
cut_overlays()
|
||||
if(!on)
|
||||
icon_state = initial(icon_state)
|
||||
set_light(FALSE)
|
||||
return
|
||||
else
|
||||
icon_state = "intercom-p"
|
||||
var/mutable_appearance/screen_overlay = mutable_appearance(icon, "intercom_screen", EFFECTS_ABOVE_LIGHTING_LAYER)
|
||||
add_overlay(screen_overlay)
|
||||
var/mutable_appearance/scanline_overlay = mutable_appearance(icon, "intercom_scanline", EFFECTS_ABOVE_LIGHTING_LAYER)
|
||||
add_overlay(scanline_overlay)
|
||||
set_light(1.4, 1, COLOR_CYAN)
|
||||
if(broadcasting)
|
||||
var/mutable_appearance/button_overlay = mutable_appearance(icon, "intercom_b", EFFECTS_ABOVE_LIGHTING_LAYER)
|
||||
add_overlay(button_overlay)
|
||||
if(listening)
|
||||
var/mutable_appearance/button_overlay = mutable_appearance(icon, "intercom_l", EFFECTS_ABOVE_LIGHTING_LAYER)
|
||||
add_overlay(button_overlay)
|
||||
|
||||
/obj/item/device/radio/intercom/broadcasting
|
||||
broadcasting = 1
|
||||
|
||||
@@ -47,6 +47,9 @@ var/global/list/default_medbay_channels = list(
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 75, MATERIAL_GLASS = 25)
|
||||
var/const/FREQ_LISTENING = 1
|
||||
var/list/internal_channels
|
||||
var/clicksound = "button" //played sound on usage
|
||||
var/clickvol = 10 //volume
|
||||
|
||||
|
||||
var/obj/item/cell/cell = /obj/item/cell/device
|
||||
|
||||
@@ -183,6 +186,11 @@ var/global/list/default_medbay_channels = list(
|
||||
return STATUS_CLOSE
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/CouldUseTopic(var/mob/user)
|
||||
..()
|
||||
if(clicksound && iscarbon(user))
|
||||
playsound(src, clicksound, clickvol)
|
||||
|
||||
/obj/item/device/radio/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
@@ -227,6 +235,7 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
if(.)
|
||||
SSnanoui.update_uis(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
|
||||
var/datum/radio_frequency/connection = null
|
||||
@@ -767,8 +776,3 @@ var/global/list/default_medbay_channels = list(
|
||||
/obj/item/device/radio/phone/medbay/Initialize()
|
||||
. = ..()
|
||||
internal_channels = default_medbay_channels.Copy()
|
||||
|
||||
/obj/item/device/radio/CouldUseTopic(var/mob/user)
|
||||
..()
|
||||
if(iscarbon(user))
|
||||
playsound(src, "button", 10)
|
||||
|
||||
Reference in New Issue
Block a user