mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Updated to work with newer cyborg code.
This commit is contained in:
@@ -252,7 +252,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
if(isrobot(src))
|
||||
var/mob/living/silicon/robot/R = src
|
||||
if(oldname != real_name)
|
||||
R.connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [real_name].</span><br>"
|
||||
R.notify_ai(3, oldname, newname)
|
||||
if(R.camera)
|
||||
R.camera.c_tag = real_name
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ var/const/BORG_WIRE_CAMERA = 16
|
||||
var/new_ai = select_active_ai(R)
|
||||
if(new_ai && (new_ai != R.connected_ai))
|
||||
R.connected_ai = new_ai
|
||||
R.connected_ai << "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <b><a href='byond://?src=\ref[R.connected_ai];track2=\ref[R.connected_ai];track=\ref[R]'>[R.name]</a></b></span><br>"
|
||||
R.notify_ai(1)
|
||||
|
||||
if (BORG_WIRE_CAMERA)
|
||||
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
sleep(30)
|
||||
if(R)
|
||||
R.SetLockdown(0)
|
||||
R.notify_ai(1)
|
||||
|
||||
/obj/machinery/transformer/conveyor/New()
|
||||
..()
|
||||
|
||||
@@ -213,6 +213,7 @@
|
||||
if(!aisync)
|
||||
lawsync = 0
|
||||
O.connected_ai = null
|
||||
O.notify_ai(1)
|
||||
else if(forced_ai)
|
||||
O.connected_ai = forced_ai
|
||||
if(!lawsync)
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
R.modtype = "robot"
|
||||
R.updatename("Default")
|
||||
R.status_flags |= CANPUSH
|
||||
R.connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [R.name] has been reset.</span><br>"
|
||||
R.designation = "Default"
|
||||
R.notify_ai(2)
|
||||
R.updateicon()
|
||||
|
||||
return 1
|
||||
@@ -52,7 +53,7 @@
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
R.connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [R.name] is now designated as [heldname].</span><br>"
|
||||
R.notify_ai(3, R.name, heldname)
|
||||
R.name = heldname
|
||||
R.real_name = heldname
|
||||
R.camera.c_tag = heldname
|
||||
@@ -78,7 +79,7 @@
|
||||
R.key = ghost.key
|
||||
|
||||
R.stat = CONSCIOUS
|
||||
R.connected_ai << "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='byond://?src=\ref[R.connected_ai];track2=\ref[R.connected_ai];track=\ref[R]'>[R.name]</a>.</span><br>"
|
||||
R.notify_ai(1)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
connected_ai.connected_robots += src
|
||||
lawsync()
|
||||
lawupdate = 1
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='byond://?src=\ref[connected_ai];track2=\ref[connected_ai];track=\ref[src]'>[name]</a></span><br>"
|
||||
else
|
||||
lawupdate = 0
|
||||
|
||||
@@ -211,7 +210,7 @@
|
||||
overlays -= "eyes" //Takes off the eyes that it started with
|
||||
|
||||
transform_animation(animation_length)
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [mod] module.</span><br>"
|
||||
notify_ai(2)
|
||||
updateicon()
|
||||
|
||||
/mob/living/silicon/robot/proc/transform_animation(animation_length)
|
||||
@@ -1093,3 +1092,14 @@
|
||||
radio = new /obj/item/device/radio/borg/syndicate(src)
|
||||
module = new /obj/item/weapon/robot_module/syndicate(src)
|
||||
laws = new /datum/ai_laws/syndicate_override()
|
||||
|
||||
/mob/living/silicon/robot/proc/notify_ai(var/notifytype, var/oldname, var/newname)
|
||||
if(!connected_ai)
|
||||
return
|
||||
switch(notifytype)
|
||||
if(1) //New Cyborg
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='byond://?src=\ref[connected_ai];track2=\ref[connected_ai];track=\ref[src]'>[name]</a></span><br>"
|
||||
if(2) //New Module
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>"
|
||||
if(3) //New Name
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"
|
||||
@@ -304,6 +304,7 @@
|
||||
|
||||
O.loc = loc
|
||||
O.job = "Cyborg"
|
||||
O.notify_ai(1)
|
||||
|
||||
O.mmi = new /obj/item/device/mmi(O)
|
||||
O.mmi.transfer_identity(src)//Does not transfer key/client.
|
||||
|
||||
@@ -117,6 +117,7 @@ proc/wabbajack(mob/living/M)
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/Robot = M
|
||||
if(Robot.mmi) qdel(Robot.mmi)
|
||||
Robot.notify_ai(1)
|
||||
else
|
||||
for(var/obj/item/W in M)
|
||||
if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something
|
||||
|
||||
Reference in New Issue
Block a user