From c6baa100cc0cdfe344519282d113366392e1fa1d Mon Sep 17 00:00:00 2001
From: Discozavisim <107996502+Discozavisim@users.noreply.github.com>
Date: Wed, 23 Oct 2024 21:04:16 +0200
Subject: [PATCH 1/4] =?UTF-8?q?=D1=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mod_celadon/radar/README.md | 98 ++++++++++++++++++++++++++++++
mod_celadon/radar/_radar.dm | 27 ++++++++
mod_celadon/radar/_radar.dme | 17 ++++++
mod_celadon/radar/code/radar.dm | 53 ++++++++++++++++
mod_celadon/radar/icons/radar.dmi | Bin 0 -> 1349 bytes
5 files changed, 195 insertions(+)
create mode 100644 mod_celadon/radar/README.md
create mode 100644 mod_celadon/radar/_radar.dm
create mode 100644 mod_celadon/radar/_radar.dme
create mode 100644 mod_celadon/radar/code/radar.dm
create mode 100644 mod_celadon/radar/icons/radar.dmi
diff --git a/mod_celadon/radar/README.md b/mod_celadon/radar/README.md
new file mode 100644
index 000000000000..955256e4072c
--- /dev/null
+++ b/mod_celadon/radar/README.md
@@ -0,0 +1,98 @@
+
+#### Список PRов
+
+- https://github.com/CeladonSS13/Shiptest/pulls/#####
+
+
+
+## НАЗВАНИЕ_МОДА
+
+ID мода: CELADON_EXAMPLE
+
+
+### Описание мода
+
+Этот мод служит примером для разработчиков и существует лишь для того,
+чтобы его можно было легко скопировать и вставить в другое место.
+
+
+### Используется в других проектах?
+- Нет
+
+
+### Изменения *кор кода*
+
+- Отсутствуют
+
+
+### Оверрайды
+
+- Отсутствуют
+
+
+### Дефайны
+
+- Отсутствуют
+
+
+### Используемые файлы, не содержащиеся в модпаке
+
+- Отсутствуют
+
+
+### Авторы
+
+Твой никнейм
+
diff --git a/mod_celadon/radar/_radar.dm b/mod_celadon/radar/_radar.dm
new file mode 100644
index 000000000000..b8db777760d7
--- /dev/null
+++ b/mod_celadon/radar/_radar.dm
@@ -0,0 +1,27 @@
+/// name - название модпака. Используется для поиска других модпаков в init.
+/// desc - описание для модпака. Может использоваться для списка глаголов модпака в качестве описания.
+/// author - автор(ы) этого модпака.
+
+/datum/modpack/example
+ name = "ОСМЫСЛЕННОЕ_ПОНЯТНОЕ_НАЗВАНИЕ"
+ desc = "КОРОТКОЕ_ОПИСАНИЕ_МОДПАКА"
+ author = "АВТОР(Ы)"
+
+/// Эти проки нужны, для того чтобы инициализировать датумы в определенный момент времени
+/// сборки билда. Инициализация обновляет данные в билде повторно, перезаписывая новыми значениями
+/// из модпака. Но иногда, сама инциализация есть и вызывается в кор коде в определенный момент, и
+/// тогда такие проки не нужны и вовсе. Также проки не нужны если в модпаке только объекты находятся.
+/// Если эти конструкции не нужны, просто закоментируй их!
+/// (можешь использовать все три, но запуск билда увеличится на 0.1 сек, за каждый датум в модпаке)
+
+// Инициализация ДО
+/datum/modpack/example/pre_initialize()
+ . = ..()
+
+// Инициализация ВОВРЕМЯ
+/datum/modpack/example/initialize()
+ . = ..()
+
+// Инициализация ПОСЛЕ
+/datum/modpack/example/post_initialize()
+ . = ..()
diff --git a/mod_celadon/radar/_radar.dme b/mod_celadon/radar/_radar.dme
new file mode 100644
index 000000000000..b61cdd2b727a
--- /dev/null
+++ b/mod_celadon/radar/_radar.dme
@@ -0,0 +1,17 @@
+#ifndef MODPACK_CELADON_EXAMPLE
+#define MODPACK_CELADON_EXAMPLE
+
+#include "_example.dm"
+
+#include "code/example.dm"
+
+#endif
+// BEGIN_INTERNALS
+// END_INTERNALS
+// BEGIN_FILE_DIR
+#define FILE_DIR .
+// END_FILE_DIR
+// BEGIN_PREFERENCES
+// END_PREFERENCES
+// BEGIN_INCLUDE
+// END_INCLUDE
diff --git a/mod_celadon/radar/code/radar.dm b/mod_celadon/radar/code/radar.dm
new file mode 100644
index 000000000000..670ee042d8c4
--- /dev/null
+++ b/mod_celadon/radar/code/radar.dm
@@ -0,0 +1,53 @@
+//Microwaving doesn't use recipes, instead it calls the microwave_act of the objects. For food, this creates something based on the food's cooked_type
+
+/obj/machinery/space_radar
+ name = "RADAR"
+ desc = "Views everything with rays."
+ icon = 'mod_celadon/radar/icons/radar.dmi'
+ icon_state = "radar-off"
+ layer = BELOW_OBJ_LAYER
+ density = TRUE
+ use_power = ACTIVE_POWER_USE
+ idle_power_usage = IDLE_DRAW_MINIMAL
+ active_power_usage = ACTIVE_DRAW_MEDIUM
+ circuit = /obj/item/circuitboard/machine/microwave
+ var/efficiency = 0
+ var/datum/looping_sound/microwave/soundloop
+
+/obj/machinery/space_radar/Initialize()
+ . = ..()
+ soundloop = new(list(src), FALSE)
+
+/obj/machinery/space_radar/Destroy()
+ QDEL_NULL(soundloop)
+ . = ..()
+
+/obj/machinery/space_radar/RefreshParts()
+ efficiency = 0
+ for(var/obj/item/stock_parts/micro_laser/M in component_parts)
+ efficiency += M.rating
+
+/obj/machinery/space_radar/update_icon_state()
+ else if(operating)
+ icon_state = "radar-on"
+ return ..()
+ else if(panel_open)
+ icon_state = "radar-open"
+ return ..()
+ else
+ icon_state = "radar-off"
+ return ..()
+
+/obj/machinery/space_radar/attackby(obj/item/O, mob/user, params)
+ if(default_deconstruction_crowbar(O))
+ return
+ ..()
+
+
+/obj/machinery/microwave/proc/wzhzhzh()
+ visible_message("\The [src] turns on.", null, "You hear a microwave humming.")
+ operating = TRUE
+
+ set_light(1.5)
+ soundloop.start()
+ update_appearance()
diff --git a/mod_celadon/radar/icons/radar.dmi b/mod_celadon/radar/icons/radar.dmi
new file mode 100644
index 0000000000000000000000000000000000000000..f1bc4b53d7ac2c813ee4177d4da09a4e6219521e
GIT binary patch
literal 1349
zcmV-L1-kl)P)C0000pP)t-sz`(#P
zDk*||cde?WVOv?>-`~V|c(Bo#{{R4h|09i7R*9T?z`(!&0GZ4H0RPNp0GR+R=scbP
z0004WQchCV=-0C=2JR&a84_w-Y6@%7{?OD!tS
z%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+(=$pSoZ^zil2jm5sVFfeu}C*RElr7wGbOXA
z7$|1Q#hF%=n41b=qpQrrp%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85=D0=B0=D1=85=D0=B0=D1=85=D0=B0=D1=85=D0=B0?=
=?UTF-8?q?=D1=85=D0=B0=D1=85=D0=B0=D1=85=D0=B0=D1=85=D0=B0=D1=85=D0=B0?=
=?UTF-8?q?=D1=85=D0=B0=D1=85=D1=85=D0=B0=D1=85=D0=B0=D1=85=D0=B0=D1=85?=
=?UTF-8?q?=D0=B0=D1=85=D0=B0=D1=85=D0=B0=D1=85=D0=B0=D1=85=D0=B0=D1=85?=
=?UTF-8?q?=D0=B0=D1=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
code/modules/overmap/helm.dm | 2 +-
code/modules/overmap/overmap_token.dm | 17 ++++-
mod_celadon/mod_celadon.dme | 1 +
mod_celadon/radar/README.md | 9 ++-
mod_celadon/radar/_radar.dm | 14 ++--
mod_celadon/radar/_radar.dme | 4 +-
mod_celadon/radar/code/radar.dm | 94 +++++++++++++++++++++-----
mod_celadon/radar/sounds/radar.ogg | Bin 0 -> 165582 bytes
8 files changed, 107 insertions(+), 34 deletions(-)
create mode 100644 mod_celadon/radar/sounds/radar.ogg
diff --git a/code/modules/overmap/helm.dm b/code/modules/overmap/helm.dm
index 49a8a4af6716..68417be20bf7 100644
--- a/code/modules/overmap/helm.dm
+++ b/code/modules/overmap/helm.dm
@@ -294,7 +294,7 @@
switch(action) // Universal topics
// [CELADON-ADD] - OVERMAP STUFF - Это вагабонд насрал
if("sensor_increase")
- current_ship.sensor_range = min(5, current_ship.sensor_range+1)
+ current_ship.sensor_range = min(10, current_ship.sensor_range+1)
update_static_data(usr, ui)
current_ship.token.update_screen()
return
diff --git a/code/modules/overmap/overmap_token.dm b/code/modules/overmap/overmap_token.dm
index a6c8adb0dc62..de834abeaed3 100644
--- a/code/modules/overmap/overmap_token.dm
+++ b/code/modules/overmap/overmap_token.dm
@@ -125,7 +125,10 @@
var/list/visible_turfs = list()
// [CELADON-EDIT] - OVERMAP SENSOR - Это вагабонд насрал
// for(var/turf/T in view(4, get_turf(src)))
- for(var/turf/T in view(parent.sensor_range, get_turf(src)))
+ if(istype(parent, /datum/overmap/ship/controlled))
+ var/datum/overmap/ship/controlled/C = parent
+ C.recalculate_radars()
+ for(var/turf/T in view(min(max(1, parent.max_sensor), parent.sensor_range), get_turf(src)))
// [/CELADON-EDIT]
visible_turfs += T
@@ -134,6 +137,16 @@
var/size_y = bbox[4] - bbox[2] + 1
cam_screen?.vis_contents = visible_turfs
- cam_background.icon_state = "clear"
+ //[CELADON-EDIT] - RADAR
+ //cam_background.icon_state = "clear"
+ if(parent.sensor_range > parent.max_sensor)
+ cam_background.icon = 'icons/effects/effects.dmi'
+ cam_background.icon_state = "static_base"
+ cam_screen.alpha = max(0, 255-abs(parent.max_sensor-parent.sensor_range)*128)
+ else
+ cam_background.icon_state = "clear"
+ cam_background.icon = initial(cam_background.icon)
+ cam_screen.alpha = 255
+ //[/CELADON-EDIT]
cam_background.fill_rect(1, 1, size_x, size_y)
return TRUE
diff --git a/mod_celadon/mod_celadon.dme b/mod_celadon/mod_celadon.dme
index 15927c75208b..a56871431e52 100644
--- a/mod_celadon/mod_celadon.dme
+++ b/mod_celadon/mod_celadon.dme
@@ -63,6 +63,7 @@
#include "tajara/_tajara.dme"
#include "turrets/_turrets.dme"
#include "weapons/_weapons.dme"
+#include "radar/_radar.dme"
// --- MOBS --- //
#include "drakeborgs/_drakeborgs.dme"
diff --git a/mod_celadon/radar/README.md b/mod_celadon/radar/README.md
index 955256e4072c..300adadcd7c8 100644
--- a/mod_celadon/radar/README.md
+++ b/mod_celadon/radar/README.md
@@ -11,7 +11,7 @@
## НАЗВАНИЕ_МОДА
-ID мода: CELADON_EXAMPLE
+ID мода: RADAR