mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
* initial commit * dme include * add shell actions * debug round 1 * debug round 2 * cleanup * better comment * cleanup? * fixes * fixes 2 * cleanup 2 * cleanup 3 * adds comments from wich repo they were ported * updatehealth change * notify to define * tguification * spannening * BORIS fixes * BORIS fix final * better comments * icons * radio fix, tg lable, status order * PDA, syndie key fix * soullink port completion * possiblle uid fix * channel redundancy removed * upadtehealth fix * notification de-duplication * cleanup * null checks * more null checks, updatehealth fix, better destroy() * more spanenming * cell fix * null checks, better updatehealth, radio fix? * mech fixes * removed redundancy, fix else if chain * Apply suggestions from code review part 1 Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: Kameň <167246105+StoneyFox29@users.noreply.github.com> * Code Review part 2 Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> * I forgor Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> * Post review runtime fixes, removed more annotations, bettered some comments * verb un-funkening, possible CI fix * null check order, comment * SPAN, minor fix * CI part 2 * CI part 3 * CI part 4, made on iphone * Apply suggestions from myself Co-authored-by: Kameň <167246105+StoneyFox29@users.noreply.github.com> Signed-off-by: Kameň <167246105+StoneyFox29@users.noreply.github.com> * soulinks, removing a verb, module reset changes, * better documentation, name changes * updatehealth improvement * spawn_shell fix * fixes shell_spawn fix * attack chain something, merge conflict * grammar, BORIS module improvement * shttle fix, early return * formatting * BORIS comment * Apply suggestions from code review Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: Kameň <167246105+StoneyFox29@users.noreply.github.com> * name change * bug report fix * slightly better bug fix * prevent the dropping of the BORIS module on reset upgrade * typo fix * wire order fix * makes emagging a shell drop the BORIS again * moving boris to misc category * makes the BORIS show up on mechfab --------- Signed-off-by: Kameň <167246105+StoneyFox29@users.noreply.github.com> Co-authored-by: TobiasHC2009 <167246105+TobiasHC2009@users.noreply.github.com> Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
74 lines
2.3 KiB
Plaintext
74 lines
2.3 KiB
Plaintext
/datum/wires/robot
|
|
randomize = TRUE
|
|
holder_type = /mob/living/silicon/robot
|
|
wire_count = 5
|
|
proper_name = "Cyborg"
|
|
|
|
/datum/wires/robot/New(atom/_holder)
|
|
wires = list(WIRE_AI_CONTROL, WIRE_BORG_CAMERA, WIRE_BORG_LAWCHECK, WIRE_BORG_LOCKED)
|
|
return ..()
|
|
|
|
/datum/wires/robot/get_status()
|
|
. = ..()
|
|
var/mob/living/silicon/robot/R = holder
|
|
. += "The LawSync light is [R.lawupdate ? "on" : "off"]."
|
|
. += "The AI link light is [R.connected_ai ? "on" : "off"]."
|
|
. += "The Camera light is [(R.camera && R.camera.status == 1) ? "on" : "off"]."
|
|
. += "The lockdown light is [R.lockcharge ? "on" : "off"]."
|
|
|
|
/datum/wires/robot/on_cut(wire, mend)
|
|
var/mob/living/silicon/robot/R = holder
|
|
switch(wire)
|
|
if(WIRE_BORG_LAWCHECK) //Cut the law wire, and the borg will no longer receive law updates from its AI
|
|
if(!mend)
|
|
if(R.lawupdate)
|
|
to_chat(R, "LawSync protocol engaged.")
|
|
R.lawsync()
|
|
R.show_laws()
|
|
if(!R.deployed)
|
|
R.lawupdate = FALSE
|
|
else
|
|
if(!R.lawupdate && !R.emagged)
|
|
R.lawupdate = TRUE
|
|
|
|
if(WIRE_AI_CONTROL) //Cut the AI wire to reset AI control
|
|
if(!mend)
|
|
if(R.connected_ai)
|
|
R.notify_ai(DISCONNECT)
|
|
if(R.shell)
|
|
R.undeploy() //Forced disconnect of an AI should this body be a shell.
|
|
R.disconnect_from_ai()
|
|
|
|
if(WIRE_BORG_CAMERA)
|
|
if(!isnull(R.camera) && !R.scrambledcodes)
|
|
R.camera.status = !mend //If we are mending, we set the status to false, and toggle cam. Otherwise, we set it to true, and cut. It's silly, I know
|
|
R.camera.toggle_cam(usr, 0) // Will kick anyone who is watching the Cyborg's camera.
|
|
|
|
if(WIRE_BORG_LOCKED)
|
|
R.SetLockdown(!mend)
|
|
..()
|
|
|
|
|
|
/datum/wires/robot/on_pulse(wire)
|
|
var/mob/living/silicon/robot/R = holder
|
|
switch(wire)
|
|
if(WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
|
|
if(!R.emagged)
|
|
R.connect_to_ai(select_active_ai())
|
|
|
|
if(WIRE_BORG_CAMERA)
|
|
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
|
|
R.camera.toggle_cam(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.")
|
|
to_chat(R, "Your camera lense focuses loudly.")
|
|
|
|
if(WIRE_BORG_LOCKED)
|
|
R.SetLockdown(!R.lockcharge) // Toggle
|
|
..()
|
|
|
|
/datum/wires/robot/interactable(mob/user)
|
|
var/mob/living/silicon/robot/R = holder
|
|
if(R.wiresexposed)
|
|
return TRUE
|
|
return FALSE
|