Skip to content

Commit

Permalink
BOUNTY: AI Update + Shuttle feature (#2665)
Browse files Browse the repository at this point in the history
Co-authored-by: UEDCommander <[email protected]>
  • Loading branch information
AmShegars and UEDCommander authored Sep 23, 2024
1 parent 1394a77 commit 034f2b5
Show file tree
Hide file tree
Showing 26 changed files with 405 additions and 284 deletions.
9 changes: 3 additions & 6 deletions code/game/machinery/_machines_base/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,20 +216,17 @@
return TOPIC_HANDLED

. = ..()
if(isAI(usr))
//[SIERRA-ADD] - AI-UPDATE
//Здесь мы будем овверрайдить решение кода свыше. Давайте проверим, есть ли у нас доступ проводом?
//(Технически это костыль, вместо того чтоб вмешиваться в CanUseTopic и глубже в код, мы перебьём)
//Значение на нужное нам. ИИ сможет взаимодействовать с обьектами, если они вне доступа камер
//[SIERRA-ADD] - AI-UPDATE
if(isAI(usr)) //Оверрайд для ИИ, ему всегда обновляет УИ
if(istype(src, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/door = src
if(door.CanAIUseTopic(usr))
updateUsrDialog()
return FALSE
//[SIERRA-ADD]
else
updateUsrDialog()
return FALSE
//[SIERRA-ADD]
if(. == TOPIC_REFRESH)
updateUsrDialog() // Update legacy UIs to the extent possible.

Expand Down
14 changes: 3 additions & 11 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -831,18 +831,10 @@ About the new airlock wires panel:
to_chat(user, SPAN_WARNING("Unable to interface: Internal error."))
return STATUS_CLOSE
if(issilicon(user) && !src.canAIControl())
//[SIERRA-ADD] - AI-UPDATE
if(ai_control_disabled != 2)
if(src.canAIHack(user))
src.start_hack(user)
if(ai_control_disabled == 2)
return ..()
//[SIERRA-ADD]
if (src.isAllPowerLoss()) //don't really like how this gets checked a second time, but not sure how else to do it.
to_chat(user, "<span class='warning'>Unable to interface: Connection timed out.</span>")
else
if (src.isAllPowerLoss()) //don't really like how this gets checked a second time, but not sure how else to do it.
to_chat(user, "<span class='warning'>Unable to interface: Connection timed out.</span>")
else
to_chat(user, "<span class='warning'>Unable to interface: Connection refused.</span>")
to_chat(user, "<span class='warning'>Unable to interface: Connection refused.</span>")
return STATUS_CLOSE

return ..()
Expand Down
4 changes: 0 additions & 4 deletions code/game/machinery/portable_turret.dm
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,6 @@ var/global/list/turret_icons
check_arrest = TC.check_arrest
check_weapons = TC.check_weapons
check_anomalies = TC.check_anomalies
//[SIERRA-ADD] - AI-UPDATE
attack_robots = TC.attack_robots
hold_deployed = TC.hold_deployed
//[SIERRA-ADD]
ailock = TC.ailock

src.power_change()
Expand Down
4 changes: 0 additions & 4 deletions code/game/machinery/turret_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@
TC.check_arrest = check_arrest
TC.check_weapons = check_weapons
TC.check_anomalies = check_anomalies
//[SIERRA-ADD] - AI_UPDATE
TC.attack_robots = attack_robots
TC.hold_deployed = hold_deployed
//[SIERRA-ADD]
TC.ailock = ailock

if(istype(control_area))
Expand Down
4 changes: 3 additions & 1 deletion code/modules/nano/nanoui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@ nanoui is used to open and update nano browser uis
if(isAI(user))
if(istype(host, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/door = host
if(door.CanAIUseTopic(user))
if(door.CanUseTopic(user))
new_status = 2
else
new_status = 2
//[SIERRA-ADD]
if(new_status == STATUS_CLOSE)
close()
Expand Down
5 changes: 4 additions & 1 deletion code/modules/overmap/ships/computers/helm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ GLOBAL_LIST_EMPTY(overmap_helm_computers)

if (href_list["manual"])
viewing_overmap(user) ? unlook(user) : look(user)

//[SIERRA-ADD]
if(href_list["Throw off"])
Throw_off_the_pursuers(user)
//[SIERRA-ADD]
add_fingerprint(user)
updateUsrDialog()

Expand Down
Loading

0 comments on commit 034f2b5

Please sign in to comment.