mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixes #9611
This commit is contained in:
@@ -201,6 +201,7 @@
|
|||||||
transfer.control_disabled = 0
|
transfer.control_disabled = 0
|
||||||
transfer.aiRadio.disabledAi = 0
|
transfer.aiRadio.disabledAi = 0
|
||||||
transfer.loc = get_turf(src)
|
transfer.loc = get_turf(src)
|
||||||
|
transfer.create_eyeobj()
|
||||||
transfer.cancel_camera()
|
transfer.cancel_camera()
|
||||||
user << "\blue <b>Transfer successful</b>: \black [transfer.name] ([rand(1000,9999)].exe) downloaded to host terminal. Local copy wiped."
|
user << "\blue <b>Transfer successful</b>: \black [transfer.name] ([rand(1000,9999)].exe) downloaded to host terminal. Local copy wiped."
|
||||||
transfer << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
transfer << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
||||||
|
|||||||
@@ -110,6 +110,7 @@
|
|||||||
|
|
||||||
ai.loc = src
|
ai.loc = src
|
||||||
ai.cancel_camera()
|
ai.cancel_camera()
|
||||||
|
ai.destroy_eyeobj(src)
|
||||||
ai.control_disabled = 1
|
ai.control_disabled = 1
|
||||||
ai.aiRestorePowerRoutine = 0
|
ai.aiRestorePowerRoutine = 0
|
||||||
carded_ai = ai
|
carded_ai = ai
|
||||||
|
|||||||
@@ -27,23 +27,37 @@
|
|||||||
// The AI's "eye". Described on the top of the page.
|
// The AI's "eye". Described on the top of the page.
|
||||||
|
|
||||||
/mob/living/silicon/ai
|
/mob/living/silicon/ai
|
||||||
eyeobj = new /mob/eye/aiEye()
|
|
||||||
var/obj/machinery/hologram/holopad/holo = null
|
var/obj/machinery/hologram/holopad/holo = null
|
||||||
|
|
||||||
|
/mob/living/silicon/ai/proc/destroy_eyeobj(var/atom/new_eye)
|
||||||
|
if(!eyeobj) return
|
||||||
|
if(!new_eye)
|
||||||
|
new_eye = src
|
||||||
|
eyeobj.owner = null
|
||||||
|
qdel(eyeobj) // No AI, no Eye
|
||||||
|
eyeobj = null
|
||||||
|
if(client)
|
||||||
|
client.eye = new_eye
|
||||||
|
|
||||||
|
/mob/living/silicon/ai/proc/create_eyeobj(var/newloc)
|
||||||
|
if(eyeobj) destroy_eyeobj()
|
||||||
|
if(!newloc) newloc = src.loc
|
||||||
|
eyeobj = PoolOrNew(/mob/eye/aiEye, newloc)
|
||||||
|
eyeobj.owner = src
|
||||||
|
eyeobj.name = "[src.name] (AI Eye)" // Give it a name
|
||||||
|
if(client) client.eye = eyeobj
|
||||||
|
SetName(src.name)
|
||||||
|
|
||||||
// Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us.
|
// Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us.
|
||||||
/mob/living/silicon/ai/New()
|
/mob/living/silicon/ai/New()
|
||||||
..()
|
..()
|
||||||
eyeobj.owner = src
|
create_eyeobj()
|
||||||
eyeobj.name = "[src.name] (AI Eye)" // Give it a name
|
|
||||||
spawn(5)
|
spawn(5)
|
||||||
if(eyeobj)
|
if(eyeobj)
|
||||||
eyeobj.loc = src.loc
|
eyeobj.loc = src.loc
|
||||||
|
|
||||||
/mob/living/silicon/ai/Destroy()
|
/mob/living/silicon/ai/Destroy()
|
||||||
if(eyeobj)
|
destroy_eyeobj()
|
||||||
eyeobj.owner = null
|
|
||||||
qdel(eyeobj) // No AI, no Eye
|
|
||||||
eyeobj = null
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/atom/proc/move_camera_by_click()
|
/atom/proc/move_camera_by_click()
|
||||||
@@ -53,23 +67,18 @@
|
|||||||
AI.eyeobj.setLoc(src)
|
AI.eyeobj.setLoc(src)
|
||||||
|
|
||||||
// Return to the Core.
|
// Return to the Core.
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/core()
|
/mob/living/silicon/ai/proc/core()
|
||||||
set category = "AI Commands"
|
set category = "AI Commands"
|
||||||
set name = "AI Core"
|
set name = "AI Core"
|
||||||
|
|
||||||
view_core()
|
view_core()
|
||||||
|
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/view_core()
|
/mob/living/silicon/ai/proc/view_core()
|
||||||
camera = null
|
camera = null
|
||||||
unset_machine()
|
unset_machine()
|
||||||
|
|
||||||
if(!src.eyeobj)
|
if(!src.eyeobj)
|
||||||
src << "ERROR: Eyeobj not found. Creating new eye..."
|
return
|
||||||
src.eyeobj = new(src.loc)
|
|
||||||
src.eyeobj.owner = src
|
|
||||||
src.SetName(src.name)
|
|
||||||
|
|
||||||
if(client && client.eye)
|
if(client && client.eye)
|
||||||
client.eye = src
|
client.eye = src
|
||||||
|
|||||||
Reference in New Issue
Block a user