Skip to content

Commit

Permalink
У РОССИИ ТРИ ПУТИ
Browse files Browse the repository at this point in the history
Рейвы
Водка
и АЙТИИИИИ
  • Loading branch information
LordNest committed Dec 26, 2023
1 parent e87d540 commit 85ffb69
Show file tree
Hide file tree
Showing 13 changed files with 405 additions and 45 deletions.
1 change: 1 addition & 0 deletions maps/sierra/sierra.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
78 changes: 78 additions & 0 deletions mods/NTNet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

#### Список PRов:

- https://github.com/SierraBay/SierraBay12/pull/1683
<!--
Ссылки на PRы, связанные с модом:
- Создание
- Большие изменения
-->

<!-- Название мода. Не важно на русском или на английском. -->
## Экран лобби

ID мода: NTNET
<!--
Название модпака прописными буквами, СОЕДИНЁННЫМИ_ПОДЧЁРКИВАНИЕМ,
которое ты будешь использовать для обозначения файлов.
-->

### Описание мода

NTNet
<!--
Что он делает, что добавляет: что, куда, зачем и почему - всё здесь.
А также любая полезная информация.
-->

### Изменения *кор кода*

- `code\__defines\items_clothing.dm`
- `code\modules\mob\living\carbon\human\examine.dm`
<!--
Если вы редактировали какие-либо процедуры или переменные в кор коде,
они должны быть указаны здесь.
Нужно указать и файл, и процедуры/переменные.
Изменений нет - напиши "Отсутствуют"
-->

### Оверрайды

<!--
Если ты добавлял новый модульный оверрайд, его нужно указать здесь.
Здесь указываются оверрайды в твоём моде и папке `_master_files`
Изменений нет - напиши "Отсутствуют"
-->

### Дефайны

- HUD IT
<!--
Если требовалось добавить какие-либо дефайны, укажи файлы,
в которые ты их добавил, а также перечисли имена.
И то же самое, если ты используешь дефайны, определённые другим модом.
Не используешь - напиши "Отсутствуют"
-->

### Используемые файлы, не содержащиеся в модпаке

- Отсутствуют
<!--
Будь то немодульный файл или модульный файл, который не содержится в папке,
принадлежащей этому конкретному моду, он должен быть упомянут здесь.
Хорошими примерами являются иконки или звуки, которые используются одновременно
несколькими модулями, или что-либо подобное.
-->

### Авторы:

- Код - LordNest

<!--
Здесь находится твой никнейм
Если работал совместно - никнеймы тех, кто помогал.
В случае порта чего-либо должна быть ссылка на источник.
-->
4 changes: 4 additions & 0 deletions mods/NTNet/_NTNet.dm
Original file line number Diff line number Diff line change
@@ -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."
9 changes: 9 additions & 0 deletions mods/NTNet/_NTNet.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef MODPACK_NTNET
#define MODPACK_NTNET

#include "_NTNet.dm"

#include "code\NTNet-items.dm"
#include "code\NTNet-core.dm"

#endif
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
176 changes: 176 additions & 0 deletions mods/NTNet/code/NTNet-items.dm
Original file line number Diff line number Diff line change
@@ -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 = {"<style>
div.id_airlocksbugged{
background: #844;
border-radius: 5px;
border-color: #a00;
padding: 20px;
}
table, td, th {
border: 1px solid #6a6;
}
td, th {
width: 100px;
}
table.id_airlocksbugged{
border: 1px solid #a66;
}
table.id_airlocksbugged td, table.id_airlocksbugged th{
border: 1px solid #a66;
}
.airlocksid_stable{
background: #4c4;
border-radius: 5px;
border: #0a0 solid 3px;
padding: 30px;
font-size: 30px;
}
</style>"}
var/IDS_table = {"<table>
<tr>
<th>ID
<th>NAME
<th>LOCATION"}
var/list/IDS = list()
var/list/bugged_airlocks = list()
var/bugged_airlocks_table = {"<tr>
<th class='id_airlocksbugged'>ID
<th class='id_airlocksbugged'>NAME
<th class='id_airlocksbugged'>LOCATION
<th class='id_airlocksbugged'>ID PAIR
<th class='id_airlocksbugged'>PAIR NAME
<th class='id_airlocksbugged'>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 += {" <td>[TEST.NTNet_id]
<td>[TEST.name]
<td>(<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[TEST.x];Y=[TEST.y];Z=[TEST.z]'>[where]</a> ([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 += {" <td class='id_airlocksbugged'>[n.NTNet_id]
<td class='id_airlocksbugged'>[n.name]
<td class='id_airlocksbugged'>[n.loc] ([<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[n.x];Y=[n.y];Z=[n.z]'>[where]</a>(n)])
<td class='id_airlocksbugged'>[i.NTNet_id]
<td class='id_airlocksbugged'>[i.name]
<td class='id_airlocksbugged'>[i.loc] ([<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[i.x];Y=[i.y];Z=[i.z]'>[where]</a>(i)])"}
if(bugged_airlocks.len)
data += {"<div class = 'id_airlocksbugged'>
<center>
<h2>
Airlocks with same ID's:
</h2>
<br>
<div align='center'>
<table class="id_airlocksbugged">
[bugged_airlocks_table]<tr>
[bugged_airlocks.Join("<tr>")]
</table>
</div>
</center>
</div><hr>"}
else
data += "<div class = 'airlocksid_stable'>Airlocks ID system stable</div>"
data += "<center><h1>All airlocks IDs:</h1></center><hr>"
if(IDS.len)
data += "<div align='center'>[IDS_table]<tr>[IDS.Join("<tr>")]</div>"
else
data += "<div class = 'id_airlocksbugged'>ERROR CODE 523 (Origin Is Unreachable): Airlocks isn't initialized or not found.</div>"
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
*/
File renamed without changes.
Binary file added mods/NTNet/icons/obj_eyes.dmi
Binary file not shown.
Binary file added mods/NTNet/icons/onmob_eyes.dmi
Binary file not shown.
Loading

0 comments on commit 85ffb69

Please sign in to comment.