Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Departmental Intercoms #11422

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions code/game/objects/items/devices/radio/intercom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,59 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/radio/intercom)
var/area/current_area = get_area(src)
if(!current_area)
return

RegisterSignal(current_area, COMSIG_AREA_POWER_CHANGE, PROC_REF(AreaPowerCheck))

/obj/item/radio/intercom/Initialize(mapload)
. = ..()
var/area/current_area = get_area(src)
if(freerange || frequency == FREQ_COMMON)
freqlock = FALSE

/obj/item/radio/intercom/department
var/department_freq = FREQ_COMMON

/obj/item/radio/intercom/department/Initialize(mapload)
. = ..()
freqlock = TRUE
frequency = department_freq

/obj/item/radio/intercom/department/medbay
name = "medbay intercom"
department_freq = FREQ_MEDICAL

/obj/item/radio/intercom/department/security
name = "security intercom"
department_freq = FREQ_SECURITY

/obj/item/radio/intercom/department/engineering
name = "engineering intercom"
department_freq = FREQ_ENGINEERING

/obj/item/radio/intercom/department/supply
name = "supply intercom"
department_freq = FREQ_SUPPLY

/obj/item/radio/intercom/department/service
name = "service intercom"
department_freq = FREQ_SERVICE

/obj/item/radio/intercom/department/science
name = "science intercom"
department_freq = FREQ_SCIENCE

/obj/item/radio/intercom/department/exploration
name = "exploration intercom"
department_freq = FREQ_EXPLORATION

/obj/item/radio/intercom/department/syndicate
name = "syndicate intercom"
department_freq = FREQ_SYNDICATE

/obj/item/radio/intercom/department/centcom
name = "centcom intercom"
department_freq = FREQ_CENTCOM

/obj/item/radio/intercom/examine(mob/user)
. = ..()
. += "<span class='notice'>Use [MODE_TOKEN_INTERCOM] when nearby to speak into it.</span>"
Expand Down
Loading