From 85ffb692c57088fe68b9b4ac24146c3034f1beff Mon Sep 17 00:00:00 2001 From: LordNest Date: Tue, 26 Dec 2023 23:22:17 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A3=20=D0=A0=D0=9E=D0=A1=D0=A1=D0=98=D0=98?= =?UTF-8?q?=20=D0=A2=D0=A0=D0=98=20=D0=9F=D0=A3=D0=A2=D0=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Рейвы Водка и АЙТИИИИИ --- maps/sierra/sierra.dm | 1 + mods/NTNet/README.md | 78 ++++++++ mods/NTNet/_NTNet.dm | 4 + mods/NTNet/_NTNet.dme | 9 + .../NTNet => mods/NTNet/code}/NTNet-core.dm | 4 - mods/NTNet/code/NTNet-items.dm | 176 ++++++++++++++++++ .../NTNet/code}/terminal/commands/connect.dm | 0 .../NTNet/code}/terminal/terminal-core.dm | 0 mods/NTNet/icons/obj_eyes.dmi | Bin 0 -> 1390 bytes mods/NTNet/icons/onmob_eyes.dmi | Bin 0 -> 1434 bytes mods/antagonists/code/operative.dm | 137 ++++++++++++++ packs/sierra-tweaks/_pack.dm | 4 - .../machinery/NTNet/NTNet-items.dm | 37 ---- 13 files changed, 405 insertions(+), 45 deletions(-) create mode 100644 mods/NTNet/README.md create mode 100644 mods/NTNet/_NTNet.dm create mode 100644 mods/NTNet/_NTNet.dme rename {packs/sierra-tweaks/machinery/NTNet => mods/NTNet/code}/NTNet-core.dm (94%) create mode 100644 mods/NTNet/code/NTNet-items.dm rename {packs/sierra-tweaks/machinery/NTNet => mods/NTNet/code}/terminal/commands/connect.dm (100%) rename {packs/sierra-tweaks/machinery/NTNet => mods/NTNet/code}/terminal/terminal-core.dm (100%) create mode 100644 mods/NTNet/icons/obj_eyes.dmi create mode 100644 mods/NTNet/icons/onmob_eyes.dmi delete mode 100644 packs/sierra-tweaks/machinery/NTNet/NTNet-items.dm diff --git a/maps/sierra/sierra.dm b/maps/sierra/sierra.dm index d365586a9cb80..fa2c53b4339ba 100644 --- a/maps/sierra/sierra.dm +++ b/maps/sierra/sierra.dm @@ -177,6 +177,7 @@ #include "../../mods/jukebox_tapes/_jukebox_tapes.dme" #include "../../mods/legalese_language/_legalese.dme" #include "../../mods/nyc_posters/_nyc_posters.dme" + #include "../../mods/NTnet/_NTnet.dme" #include "../../mods/leroy_beasts/_leroy_beasts.dme" #include "../../mods/screentips/_screentips.dme" #include "../../mods/tajara/_tajara.dme" diff --git a/mods/NTNet/README.md b/mods/NTNet/README.md new file mode 100644 index 0000000000000..96253e92e3d69 --- /dev/null +++ b/mods/NTNet/README.md @@ -0,0 +1,78 @@ + +#### Список PRов: + +- https://github.com/SierraBay/SierraBay12/pull/1683 + + + +## Экран лобби + +ID мода: NTNET + + +### Описание мода + +NTNet + + +### Изменения *кор кода* + +- `code\__defines\items_clothing.dm` +- `code\modules\mob\living\carbon\human\examine.dm` + + +### Оверрайды + + + +### Дефайны + +- HUD IT + + +### Используемые файлы, не содержащиеся в модпаке + +- Отсутствуют + + +### Авторы: + +- Код - LordNest + + diff --git a/mods/NTNet/_NTNet.dm b/mods/NTNet/_NTNet.dm new file mode 100644 index 0000000000000..b8294a95e3f9e --- /dev/null +++ b/mods/NTNet/_NTNet.dm @@ -0,0 +1,4 @@ +/singleton/modpack/ntnet + name = "NTNet" + desc = "NTNet - Best solutions for your internal network. Мод, который добавляет НТнет." + author = "LordNest and others who originally coded this thing." diff --git a/mods/NTNet/_NTNet.dme b/mods/NTNet/_NTNet.dme new file mode 100644 index 0000000000000..ab9a1e62ea76f --- /dev/null +++ b/mods/NTNet/_NTNet.dme @@ -0,0 +1,9 @@ +#ifndef MODPACK_NTNET +#define MODPACK_NTNET + +#include "_NTNet.dm" + +#include "code\NTNet-items.dm" +#include "code\NTNet-core.dm" + +#endif diff --git a/packs/sierra-tweaks/machinery/NTNet/NTNet-core.dm b/mods/NTNet/code/NTNet-core.dm similarity index 94% rename from packs/sierra-tweaks/machinery/NTNet/NTNet-core.dm rename to mods/NTNet/code/NTNet-core.dm index 4066847e9ffa9..f7a882e6a66c2 100644 --- a/packs/sierra-tweaks/machinery/NTNet/NTNet-core.dm +++ b/mods/NTNet/code/NTNet-core.dm @@ -1,14 +1,10 @@ #include "terminal\terminal-core.dm" GLOBAL_LIST_INIT(NTNet_machines, list()) - // modify core /obj/machinery var/NTNet_id -/obj/machinery/door/airlock - var/t_ntnet_id - //generating ID /obj/machinery/proc/get_new_ntnet_id(A) NTNet_id = A + num2text(rand(100,999)) diff --git a/mods/NTNet/code/NTNet-items.dm b/mods/NTNet/code/NTNet-items.dm new file mode 100644 index 0000000000000..3a62f530c58b2 --- /dev/null +++ b/mods/NTNet/code/NTNet-items.dm @@ -0,0 +1,176 @@ +// HACSO's HUD and related interactions +// code\__defines\items_clothing.dm - used outside pack +// code\modules\mob\living\carbon\human\examine.dm - used outside pack + +/obj/item/clothing/glasses/hud/it + name = "IT special HUD" + desc = "An augmented reality device that allows you to see doors NTNet ID's." + icon = 'mods/NTNet/icons/obj_eyes.dmi' + item_icons = list(slot_glasses_str = 'mods/NTNet/icons/onmob_eyes.dmi') + icon_state = "ithud" + off_state = "ithud_off" + hud_type = HUD_IT + body_parts_covered = 0 + +/obj/machinery/door/airlock/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, datum/topic_state/state = GLOB.default_state) + var/data[0] + + data["main_power_loss"] = round(main_power_lost_until > 0 ? max(main_power_lost_until - world.time, 0) / 10 : main_power_lost_until, 1) + data["backup_power_loss"] = round(backup_power_lost_until > 0 ? max(backup_power_lost_until - world.time, 0) / 10 : backup_power_lost_until, 1) + data["electrified"] = round(electrified_until > 0 ? max(electrified_until - world.time, 0) / 10 : electrified_until, 1) + data["open"] = !density + + data["airlock_ntnet_id"] = NTNet_id + + var/commands[0] + commands[LIST_PRE_INC(commands)] = list("name" = "IdScan", "command"= "idscan", "active" = !aiDisabledIdScanner, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) + commands[LIST_PRE_INC(commands)] = list("name" = "Bolts", "command"= "bolts", "active" = !locked, "enabled" = "Raised ", "disabled" = "Dropped", "danger" = 0, "act" = 0) + commands[LIST_PRE_INC(commands)] = list("name" = "Lights", "command"= "lights", "active" = lights, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) + commands[LIST_PRE_INC(commands)] = list("name" = "Safeties", "command"= "safeties", "active" = safe, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) + commands[LIST_PRE_INC(commands)] = list("name" = "Timing", "command"= "timing", "active" = normalspeed, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) + commands[LIST_PRE_INC(commands)] = list("name" = "Door State", "command"= "open", "active" = density, "enabled" = "Closed", "disabled" = "Opened", "danger" = 0, "act" = 0) + + data["commands"] = commands + + ui = SSnano.try_update_ui(user, src, ui_key, ui, data, force_open) + if (!ui) + ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls", 450, 350, state = state) + ui.set_initial_data(data) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if (src.isElectrified()) + if (istype(mover, /obj/item)) + var/obj/item/i = mover + if (i.matter && (MATERIAL_STEEL in i.matter) && i.matter[MATERIAL_STEEL] > 0) + var/datum/effect/spark_spread/s = new /datum/effect/spark_spread + s.set_up(5, 1, src) + s.start() + return ..() + +/obj/machinery/door/airlock/examine(mob/user) + . = ..() + if (lock_cut_state == BOLTS_EXPOSED) + to_chat(user, "The bolt cover has been cut open.") + if (lock_cut_state == BOLTS_CUT) + to_chat(user, "The door bolts have been cut.") + if(brace) + to_chat(user, "\The [brace] is installed on \the [src], preventing it from opening.") + brace.examine_damage_state(user) + if(hasHUD(user, HUD_IT) && arePowerSystemsOn()) + to_chat(user, SPAN_INFO(SPAN_ITALIC("You may notice a small hologram that says: [NTNet_id]"))) + +/obj/item/modular_computer/examine(mob/user) + . = ..() + if(hasHUD(user, HUD_IT)) + if(network_card && network_card.check_functionality() && enabled) + to_chat(user, SPAN_INFO(SPAN_ITALIC("You may notice a small hologram that says: [network_card.get_network_tag()]."))) + +/obj/machinery/computer/modular/examine(mob/user) + . = ..() + if(hasHUD(user, HUD_IT)) + var/datum/extension/interactive/ntos/os = get_extension(src, /datum/extension/interactive/ntos) + var/obj/item/stock_parts/computer/network_card/network_card = os.get_component(PART_NETWORK) + if(istype(network_card) && network_card.check_functionality() && os.on) + to_chat(user, SPAN_INFO(SPAN_ITALIC("You may notice a small hologram that says: [network_card.get_network_tag()]."))) + +/* +/client/proc/debug_airlocks_id() + set name = "Debug Airlocks ID" + set category = "Debug" +//html{background: linear-gradient(180deg, #373737, #171717);color: #a4bad6;}hr{background-color: #40628a;height: 1px;} + var/stylesheet = {""} + var/IDS_table = {" + + + [IDS.Join("")]" + else + data += "
ERROR CODE 523 (Origin Is Unreachable): Airlocks isn't initialized or not found.
" + data += stylesheet + //show_browser(src, data, "airlocks_ntnet_id_debug") + var/datum/browser/popup = new(src.virtual_eye, "ailocksdebug", "Airlock ID Debug", 700, 800) + popup.set_content(data) + popup.open() + return 1 +*/ diff --git a/packs/sierra-tweaks/machinery/NTNet/terminal/commands/connect.dm b/mods/NTNet/code/terminal/commands/connect.dm similarity index 100% rename from packs/sierra-tweaks/machinery/NTNet/terminal/commands/connect.dm rename to mods/NTNet/code/terminal/commands/connect.dm diff --git a/packs/sierra-tweaks/machinery/NTNet/terminal/terminal-core.dm b/mods/NTNet/code/terminal/terminal-core.dm similarity index 100% rename from packs/sierra-tweaks/machinery/NTNet/terminal/terminal-core.dm rename to mods/NTNet/code/terminal/terminal-core.dm diff --git a/mods/NTNet/icons/obj_eyes.dmi b/mods/NTNet/icons/obj_eyes.dmi new file mode 100644 index 0000000000000000000000000000000000000000..c79445c78325b546537b0ce4170b65690c6e400c GIT binary patch literal 1390 zcma)6eKga182=8Fn3Q{Es%t8@ZpuQ!v1+O@EN{(-w2@jl-bO1g$(BxbrWYia^0L(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f}nYpW)WVgg6$V{eDSrK7`1k85ymO}A8c>wU}pD6dY+1co%IhC_<0B79v+C! F`5S8qjaL8w literal 0 HcmV?d00001 diff --git a/mods/NTNet/icons/onmob_eyes.dmi b/mods/NTNet/icons/onmob_eyes.dmi new file mode 100644 index 0000000000000000000000000000000000000000..c0c87d8bafdfb77205e08c793535f4e60a16ea5c GIT binary patch literal 1434 zcmeAS@N?(olHy`uVBq!ia0vp^2SAvE4M+yv$zcal9aSL_B`&GO$wiq3C7Jno3=9=> za!+mKI%FW?_R#XXX5FpOBiH!!$|s7Pys)o{r6^f%MXQQdZ8f{P>$#E#*@ZIxd2MrL zY*oc$-zD(emYq4hZPtMs-%}>NP`!G7%B$547c+eO3*wS;POzM1?P>Hm^G}Vn=bih% zaCRfdb#<(Z@7K8M9=mzSukYTwXWH)#r(ZqBz`%0W)5S5QV$R#U8@-h?B^o|nFPPvY zSah31Oib`d(RLd#pNYR_>2BL%nXWoP>F*?^oYGzyMoahZ&-^!@t&2M0^oQBxsZz%B zXjzV=$!f(%6F09u#N&DGNo8HG!Tkx-mrHbikACs}w_@Pbx-ZNg_LCSn&N8&5F*r$k zGtBi4tFQ1RSk;;a7a_w>_G zD{8+fyqd?zz}O!ZQ|_4b?7^2;al^77<*k|s@3 zIoWnNamwkZGoDb2G2i{WiZVAt-Teo~|_?zE? zAO&eb@_Q{S|L0A5ZeQv*@uzrH|G$`TkNL~k1(yqE&%e`ee|Gcp%zyXz6-@3kf?|eZ zCnF3wCe-lz>l?|0uJs13G=v*{2uZ=jUIZd#(5P$K@O3>sNnyeemV<+dFQ* z=ufq;llyG(-|6+myZ!%dzCE7*w@@}kdz|v+`#F{K>*rqQQ&s|o z|NC>AMi7_U+yDO9J!ARLYWs!@HSAQ3dT2IzcRYRe)1S|G$shRp
ID + NAME + LOCATION"} + var/list/IDS = list() + var/list/bugged_airlocks = list() + var/bugged_airlocks_table = {"
ID + NAME + LOCATION + ID PAIR + PAIR NAME + PAIR LOCATION"} + var/data = "" + for(var/obj/machinery/door/airlock/TEST in GLOB.airlocks) +/* + for(var/obj/machinery/door/airlock/I in SSmachines.machinery) + if(TEST.NTNet_id == I.NTNet_id && I != TEST) + bugged_airlocks += "[I.name] | ID: [I.NTNet_id] | Location: [I.loc]" + continue +*/ + IDS += {" [TEST.NTNet_id] + [TEST.name] + ([where] ([TEST.loc]))"} + for(var/obj/machinery/door/airlock/i in GLOB.airlocks) + for(var/obj/machinery/door/airlock/n in GLOB.airlocks) + if(n == i) + continue + if(n.NTNet_id == i.NTNet_id) + bugged_airlocks += {" [n.NTNet_id] + [n.name] + [n.loc] ([[where](n)]) + + [i.NTNet_id] + [i.name] + [i.loc] ([[where](i)])"} + + if(bugged_airlocks.len) + data += {"
+
+

+ Airlocks with same ID's: +

+
+
+ + [bugged_airlocks_table] + [bugged_airlocks.Join("")] +
+
+
+

"} + else + data += "
Airlocks ID system stable
" + data += "

All airlocks IDs:


" + if(IDS.len) + data += "
[IDS_table]