Cyborg PDA Update

Allows robots to use the same PDA subtype as the AI. Adds a 1/1000 chance of AOL "You've got mail!" playing when receiving a PDA message.
This commit is contained in:
haha26315
2022-09-15 12:33:30 -04:00
parent acbc8027c1
commit 8b04cb4fc1
8 changed files with 62 additions and 35 deletions
+2 -2
View File
@@ -90,7 +90,7 @@
/obj/effect/mob_spawn/proc/delayusability(deciseconds, showOnMenu) //How many deciseconds until it is enabled, + should it show up on the menu?
addtimer(CALLBACK(src, .proc/enableghostrole, showOnMenu), deciseconds)
/obj/effect/mob_spawn/proc/enableghostrole(show)
ghost_usable = TRUE
if (show == TRUE)
@@ -276,7 +276,7 @@
var/mob/living/silicon/ai/spawned/M = new(loc) //spawn new AI at landmark as var M
M.name = src.name
M.real_name = src.name
M.aiPDA.toff = TRUE //turns the AI's PDA messenger off, stopping it showing up on player PDAs
M.builtInPDA.toff = TRUE //turns the AI's PDA messenger off, stopping it showing up on player PDAs
M.death() //call the AI's death proc
qdel(src)
+7 -8
View File
@@ -40,7 +40,6 @@
var/obj/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
var/radio_enabled = TRUE //Determins if a carded AI can speak with its built in radio or not.
radiomod = ";" //AIs will, by default, state their laws on the internal radio.
var/obj/item/pda/ai/aiPDA
var/obj/item/multitool/aiMulti
var/mob/living/simple_animal/bot/Bot
var/tracking = FALSE //this is 1 if the AI is currently tracking somebody, but the track has not yet been completed.
@@ -139,10 +138,10 @@
add_verb(src, /mob/living/silicon/ai/proc/show_laws_verb)
aiPDA = new/obj/item/pda/ai(src)
aiPDA.owner = name
aiPDA.ownjob = "AI"
aiPDA.name = name + " (" + aiPDA.ownjob + ")"
builtInPDA = new/obj/item/pda/ai(src)
builtInPDA.owner = name
builtInPDA.ownjob = "AI"
builtInPDA.name = name + " (" + builtInPDA.ownjob + ")"
aiMulti = new(src)
radio = new /obj/item/radio/headset/ai(src)
@@ -846,9 +845,9 @@
Slave.show_laws()
/mob/living/silicon/ai/replace_identification_name(oldname,newname)
if(aiPDA)
aiPDA.owner = newname
aiPDA.name = newname + " (" + aiPDA.ownjob + ")"
if(builtInPDA)
builtInPDA.owner = newname
builtInPDA.name = newname + " (" + builtInPDA.ownjob + ")"
/mob/living/silicon/ai/proc/add_malf_picker()
+13 -5
View File
@@ -142,10 +142,6 @@
builtInCamera.internal_light = FALSE
if(wires.is_cut(WIRE_CAMERA))
builtInCamera.status = 0
module = new /obj/item/robot_module(src)
module.rebuild_modules()
update_icons()
. = ..()
//If this body is meant to be a borg controlled by the AI player
if(shell)
@@ -165,6 +161,18 @@
updatename()
//Name updated, can build PDA data now
if(!builtInPDA)
builtInPDA = new/obj/item/pda/ai(src)
builtInPDA.owner = name
builtInPDA.ownjob = "Station Cyborg"
builtInPDA.name = name + " (" + builtInPDA.ownjob + ")"
module = new /obj/item/robot_module(src)
module.rebuild_modules()
update_icons()
. = ..()
equippable_hats = typecacheof(equippable_hats)
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
@@ -661,7 +669,7 @@
if(BORGBELLY_GREEN) sleeper_overlay_state = "_g"
if(BORGBELLY_RED) sleeper_overlay_state = "_r"
add_overlay("[module.sleeper_overlay][sleeper_overlay_state]")
if(module.dogborg == TRUE)
if(resting)
cut_overlays()
@@ -43,6 +43,8 @@
var/obj/machinery/camera/builtInCamera = null
var/updating = FALSE //portable camera camerachunk update
var/obj/item/pda/ai/builtInPDA = null
var/hack_software = FALSE //Will be able to use hacking actions
var/interaction_range = 7 //wireless control range
@@ -70,6 +72,7 @@
radio = null
aicamera = null
QDEL_NULL(builtInCamera)
QDEL_NULL(builtInPDA)
GLOB.silicon_mobs -= src
return ..()