Skip to content

Commit

Permalink
Merge pull request #1925 from Lexanx/AI-items-acess
Browse files Browse the repository at this point in the history
Фикс ИИ. Доступ к вещам и Кнопка терминал к консолям
  • Loading branch information
YegorKandziuba authored Mar 7, 2024
2 parents 7286e9c + 065ebfa commit d72a367
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@
var/response = alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", "Yes", "No")
if(response == "Yes")
turn_on(user)

/obj/item/modular_computer/attack_ai(mob/user)
/*
/obj/item/modular_computer/attack_ai(mob/user) -------> mods\ai\code\ai.dm
return attack_self(user)
*/

/obj/item/modular_computer/attack_hand(mob/user)
if(anchored)
Expand Down
4 changes: 3 additions & 1 deletion mods/ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#### Список PRов:

- https://github.com/SierraBay/SierraBay12/pull/1773
- https://github.com/SierraBay/SierraBay12/pull/1925
<!--
Ссылки на PRы, связанные с модом:
- Создание
Expand Down Expand Up @@ -29,6 +30,7 @@ ID мода: AI

- `code/modules/mob/living/silicon/ai/ai.dm`: `var/global/list/ai_verbs_default`
- `code/modules/mob/observer/freelook/chunk.dm`: `/datum/obfuscation/proc/get_obfuscation()`
- `code/modules/modular_computers/computers/modular_computer/interaction.dm` : `/obj/item/modular_computer/attack_ai`
<!--
Если вы редактировали какие-либо процедуры или переменные в кор коде,
они должны быть указаны здесь.
Expand Down Expand Up @@ -70,7 +72,7 @@ ID мода: AI

### Авторы:

LordNest
LordNest, Lexanx
<!--
Здесь находится твой никнейм
Если работал совместно - никнеймы тех, кто помогал.
Expand Down
9 changes: 9 additions & 0 deletions mods/ai/_ai.dme
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@
#include "code/ai_screen_objects.dm"

#endif
// BEGIN_INTERNALS
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
// END_FILE_DIR
// BEGIN_PREFERENCES
// END_PREFERENCES
// BEGIN_INCLUDE
// END_INCLUDE
45 changes: 45 additions & 0 deletions mods/ai/code/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,48 @@
set name = "Show Crew Records"

open_subsystem(/datum/nano_module/records)



//Кнопка для открытия терминала на компьютерах для ИИ

/obj/item/modular_computer/attack_ai(mob/user)
var/datum/extension/interactive/ntos/os = get_extension(src, /datum/extension/interactive/ntos)
if(!enabled && screen_on)
return attack_self(user)
switch(alert("Open Terminal or interact with it?", "Open Terminal or interact with it?", "Interact", "Terminal"))
if("Interact")
return attack_self(user)
if("Terminal")
return os.open_terminal(user)


/obj/machinery/computer/modular/attack_ai(mob/user)
var/datum/extension/interactive/ntos/os = get_extension(src, /datum/extension/interactive/ntos)
switch(alert("Open Terminal or interact with it?", "Open Terminal or interact with it?", "Interact", "Terminal"))
if("Interact")
return interface_interact(user)
if("Terminal")
os.system_boot()
return os.open_terminal(user)


/// Тут мы перечисляем все, к чему к ИИ не должно быть доступа.

/obj/machinery/portable_atmospherics/attack_ai(mob/user)
return

/obj/machinery/floodlight/attack_ai(mob/user)
return

/obj/machinery/shieldgen/attack_ai(mob/user)
return

/obj/machinery/door/attack_ai(mob/user)
return attack_hand(user)

/obj/machinery/suspension_gen/attack_ai(mob/user)
return

/obj/machinery/icecream_vat/attack_ai(mob/user)
return

0 comments on commit d72a367

Please sign in to comment.