Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+49 -130
View File
@@ -11,12 +11,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
icon_state = "pda"
item_state = "electronic"
flags = NOBLUDGEON
w_class = WEIGHT_CLASS_TINY
w_class = 1
slot_flags = SLOT_ID | SLOT_BELT
origin_tech = "programming=2"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
//Main variables
var/owner = null // String name of owner
@@ -53,35 +50,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/image/photo = null //Scanned photo
var/list/contained_item = list(/obj/item/weapon/pen, /obj/item/toy/crayon, /obj/item/weapon/lipstick, /obj/item/device/flashlight/pen, /obj/item/clothing/mask/cigarette)
var/obj/item/inserted_item //Used for pen, crayon, and lipstick insertion or removal. Same as above.
var/overlays_x_offset = 0 //x offset to use for certain overlays
/obj/item/device/pda/pickup(mob/user)
..()
if(fon)
SetLuminosity(0)
user.AddLuminosity(f_lum)
/obj/item/device/pda/dropped(mob/user)
..()
if(fon)
user.AddLuminosity(-f_lum)
SetLuminosity(f_lum)
/obj/item/device/pda/New()
..()
if(fon)
if(!isturf(loc))
loc.AddLuminosity(f_lum)
SetLuminosity(0)
else
SetLuminosity(f_lum)
set_light(f_lum)
PDAs += src
if(default_cartridge)
cartridge = new default_cartridge(src)
inserted_item = new /obj/item/weapon/pen(src)
update_icon()
new /obj/item/weapon/pen(src)
/obj/item/device/pda/proc/update_label()
name = "PDA-[owner] ([ownjob])" //Name generalisation
@@ -95,25 +71,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/GetID()
return id
/obj/item/device/pda/update_icon()
cut_overlays()
if(id)
var/image/I = image(icon_state = "id_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
if(inserted_item)
var/image/I = image(icon_state = "insert_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
if(fon)
var/image/I = image(icon_state = "light_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
if(pai)
if(pai.pai)
var/image/I = image(icon_state = "pai_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
else
var/image/I = image(icon_state = "pai_off_overlay", pixel_x = overlays_x_offset)
add_overlay(I)
/obj/item/device/pda/MouseDrop(obj/over_object, src_location, over_location)
var/mob/M = usr
if((!istype(over_object, /obj/screen)) && usr.canUseTopic(src))
@@ -213,14 +170,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "<li><a href='byond://?src=\ref[src];choice=Gas Scan'><img src=pda_reagent.png> [scanmode == 5 ? "Disable" : "Enable"] Gas Scanner</a></li>"
if (cartridge.access_remote_door)
dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><img src=pda_rdoor.png> Toggle Remote Door</a></li>"
if (cartridge.access_dronephone)
dat += "<li><a href='byond://?src=\ref[src];choice=Drone Phone'><img src=pda_dronephone.png> Drone Phone</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=pda_atmos.png> Atmospheric Scan</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Light'><img src=pda_flashlight.png> [fon ? "Disable" : "Enable"] Flashlight</a></li>"
if (pai)
if(pai.loc != src)
pai = null
update_icon()
else
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=1'>pAI Device Configuration</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=pai;option=2'>Eject pAI Device</a></li>"
@@ -303,6 +257,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "Temperature: [round(environment.temperature-T0C)]&deg;C<br>"
dat += "<br>"
else//Else it links to the cart menu proc. Although, it really uses menu hub 4--menu 4 doesn't really exist as it simply redirects to hub.
dat += cart
@@ -335,19 +290,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
cartridge.mode = mode
cartridge.unlock()
if ("Authenticate")//Checks for ID
id_check(U)
id_check(U, 1)
if("UpdateInfo")
ownjob = id.assignment
update_label()
if("Eject")//Ejects the cart, only done from hub.
if (!isnull(cartridge))
U.put_in_hands(cartridge)
U << "<span class='notice'>You remove [cartridge] from [src].</span>"
var/turf/T = loc
if(ismob(T))
T = T.loc
cartridge.loc = T
scanmode = 0
if (cartridge.radio)
cartridge.radio.hostpda = null
cartridge = null
update_icon()
//MENU FUNCTIONS===================================
@@ -370,17 +326,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("Light")
if(fon)
fon = 0
if(src in U.contents)
U.AddLuminosity(-f_lum)
else
SetLuminosity(0)
set_light(0)
else
fon = 1
if(src in U.contents)
U.AddLuminosity(f_lum)
else
SetLuminosity(f_lum)
update_icon()
set_light(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0
@@ -409,14 +358,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_atmos))
scanmode = 5
if("Drone Phone")
var/area/A = get_area(U)
var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
if(A && alert_s)
var/msg = "<span class='boldnotice'>NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!</span>"
_alert_drones(msg, 1)
U << msg
//NOTEKEEPER FUNCTIONS===================================
@@ -500,7 +441,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
M.close()
if("Detonate")//Detonate PDA
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
var/obj/item/device/pda/P = locate(href_list["target"])
@@ -557,7 +497,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
//EXTRA FUNCTIONS===================================
if (mode == 2||mode == 21)//To clear message overlays.
update_icon()
cut_overlays()
if ((honkamt > 0) && (prob(60)))//For clown virus.
honkamt--
@@ -579,7 +519,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
id.loc = get_turf(src)
id = null
update_icon()
/obj/item/device/pda/proc/msg_input(mob/living/U = usr)
var/t = stripped_input(U, "Please enter message", name, null, MAX_MESSAGE_LEN)
@@ -651,7 +590,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(L && L.stat != UNCONSCIOUS)
L << "\icon[src] <b>Message from [source.owner] ([source.ownjob]), </b>\"[msg.message]\"[msg.get_photo_ref()] (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[source]'>Reply</a>)"
update_icon()
cut_overlays()
add_overlay(image(icon, icon_alert))
/obj/item/device/pda/proc/show_to_ghosts(mob/living/user, datum/data_pda_msg/msg,multiple = 0)
@@ -707,7 +646,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(id)
remove_id()
else
remove_pen()
usr << "<span class='warning'>This PDA does not have an ID in it!</span>"
/obj/item/device/pda/verb/verb_remove_id()
set category = "Object"
@@ -732,54 +671,50 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
if (usr.canUseTopic(src))
remove_pen()
/obj/item/device/pda/proc/remove_pen()
if(inserted_item)
if(ismob(loc))
var/mob/M = loc
M.put_in_hands(inserted_item)
var/obj/item/weapon/pen/O = locate() in src
if(O)
if (istype(loc, /mob))
var/mob/M = loc
if(M.get_active_hand() == null)
M.put_in_hands(O)
usr << "<span class='notice'>You remove \the [O] from \the [src].</span>"
return
O.loc = get_turf(src)
else
inserted_item.forceMove(loc)
usr << "<span class='notice'>You remove \the [inserted_item] from \the [src].</span>"
inserted_item = null
update_icon()
else
usr << "<span class='warning'>This PDA does not have a pen in it!</span>"
usr << "<span class='warning'>This PDA does not have a pen in it!</span>"
//trying to insert or remove an id
/obj/item/device/pda/proc/id_check(mob/user, obj/item/weapon/card/id/I)
if(!I)
if(id)
/obj/item/device/pda/proc/id_check(mob/user, 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()
return 1
else
var/obj/item/weapon/card/id/C = user.get_active_held_item()
if(istype(C))
I = C
if(I && I.registered_name)
if(!user.unEquip(I))
return 0
var/obj/old_id = id
I.forceMove(src)
id = I
if(old_id)
var/obj/item/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if(!user.unEquip(I))
return 0
I.loc = src
id = I
else
var/obj/item/weapon/card/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
if(!user.unEquip(I))
return 0
var/obj/old_id = id
I.loc = src
id = I
user.put_in_hands(old_id)
update_icon()
return 1
// access to status display signals
/obj/item/device/pda/attackby(obj/item/C, mob/user, params)
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
cartridge = C
if(!user.unEquip(C))
return
cartridge = C
cartridge.loc = src
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
if(cartridge.radio)
cartridge.radio.hostpda = src
update_icon()
else if(istype(C, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = C
@@ -793,8 +728,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "<span class='notice'>Card scanned.</span>"
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
if(((src in user.contents) || (isturf(loc) && in_range(src, user))) && (C in user.contents))
if(!id_check(user, idcard))
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
if(!id_check(user, 2))
return
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
updateSelfDialog()//Update self dialog on success.
@@ -806,24 +741,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
C.loc = src
pai = C
user << "<span class='notice'>You slot \the [C] into [src].</span>"
update_icon()
updateUsrDialog()
else if(is_type_in_list(C, contained_item)) //Checks if there is a pen
if(inserted_item)
user << "<span class='warning'>There is already \a [inserted_item] in \the [src]!</span>"
else if(istype(C, /obj/item/weapon/pen))
var/obj/item/weapon/pen/O = locate() in src
if(O)
user << "<span class='warning'>There is already a pen in \the [src]!</span>"
else
if(!user.unEquip(C))
return
C.forceMove(src)
C.loc = src
user << "<span class='notice'>You slide \the [C] into \the [src].</span>"
inserted_item = C
update_icon()
else if(istype(C, /obj/item/weapon/photo))
var/obj/item/weapon/photo/P = C
photo = P.img
user << "<span class='notice'>You scan \the [C].</span>"
else if(hidden_uplink && hidden_uplink.active)
hidden_uplink.attackby(C, user, params)
else
return ..()
@@ -919,18 +850,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/Destroy()
PDAs -= src
if(id)
qdel(id)
id = null
if(cartridge)
qdel(cartridge)
cartridge = null
if(pai)
qdel(pai)
pai = null
if(inserted_item)
qdel(inserted_item)
inserted_item = null
return ..()
//AI verb and proc for sending PDA messages.
@@ -166,15 +166,14 @@
icon_state = "pda-library"
icon_alert = "pda-r-library"
default_cartridge = /obj/item/weapon/cartridge/librarian
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a WGW-11 series e-reader."
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
silent = 1 //Quiet in the library!
overlays_x_offset = -3
/obj/item/device/pda/clear
name = "clear PDA"
icon_state = "pda-clear"
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a special edition with a transparent case."
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition with a transparent case."
note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition!"
/obj/item/device/pda/cook
+1 -10
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/pda.dmi'
icon_state = "cart"
item_state = "electronic"
w_class = WEIGHT_CLASS_TINY
w_class = 1
var/obj/item/radio/integrated/radio = null
var/access_security = 0
@@ -23,7 +23,6 @@
var/access_status_display = 0
var/access_quartermaster = 0
var/access_hydroponics = 0
var/access_dronephone = 0
var/bot_access_flags = 0 //Bit flags. Selection: SEC_BOT|MULE_BOT|FLOOR_BOT|CLEAN_BOT|MED_BOT
var/spam_enabled = 0 //Enables "Send to All" Option
@@ -46,14 +45,12 @@
name = "\improper Power-ON cartridge"
icon_state = "cart-e"
access_engine = 1
access_dronephone = 1
bot_access_flags = FLOOR_BOT
/obj/item/weapon/cartridge/atmos
name = "\improper BreatheDeep cartridge"
icon_state = "cart-a"
access_atmos = 1
access_dronephone = 1
bot_access_flags = FLOOR_BOT
/obj/item/weapon/cartridge/medical
@@ -87,7 +84,6 @@
desc = "The ultimate in clean-room design."
icon_state = "cart-j"
access_janitor = 1
access_dronephone = 1
bot_access_flags = CLEAN_BOT
/obj/item/weapon/cartridge/lawyer
@@ -124,7 +120,6 @@
name = "\improper B.O.O.P. Remote Control cartridge"
desc = "Packed with heavy duty triple-bot interlink!"
bot_access_flags = FLOOR_BOT|CLEAN_BOT|MED_BOT
access_dronephone = 1
/obj/item/weapon/cartridge/signal
name = "generic signaler cartridge"
@@ -166,7 +161,6 @@
access_security = 1
access_newscaster = 1
access_quartermaster = 1
access_dronephone = 1
/obj/item/weapon/cartridge/hos
name = "\improper R.O.B.U.S.T. DELUXE cartridge"
@@ -184,7 +178,6 @@
access_status_display = 1
access_engine = 1
access_atmos = 1
access_dronephone = 1
bot_access_flags = FLOOR_BOT
/obj/item/weapon/cartridge/cmo
@@ -203,7 +196,6 @@
access_status_display = 1
access_reagent_scanner = 1
access_atmos = 1
access_dronephone = 1
bot_access_flags = FLOOR_BOT|CLEAN_BOT|MED_BOT
/obj/item/weapon/cartridge/rd/New()
@@ -224,7 +216,6 @@
access_newscaster = 1
access_quartermaster = 1
access_janitor = 1
access_dronephone = 1
bot_access_flags = SEC_BOT|MULE_BOT|FLOOR_BOT|CLEAN_BOT|MED_BOT
spam_enabled = 1