mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #6787 from mwerezak/robot-camera
Alternate fix to #6705
This commit is contained in:
@@ -283,12 +283,4 @@
|
||||
return 0
|
||||
return 1
|
||||
busy = 0
|
||||
return 0
|
||||
|
||||
/obj/machinery/camera/proc/is_functional()
|
||||
if(istype(loc,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(!R.stat && R.is_component_functioning("camera"))
|
||||
return 1
|
||||
return 0
|
||||
return status
|
||||
return 0
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
proc/can_access_camera(var/obj/machinery/camera/C)
|
||||
var/list/shared_networks = src.network & C.network
|
||||
if(shared_networks.len && C.is_functional())
|
||||
if(shared_networks.len)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -134,7 +134,33 @@
|
||||
external_type = /obj/item/robot_parts/robot_component/camera
|
||||
idle_usage = 10
|
||||
max_damage = 40
|
||||
var/obj/machinery/camera/camera
|
||||
|
||||
/datum/robot_component/camera/New(mob/living/silicon/robot/R)
|
||||
..()
|
||||
camera = R.camera
|
||||
|
||||
/datum/robot_component/camera/update_power_state()
|
||||
..()
|
||||
if (camera)
|
||||
//check if camera component was deactivated
|
||||
if (!powered && camera.status != powered)
|
||||
camera.kick_viewers()
|
||||
camera.status = powered
|
||||
|
||||
/datum/robot_component/camera/install()
|
||||
if (camera)
|
||||
camera.status = 1
|
||||
|
||||
/datum/robot_component/camera/uninstall()
|
||||
if (camera)
|
||||
camera.status = 0
|
||||
camera.kick_viewers()
|
||||
|
||||
/datum/robot_component/camera/destroy()
|
||||
if (camera)
|
||||
camera.status = 0
|
||||
camera.kick_viewers()
|
||||
|
||||
// SELF DIAGNOSIS MODULE
|
||||
// Analyses cyborg's modules, providing damage readouts and basic information
|
||||
|
||||
Reference in New Issue
Block a user