From 0bb37b8cd22e2dfa85b3a08626e07ffce6d4c078 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sat, 23 Sep 2023 23:30:24 +0500 Subject: [PATCH] Feat: Radio overhaul (#221) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Что этот PR делает За основу спрайтов был взят спрайт СБшной рации с рупары, были портированы QOL изменения рации оттуда же (Альт-клик, Шифт-альт-клик) Добавляет несколько новых раций: 1. Альтернативая - замена существующей зеленой рации, была перерисована в заметные, жёлтые цвета. 2. СБшная 3. Синдикатовская 4. Специализированная - для ЕРТ, и так далее ## Почему это хорошо для игры ... ## Изображения изменений (Слева направо) Нынешняя, Сбшная, Специализированная, Синдикатовская, Альтернативная ![image](https://github.com/ss220club/Paradise-SS220/assets/20109643/84b78500-30b7-45b1-bbe4-9863a2656f90) ## Тестирование Проверял в игре ## Changelog :cl: add: 4 новые рации, улучшение удобства их использования /:cl: --------- Co-authored-by: Furior <68264134+Furrior@users.noreply.github.com> --- modular_ss220/devices/_devices.dme | 1 + modular_ss220/devices/code/items/radio.dm | 65 ++++++++++++++++++++++ modular_ss220/devices/icons/radio.dmi | Bin 0 -> 693 bytes 3 files changed, 66 insertions(+) create mode 100644 modular_ss220/devices/code/items/radio.dm create mode 100644 modular_ss220/devices/icons/radio.dmi diff --git a/modular_ss220/devices/_devices.dme b/modular_ss220/devices/_devices.dme index 2aa9f1945e62..c5209490a5bb 100644 --- a/modular_ss220/devices/_devices.dme +++ b/modular_ss220/devices/_devices.dme @@ -1,4 +1,5 @@ #include "_devices.dm" #include "code/items/scanners.dm" +#include "code/items/radio.dm" #include "code/research_designs/equipment_designs.dm" diff --git a/modular_ss220/devices/code/items/radio.dm b/modular_ss220/devices/code/items/radio.dm new file mode 100644 index 000000000000..5e12a73a4daf --- /dev/null +++ b/modular_ss220/devices/code/items/radio.dm @@ -0,0 +1,65 @@ +// Just renaming +/obj/item/radio + name = "handheld radio" + desc = "A basic shortwave radio that can communicate with local telecommunication networks." + +// I don't want to mess up icons, so I'll just make an "alternate" version +/obj/item/radio/alternative + name = "handheld radio" + desc = "A basic shortwave radio that can communicate with local telecommunication networks. This model is painted in contrasted, visible colors." + icon = 'modular_ss220/devices/icons/radio.dmi' + icon_state = "walkietalkie" + +/obj/item/radio/security + name = "security handheld radio" + desc = "A basic shortwave radio that can communicate with local telecommunication networks on security frequency. This model is painted in black colors." + icon = 'modular_ss220/devices/icons/radio.dmi' + icon_state = "walkietalkie_sec" + frequency = SEC_FREQ + +/obj/item/radio/tactical + name = "tactical handheld radio" + desc = "A tactical shortwave radio that used by some special forces. That can communicate with local telecommunication networks on allocated frequencies. This model is painted in gray camouflage." + icon = 'modular_ss220/devices/icons/radio.dmi' + icon_state = "walkietalkie_special" + frequency = DTH_FREQ + +// DO NOT PLACE IT IN MAINT SPAWNERS, PLEASE +/obj/item/radio/syndicate + name = "suspecious handheld radio" + desc = "A suspecious shortwave radio. This model is painted in reddish colors, there is some numbers and letters on back of it." + icon = 'modular_ss220/devices/icons/radio.dmi' + icon_state = "walkietalkie_syndie" + frequency = SYNDTEAM_FREQ + +/* + * Radio QoL improvement + * So players can Alt+click to enable dynamic and Ctrl+Shift+click to enable speaker +*/ +/obj/item/radio/examine(mob/user) + . = ..() + if(in_range(src, user) || loc == user) + . += span_info("Alt-click on \the [name] to toggle broadcasting.") + . += span_info("Ctrl-Shift-click on \the [src] to toggle speaker.") + +/obj/item/radio/AltClick(mob/user) + if(!Adjacent(user)) + return + if(!iscarbon(usr) && !isrobot(usr)) + return + if(!istype(user) || user.incapacitated()) + to_chat(user, span_warning("You can't do that right now!")) + return + broadcasting = !broadcasting + to_chat(user, span_notice("You toggle broadcasting [broadcasting ? "on" : "off"].")) + +/obj/item/radio/CtrlShiftClick(mob/user) + if(!Adjacent(user)) + return + if(!iscarbon(usr) && !isrobot(usr)) + return + if(!istype(user) || user.incapacitated()) + to_chat(user, span_warning("You can't do that right now!")) + return + listening = !listening + to_chat(user, span_notice("You toggle speaker [listening ? "on" : "off"].")) diff --git a/modular_ss220/devices/icons/radio.dmi b/modular_ss220/devices/icons/radio.dmi new file mode 100644 index 0000000000000000000000000000000000000000..470f46b252953a167b2e6bbde35d5a2c927345b7 GIT binary patch literal 693 zcmV;m0!safP)(^E-WekW&lA!K{qurN=iyVJUWsK3y%1~HuRA`#ed9Z zGd?~(CM6_JPEJitO(Y~F{{R5Y005bpnKS?YX8->)%*>ep0A>IH2T7UR00001bW%=J z06^y0W&i*HgL+h0bVOxyV{&P5bZKvH004NLQ&wi>LCp$B>1WYP%ai(Mz6$6D0xj55` z5_3}_Y^;joi&K+H)KHL`oSB$IqNd8c6x=RTR&e!m0s9*OMmkM~BOCoC0004WNklLA#d_BOY@k2^285 z3#UC6R8CNEP<}*$F4NoT^iJq9yMuDr;2}T_9s<~)|M>~10S{!Kfe6wu9jV8H%3*_$ zNqB;SFerx&Lez>-kd%KIg7a`5EJ5X#K=>yXjLNZKbQ+9agE00Ii`z%AWy_P&trfV_ zcdekT6?ntf8=Zd<*yB6-js?ywgh~0$Xi%pwY%nRuf?4Ok(V%iHX!RSQVDuV