Skip to content

Commit

Permalink
Multiple in, multiple out.
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Aug 7, 2023
1 parent 04c7967 commit 6198821
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
10 changes: 6 additions & 4 deletions code/game/objects/items/storage/backpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ GLOBAL_LIST_EMPTY_TYPED(radio_packs, /obj/item/storage/backpack/marine/satchel/r
var/obj/structure/transmitter/internal/internal_transmitter

var/phone_category = PHONE_MARINE
var/network_receive = FACTION_MARINE
var/list/networks_receive = list(FACTION_MARINE)
var/list/networks_transmit = list(FACTION_MARINE)
var/base_icon

Expand All @@ -523,7 +523,7 @@ GLOBAL_LIST_EMPTY_TYPED(radio_packs, /obj/item/storage/backpack/marine/satchel/r
internal_transmitter.relay_obj = src
internal_transmitter.phone_category = phone_category
internal_transmitter.enabled = FALSE
internal_transmitter.network_receive = network_receive
internal_transmitter.networks_receive = networks_receive
internal_transmitter.networks_transmit = networks_transmit
RegisterSignal(internal_transmitter, COMSIG_TRANSMITTER_UPDATE_ICON, PROC_REF(check_for_ringing))
GLOB.radio_packs += src
Expand Down Expand Up @@ -593,7 +593,8 @@ GLOBAL_LIST_EMPTY_TYPED(radio_packs, /obj/item/storage/backpack/marine/satchel/r
. = ..()

/obj/item/storage/backpack/marine/satchel/rto/upp_net
network_receive = FACTION_UPP
name = "\improper UPP Radio Telephone Pack"
networks_receive = list(FACTION_UPP)
networks_transmit = list(FACTION_UPP)

/obj/item/storage/backpack/marine/satchel/rto/small
Expand All @@ -602,7 +603,8 @@ GLOBAL_LIST_EMPTY_TYPED(radio_packs, /obj/item/storage/backpack/marine/satchel/r


/obj/item/storage/backpack/marine/satchel/rto/small/upp_net
network_receive = FACTION_UPP
name = "\improper UPP Radio Telephone Pack"
networks_receive = list(FACTION_UPP)
networks_transmit = list(FACTION_UPP)
phone_category = PHONE_UPP_SOLDIER

Expand Down
11 changes: 8 additions & 3 deletions code/modules/cm_phone/phone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter)
var/timeout_timer_id
var/timeout_duration = 30 SECONDS

var/network_receive = FACTION_MARINE
var/list/networks_receive = list(FACTION_MARINE)
var/list/networks_transmit = list(FACTION_MARINE)

/obj/structure/transmitter/hidden
Expand Down Expand Up @@ -82,7 +82,12 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter)
var/obj/structure/transmitter/target_phone = possible_phone
if(TRANSMITTER_UNAVAILABLE(target_phone) || !target_phone.callable) // Phone not available
continue
if(!(target_phone.network_receive in networks_transmit))
var/net_link = FALSE
for(var/network in networks_transmit)
if(network in target_phone.networks_receive)
net_link = TRUE
continue
if(!net_link)
continue

var/id = target_phone.phone_id
Expand Down Expand Up @@ -540,7 +545,7 @@ GLOBAL_LIST_EMPTY_TYPED(transmitters, /obj/structure/transmitter)


/obj/structure/transmitter/colony_net
network_receive = FACTION_COLONIST
networks_receive = list(FACTION_COLONIST)
networks_transmit = list(FACTION_COLONIST)

/obj/structure/transmitter/colony_net/rotary
Expand Down
8 changes: 4 additions & 4 deletions maps/map_files/LV624/standalone/clfship.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
/area/lv624/lazarus/crashed_ship)
"fA" = (
/obj/structure/transmitter/colony_net{
network_receive = "CLF";
networks_receive = list("CLF");
networks_transmit = list("CLF");
phone_category = "CR-116";
phone_id = "Armoury";
Expand Down Expand Up @@ -667,7 +667,7 @@
/obj/structure/surface/table/reinforced/prison,
/obj/effect/spawner/random/toolbox,
/obj/structure/transmitter/colony_net/rotary{
network_receive = "CLF";
networks_receive = list("CLF");
networks_transmit = list("CLF");
phone_category = "CR-116";
phone_color = "yellow";
Expand Down Expand Up @@ -1662,7 +1662,7 @@
"Qj" = (
/obj/structure/machinery/body_scanconsole,
/obj/structure/transmitter/colony_net{
network_receive = "CLF";
networks_receive = list("CLF");
networks_transmit = list("CLF");
phone_category = "CR-116";
phone_color = "green";
Expand Down Expand Up @@ -1994,7 +1994,7 @@
/area/lv624/lazarus/crashed_ship)
"XM" = (
/obj/structure/transmitter/colony_net{
network_receive = "CLF";
networks_receive = list("CLF");
networks_transmit = list("CLF");
phone_category = "CR-116";
phone_id = "Cargo Bay";
Expand Down

0 comments on commit 6198821

Please sign in to comment.