mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-28 02:52:28 +00:00
Removes devices
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
|
||||
// Special AI/pAI PDAs that cannot explode.
|
||||
/obj/item/device/pda/ai
|
||||
/obj/item/pda/ai
|
||||
icon_state = "NONE"
|
||||
ttone = "data"
|
||||
detonate = 0
|
||||
|
||||
|
||||
/obj/item/device/pda/ai/proc/set_name_and_job(newname as text, newjob as text, newrank as null|text)
|
||||
/obj/item/pda/ai/proc/set_name_and_job(newname as text, newjob as text, newrank as null|text)
|
||||
owner = newname
|
||||
ownjob = newjob
|
||||
if(newrank)
|
||||
@@ -16,7 +16,7 @@
|
||||
name = newname + " (" + ownjob + ")"
|
||||
|
||||
//AI verb and proc for sending PDA messages.
|
||||
/obj/item/device/pda/ai/verb/cmd_send_pdamesg()
|
||||
/obj/item/pda/ai/verb/cmd_send_pdamesg()
|
||||
set category = "AI IM"
|
||||
set name = "Send PDA Message"
|
||||
set src in usr
|
||||
@@ -34,7 +34,7 @@
|
||||
var/selected = plist[c]
|
||||
M.create_message(usr, selected)
|
||||
|
||||
/obj/item/device/pda/ai/verb/cmd_toggle_pda_receiver()
|
||||
/obj/item/pda/ai/verb/cmd_toggle_pda_receiver()
|
||||
set category = "AI IM"
|
||||
set name = "Toggle Sender/Receiver"
|
||||
set src in usr
|
||||
@@ -45,7 +45,7 @@
|
||||
M.toff = !M.toff
|
||||
to_chat(usr, "<span class='notice'>PDA sender/receiver toggled [(M.toff ? "Off" : "On")]!</span>")
|
||||
|
||||
/obj/item/device/pda/ai/verb/cmd_toggle_pda_silent()
|
||||
/obj/item/pda/ai/verb/cmd_toggle_pda_silent()
|
||||
set category = "AI IM"
|
||||
set name = "Toggle Ringer"
|
||||
set src in usr
|
||||
@@ -56,7 +56,7 @@
|
||||
M.notify_silent = !M.notify_silent
|
||||
to_chat(usr, "<span class='notice'>PDA ringer toggled [(M.notify_silent ? "Off" : "On")]!</span>")
|
||||
|
||||
/obj/item/device/pda/ai/verb/cmd_show_message_log()
|
||||
/obj/item/pda/ai/verb/cmd_show_message_log()
|
||||
set category = "AI IM"
|
||||
set name = "Show Message Log"
|
||||
set src in usr
|
||||
@@ -76,18 +76,18 @@
|
||||
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
|
||||
|
||||
/obj/item/device/pda/ai/can_use()
|
||||
/obj/item/pda/ai/can_use()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/device/pda/ai/attack_self(mob/user as mob)
|
||||
/obj/item/pda/ai/attack_self(mob/user as mob)
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/pda/ai/pai
|
||||
/obj/item/pda/ai/pai
|
||||
ttone = "assist"
|
||||
var/our_owner = null // Ref to a pAI
|
||||
touch_silent = TRUE
|
||||
@@ -96,15 +96,15 @@
|
||||
new/datum/data/pda/app/notekeeper,
|
||||
new/datum/data/pda/app/messenger)
|
||||
|
||||
/obj/item/device/pda/ai/pai/Initialize()
|
||||
/obj/item/pda/ai/pai/Initialize()
|
||||
if(istype(loc, /mob/living/silicon/pai))
|
||||
our_owner = REF(loc)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/pda/ai/pai/tgui_status(mob/living/silicon/pai/user, datum/tgui_state/state)
|
||||
/obj/item/pda/ai/pai/tgui_status(mob/living/silicon/pai/user, datum/tgui_state/state)
|
||||
if(!istype(user) || REF(user) != our_owner) // Only allow our pAI to interface with us
|
||||
return STATUS_CLOSE
|
||||
return ..()
|
||||
|
||||
/obj/item/device/pda/ai/shell
|
||||
/obj/item/pda/ai/shell
|
||||
spam_proof = TRUE // Since empty shells get a functional PDA.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/notify_silent = 0
|
||||
var/hidden = 0 // program not displayed in main menu
|
||||
var/category = "General" // the category to list it in on the main menu
|
||||
var/obj/item/device/pda/pda // if this is null, and the app is running code, something's gone wrong
|
||||
var/obj/item/pda/pda // if this is null, and the app is running code, something's gone wrong
|
||||
|
||||
/datum/data/pda/Destroy()
|
||||
pda = null
|
||||
|
||||
@@ -68,7 +68,7 @@ var/list/civilian_cartridges = list(
|
||||
QDEL_LIST(messenger_plugins)
|
||||
return ..()
|
||||
|
||||
/obj/item/cartridge/proc/update_programs(obj/item/device/pda/pda)
|
||||
/obj/item/cartridge/proc/update_programs(obj/item/pda/pda)
|
||||
for(var/A in programs)
|
||||
var/datum/data/pda/P = A
|
||||
P.pda = pda
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/convopdas[0]
|
||||
var/pdas[0]
|
||||
for(var/A in PDAs)
|
||||
var/obj/item/device/pda/P = A
|
||||
var/obj/item/pda/P = A
|
||||
var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger)
|
||||
|
||||
if(!P.owner || PM.toff || P == pda || PM.m_hidden)
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
active_conversation = null
|
||||
if("Message")
|
||||
var/obj/item/device/pda/P = locate(params["target"])
|
||||
var/obj/item/pda/P = locate(params["target"])
|
||||
create_message(usr, P)
|
||||
if(params["target"] in conversations) // Need to make sure the message went through, if not welp.
|
||||
active_conversation = params["target"]
|
||||
@@ -96,7 +96,7 @@
|
||||
if(!params["target"] || !params["plugin"])
|
||||
return
|
||||
|
||||
var/obj/item/device/pda/P = locate(params["target"])
|
||||
var/obj/item/pda/P = locate(params["target"])
|
||||
if(!P)
|
||||
to_chat(usr, "PDA not found.")
|
||||
|
||||
@@ -115,13 +115,13 @@
|
||||
|
||||
switch(href_list["choice"])
|
||||
if("Message")
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
var/obj/item/pda/P = locate(href_list["target"])
|
||||
create_message(usr, P)
|
||||
if(href_list["target"] in conversations) // Need to make sure the message went through, if not welp.
|
||||
active_conversation = href_list["target"]
|
||||
|
||||
|
||||
/datum/data/pda/app/messenger/proc/create_message(var/mob/living/U, var/obj/item/device/pda/P)
|
||||
/datum/data/pda/app/messenger/proc/create_message(var/mob/living/U, var/obj/item/pda/P)
|
||||
var/t = input(U, "Please enter message", name, null) as text|null
|
||||
if(!t)
|
||||
return
|
||||
@@ -194,7 +194,7 @@
|
||||
return
|
||||
|
||||
for(var/A in PDAs)
|
||||
var/obj/item/device/pda/P = A
|
||||
var/obj/item/pda/P = A
|
||||
var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger)
|
||||
|
||||
if(!P.owner || !PM || PM.hidden || P == pda || PM.toff)
|
||||
@@ -228,7 +228,7 @@
|
||||
/datum/data/pda/app/messenger/multicast/receive_message(list/data, ref)
|
||||
. = ..()
|
||||
|
||||
var/obj/item/device/pda/multicaster/M = pda
|
||||
var/obj/item/pda/multicaster/M = pda
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
@@ -237,11 +237,11 @@
|
||||
modified_message["target"] = "\ref[M]"
|
||||
|
||||
var/list/targets = list()
|
||||
for(var/obj/item/device/pda/pda in PDAs)
|
||||
for(var/obj/item/pda/pda in PDAs)
|
||||
if(pda.cartridge && pda.owner && is_type_in_list(pda.cartridge, M.cartridges_to_send_to))
|
||||
targets |= pda
|
||||
if(targets.len)
|
||||
for(var/obj/item/device/pda/target in targets)
|
||||
for(var/obj/item/pda/target in targets)
|
||||
var/datum/data/pda/app/messenger/P = target.find_program(/datum/data/pda/app/messenger)
|
||||
if(P)
|
||||
P.receive_message(modified_message, "\ref[M]")
|
||||
@@ -1,13 +1,13 @@
|
||||
/datum/data/pda/messenger_plugin
|
||||
var/datum/data/pda/app/messenger/messenger
|
||||
|
||||
/datum/data/pda/messenger_plugin/proc/user_act(mob/user as mob, obj/item/device/pda/P)
|
||||
/datum/data/pda/messenger_plugin/proc/user_act(mob/user as mob, obj/item/pda/P)
|
||||
|
||||
|
||||
/datum/data/pda/messenger_plugin/virus
|
||||
name = "*Send Virus*"
|
||||
|
||||
/datum/data/pda/messenger_plugin/virus/user_act(mob/user as mob, obj/item/device/pda/P)
|
||||
/datum/data/pda/messenger_plugin/virus/user_act(mob/user as mob, obj/item/pda/P)
|
||||
var/datum/data/pda/app/messenger/M = P.find_program(/datum/data/pda/app/messenger)
|
||||
|
||||
if(M && !M.toff && pda.cartridge.charges > 0)
|
||||
@@ -19,7 +19,7 @@
|
||||
/datum/data/pda/messenger_plugin/virus/clown
|
||||
icon = "star"
|
||||
|
||||
/datum/data/pda/messenger_plugin/virus/clown/user_act(mob/user as mob, obj/item/device/pda/P)
|
||||
/datum/data/pda/messenger_plugin/virus/clown/user_act(mob/user as mob, obj/item/pda/P)
|
||||
. = ..(user, P)
|
||||
if(.)
|
||||
user.show_message("<span class='notice'>Virus sent!</span>", 1)
|
||||
@@ -30,7 +30,7 @@
|
||||
/datum/data/pda/messenger_plugin/virus/mime
|
||||
icon = "arrow-circle-down"
|
||||
|
||||
/datum/data/pda/messenger_plugin/virus/mime/user_act(mob/user as mob, obj/item/device/pda/P)
|
||||
/datum/data/pda/messenger_plugin/virus/mime/user_act(mob/user as mob, obj/item/pda/P)
|
||||
. = ..(user, P)
|
||||
if(.)
|
||||
user.show_message("<span class='notice'>Virus sent!</span>", 1)
|
||||
@@ -44,7 +44,7 @@
|
||||
name = "*Detonate*"
|
||||
icon = "exclamation-circle"
|
||||
|
||||
/datum/data/pda/messenger_plugin/virus/detonate/user_act(mob/user as mob, obj/item/device/pda/P)
|
||||
/datum/data/pda/messenger_plugin/virus/detonate/user_act(mob/user as mob, obj/item/pda/P)
|
||||
. = ..(user, P)
|
||||
if(.)
|
||||
var/difficulty = 0
|
||||
@@ -74,13 +74,13 @@
|
||||
/datum/data/pda/messenger_plugin/virus/frame
|
||||
icon = "exclamation-circle"
|
||||
|
||||
/datum/data/pda/messenger_plugin/virus/frame/user_act(mob/user, obj/item/device/pda/P)
|
||||
/datum/data/pda/messenger_plugin/virus/frame/user_act(mob/user, obj/item/pda/P)
|
||||
. = ..(user, P)
|
||||
if(.)
|
||||
var/lock_code = "[rand(100,999)] [pick("Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-ray","Yankee","Zulu")]"
|
||||
user.show_message("<span class='notice'>Virus Sent! The unlock code to the target is: [lock_code]</span>")
|
||||
if(!P.hidden_uplink)
|
||||
var/obj/item/device/uplink/hidden/uplink = new(P)
|
||||
var/obj/item/uplink/hidden/uplink = new(P)
|
||||
P.hidden_uplink = uplink
|
||||
P.lock_code = lock_code
|
||||
// else
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
//The advanced pea-green monochrome lcd of tomorrow.
|
||||
|
||||
var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/global/list/obj/item/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda
|
||||
/obj/item/pda
|
||||
name = "\improper PDA"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
@@ -42,7 +42,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/ownjob = null //related to above - this is assignment (potentially alt title)
|
||||
var/ownrank = null // this one is rank, never alt title
|
||||
|
||||
var/obj/item/device/paicard/pai = null // A slot for a personal AI device
|
||||
var/obj/item/paicard/pai = null // A slot for a personal AI device
|
||||
|
||||
var/spam_proof = FALSE // If true, it can't be spammed by random events.
|
||||
|
||||
@@ -62,12 +62,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/list/notifying_programs = list()
|
||||
var/retro_mode = 0
|
||||
|
||||
/obj/item/device/pda/examine(mob/user)
|
||||
/obj/item/pda/examine(mob/user)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "The time [stationtime2text()] is displayed in the corner of the screen."
|
||||
|
||||
/obj/item/device/pda/CtrlClick()
|
||||
/obj/item/pda/CtrlClick()
|
||||
if(issilicon(usr))
|
||||
return
|
||||
|
||||
@@ -76,7 +76,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/pda/AltClick()
|
||||
/obj/item/pda/AltClick()
|
||||
if(issilicon(usr))
|
||||
return
|
||||
|
||||
@@ -86,7 +86,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>This PDA does not have an ID in it.</span>")
|
||||
|
||||
/obj/item/device/pda/proc/play_ringtone()
|
||||
/obj/item/pda/proc/play_ringtone()
|
||||
var/S
|
||||
|
||||
if(ttone in ttone_sound)
|
||||
@@ -97,7 +97,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
for(var/mob/O in hearers(3, loc))
|
||||
O.show_message(text("[bicon(src)] *[ttone]*"))
|
||||
|
||||
/obj/item/device/pda/proc/set_ringtone()
|
||||
/obj/item/pda/proc/set_ringtone()
|
||||
var/t = input("Please enter new ringtone", name, ttone) as text
|
||||
if(in_range(src, usr) && loc == usr)
|
||||
if(t)
|
||||
@@ -112,7 +112,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
close(usr)
|
||||
return 0
|
||||
|
||||
/obj/item/device/pda/Initialize()
|
||||
/obj/item/pda/Initialize()
|
||||
. = ..()
|
||||
PDAs += src
|
||||
PDAs = sortAtom(PDAs)
|
||||
@@ -153,28 +153,28 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
log_debug("Invalid switch for PDA, defaulting to old PDA icons. [pdachoice] chosen.")
|
||||
start_program(find_program(/datum/data/pda/app/main_menu))
|
||||
|
||||
/obj/item/device/pda/proc/can_use(mob/user)
|
||||
/obj/item/pda/proc/can_use(mob/user)
|
||||
return (tgui_status(user, GLOB.tgui_inventory_state) == STATUS_INTERACTIVE)
|
||||
|
||||
/obj/item/device/pda/GetAccess()
|
||||
/obj/item/pda/GetAccess()
|
||||
if(id)
|
||||
return id.GetAccess()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/pda/GetID()
|
||||
/obj/item/pda/GetID()
|
||||
return id
|
||||
|
||||
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
/obj/item/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
if((!istype(over_object, /obj/screen)) && can_use(usr))
|
||||
return attack_self(M)
|
||||
return
|
||||
|
||||
/obj/item/device/pda/proc/close(mob/user)
|
||||
/obj/item/pda/proc/close(mob/user)
|
||||
SStgui.close_uis(src)
|
||||
|
||||
/obj/item/device/pda/attack_self(mob/user as mob)
|
||||
/obj/item/pda/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
if(active_uplink_check(user))
|
||||
@@ -183,12 +183,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
tgui_interact(user)
|
||||
return
|
||||
|
||||
/obj/item/device/pda/proc/start_program(datum/data/pda/P)
|
||||
/obj/item/pda/proc/start_program(datum/data/pda/P)
|
||||
if(P && ((P in programs) || (cartridge && (P in cartridge.programs))))
|
||||
return P.start()
|
||||
return 0
|
||||
|
||||
/obj/item/device/pda/proc/find_program(type)
|
||||
/obj/item/pda/proc/find_program(type)
|
||||
var/datum/data/pda/A = locate(type) in programs
|
||||
if(A)
|
||||
return A
|
||||
@@ -199,15 +199,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return null
|
||||
|
||||
// force the cache to rebuild on update_ui
|
||||
/obj/item/device/pda/proc/update_shortcuts()
|
||||
/obj/item/pda/proc/update_shortcuts()
|
||||
shortcut_cache.Cut()
|
||||
|
||||
/obj/item/device/pda/proc/update_programs()
|
||||
/obj/item/pda/proc/update_programs()
|
||||
for(var/A in programs)
|
||||
var/datum/data/pda/P = A
|
||||
P.pda = src
|
||||
|
||||
/obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P)
|
||||
/obj/item/pda/proc/detonate_act(var/obj/item/pda/P)
|
||||
//TODO: sometimes these attacks show up on the message server
|
||||
var/i = rand(1,100)
|
||||
var/j = rand(0,1) //Possibility of losing the PDA after the detonation
|
||||
@@ -271,7 +271,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
message = "<span class='warning'>[message]</span>"
|
||||
M.show_message(message, 1)
|
||||
|
||||
/obj/item/device/pda/proc/remove_id()
|
||||
/obj/item/pda/proc/remove_id()
|
||||
if (id)
|
||||
if (ismob(loc))
|
||||
var/mob/M = loc
|
||||
@@ -282,7 +282,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
id.loc = get_turf(src)
|
||||
id = null
|
||||
|
||||
/obj/item/device/pda/proc/remove_pen()
|
||||
/obj/item/pda/proc/remove_pen()
|
||||
var/obj/item/pen/O = locate() in src
|
||||
if(O)
|
||||
if(istype(loc, /mob))
|
||||
@@ -295,7 +295,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>This PDA does not have a pen in it.</span>")
|
||||
|
||||
/obj/item/device/pda/verb/verb_reset_pda()
|
||||
/obj/item/pda/verb/verb_reset_pda()
|
||||
set category = "Object"
|
||||
set name = "Reset PDA"
|
||||
set src in usr
|
||||
@@ -311,7 +311,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_id()
|
||||
/obj/item/pda/verb/verb_remove_id()
|
||||
set category = "Object"
|
||||
set name = "Remove id"
|
||||
set src in usr
|
||||
@@ -328,7 +328,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_pen()
|
||||
/obj/item/pda/verb/verb_remove_pen()
|
||||
set category = "Object"
|
||||
set name = "Remove pen"
|
||||
set src in usr
|
||||
@@ -341,7 +341,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_cartridge()
|
||||
/obj/item/pda/verb/verb_remove_cartridge()
|
||||
set category = "Object"
|
||||
set name = "Remove cartridge"
|
||||
set src in usr
|
||||
@@ -373,7 +373,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
start_program(find_program(/datum/data/pda/app/main_menu))
|
||||
|
||||
|
||||
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
|
||||
/obj/item/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
|
||||
if(choice == 1)
|
||||
if (id)
|
||||
remove_id()
|
||||
@@ -395,7 +395,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return 0
|
||||
|
||||
// access to status display signals
|
||||
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
|
||||
/obj/item/pda/attackby(obj/item/C as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(C, /obj/item/cartridge) && !cartridge)
|
||||
cartridge = C
|
||||
@@ -426,7 +426,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
updateSelfDialog()//Update self dialog on success.
|
||||
return //Return in case of failed check or when successful.
|
||||
updateSelfDialog()//For the non-input related code.
|
||||
else if(istype(C, /obj/item/device/paicard) && !src.pai)
|
||||
else if(istype(C, /obj/item/paicard) && !src.pai)
|
||||
user.drop_item()
|
||||
C.loc = src
|
||||
pai = C
|
||||
@@ -442,15 +442,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/pda/attack(mob/living/C as mob, mob/living/user as mob)
|
||||
/obj/item/pda/attack(mob/living/C as mob, mob/living/user as mob)
|
||||
if (istype(C, /mob/living/carbon) && scanmode)
|
||||
scanmode.scan_mob(C, user)
|
||||
|
||||
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
|
||||
/obj/item/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
|
||||
if(proximity && scanmode)
|
||||
scanmode.scan_atom(A, user)
|
||||
|
||||
/obj/item/device/pda/proc/explode() //This needs tuning. //Sure did.
|
||||
/obj/item/pda/proc/explode() //This needs tuning. //Sure did.
|
||||
if(!src.detonate) return
|
||||
var/turf/T = get_turf(src.loc)
|
||||
if(T)
|
||||
@@ -458,7 +458,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
explosion(T, 0, 0, 1, rand(1,2))
|
||||
return
|
||||
|
||||
/obj/item/device/pda/Destroy()
|
||||
/obj/item/pda/Destroy()
|
||||
PDAs -= src
|
||||
if (src.id && prob(90)) //IDs are kept in 90% of the cases
|
||||
src.id.forceMove(get_turf(src.loc))
|
||||
@@ -481,10 +481,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/storage/box/PDAs/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/device/pda(src)
|
||||
new /obj/item/device/pda(src)
|
||||
new /obj/item/device/pda(src)
|
||||
new /obj/item/device/pda(src)
|
||||
new /obj/item/pda(src)
|
||||
new /obj/item/pda(src)
|
||||
new /obj/item/pda(src)
|
||||
new /obj/item/pda(src)
|
||||
new /obj/item/cartridge/head(src)
|
||||
|
||||
var/newcart = pick( /obj/item/cartridge/engineering,
|
||||
@@ -495,6 +495,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
new newcart(src)
|
||||
|
||||
// Pass along the pulse to atoms in contents, largely added so pAIs are vulnerable to EMP
|
||||
/obj/item/device/pda/emp_act(severity)
|
||||
/obj/item/pda/emp_act(severity)
|
||||
for(var/atom/A in src)
|
||||
A.emp_act(severity)
|
||||
|
||||
@@ -1,167 +1,167 @@
|
||||
|
||||
/obj/item/device/pda/medical
|
||||
/obj/item/pda/medical
|
||||
default_cartridge = /obj/item/cartridge/medical
|
||||
icon_state = "pda-m"
|
||||
|
||||
/obj/item/device/pda/viro
|
||||
/obj/item/pda/viro
|
||||
default_cartridge = /obj/item/cartridge/medical
|
||||
icon_state = "pda-v"
|
||||
|
||||
/obj/item/device/pda/engineering
|
||||
/obj/item/pda/engineering
|
||||
default_cartridge = /obj/item/cartridge/engineering
|
||||
icon_state = "pda-e"
|
||||
|
||||
/obj/item/device/pda/security
|
||||
/obj/item/pda/security
|
||||
default_cartridge = /obj/item/cartridge/security
|
||||
icon_state = "pda-s"
|
||||
|
||||
/obj/item/device/pda/detective
|
||||
/obj/item/pda/detective
|
||||
default_cartridge = /obj/item/cartridge/detective
|
||||
icon_state = "pda-det"
|
||||
|
||||
/obj/item/device/pda/warden
|
||||
/obj/item/pda/warden
|
||||
default_cartridge = /obj/item/cartridge/security
|
||||
icon_state = "pda-warden"
|
||||
|
||||
/obj/item/device/pda/janitor
|
||||
/obj/item/pda/janitor
|
||||
default_cartridge = /obj/item/cartridge/janitor
|
||||
icon_state = "pda-j"
|
||||
ttone = "slip"
|
||||
|
||||
/obj/item/device/pda/science
|
||||
/obj/item/pda/science
|
||||
default_cartridge = /obj/item/cartridge/signal/science
|
||||
icon_state = "pda-tox"
|
||||
ttone = "boom"
|
||||
|
||||
/obj/item/device/pda/clown
|
||||
/obj/item/pda/clown
|
||||
default_cartridge = /obj/item/cartridge/clown
|
||||
icon_state = "pda-clown"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings."
|
||||
ttone = "honk"
|
||||
|
||||
/obj/item/device/pda/mime
|
||||
/obj/item/pda/mime
|
||||
default_cartridge = /obj/item/cartridge/mime
|
||||
icon_state = "pda-mime"
|
||||
|
||||
/obj/item/device/pda/mime/Initialize()
|
||||
/obj/item/pda/mime/Initialize()
|
||||
. = ..()
|
||||
var/datum/data/pda/app/M = find_program(/datum/data/pda/app/messenger)
|
||||
if(M)
|
||||
M.notify_silent = TRUE
|
||||
|
||||
/obj/item/device/pda/heads
|
||||
/obj/item/pda/heads
|
||||
default_cartridge = /obj/item/cartridge/head
|
||||
icon_state = "pda-h"
|
||||
|
||||
/obj/item/device/pda/heads/hop
|
||||
/obj/item/pda/heads/hop
|
||||
default_cartridge = /obj/item/cartridge/hop
|
||||
icon_state = "pda-hop"
|
||||
|
||||
/obj/item/device/pda/heads/hos
|
||||
/obj/item/pda/heads/hos
|
||||
default_cartridge = /obj/item/cartridge/hos
|
||||
icon_state = "pda-hos"
|
||||
|
||||
/obj/item/device/pda/heads/ce
|
||||
/obj/item/pda/heads/ce
|
||||
default_cartridge = /obj/item/cartridge/ce
|
||||
icon_state = "pda-ce"
|
||||
|
||||
/obj/item/device/pda/heads/cmo
|
||||
/obj/item/pda/heads/cmo
|
||||
default_cartridge = /obj/item/cartridge/cmo
|
||||
icon_state = "pda-cmo"
|
||||
|
||||
/obj/item/device/pda/heads/rd
|
||||
/obj/item/pda/heads/rd
|
||||
default_cartridge = /obj/item/cartridge/rd
|
||||
icon_state = "pda-rd"
|
||||
|
||||
/obj/item/device/pda/captain
|
||||
/obj/item/pda/captain
|
||||
default_cartridge = /obj/item/cartridge/captain
|
||||
icon_state = "pda-c"
|
||||
detonate = 0
|
||||
//toff = 1
|
||||
|
||||
/obj/item/device/pda/ert
|
||||
/obj/item/pda/ert
|
||||
default_cartridge = /obj/item/cartridge/captain
|
||||
icon_state = "pda-h"
|
||||
detonate = 0
|
||||
// hidden = 1
|
||||
|
||||
/obj/item/device/pda/cargo
|
||||
/obj/item/pda/cargo
|
||||
default_cartridge = /obj/item/cartridge/quartermaster
|
||||
icon_state = "pda-cargo"
|
||||
|
||||
/obj/item/device/pda/quartermaster
|
||||
/obj/item/pda/quartermaster
|
||||
default_cartridge = /obj/item/cartridge/quartermaster
|
||||
icon_state = "pda-q"
|
||||
|
||||
/obj/item/device/pda/shaftminer
|
||||
/obj/item/pda/shaftminer
|
||||
icon_state = "pda-miner"
|
||||
default_cartridge = /obj/item/cartridge/miner
|
||||
|
||||
/obj/item/device/pda/syndicate
|
||||
/obj/item/pda/syndicate
|
||||
default_cartridge = /obj/item/cartridge/syndicate
|
||||
icon_state = "pda-syn"
|
||||
name = "Military PDA"
|
||||
owner = "John Doe"
|
||||
hidden = 1
|
||||
|
||||
/obj/item/device/pda/chaplain
|
||||
/obj/item/pda/chaplain
|
||||
default_cartridge = /obj/item/cartridge/service
|
||||
icon_state = "pda-holy"
|
||||
ttone = "holy"
|
||||
|
||||
/obj/item/device/pda/lawyer
|
||||
/obj/item/pda/lawyer
|
||||
default_cartridge = /obj/item/cartridge/lawyer
|
||||
icon_state = "pda-lawyer"
|
||||
ttone = "..."
|
||||
|
||||
/obj/item/device/pda/botanist
|
||||
/obj/item/pda/botanist
|
||||
default_cartridge = /obj/item/cartridge/service
|
||||
icon_state = "pda-hydro"
|
||||
|
||||
/obj/item/device/pda/roboticist
|
||||
/obj/item/pda/roboticist
|
||||
default_cartridge = /obj/item/cartridge/signal/science
|
||||
icon_state = "pda-robot"
|
||||
|
||||
/obj/item/device/pda/librarian
|
||||
/obj/item/pda/librarian
|
||||
default_cartridge = /obj/item/cartridge/service
|
||||
icon_state = "pda-libb"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
|
||||
model_name = "Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant"
|
||||
|
||||
/obj/item/device/pda/librarian/Initialize()
|
||||
/obj/item/pda/librarian/Initialize()
|
||||
. = ..()
|
||||
var/datum/data/pda/app/M = find_program(/datum/data/pda/app/messenger)
|
||||
if(M)
|
||||
M.notify_silent = TRUE //Quiet in the library!
|
||||
|
||||
/obj/item/device/pda/clear
|
||||
/obj/item/pda/clear
|
||||
icon_state = "pda-transp"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition with a transparent case."
|
||||
model_name = "Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition"
|
||||
|
||||
/obj/item/device/pda/chef
|
||||
/obj/item/pda/chef
|
||||
default_cartridge = /obj/item/cartridge/service
|
||||
icon_state = "pda-chef"
|
||||
|
||||
/obj/item/device/pda/bar
|
||||
/obj/item/pda/bar
|
||||
default_cartridge = /obj/item/cartridge/service
|
||||
icon_state = "pda-bar"
|
||||
|
||||
/obj/item/device/pda/atmos
|
||||
/obj/item/pda/atmos
|
||||
default_cartridge = /obj/item/cartridge/atmos
|
||||
icon_state = "pda-atmo"
|
||||
|
||||
/obj/item/device/pda/chemist
|
||||
/obj/item/pda/chemist
|
||||
default_cartridge = /obj/item/cartridge/chemistry
|
||||
icon_state = "pda-chem"
|
||||
|
||||
/obj/item/device/pda/geneticist
|
||||
/obj/item/pda/geneticist
|
||||
default_cartridge = /obj/item/cartridge/medical
|
||||
icon_state = "pda-gene"
|
||||
|
||||
|
||||
// Used for the PDA multicaster, which mirrors messages sent to it to a specific department,
|
||||
/obj/item/device/pda/multicaster
|
||||
/obj/item/pda/multicaster
|
||||
ownjob = "Relay"
|
||||
icon_state = "NONE"
|
||||
detonate = 0
|
||||
@@ -171,49 +171,49 @@
|
||||
)
|
||||
var/list/cartridges_to_send_to = list()
|
||||
|
||||
/obj/item/device/pda/multicaster/command/Initialize()
|
||||
/obj/item/pda/multicaster/command/Initialize()
|
||||
. = ..()
|
||||
owner = "Command Department"
|
||||
name = "Command Department (Relay)"
|
||||
cartridges_to_send_to = command_cartridges
|
||||
|
||||
/obj/item/device/pda/multicaster/security/Initialize()
|
||||
/obj/item/pda/multicaster/security/Initialize()
|
||||
. = ..()
|
||||
owner = "Security Department"
|
||||
name = "Security Department (Relay)"
|
||||
cartridges_to_send_to = security_cartridges
|
||||
|
||||
/obj/item/device/pda/multicaster/engineering/Initialize()
|
||||
/obj/item/pda/multicaster/engineering/Initialize()
|
||||
. = ..()
|
||||
owner = "Engineering Department"
|
||||
name = "Engineering Department (Relay)"
|
||||
cartridges_to_send_to = engineering_cartridges
|
||||
|
||||
/obj/item/device/pda/multicaster/medical/Initialize()
|
||||
/obj/item/pda/multicaster/medical/Initialize()
|
||||
. = ..()
|
||||
owner = "Medical Department"
|
||||
name = "Medical Department (Relay)"
|
||||
cartridges_to_send_to = medical_cartridges
|
||||
|
||||
/obj/item/device/pda/multicaster/research/Initialize()
|
||||
/obj/item/pda/multicaster/research/Initialize()
|
||||
. = ..()
|
||||
owner = "Research Department"
|
||||
name = "Research Department (Relay)"
|
||||
cartridges_to_send_to = research_cartridges
|
||||
|
||||
/obj/item/device/pda/multicaster/cargo/Initialize()
|
||||
/obj/item/pda/multicaster/cargo/Initialize()
|
||||
. = ..()
|
||||
owner = "Cargo Department"
|
||||
name = "Cargo Department (Relay)"
|
||||
cartridges_to_send_to = cargo_cartridges
|
||||
|
||||
/obj/item/device/pda/multicaster/civilian/Initialize()
|
||||
/obj/item/pda/multicaster/civilian/Initialize()
|
||||
. = ..()
|
||||
owner = "Civilian Services Department"
|
||||
name = "Civilian Services Department (Relay)"
|
||||
cartridges_to_send_to = civilian_cartridges
|
||||
|
||||
/obj/item/device/pda/clown/Crossed(atom/movable/AM as mob|obj) //Clown PDA is slippery.
|
||||
/obj/item/pda/clown/Crossed(atom/movable/AM as mob|obj) //Clown PDA is slippery.
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if (istype(AM, /mob/living))
|
||||
@@ -232,10 +232,10 @@
|
||||
|
||||
/obj/item/storage/box/PDAs/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/device/pda(src)
|
||||
new /obj/item/device/pda(src)
|
||||
new /obj/item/device/pda(src)
|
||||
new /obj/item/device/pda(src)
|
||||
new /obj/item/pda(src)
|
||||
new /obj/item/pda(src)
|
||||
new /obj/item/pda(src)
|
||||
new /obj/item/pda(src)
|
||||
new /obj/item/cartridge/head(src)
|
||||
|
||||
var/newcart = pick( /obj/item/cartridge/engineering,
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Self contained file for all things TGUI
|
||||
/obj/item/device/pda/tgui_state(mob/user)
|
||||
/obj/item/pda/tgui_state(mob/user)
|
||||
return GLOB.tgui_inventory_state
|
||||
|
||||
/obj/item/device/pda/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui)
|
||||
/obj/item/pda/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "Pda", "Personal Data Assistant", parent_ui = parent_ui)
|
||||
ui.open()
|
||||
|
||||
/obj/item/device/pda/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
||||
/obj/item/pda/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
||||
var/list/data = ..()
|
||||
|
||||
data["owner"] = owner // Who is your daddy...
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
return data
|
||||
|
||||
/obj/item/device/pda/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
/obj/item/pda/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "An electronic radio system."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "power_mod"
|
||||
var/obj/item/device/pda/hostpda = null
|
||||
var/obj/item/pda/hostpda = null
|
||||
|
||||
var/list/botlist = null // list of bots
|
||||
var/mob/living/bot/active // the active bot; if null, show bot list
|
||||
@@ -14,12 +14,12 @@
|
||||
|
||||
var/control_freq = BOT_FREQ
|
||||
|
||||
var/on = 0 //Are we currently active??
|
||||
on = FALSE //Are we currently active??
|
||||
var/menu_message = ""
|
||||
|
||||
/obj/item/radio/integrated/Initialize()
|
||||
. = ..()
|
||||
if(istype(loc.loc, /obj/item/device/pda))
|
||||
if(istype(loc.loc, /obj/item/pda))
|
||||
hostpda = loc.loc
|
||||
if(bot_filter)
|
||||
spawn(5)
|
||||
@@ -95,10 +95,10 @@
|
||||
* Radio Cartridge, essentially a signaler.
|
||||
*/
|
||||
/obj/item/radio/integrated/signal
|
||||
var/frequency = 1457
|
||||
frequency = 1457
|
||||
var/code = 30.0
|
||||
var/last_transmission
|
||||
var/datum/radio_frequency/radio_connection
|
||||
last_transmission
|
||||
datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/item/radio/integrated/signal/Destroy()
|
||||
if(radio_controller)
|
||||
@@ -113,11 +113,6 @@
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
|
||||
if(last_transmission && world.time < (last_transmission + 5))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user