Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Access fixes #2087

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@
if(response == "Yes")
turn_on(user)

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

/obj/item/modular_computer/attack_hand(mob/user)
if(anchored)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/power/apc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -813,9 +813,9 @@
if(istype(usr, /mob/living/silicon))
if(emagged || MACHINE_IS_BROKEN(src) || GET_FLAGS(stat, MACHINE_STAT_MAINT))
to_chat(usr, "The APC does not respond to the command.")
else
locked = !locked
update_icon()
else
locked = !locked
update_icon()
else
return FALSE

Expand Down
3 changes: 2 additions & 1 deletion mods/ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,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 +71,7 @@ ID мода: AI

### Авторы:

LordNest
LordNest, Lexanx
<!--
Здесь находится твой никнейм
Если работал совместно - никнеймы тех, кто помогал.
Expand Down
43 changes: 43 additions & 0 deletions mods/ai/code/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,46 @@
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