mirror of
https://github.com/KabKebab/GS13.git
synced 2026-02-09 23:27:37 +00:00
Merge pull request #1332 from ArchieBeepBoop/aistuff
AI camera stuff, runtime fixes, AI fixes, etc.
This commit is contained in:
@@ -157,6 +157,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
|
||||
|
||||
#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown))
|
||||
|
||||
#define ismimic(A) (istype(A, /mob/living/simple_animal/hostile/hs13mimic))
|
||||
|
||||
GLOBAL_LIST_INIT(shoefootmob, typecacheof(list(
|
||||
/mob/living/carbon/human/,
|
||||
/mob/living/simple_animal/cow,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/datum/component/lockon_aiming
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
var/lock_icon = 'icons/mob/blob.dmi'
|
||||
var/lock_icon = 'icons/mob/cameramob.dmi'
|
||||
var/lock_icon_state = "marker"
|
||||
var/mutable_appearance/lock_appearance
|
||||
var/list/image/lock_images
|
||||
|
||||
@@ -288,9 +288,9 @@
|
||||
|
||||
/obj/machinery/computer/camera_advanced/ratvar/CreateEye()
|
||||
..()
|
||||
eyeobj.visible_icon = 1
|
||||
eyeobj.icon = 'icons/obj/abductor.dmi' //in case you still had any doubts
|
||||
eyeobj.icon_state = "camera_target"
|
||||
eyeobj.visible_icon = TRUE
|
||||
eyeobj.icon = 'icons/mob/cameramob.dmi' //in case you still had any doubts
|
||||
eyeobj.icon_state = "generic_camera"
|
||||
|
||||
/obj/machinery/computer/camera_advanced/ratvar/GrantActions(mob/living/carbon/user)
|
||||
..()
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
/obj/machinery/computer/camera_advanced/abductor/CreateEye()
|
||||
..()
|
||||
eyeobj.visible_icon = 1
|
||||
eyeobj.icon = 'icons/obj/abductor.dmi'
|
||||
eyeobj.icon_state = "camera_target"
|
||||
eyeobj.visible_icon = TRUE
|
||||
eyeobj.icon = 'icons/mob/cameramob.dmi'
|
||||
eyeobj.icon_state = "generic_camera"
|
||||
|
||||
/obj/machinery/computer/camera_advanced/abductor/GrantActions(mob/living/carbon/user)
|
||||
..()
|
||||
|
||||
@@ -9,7 +9,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
name = "Blob Overmind"
|
||||
real_name = "Blob Overmind"
|
||||
desc = "The overmind. It controls the blob."
|
||||
icon = 'icons/mob/blob.dmi'
|
||||
icon = 'icons/mob/cameramob.dmi'
|
||||
icon_state = "marker"
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
move_on_shuttle = 1
|
||||
|
||||
@@ -9,7 +9,7 @@ the new instance inside the host to be updated to the template's stats.
|
||||
name = "Sentient Disease"
|
||||
real_name = "Sentient Disease"
|
||||
desc = ""
|
||||
icon = 'icons/mob/blob.dmi'
|
||||
icon = 'icons/mob/cameramob.dmi'
|
||||
icon_state = "marker"
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
move_on_shuttle = FALSE
|
||||
|
||||
@@ -873,6 +873,8 @@
|
||||
return 0
|
||||
if(digitalcamo || digitalinvis)
|
||||
return 0
|
||||
if(ismimic(src)) // Are we a mimic? Mimics should not be tracked to prevent AI camera cheese.
|
||||
return 0
|
||||
|
||||
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
|
||||
if(!near_camera(src))
|
||||
|
||||
@@ -892,6 +892,7 @@
|
||||
/mob/living/silicon/ai/revive(full_heal = 0, admin_revive = 0)
|
||||
. = ..()
|
||||
if(.) //successfully ressuscitated from death
|
||||
set_eyeobj_visible(TRUE)
|
||||
set_core_display_icon(display_icon_override)
|
||||
|
||||
/mob/living/silicon/ai/proc/malfhacked(obj/machinery/power/apc/apc)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
update_canmove()
|
||||
if(eyeobj)
|
||||
eyeobj.setLoc(get_turf(src))
|
||||
set_eyeobj_visible(FALSE)
|
||||
|
||||
GLOB.shuttle_caller_list -= src
|
||||
SSshuttle.autoEvac()
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
/mob/camera/aiEye
|
||||
name = "Inactive AI Eye"
|
||||
|
||||
icon_state = "ai_camera"
|
||||
icon = 'icons/mob/cameramob.dmi'
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
hud_possible = list(ANTAG_HUD, AI_DETECT_HUD = HUD_LIST_LIST)
|
||||
var/list/visibleCameraChunks = list()
|
||||
@@ -158,11 +160,11 @@
|
||||
cameraFollow = null
|
||||
unset_machine()
|
||||
|
||||
if(!eyeobj || !eyeobj.loc || QDELETED(eyeobj))
|
||||
if(isturf(loc) && (QDELETED(eyeobj) || !eyeobj.loc))
|
||||
to_chat(src, "ERROR: Eyeobj not found. Creating new eye...")
|
||||
create_eye()
|
||||
|
||||
eyeobj.setLoc(loc)
|
||||
eyeobj?.setLoc(loc)
|
||||
|
||||
/mob/living/silicon/ai/proc/create_eye()
|
||||
if(eyeobj)
|
||||
@@ -172,6 +174,13 @@
|
||||
eyeobj.ai = src
|
||||
eyeobj.setLoc(loc)
|
||||
eyeobj.name = "[name] (AI Eye)"
|
||||
set_eyeobj_visible(TRUE)
|
||||
|
||||
/mob/living/silicon/ai/proc/set_eyeobj_visible(state = TRUE)
|
||||
if(!eyeobj)
|
||||
return
|
||||
eyeobj.mouse_opacity = state ? MOUSE_OPACITY_ICON : initial(eyeobj.mouse_opacity)
|
||||
eyeobj.invisibility = state ? INVISIBILITY_OBSERVER : initial(eyeobj.invisibility)
|
||||
|
||||
/mob/living/silicon/ai/verb/toggle_acceleration()
|
||||
set category = "AI Commands"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// messenging the client
|
||||
malfhacked(malfhack)
|
||||
|
||||
if(!eyeobj || QDELETED(eyeobj) || !eyeobj.loc)
|
||||
if(isturf(loc) && (QDELETED(eyeobj) || !eyeobj.loc))
|
||||
view_core()
|
||||
|
||||
if(machine)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
O.mode = 1
|
||||
O.emotion = "Neutral"
|
||||
O.update()
|
||||
set_eyeobj_visible(TRUE)
|
||||
if(multicam_on)
|
||||
end_multicam()
|
||||
view_core()
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
var/obj/machinery/status_display/ai/O = each
|
||||
O.mode = 0
|
||||
O.update()
|
||||
set_eyeobj_visible(FALSE)
|
||||
view_core()
|
||||
|
||||
@@ -120,6 +120,9 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
|
||||
|
||||
/mob/camera/aiEye/pic_in_pic
|
||||
name = "Secondary AI Eye"
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
icon_state = "ai_pip_camera"
|
||||
var/obj/screen/movable/pic_in_pic/ai/screen
|
||||
var/list/cameras_telegraphed = list()
|
||||
var/telegraph_cameras = TRUE
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
|
||||
locked = FALSE //unlock cover
|
||||
|
||||
if(connected_ai)
|
||||
deployed = FALSE
|
||||
|
||||
update_canmove()
|
||||
if(!QDELETED(builtInCamera) && builtInCamera.status)
|
||||
builtInCamera.toggle_cam(src,0)
|
||||
|
||||
@@ -1232,7 +1232,6 @@
|
||||
/mob/living/silicon/robot/proc/TryConnectToAI()
|
||||
set_connected_ai(select_active_ai_with_fewest_borgs(z))
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots += src
|
||||
lawsync()
|
||||
lawupdate = 1
|
||||
return TRUE
|
||||
@@ -1270,4 +1269,4 @@
|
||||
var/mob/living/silicon/ai/old_ai = .
|
||||
old_ai.connected_robots -= src
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots |= src
|
||||
connected_ai.connected_robots |= src
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//Xenobio control console
|
||||
/mob/camera/aiEye/remote/xenobio
|
||||
visible_icon = TRUE
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "camera_target"
|
||||
icon = 'icons/mob/cameramob.dmi'
|
||||
icon_state = "generic_camera"
|
||||
var/allowed_area = null
|
||||
|
||||
/mob/camera/aiEye/remote/xenobio/Initialize()
|
||||
@@ -80,8 +80,8 @@
|
||||
eyeobj = new /mob/camera/aiEye/remote/xenobio(get_turf(src))
|
||||
eyeobj.origin = src
|
||||
eyeobj.visible_icon = TRUE
|
||||
eyeobj.icon = 'icons/obj/abductor.dmi'
|
||||
eyeobj.icon_state = "camera_target"
|
||||
eyeobj.icon = 'icons/mob/cameramob.dmi'
|
||||
eyeobj.icon_state = "generic_camera"
|
||||
|
||||
/obj/machinery/computer/camera_advanced/xenobio/GrantActions(mob/living/user)
|
||||
..()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
BIN
icons/mob/cameramob.dmi
Normal file
BIN
icons/mob/cameramob.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 58 KiB |
Reference in New Issue
Block a user