Cameras can be broken by weapons/projectiles, fixes

Fixes being able to show papers to AIs through deactivated cameras.
Fixes being able to break doors with TOX, OXY, and CLONE damage.
Fixes camera alarms persisting after the camera is deleted.
Fixes #7021.
Some camera cleanup.
This commit is contained in:
mwerezak
2014-12-03 10:36:30 -05:00
parent 529a610613
commit fad5506683
4 changed files with 107 additions and 43 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ var/const/BORG_WIRE_CAMERA = 16
if (BORG_WIRE_CAMERA)
if(!isnull(R.camera) && !R.scrambledcodes)
R.camera.status = mended
R.camera.deactivate(usr, 0) // Will kick anyone who is watching the Cyborg's camera.
R.camera.kick_viewers() // Will kick anyone who is watching the Cyborg's camera.
if(BORG_WIRE_LAWCHECK) //Forces a law update if the borg is set to receive them. Since an update would happen when the borg checks its laws anyway, not much use, but eh
if (R.lawupdate)
@@ -83,7 +83,7 @@ var/const/BORG_WIRE_CAMERA = 16
if (BORG_WIRE_CAMERA)
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
R.camera.deactivate(usr, 0) // Kick anyone watching the Cyborg's camera, doesn't display you disconnecting the camera.
R.camera.kick_viewers() // Kick anyone watching the Cyborg's camera
R.visible_message("[R]'s camera lense focuses loudly.")
R << "Your camera lense focuses loudly."