This commit is contained in:
shellspeed1
2022-09-17 02:40:37 -07:00
parent b554906511
commit 11ec2b89e0
4 changed files with 98 additions and 0 deletions

View File

@@ -4,3 +4,6 @@
#define HUD_STYLE_NOHUD 3 //No hud (for screenshots)
#define HUD_VERSIONS 3 //Used in show_hud(); Please ensure this is the same as the maximum index.
#define ui_borg_pda_send "CENTER+5:21,SOUTH:5" // To the right of the alert panel
#define ui_borg_pda_log "CENTER+6:21,SOUTH:5"

View File

@@ -342,3 +342,43 @@
if(.)
return
robot.modularInterface?.interact(robot)
//borg pda
/datum/hud/robot/New(mob/owner)
. = ..()
var/atom/movable/screen/using
//PDA message
using = new /atom/movable/screen/robot/pda_msg_send
using.screen_loc = ui_borg_pda_send
using.hud = src
static_inventory += using
//PDA log
using = new /atom/movable/screen/robot/pda_msg_show
using.screen_loc = ui_borg_pda_log
using.hud = src
static_inventory += using
/atom/movable/screen/robot/pda_msg_send
name = "PDA - Send Message"
icon = 'icons/mob/screen_ai.dmi'
icon_state = "pda_send"
/atom/movable/screen/robot/pda_msg_send/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.cmd_send_pdamesg(usr)
/atom/movable/screen/robot/pda_msg_show
name = "PDA - Show Message Log"
icon = 'icons/mob/screen_ai.dmi'
icon_state = "pda_receive"
/atom/movable/screen/robot/pda_msg_show/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.cmd_show_message_log(usr)

View File

@@ -1232,6 +1232,51 @@ GLOBAL_LIST_EMPTY(PDAs)
continue
. += P
//borg pda stuff
/mob/living/silicon/robot/proc/cmd_send_pdamesg(mob/user)
var/list/plist = list()
var/list/namecounts = list()
if(aiPDA.toff)
to_chat(user, "Turn on your receiver in order to send messages.")
return
for (var/obj/item/pda/P in get_viewable_pdas())
if (P == src)
continue
else if (P == aiPDA)
continue
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
if (!c)
return
var/selected = plist[c]
if(aicamera.stored.len)
var/add_photo = input(user,"Do you want to attach a photo?","Photo","No") as null|anything in list("Yes","No")
if(add_photo=="Yes")
var/datum/picture/Pic = aicamera.selectpicture(user)
aiPDA.picture = Pic
if(incapacitated())
return
aiPDA.create_message(src, selected)
/mob/living/silicon/robot/proc/cmd_show_message_log(mob/user)
if(incapacitated())
return
if(!isnull(aiPDA))
var/HTML = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>AI PDA Message Log</title></head><body>[aiPDA.tnote]</body></html>"
user << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
else
to_chat(user, "You do not have a PDA. You should make an issue report about this.")
#undef PDA_SCANNER_NONE
#undef PDA_SCANNER_MEDICAL
#undef PDA_SCANNER_FORENSICS

View File

@@ -4,6 +4,7 @@
icon = 'icons/mob/robots.dmi'
icon_state = "robot"
bubble_icon = "robot"
var/obj/item/pda/ai/aiPDA
/mob/living/silicon/robot/get_cell()
return cell
@@ -27,6 +28,12 @@
inv2 = new /atom/movable/screen/robot/module2()
inv3 = new /atom/movable/screen/robot/module3()
if(!shell)
aiPDA = new/obj/item/pda/ai(src)
aiPDA.owner = real_name
aiPDA.ownjob = "Cyborg"
aiPDA.name = real_name + " (" + aiPDA.ownjob + ")"
previous_health = health
if(ispath(cell))
@@ -968,6 +975,9 @@
notify_ai(RENAME, oldname, newname)
if(!QDELETED(builtInCamera))
builtInCamera.c_tag = real_name
if(aiPDA && !shell)
aiPDA.owner = newname
aiPDA.name = newname + " (" + aiPDA.ownjob + ")"
custom_name = newname