From 464a42dfeaf6427aff72c4456ad8242e789ade4b Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 3 Sep 2024 01:09:44 +0200 Subject: [PATCH 1/5] initial commit :apple: --- code/game/area/Space_Station_13_areas.dm | 19 +++++++++++++++++-- code/game/area/areas.dm | 1 + code/game/area/areas/shuttles.dm | 9 +++++++++ .../objects/items/devices/radio/intercom.dm | 8 ++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm index 2de64b6e62c5b..8b568e06c5565 100644 --- a/code/game/area/Space_Station_13_areas.dm +++ b/code/game/area/Space_Station_13_areas.dm @@ -555,6 +555,10 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/crew_quarters area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA + freq = FREQ_SERVICE + +/area/crew_quarters/heads + freq = FREQ_COMMAND /area/crew_quarters/heads/captain name = "Captain's Office" @@ -1049,6 +1053,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station lighting_colour_bulb = "#d5f2ff" airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_SIMPLE color_correction = /datum/client_colour/area_color/cold_ish + freq = FREQ_MEDICAL /area/medical/medbay/zone2 name = "Medbay" @@ -1186,6 +1191,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station lighting_colour_bulb = "#ffdfca" airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_ELITE color_correction = /datum/client_colour/area_color/warm_ish + freq = FREQ_SECURITY /area/security/get_turf_textures() return GLOB.turf_texture_hallway @@ -1208,7 +1214,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/security/brig/medbay name = "Brig Bay" - + /area/security/brig/aft name = "Brig Aft" @@ -1225,6 +1231,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station mood_job_allowed = list(JOB_NAME_HEADOFSECURITY,JOB_NAME_WARDEN, JOB_NAME_SECURITYOFFICER) // JUSTICE! mood_job_reverse = TRUE mood_message = "I'm trapped here with little hope of escape!\n" + freq = FREQ_COMMON /area/security/prison/shielded name = "Prison Wing Shielded area" @@ -1352,6 +1359,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station sound_environment = SOUND_AREA_STANDARD_STATION airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_SIMPLE color_correction = /datum/client_colour/area_color/warm_yellow + freq = FREQ_SUPPLY /area/quartermaster/get_turf_textures() return GLOB.turf_texture_hallway @@ -1380,6 +1388,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station icon_state = "cargo_lobby" airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_SIMPLE color_correction = /datum/client_colour/area_color/warm_yellow + freq = FREQ_SUPPLY /area/quartermaster/qm name = "Quartermaster's Office" @@ -1406,6 +1415,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/quartermaster/exploration_prep name = "Exploration Preparation Room" icon_state = "mining" + freq = FREQ_EXPLORATION /area/quartermaster/exploration_dock name = "Exploration Dock" @@ -1463,7 +1473,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station sound_environment = SOUND_AREA_STANDARD_STATION airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_ADVANCED color_correction = /datum/client_colour/area_color/cold_ish - + freq = FREQ_SCIENCE + /area/science/aft name = "Science Aft" @@ -1611,6 +1622,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station ambience_index = AMBIENCE_ENGI sound_environment = SOUND_AREA_STANDARD_STATION airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_NONE + freq = FREQ_ENGINEERING /area/construction/mining/aux_base name = "Auxiliary Base Construction" @@ -1683,6 +1695,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/ai_monitored/turret_protected ambientsounds = list('sound/ambience/ambimalf.ogg', 'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg') + freq = FREQ_AI_PRIVATE + /area/ai_monitored/turret_protected/ai_upload name = "AI Upload Chamber" @@ -1754,6 +1768,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg', 'sound/ambience/ambimystery.ogg') network_root_id = STATION_NETWORK_ROOT // They should of unpluged the router before they left airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_ELITE + freq = FREQ_ENGINEERING /area/tcommsat/computer name = "Telecomms Control Room" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index df6b03f7fdf85..c1c03a1818bc6 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -136,6 +136,7 @@ ///The areas specific color correction var/color_correction = /datum/client_colour/area_color + var/freq = FREQ_COMMON /** * A list of teleport locations diff --git a/code/game/area/areas/shuttles.dm b/code/game/area/areas/shuttles.dm index 1a265e8798620..50e6d8e9d9040 100644 --- a/code/game/area/areas/shuttles.dm +++ b/code/game/area/areas/shuttles.dm @@ -70,6 +70,7 @@ ambience_index = AMBIENCE_DANGER canSmoothWithAreas = /area/shuttle/syndicate airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_MAXIMUM + freq = FREQ_SYNDICATE /area/shuttle/syndicate/bridge name = "Syndicate Infiltrator Control" @@ -94,6 +95,7 @@ name = "Pirate Shuttle" requires_power = TRUE canSmoothWithAreas = /area/shuttle/pirate + freq = FREQ_SYNDICATE ////////////////////////////Bounty Hunter Shuttles//////////////////////////// @@ -167,6 +169,7 @@ /area/shuttle/mining name = "Mining Shuttle" + freq = FREQ_SUPPLY /area/shuttle/mining/large name = "Mining Shuttle" @@ -175,16 +178,20 @@ /area/shuttle/science name = "Science Shuttle" requires_power = TRUE + freq = FREQ_SCIENCE /area/shuttle/exploration name = "Exploration Shuttle" requires_power = TRUE + freq = FREQ_EXPLORATION /area/shuttle/labor name = "Labor Camp Shuttle" + freq = FREQ_SECURITY /area/shuttle/supply name = "Supply Shuttle" + freq = FREQ_SUPPLY /area/shuttle/escape name = "Emergency Shuttle" @@ -206,9 +213,11 @@ /area/shuttle/transport name = "Transport Shuttle" + freq = FREQ_CENTCOM /area/shuttle/assault_pod name = "Steel Rain" + freq = FREQ_SYNDICATE /area/shuttle/sbc_starfury name = "SBC Starfury" diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index fe6f1f5c34c79..2864995817131 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -8,6 +8,9 @@ dog_fashion = null unscrewed = FALSE layer = ABOVE_WINDOW_LAYER + freqlock = TRUE + //whhether or not the intercom should automatically set its frequency to that of the departments (if there is one) + var/department_freq = TRUE /obj/item/radio/intercom/unscrewed unscrewed = TRUE @@ -17,6 +20,11 @@ var/area/current_area = get_area(src) if(!current_area) return + if(freerange || frequency = FREQ_COMMON) + freqlock = FALSE + if(department_freq) + frequency = current_area.freq + RegisterSignal(current_area, COMSIG_AREA_POWER_CHANGE, PROC_REF(AreaPowerCheck)) /obj/item/radio/intercom/examine(mob/user) From 75b23b8104286e41f9d942c8c04fa14d5ff350ad Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 3 Sep 2024 01:11:50 +0200 Subject: [PATCH 2/5] changed it to only do it on mapload --- code/game/objects/items/devices/radio/intercom.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 2864995817131..5a766252b5b12 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -20,13 +20,15 @@ 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) if(freerange || frequency = FREQ_COMMON) freqlock = FALSE if(department_freq) frequency = current_area.freq - RegisterSignal(current_area, COMSIG_AREA_POWER_CHANGE, PROC_REF(AreaPowerCheck)) - /obj/item/radio/intercom/examine(mob/user) . = ..() . += "Use [MODE_TOKEN_INTERCOM] when nearby to speak into it." From 3dec5692c429c80ef3f4e37a5b2a0ec534425dee Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 3 Sep 2024 11:31:07 +0200 Subject: [PATCH 3/5] whoops --- code/game/objects/items/devices/radio/intercom.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 5a766252b5b12..995c80e730684 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -24,7 +24,9 @@ RegisterSignal(current_area, COMSIG_AREA_POWER_CHANGE, PROC_REF(AreaPowerCheck)) /obj/item/radio/intercom/Initialize(mapload) - if(freerange || frequency = FREQ_COMMON) + . = ..() + var/area/current_area = get_area(src) + if(freerange || frequency == FREQ_COMMON) freqlock = FALSE if(department_freq) frequency = current_area.freq From f598d0217ac5c72d89797df5ddc1c07f07bc753d Mon Sep 17 00:00:00 2001 From: Markus Date: Sat, 7 Sep 2024 10:46:45 +0200 Subject: [PATCH 4/5] undid area changes, changed it from being done on init to be done in a map editor --- code/game/area/Space_Station_13_areas.dm | 14 ------- code/game/area/areas.dm | 1 - code/game/area/areas/shuttles.dm | 9 ----- .../objects/items/devices/radio/intercom.dm | 40 ++++++++++++++++--- 4 files changed, 35 insertions(+), 29 deletions(-) diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm index 8b568e06c5565..d8bdad89fe75d 100644 --- a/code/game/area/Space_Station_13_areas.dm +++ b/code/game/area/Space_Station_13_areas.dm @@ -555,10 +555,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/crew_quarters area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA - freq = FREQ_SERVICE - -/area/crew_quarters/heads - freq = FREQ_COMMAND /area/crew_quarters/heads/captain name = "Captain's Office" @@ -1053,7 +1049,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station lighting_colour_bulb = "#d5f2ff" airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_SIMPLE color_correction = /datum/client_colour/area_color/cold_ish - freq = FREQ_MEDICAL /area/medical/medbay/zone2 name = "Medbay" @@ -1191,7 +1186,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station lighting_colour_bulb = "#ffdfca" airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_ELITE color_correction = /datum/client_colour/area_color/warm_ish - freq = FREQ_SECURITY /area/security/get_turf_textures() return GLOB.turf_texture_hallway @@ -1231,7 +1225,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station mood_job_allowed = list(JOB_NAME_HEADOFSECURITY,JOB_NAME_WARDEN, JOB_NAME_SECURITYOFFICER) // JUSTICE! mood_job_reverse = TRUE mood_message = "I'm trapped here with little hope of escape!\n" - freq = FREQ_COMMON /area/security/prison/shielded name = "Prison Wing Shielded area" @@ -1359,7 +1352,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station sound_environment = SOUND_AREA_STANDARD_STATION airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_SIMPLE color_correction = /datum/client_colour/area_color/warm_yellow - freq = FREQ_SUPPLY /area/quartermaster/get_turf_textures() return GLOB.turf_texture_hallway @@ -1388,7 +1380,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station icon_state = "cargo_lobby" airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_SIMPLE color_correction = /datum/client_colour/area_color/warm_yellow - freq = FREQ_SUPPLY /area/quartermaster/qm name = "Quartermaster's Office" @@ -1415,7 +1406,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/quartermaster/exploration_prep name = "Exploration Preparation Room" icon_state = "mining" - freq = FREQ_EXPLORATION /area/quartermaster/exploration_dock name = "Exploration Dock" @@ -1473,7 +1463,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station sound_environment = SOUND_AREA_STANDARD_STATION airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_ADVANCED color_correction = /datum/client_colour/area_color/cold_ish - freq = FREQ_SCIENCE /area/science/aft name = "Science Aft" @@ -1622,7 +1611,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station ambience_index = AMBIENCE_ENGI sound_environment = SOUND_AREA_STANDARD_STATION airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_NONE - freq = FREQ_ENGINEERING /area/construction/mining/aux_base name = "Auxiliary Base Construction" @@ -1695,7 +1683,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/ai_monitored/turret_protected ambientsounds = list('sound/ambience/ambimalf.ogg', 'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg') - freq = FREQ_AI_PRIVATE /area/ai_monitored/turret_protected/ai_upload @@ -1768,7 +1755,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg', 'sound/ambience/ambimystery.ogg') network_root_id = STATION_NETWORK_ROOT // They should of unpluged the router before they left airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_ELITE - freq = FREQ_ENGINEERING /area/tcommsat/computer name = "Telecomms Control Room" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index c1c03a1818bc6..df6b03f7fdf85 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -136,7 +136,6 @@ ///The areas specific color correction var/color_correction = /datum/client_colour/area_color - var/freq = FREQ_COMMON /** * A list of teleport locations diff --git a/code/game/area/areas/shuttles.dm b/code/game/area/areas/shuttles.dm index 50e6d8e9d9040..1a265e8798620 100644 --- a/code/game/area/areas/shuttles.dm +++ b/code/game/area/areas/shuttles.dm @@ -70,7 +70,6 @@ ambience_index = AMBIENCE_DANGER canSmoothWithAreas = /area/shuttle/syndicate airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_MAXIMUM - freq = FREQ_SYNDICATE /area/shuttle/syndicate/bridge name = "Syndicate Infiltrator Control" @@ -95,7 +94,6 @@ name = "Pirate Shuttle" requires_power = TRUE canSmoothWithAreas = /area/shuttle/pirate - freq = FREQ_SYNDICATE ////////////////////////////Bounty Hunter Shuttles//////////////////////////// @@ -169,7 +167,6 @@ /area/shuttle/mining name = "Mining Shuttle" - freq = FREQ_SUPPLY /area/shuttle/mining/large name = "Mining Shuttle" @@ -178,20 +175,16 @@ /area/shuttle/science name = "Science Shuttle" requires_power = TRUE - freq = FREQ_SCIENCE /area/shuttle/exploration name = "Exploration Shuttle" requires_power = TRUE - freq = FREQ_EXPLORATION /area/shuttle/labor name = "Labor Camp Shuttle" - freq = FREQ_SECURITY /area/shuttle/supply name = "Supply Shuttle" - freq = FREQ_SUPPLY /area/shuttle/escape name = "Emergency Shuttle" @@ -213,11 +206,9 @@ /area/shuttle/transport name = "Transport Shuttle" - freq = FREQ_CENTCOM /area/shuttle/assault_pod name = "Steel Rain" - freq = FREQ_SYNDICATE /area/shuttle/sbc_starfury name = "SBC Starfury" diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 995c80e730684..c5ba577452fa2 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -8,9 +8,6 @@ dog_fashion = null unscrewed = FALSE layer = ABOVE_WINDOW_LAYER - freqlock = TRUE - //whhether or not the intercom should automatically set its frequency to that of the departments (if there is one) - var/department_freq = TRUE /obj/item/radio/intercom/unscrewed unscrewed = TRUE @@ -28,8 +25,41 @@ var/area/current_area = get_area(src) if(freerange || frequency == FREQ_COMMON) freqlock = FALSE - if(department_freq) - frequency = current_area.freq + +/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 + department_freq = FREQ_MEDICAL + +/obj/item/radio/intercom/department/security + department_freq = FREQ_SECURITY + +/obj/item/radio/intercom/department/engineering + department_freq = FREQ_ENGINEERING + +/obj/item/radio/intercom/department/supply + department_freq = FREQ_SUPPLY + +/obj/item/radio/intercom/department/service + department_freq = FREQ_SERVICE + +/obj/item/radio/intercom/department/science + department_freq = FREQ_SCIENCE + +/obj/item/radio/intercom/department/exploration + department_freq = FREQ_EXPLORATION + +/obj/item/radio/intercom/department/syndicate + department_freq = FREQ_SYNDICATE + +/obj/item/radio/intercom/department/centcom + department_freq = FREQ_CENTCOM /obj/item/radio/intercom/examine(mob/user) . = ..() From d3f02b677779da950b8f44762d10c2080a3d5531 Mon Sep 17 00:00:00 2001 From: Markus Date: Thu, 3 Oct 2024 22:04:22 +0200 Subject: [PATCH 5/5] Update intercom.dm --- code/game/objects/items/devices/radio/intercom.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 29ae7aa7041b0..eac0001a1d14d 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -37,30 +37,39 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/radio/intercom) 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)