12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
@@ -11,9 +11,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
icon_state = "pda"
|
||||
item_state = "electronic"
|
||||
flags = NOBLUDGEON
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
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
|
||||
@@ -50,14 +53,35 @@ 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)
|
||||
set_light(f_lum)
|
||||
if(!isturf(loc))
|
||||
loc.AddLuminosity(f_lum)
|
||||
SetLuminosity(0)
|
||||
else
|
||||
SetLuminosity(f_lum)
|
||||
PDAs += src
|
||||
if(default_cartridge)
|
||||
cartridge = new default_cartridge(src)
|
||||
new /obj/item/weapon/pen(src)
|
||||
inserted_item = new /obj/item/weapon/pen(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/pda/proc/update_label()
|
||||
name = "PDA-[owner] ([ownjob])" //Name generalisation
|
||||
@@ -71,6 +95,25 @@ 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))
|
||||
@@ -170,11 +213,14 @@ 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>"
|
||||
@@ -257,7 +303,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
dat += "Temperature: [round(environment.temperature-T0C)]°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
|
||||
|
||||
@@ -290,20 +335,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
if ("Authenticate")//Checks for ID
|
||||
id_check(U, 1)
|
||||
id_check(U)
|
||||
if("UpdateInfo")
|
||||
ownjob = id.assignment
|
||||
update_label()
|
||||
if("Eject")//Ejects the cart, only done from hub.
|
||||
if (!isnull(cartridge))
|
||||
var/turf/T = loc
|
||||
if(ismob(T))
|
||||
T = T.loc
|
||||
cartridge.loc = T
|
||||
U.put_in_hands(cartridge)
|
||||
U << "<span class='notice'>You remove [cartridge] from [src].</span>"
|
||||
scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
cartridge = null
|
||||
update_icon()
|
||||
|
||||
//MENU FUNCTIONS===================================
|
||||
|
||||
@@ -326,10 +370,17 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if("Light")
|
||||
if(fon)
|
||||
fon = 0
|
||||
set_light(0)
|
||||
if(src in U.contents)
|
||||
U.AddLuminosity(-f_lum)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
else
|
||||
fon = 1
|
||||
set_light(f_lum)
|
||||
if(src in U.contents)
|
||||
U.AddLuminosity(f_lum)
|
||||
else
|
||||
SetLuminosity(f_lum)
|
||||
update_icon()
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
scanmode = 0
|
||||
@@ -358,6 +409,14 @@ 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===================================
|
||||
|
||||
@@ -441,6 +500,7 @@ 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"])
|
||||
@@ -497,7 +557,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
//EXTRA FUNCTIONS===================================
|
||||
|
||||
if (mode == 2||mode == 21)//To clear message overlays.
|
||||
cut_overlays()
|
||||
update_icon()
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
@@ -519,6 +579,7 @@ 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)
|
||||
@@ -590,7 +651,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>)"
|
||||
|
||||
cut_overlays()
|
||||
update_icon()
|
||||
add_overlay(image(icon, icon_alert))
|
||||
|
||||
/obj/item/device/pda/proc/show_to_ghosts(mob/living/user, datum/data_pda_msg/msg,multiple = 0)
|
||||
@@ -646,7 +707,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(id)
|
||||
remove_id()
|
||||
else
|
||||
usr << "<span class='warning'>This PDA does not have an ID in it!</span>"
|
||||
remove_pen()
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_id()
|
||||
set category = "Object"
|
||||
@@ -671,50 +732,54 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return
|
||||
|
||||
if (usr.canUseTopic(src))
|
||||
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
|
||||
usr << "<span class='warning'>This PDA does not have a pen in it!</span>"
|
||||
remove_pen()
|
||||
|
||||
/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()
|
||||
/obj/item/device/pda/proc/remove_pen()
|
||||
if(inserted_item)
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(inserted_item)
|
||||
else
|
||||
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
|
||||
inserted_item.forceMove(loc)
|
||||
usr << "<span class='notice'>You remove \the [inserted_item] from \the [src].</span>"
|
||||
inserted_item = null
|
||||
update_icon()
|
||||
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
|
||||
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)
|
||||
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)
|
||||
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
|
||||
@@ -728,8 +793,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) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
|
||||
if(!id_check(user, 2))
|
||||
if(((src in user.contents) || (isturf(loc) && in_range(src, user))) && (C in user.contents))
|
||||
if(!id_check(user, idcard))
|
||||
return
|
||||
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
|
||||
updateSelfDialog()//Update self dialog on success.
|
||||
@@ -741,20 +806,24 @@ 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(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(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(!user.unEquip(C))
|
||||
return
|
||||
C.loc = src
|
||||
C.forceMove(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 ..()
|
||||
|
||||
@@ -850,6 +919,18 @@ 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,14 +166,15 @@
|
||||
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 is model is a WGW-11 series e-reader."
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This 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 is model is a special edition with a transparent case."
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This 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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon_state = "cart"
|
||||
item_state = "electronic"
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/obj/item/radio/integrated/radio = null
|
||||
var/access_security = 0
|
||||
@@ -23,6 +23,7 @@
|
||||
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
|
||||
|
||||
@@ -45,12 +46,14 @@
|
||||
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
|
||||
@@ -84,6 +87,7 @@
|
||||
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
|
||||
@@ -120,6 +124,7 @@
|
||||
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"
|
||||
@@ -161,6 +166,7 @@
|
||||
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"
|
||||
@@ -178,6 +184,7 @@
|
||||
access_status_display = 1
|
||||
access_engine = 1
|
||||
access_atmos = 1
|
||||
access_dronephone = 1
|
||||
bot_access_flags = FLOOR_BOT
|
||||
|
||||
/obj/item/weapon/cartridge/cmo
|
||||
@@ -196,6 +203,7 @@
|
||||
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()
|
||||
@@ -216,6 +224,7 @@
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user