mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Merge remote-tracking branch 'upstream/dev' into StateLaws
This commit is contained in:
@@ -0,0 +1,195 @@
|
||||
// Wires for airlocks
|
||||
|
||||
/datum/wires/airlock/secure
|
||||
random = 1
|
||||
wire_count = 14
|
||||
|
||||
/datum/wires/airlock
|
||||
holder_type = /obj/machinery/door/airlock
|
||||
wire_count = 12
|
||||
window_y = 570
|
||||
|
||||
var/const/AIRLOCK_WIRE_IDSCAN = 1
|
||||
var/const/AIRLOCK_WIRE_MAIN_POWER1 = 2
|
||||
var/const/AIRLOCK_WIRE_MAIN_POWER2 = 4
|
||||
var/const/AIRLOCK_WIRE_DOOR_BOLTS = 8
|
||||
var/const/AIRLOCK_WIRE_BACKUP_POWER1 = 16
|
||||
var/const/AIRLOCK_WIRE_BACKUP_POWER2 = 32
|
||||
var/const/AIRLOCK_WIRE_OPEN_DOOR = 64
|
||||
var/const/AIRLOCK_WIRE_AI_CONTROL = 128
|
||||
var/const/AIRLOCK_WIRE_ELECTRIFY = 256
|
||||
var/const/AIRLOCK_WIRE_SAFETY = 512
|
||||
var/const/AIRLOCK_WIRE_SPEED = 1024
|
||||
var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
|
||||
/datum/wires/airlock/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
if(!istype(L, /mob/living/silicon))
|
||||
if(A.isElectrified())
|
||||
if(A.shock(L, 100))
|
||||
return 0
|
||||
if(A.p_open)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/airlock/GetInteractWindow()
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
. += ..()
|
||||
. += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]", (A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
|
||||
(A.lights ? "The door bolt lights are on." : "The door bolt lights are off!"),
|
||||
((A.hasPower()) ? "The test light is on." : "The test light is off!"),
|
||||
((A.aiControlDisabled==0 && !A.emagged) ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
|
||||
(A.safe==0 ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
|
||||
(A.normalspeed==0 ? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),
|
||||
(A.aiDisabledIdScanner==0 ? "The IDScan light is on." : "The IDScan light is off."))
|
||||
|
||||
/datum/wires/airlock/UpdateCut(var/index, var/mended)
|
||||
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
switch(index)
|
||||
if(AIRLOCK_WIRE_IDSCAN)
|
||||
A.aiDisabledIdScanner = !mended
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1, AIRLOCK_WIRE_MAIN_POWER2)
|
||||
|
||||
if(!mended)
|
||||
//Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be crowbarred open, but bolts-raising will not work. Cutting these wires may electocute the user.
|
||||
A.loseMainPower()
|
||||
A.shock(usr, 50)
|
||||
else
|
||||
if((!IsIndexCut(AIRLOCK_WIRE_MAIN_POWER1)) && (!IsIndexCut(AIRLOCK_WIRE_MAIN_POWER2)))
|
||||
A.regainMainPower()
|
||||
A.shock(usr, 50)
|
||||
|
||||
if(AIRLOCK_WIRE_BACKUP_POWER1, AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
|
||||
if(!mended)
|
||||
//Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user.
|
||||
A.loseBackupPower()
|
||||
A.shock(usr, 50)
|
||||
else
|
||||
if((!IsIndexCut(AIRLOCK_WIRE_BACKUP_POWER1)) && (!IsIndexCut(AIRLOCK_WIRE_BACKUP_POWER2)))
|
||||
A.regainBackupPower()
|
||||
A.shock(usr, 50)
|
||||
|
||||
if(AIRLOCK_WIRE_DOOR_BOLTS)
|
||||
|
||||
if(!mended)
|
||||
//Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present)
|
||||
if(A.locked!=1)
|
||||
A.locked = 1
|
||||
A.update_icon()
|
||||
|
||||
if(AIRLOCK_WIRE_AI_CONTROL)
|
||||
|
||||
if(!mended)
|
||||
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
|
||||
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
if(A.aiControlDisabled == 0)
|
||||
A.aiControlDisabled = 1
|
||||
else if(A.aiControlDisabled == -1)
|
||||
A.aiControlDisabled = 2
|
||||
else
|
||||
if(A.aiControlDisabled == 1)
|
||||
A.aiControlDisabled = 0
|
||||
else if(A.aiControlDisabled == 2)
|
||||
A.aiControlDisabled = -1
|
||||
|
||||
if(AIRLOCK_WIRE_ELECTRIFY)
|
||||
|
||||
if(!mended)
|
||||
//Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted.
|
||||
if(A.secondsElectrified != -1)
|
||||
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]")
|
||||
A.secondsElectrified = -1
|
||||
else
|
||||
if(A.secondsElectrified == -1)
|
||||
A.secondsElectrified = 0
|
||||
return // Don't update the dialog.
|
||||
|
||||
if (AIRLOCK_WIRE_SAFETY)
|
||||
A.safe = mended
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
A.autoclose = mended
|
||||
if(mended)
|
||||
if(!A.density)
|
||||
A.close()
|
||||
|
||||
if(AIRLOCK_WIRE_LIGHT)
|
||||
A.lights = mended
|
||||
A.update_icon()
|
||||
|
||||
|
||||
/datum/wires/airlock/UpdatePulsed(var/index)
|
||||
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
switch(index)
|
||||
if(AIRLOCK_WIRE_IDSCAN)
|
||||
//Sending a pulse through flashes the red light on the door (if the door has power).
|
||||
if(A.hasPower() && A.density)
|
||||
A.do_animate("deny")
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
|
||||
A.loseMainPower()
|
||||
if(AIRLOCK_WIRE_DOOR_BOLTS)
|
||||
//one wire for door bolts. Sending a pulse through this drops door bolts if they're not down (whether power's on or not),
|
||||
//raises them if they are down (only if power's on)
|
||||
if(!A.locked)
|
||||
A.locked = 1
|
||||
A.audible_message("You hear a click from the bottom of the door.", null, 1)
|
||||
else
|
||||
if(A.hasPower()) //only can raise bolts if power's on
|
||||
A.locked = 0
|
||||
A.audible_message("You hear a click from the bottom of the door.", null, 1)
|
||||
A.update_icon()
|
||||
|
||||
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
|
||||
A.loseBackupPower()
|
||||
if(AIRLOCK_WIRE_AI_CONTROL)
|
||||
if(A.aiControlDisabled == 0)
|
||||
A.aiControlDisabled = 1
|
||||
else if(A.aiControlDisabled == -1)
|
||||
A.aiControlDisabled = 2
|
||||
|
||||
spawn(10)
|
||||
if(A)
|
||||
if(A.aiControlDisabled == 1)
|
||||
A.aiControlDisabled = 0
|
||||
else if(A.aiControlDisabled == 2)
|
||||
A.aiControlDisabled = -1
|
||||
|
||||
if(AIRLOCK_WIRE_ELECTRIFY)
|
||||
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
|
||||
if(A.secondsElectrified==0)
|
||||
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]")
|
||||
A.secondsElectrified = 30
|
||||
spawn(10)
|
||||
if(A)
|
||||
//TODO: Move this into process() and make pulsing reset secondsElectrified to 30
|
||||
while (A.secondsElectrified>0)
|
||||
A.secondsElectrified-=1
|
||||
if(A.secondsElectrified<0)
|
||||
A.secondsElectrified = 0
|
||||
sleep(10)
|
||||
return
|
||||
if(AIRLOCK_WIRE_OPEN_DOOR)
|
||||
//tries to open the door without ID
|
||||
//will succeed only if the ID wire is cut or the door requires no access and it's not emagged
|
||||
if(A.emagged) return
|
||||
if(!A.requiresID() || A.check_access(null))
|
||||
if(A.density) A.open()
|
||||
else A.close()
|
||||
if(AIRLOCK_WIRE_SAFETY)
|
||||
A.safe = !A.safe
|
||||
if(!A.density)
|
||||
A.close()
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
A.normalspeed = !A.normalspeed
|
||||
|
||||
if(AIRLOCK_WIRE_LIGHT)
|
||||
A.lights = !A.lights
|
||||
A.update_icon()
|
||||
@@ -0,0 +1,93 @@
|
||||
/datum/wires/alarm
|
||||
holder_type = /obj/machinery/alarm
|
||||
wire_count = 5
|
||||
|
||||
var/const/AALARM_WIRE_IDSCAN = 1
|
||||
var/const/AALARM_WIRE_POWER = 2
|
||||
var/const/AALARM_WIRE_SYPHON = 4
|
||||
var/const/AALARM_WIRE_AI_CONTROL = 8
|
||||
var/const/AALARM_WIRE_AALARM = 16
|
||||
|
||||
|
||||
/datum/wires/alarm/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/alarm/A = holder
|
||||
if(A.wiresexposed)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/alarm/GetInteractWindow()
|
||||
var/obj/machinery/alarm/A = holder
|
||||
. += ..()
|
||||
. += text("<br>\n[(A.locked ? "The Air Alarm is locked." : "The Air Alarm is unlocked.")]<br>\n[((A.shorted || (A.stat & (NOPOWER|BROKEN))) ? "The Air Alarm is offline." : "The Air Alarm is working properly!")]<br>\n[(A.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
|
||||
|
||||
/datum/wires/alarm/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/alarm/A = holder
|
||||
switch(index)
|
||||
if(AALARM_WIRE_IDSCAN)
|
||||
if(!mended)
|
||||
A.locked = 1
|
||||
//world << "Idscan wire cut"
|
||||
|
||||
if(AALARM_WIRE_POWER)
|
||||
A.shock(usr, 50)
|
||||
A.shorted = !mended
|
||||
A.update_icon()
|
||||
//world << "Power wire cut"
|
||||
|
||||
if (AALARM_WIRE_AI_CONTROL)
|
||||
if (A.aidisabled == !mended)
|
||||
A.aidisabled = mended
|
||||
//world << "AI Control Wire Cut"
|
||||
|
||||
if(AALARM_WIRE_SYPHON)
|
||||
if(!mended)
|
||||
A.mode = 3 // AALARM_MODE_PANIC
|
||||
A.apply_mode()
|
||||
//world << "Syphon Wire Cut"
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
if (A.alarm_area.atmosalert(2))
|
||||
A.post_alert(2)
|
||||
A.update_icon()
|
||||
|
||||
/datum/wires/alarm/UpdatePulsed(var/index)
|
||||
var/obj/machinery/alarm/A = holder
|
||||
switch(index)
|
||||
if(AALARM_WIRE_IDSCAN)
|
||||
A.locked = !A.locked
|
||||
// world << "Idscan wire pulsed"
|
||||
|
||||
if (AALARM_WIRE_POWER)
|
||||
// world << "Power wire pulsed"
|
||||
if(A.shorted == 0)
|
||||
A.shorted = 1
|
||||
A.update_icon()
|
||||
|
||||
spawn(12000)
|
||||
if(A.shorted == 1)
|
||||
A.shorted = 0
|
||||
A.update_icon()
|
||||
|
||||
|
||||
if (AALARM_WIRE_AI_CONTROL)
|
||||
// world << "AI Control wire pulsed"
|
||||
if (A.aidisabled == 0)
|
||||
A.aidisabled = 1
|
||||
A.updateDialog()
|
||||
spawn(100)
|
||||
if (A.aidisabled == 1)
|
||||
A.aidisabled = 0
|
||||
|
||||
if(AALARM_WIRE_SYPHON)
|
||||
// world << "Syphon wire pulsed"
|
||||
if(A.mode == 1) // AALARM_MODE_SCRUB
|
||||
A.mode = 3 // AALARM_MODE_PANIC
|
||||
else
|
||||
A.mode = 1 // AALARM_MODE_SCRUB
|
||||
A.apply_mode()
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
// world << "Aalarm wire pulsed"
|
||||
if (A.alarm_area.atmosalert(0))
|
||||
A.post_alert(0)
|
||||
A.update_icon()
|
||||
@@ -31,7 +31,6 @@
|
||||
spawn(300)
|
||||
if(A)
|
||||
A.locked = 1
|
||||
A.updateDialog()
|
||||
|
||||
if (APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2)
|
||||
if(A.shorted == 0)
|
||||
@@ -40,7 +39,6 @@
|
||||
spawn(1200)
|
||||
if(A && !IsIndexCut(APC_WIRE_MAIN_POWER1) && !IsIndexCut(APC_WIRE_MAIN_POWER2))
|
||||
A.shorted = 0
|
||||
A.updateDialog()
|
||||
|
||||
if (APC_WIRE_AI_CONTROL)
|
||||
if (A.aidisabled == 0)
|
||||
@@ -49,9 +47,6 @@
|
||||
spawn(10)
|
||||
if(A && !IsIndexCut(APC_WIRE_AI_CONTROL))
|
||||
A.aidisabled = 0
|
||||
A.updateDialog()
|
||||
|
||||
A.updateDialog()
|
||||
|
||||
/datum/wires/apc/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/power/apc/A = holder
|
||||
@@ -75,4 +70,3 @@
|
||||
else
|
||||
if (A.aidisabled == 1)
|
||||
A.aidisabled = 0
|
||||
A.updateDialog()
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
// Wires for cameras.
|
||||
|
||||
/datum/wires/camera
|
||||
random = 1
|
||||
holder_type = /obj/machinery/camera
|
||||
wire_count = 6
|
||||
|
||||
/datum/wires/camera/GetInteractWindow()
|
||||
|
||||
. = ..()
|
||||
var/obj/machinery/camera/C = holder
|
||||
. += "<br>\n[(C.view_range == initial(C.view_range) ? "The focus light is on." : "The focus light is off.")]"
|
||||
. += "<br>\n[(C.can_use() ? "The power link light is on." : "The power link light is off.")]"
|
||||
. += "<br>\n[(C.light_disabled ? "The camera light is off." : "The camera light is on.")]"
|
||||
. += "<br>\n[(C.alarm_on ? "The alarm light is on." : "The alarm light is off.")]"
|
||||
return .
|
||||
|
||||
/datum/wires/camera/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/camera/C = holder
|
||||
return C.panel_open
|
||||
|
||||
var/const/CAMERA_WIRE_FOCUS = 1
|
||||
var/const/CAMERA_WIRE_POWER = 2
|
||||
var/const/CAMERA_WIRE_LIGHT = 4
|
||||
var/const/CAMERA_WIRE_ALARM = 8
|
||||
var/const/CAMERA_WIRE_NOTHING1 = 16
|
||||
var/const/CAMERA_WIRE_NOTHING2 = 32
|
||||
|
||||
/datum/wires/camera/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/camera/C = holder
|
||||
|
||||
switch(index)
|
||||
if(CAMERA_WIRE_FOCUS)
|
||||
var/range = (mended ? initial(C.view_range) : C.short_range)
|
||||
C.setViewRange(range)
|
||||
|
||||
if(CAMERA_WIRE_POWER)
|
||||
if(C.status && !mended || !C.status && mended)
|
||||
C.deactivate(usr, 1)
|
||||
|
||||
if(CAMERA_WIRE_LIGHT)
|
||||
C.light_disabled = !mended
|
||||
|
||||
if(CAMERA_WIRE_ALARM)
|
||||
if(!mended)
|
||||
C.triggerCameraAlarm()
|
||||
else
|
||||
C.cancelCameraAlarm()
|
||||
return
|
||||
|
||||
/datum/wires/camera/UpdatePulsed(var/index)
|
||||
var/obj/machinery/camera/C = holder
|
||||
if(IsIndexCut(index))
|
||||
return
|
||||
switch(index)
|
||||
if(CAMERA_WIRE_FOCUS)
|
||||
var/new_range = (C.view_range == initial(C.view_range) ? C.short_range : initial(C.view_range))
|
||||
C.setViewRange(new_range)
|
||||
|
||||
if(CAMERA_WIRE_POWER)
|
||||
C.deactivate(null) // Deactivate the camera
|
||||
|
||||
if(CAMERA_WIRE_LIGHT)
|
||||
C.light_disabled = !C.light_disabled
|
||||
|
||||
if(CAMERA_WIRE_ALARM)
|
||||
C.visible_message("\icon[C] *beep*", "\icon[C] *beep*")
|
||||
return
|
||||
|
||||
/datum/wires/camera/proc/CanDeconstruct()
|
||||
if(IsIndexCut(CAMERA_WIRE_POWER) && IsIndexCut(CAMERA_WIRE_FOCUS) && IsIndexCut(CAMERA_WIRE_LIGHT) && IsIndexCut(CAMERA_WIRE_NOTHING1) && IsIndexCut(CAMERA_WIRE_NOTHING2))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -0,0 +1,103 @@
|
||||
/datum/wires/robot
|
||||
random = 1
|
||||
holder_type = /mob/living/silicon/robot
|
||||
wire_count = 5
|
||||
|
||||
var/const/BORG_WIRE_LAWCHECK = 1
|
||||
var/const/BORG_WIRE_MAIN_POWER = 2 // The power wires do nothing whyyyyyyyyyyyyy
|
||||
var/const/BORG_WIRE_LOCKED_DOWN = 4
|
||||
var/const/BORG_WIRE_AI_CONTROL = 8
|
||||
var/const/BORG_WIRE_CAMERA = 16
|
||||
|
||||
/datum/wires/robot/GetInteractWindow()
|
||||
|
||||
. = ..()
|
||||
var/mob/living/silicon/robot/R = holder
|
||||
. += text("<br>\n[(R.lawupdate ? "The LawSync light is on." : "The LawSync light is off.")]")
|
||||
. += text("<br>\n[(R.connected_ai ? "The AI link light is on." : "The AI link light is off.")]")
|
||||
. += text("<br>\n[((!isnull(R.camera) && R.camera.status == 1) ? "The Camera light is on." : "The Camera light is off.")]")
|
||||
. += text("<br>\n[(R.lockcharge ? "The lockdown light is on." : "The lockdown light is off.")]")
|
||||
return .
|
||||
|
||||
/datum/wires/robot/UpdateCut(var/index, var/mended)
|
||||
|
||||
var/mob/living/silicon/robot/R = holder
|
||||
switch(index)
|
||||
if(BORG_WIRE_LAWCHECK) //Cut the law wire, and the borg will no longer receive law updates from its AI
|
||||
if(!mended)
|
||||
if (R.lawupdate == 1)
|
||||
R << "LawSync protocol engaged."
|
||||
R.show_laws()
|
||||
else
|
||||
if (R.lawupdate == 0 && !R.emagged)
|
||||
R.lawupdate = 1
|
||||
|
||||
if (BORG_WIRE_AI_CONTROL) //Cut the AI wire to reset AI control
|
||||
if(!mended)
|
||||
if (R.connected_ai)
|
||||
R.connected_ai = null
|
||||
|
||||
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.
|
||||
|
||||
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)
|
||||
R.lawsync()
|
||||
|
||||
if(BORG_WIRE_LOCKED_DOWN)
|
||||
R.SetLockdown(!mended)
|
||||
|
||||
|
||||
/datum/wires/robot/UpdatePulsed(var/index)
|
||||
|
||||
var/mob/living/silicon/robot/R = holder
|
||||
switch(index)
|
||||
if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
|
||||
if(!R.emagged)
|
||||
var/new_ai = select_active_ai(R)
|
||||
if(new_ai && (new_ai != R.connected_ai))
|
||||
R.connected_ai = new_ai
|
||||
R.notify_ai(1)
|
||||
var/numberer = 1 // Send images the Cyborg has taken to the AI's album upon sync.
|
||||
for(var/datum/picture/z in R.aiCamera.aipictures)
|
||||
if(R.connected_ai.aiCamera.aipictures.len == 0)
|
||||
var/datum/picture/p = new/datum/picture()
|
||||
p = z
|
||||
p.fields["name"] = "Uploaded Image [numberer] (synced from [R.name])"
|
||||
R.connected_ai.aiCamera.aipictures += p
|
||||
numberer++
|
||||
continue
|
||||
for(var/datum/picture/t in R.connected_ai.aiCamera.aipictures) //Hopefully to prevent someone spamming images to silicons, by spamming this wire
|
||||
if((z.fields["pixel_y"] != t.fields["pixel_y"]) && (z.fields["pixel_x"] != t.fields["pixel_x"])) //~2.26 out of 1000 chance this will stop something it shouldn't
|
||||
var/datum/picture/p = new/datum/picture()
|
||||
p = z
|
||||
p.fields["name"] = "Uploaded Image [numberer] (synced from [R.name])"
|
||||
R.connected_ai.aiCamera.aipictures += p
|
||||
else
|
||||
continue
|
||||
numberer++
|
||||
if(R.aiCamera.aipictures.len > 0)
|
||||
R << "<span class='notice'>Locally saved images synced with AI. Images were retained in local database in case of loss of connection with the AI.</span>"
|
||||
|
||||
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.visible_message("[R]'s camera lense focuses loudly.")
|
||||
R << "Your camera lense focuses loudly."
|
||||
|
||||
if(BORG_WIRE_LOCKED_DOWN)
|
||||
R.SetLockdown(!R.lockcharge) // Toggle
|
||||
|
||||
/datum/wires/robot/CanUse(var/mob/living/L)
|
||||
var/mob/living/silicon/robot/R = holder
|
||||
if(R.wiresexposed)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/robot/proc/IsCameraCut()
|
||||
return wires_status & BORG_WIRE_CAMERA
|
||||
|
||||
/datum/wires/robot/proc/LockedCut()
|
||||
return wires_status & BORG_WIRE_LOCKED_DOWN
|
||||
@@ -2,6 +2,10 @@
|
||||
holder_type = /obj/machinery/smartfridge
|
||||
wire_count = 3
|
||||
|
||||
/datum/wires/smartfridge/secure
|
||||
random = 1
|
||||
wire_count = 4
|
||||
|
||||
var/const/SMARTFRIDGE_WIRE_ELECTRIFY = 1
|
||||
var/const/SMARTFRIDGE_WIRE_THROW = 2
|
||||
var/const/SMARTFRIDGE_WIRE_IDSCAN = 4
|
||||
@@ -16,11 +20,6 @@ var/const/SMARTFRIDGE_WIRE_IDSCAN = 4
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/smartfridge/Interact(var/mob/living/user)
|
||||
if(CanUse(user))
|
||||
var/obj/machinery/smartfridge/S = holder
|
||||
S.attack_hand(user)
|
||||
|
||||
/datum/wires/smartfridge/GetInteractWindow()
|
||||
var/obj/machinery/smartfridge/S = holder
|
||||
. += ..()
|
||||
|
||||
@@ -16,11 +16,6 @@ var/const/SUIT_STORAGE_WIRE_LOCKED = 4
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/suit_storage_unit/Interact(var/mob/living/user)
|
||||
if(CanUse(user))
|
||||
var/obj/machinery/suit_cycler/S = holder
|
||||
S.attack_hand(user)
|
||||
|
||||
/datum/wires/suit_storage_unit/GetInteractWindow()
|
||||
var/obj/machinery/suit_cycler/S = holder
|
||||
. += ..()
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#define MAX_FLAG 65535
|
||||
|
||||
var/list/same_wires = list()
|
||||
// 12 colours, if you're adding more than 12 wires then add more colours here
|
||||
var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", "gold", "gray", "cyan", "navy", "purple", "pink")
|
||||
// 14 colours, if you're adding more than 14 wires then add more colours here
|
||||
var/list/wireColours = list("red", "blue", "green", "white", "orange", "brown", "gold", "gray", "cyan", "navy", "purple", "pink", "black", "yellow")
|
||||
|
||||
/datum/wires
|
||||
|
||||
|
||||
Reference in New Issue
Block a user