mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
removes cheese (#29587)
This commit is contained in:
@@ -124,17 +124,17 @@
|
|||||||
cameraFollow = null
|
cameraFollow = null
|
||||||
unset_machine()
|
unset_machine()
|
||||||
|
|
||||||
if(src.eyeobj && src.loc)
|
if(!loc)
|
||||||
//src.eyeobj.loc = src.loc
|
return
|
||||||
src.eyeobj.forceMove(src.loc)
|
|
||||||
|
if(!eyeobj)
|
||||||
|
make_eyeobj()
|
||||||
else
|
else
|
||||||
src.eyeobj = new(src.loc)
|
eyeobj.forceMove(loc)
|
||||||
src.eyeobj.ai = src
|
|
||||||
src.eyeobj.name = "[src.name] (AI Eye)" // Give it a name
|
|
||||||
src.eyeobj.forceMove(src.loc)
|
|
||||||
|
|
||||||
if(client && client.eye) // Reset these things so the AI can't view through walls and stuff.
|
if(client && client.eye) // Reset these things so the AI can't view through walls and stuff.
|
||||||
client.eye = src
|
client.eye = src
|
||||||
|
client.show_popup_menus = TRUE
|
||||||
change_sight(removing = SEE_TURFS | SEE_MOBS | SEE_OBJS)
|
change_sight(removing = SEE_TURFS | SEE_MOBS | SEE_OBJS)
|
||||||
see_in_dark = 0
|
see_in_dark = 0
|
||||||
see_invisible = SEE_INVISIBLE_LIVING
|
see_invisible = SEE_INVISIBLE_LIVING
|
||||||
@@ -142,14 +142,20 @@
|
|||||||
for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
|
for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
|
||||||
c.remove(eyeobj)
|
c.remove(eyeobj)
|
||||||
|
|
||||||
|
/mob/living/silicon/ai/proc/make_eyeobj()
|
||||||
|
eyeobj = new(loc)
|
||||||
|
eyeobj.ai = src
|
||||||
|
refresh_eyeobj_name()
|
||||||
|
eyeobj.forceMove(loc)
|
||||||
|
|
||||||
|
/mob/living/silicon/ai/proc/refresh_eyeobj_name()
|
||||||
|
eyeobj.name = "[name] (AI Eye)"
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/jump_to_area(var/area/A)
|
/mob/living/silicon/ai/proc/jump_to_area(var/area/A)
|
||||||
if(!A)
|
if(!A)
|
||||||
return
|
return
|
||||||
if(!eyeobj)
|
if(!eyeobj)
|
||||||
eyeobj = new(loc)
|
make_eyeobj()
|
||||||
eyeobj.ai = src
|
|
||||||
eyeobj.name = "[name] (AI Eye)"
|
|
||||||
eyeobj.forceMove(loc)
|
|
||||||
var/list/turfs = list()
|
var/list/turfs = list()
|
||||||
for(var/turf/T in A)
|
for(var/turf/T in A)
|
||||||
turfs.Add(T)
|
turfs.Add(T)
|
||||||
@@ -159,7 +165,7 @@
|
|||||||
return
|
return
|
||||||
cameraFollow = null
|
cameraFollow = null
|
||||||
eyeobj.forceMove(T)
|
eyeobj.forceMove(T)
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/toggleholopadoverlays() //shows holopads above all static
|
/mob/living/silicon/ai/proc/toggleholopadoverlays() //shows holopads above all static
|
||||||
if (!holopadoverlays.len)
|
if (!holopadoverlays.len)
|
||||||
for(var/obj/machinery/hologram/holopad/holopads in machines)
|
for(var/obj/machinery/hologram/holopad/holopads in machines)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
/mob/living/silicon/ai/proc/life_handle_powered_core()
|
/mob/living/silicon/ai/proc/life_handle_powered_core()
|
||||||
var/unblindme = FALSE
|
var/unblindme = FALSE
|
||||||
if(client && client.eye == eyeobj) // We are viewing the world through our "eye" mob.
|
if(client && client.eye == eyeobj) // We are viewing the world through our "eye" mob.
|
||||||
|
client.show_popup_menus = FALSE
|
||||||
change_sight(adding = SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
change_sight(adding = SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||||
see_in_dark = 8
|
see_in_dark = 8
|
||||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||||
@@ -189,9 +190,9 @@
|
|||||||
var/damage_taken
|
var/damage_taken
|
||||||
if(ai_flags & COREFIRERESIST)
|
if(ai_flags & COREFIRERESIST)
|
||||||
damage_taken = getToxLoss() + getBruteLoss() + getOxyLoss()
|
damage_taken = getToxLoss() + getBruteLoss() + getOxyLoss()
|
||||||
else
|
else
|
||||||
damage_taken = getToxLoss() + getFireLoss() + getBruteLoss() + getOxyLoss()
|
damage_taken = getToxLoss() + getFireLoss() + getBruteLoss() + getOxyLoss()
|
||||||
|
|
||||||
health = maxHealth - damage_taken
|
health = maxHealth - damage_taken
|
||||||
|
|
||||||
/mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore
|
/mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore
|
||||||
@@ -200,5 +201,5 @@
|
|||||||
/mob/living/silicon/ai/handle_regular_hud_updates()
|
/mob/living/silicon/ai/handle_regular_hud_updates()
|
||||||
if(malfhacking)
|
if(malfhacking)
|
||||||
throw_alert(SCREEN_ALARM_APC_HACKING, /obj/abstract/screen/alert/robot/apc_hacking)
|
throw_alert(SCREEN_ALARM_APC_HACKING, /obj/abstract/screen/alert/robot/apc_hacking)
|
||||||
else
|
else
|
||||||
clear_alert(SCREEN_ALARM_APC_HACKING)
|
clear_alert(SCREEN_ALARM_APC_HACKING)
|
||||||
|
|||||||
Reference in New Issue
Block a user