mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge pull request #7093 from PsiOmegaDelta/Tracking
AI can now track people with max level sensors.
This commit is contained in:
@@ -12,12 +12,7 @@ proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
|
|||||||
if(P.Mob.see_invisible < patient.invisibility)
|
if(P.Mob.see_invisible < patient.invisibility)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if(!local_scanner)
|
if(!(local_scanner || hassensorlevel(P, SUIT_SENSOR_VITAL)))
|
||||||
if(istype(patient.w_uniform, /obj/item/clothing/under))
|
|
||||||
var/obj/item/clothing/under/U = patient.w_uniform
|
|
||||||
if(U.sensor_mode < 2)
|
|
||||||
continue
|
|
||||||
else
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
P.Client.images += patient.hud_list[HEALTH_HUD]
|
P.Client.images += patient.hud_list[HEALTH_HUD]
|
||||||
|
|||||||
@@ -211,7 +211,7 @@
|
|||||||
U.ai_cancel_tracking()
|
U.ai_cancel_tracking()
|
||||||
return
|
return
|
||||||
|
|
||||||
if (!near_camera(target))
|
if (!trackable(target))
|
||||||
U << "Target is not near any active cameras."
|
U << "Target is not near any active cameras."
|
||||||
sleep(100)
|
sleep(100)
|
||||||
continue
|
continue
|
||||||
@@ -234,6 +234,9 @@
|
|||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/proc/trackable(var/mob/living/M)
|
||||||
|
return near_camera(M) || (M.loc.z in config.station_levels && hassensorlevel(M, SUIT_SENSOR_TRACKING))
|
||||||
|
|
||||||
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
|
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
|
||||||
if (!istype(user))
|
if (!istype(user))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -202,6 +202,12 @@ var/datum/event_manager/event_manager = new()
|
|||||||
#define EVENT_LEVEL_MODERATE 2
|
#define EVENT_LEVEL_MODERATE 2
|
||||||
#define EVENT_LEVEL_MAJOR 3
|
#define EVENT_LEVEL_MAJOR 3
|
||||||
|
|
||||||
|
// Suit sensor levels
|
||||||
|
#define SUIT_SENSOR_OFF 0
|
||||||
|
#define SUIT_SENSOR_BINARY 1
|
||||||
|
#define SUIT_SENSOR_VITAL 2
|
||||||
|
#define SUIT_SENSOR_TRACKING 3
|
||||||
|
|
||||||
//away missions
|
//away missions
|
||||||
var/list/awaydestinations = list() //a list of landmarks that the warpgate can take you to
|
var/list/awaydestinations = list() //a list of landmarks that the warpgate can take you to
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,13 @@ proc/iscuffed(A)
|
|||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
proc/hassensorlevel(A, var/level)
|
||||||
|
var/mob/living/carbon/human/H = A
|
||||||
|
if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under))
|
||||||
|
var/obj/item/clothing/under/U = H.w_uniform
|
||||||
|
return U.sensor_mode >= level
|
||||||
|
return 0
|
||||||
|
|
||||||
/proc/hsl2rgb(h, s, l)
|
/proc/hsl2rgb(h, s, l)
|
||||||
return //TODO: Implement
|
return //TODO: Implement
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user