mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Makes it possible for the AI to alt+left click turfs in camera view and grants ctrl/alt shortcuts to the turret control.
AI can now alt+left click turfs in camera view to list and interact with objects in the status tab. For example allows for interacting with emergency shutters beneath grills. alt-clicking doors now notifies the AI when they are electrified/un-electrified as, unlike most other shortcuts, this doesn't have a visual cue. When interacting with doors and the AI-control is disabled hacking is now automatically initiated, as if the AI had attempted to open the door 'menu'. When borgs/AIs try to interact with an emagged door they now receive a feedback message that it's unresponsive. Parts of implementation done by porting code from tg-station. Conflicts: code/_onclick/ai.dm code/_onclick/click.dm code/modules/mob/living/silicon/ai/freelook/cameranet.dm code/modules/mob/mob.dm
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
/datum/visibility_network/proc/visibility(var/mob/targetMob)
|
||||
|
||||
|
||||
// if we've got not visibility interface on the mob, we canot do this
|
||||
if (!targetMob.visibility_interface)
|
||||
return
|
||||
@@ -88,12 +88,12 @@
|
||||
|
||||
/datum/visibility_network/proc/getViewpointFromMob(var/mob/currentMob)
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/visibility_network/proc/updateMob(var/mob/currentMob)
|
||||
var/viewpoint = getViewpointFromMob(currentMob)
|
||||
if(viewpoint)
|
||||
updateViewpoint(viewpoint)
|
||||
|
||||
|
||||
|
||||
/datum/visibility_network/proc/updateViewpoint(var/viewpoint)
|
||||
if(validViewpoint(viewpoint))
|
||||
@@ -132,6 +132,9 @@
|
||||
// checks if the network can see a particular atom
|
||||
/datum/visibility_network/proc/checkCanSee(var/atom/target)
|
||||
var/turf/position = get_turf(target)
|
||||
return checkTurfVis(position)
|
||||
|
||||
/datum/visibility_network/proc/checkTurfVis(var/turf/position)
|
||||
var/datum/visibility_chunk/chunk = getChunk(position.x, position.y, position.z)
|
||||
if(chunk)
|
||||
if(chunk.changed)
|
||||
|
||||
Reference in New Issue
Block a user