Bleeding edgy refresh (#303)
* not code stuff * other things * global vars, defines, helpers * onclick hud stuff, orphans, world.dm * controllers and datums * game folder * everything not client/mobs in modules * client folder * stage 1 mob stuff * simple animal things * silicons * carbon things * ayylmaos and monkeys * hyoomahn * icons n shit * sprite fixes * compile fixes * some fixes I cherrypicked. * qdel fixes * forgot brain refractors
This commit is contained in:
@@ -57,26 +57,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
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)
|
||||
@@ -344,7 +329,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
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>"
|
||||
to_chat(U, "<span class='notice'>You remove [cartridge] from [src].</span>")
|
||||
scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
@@ -372,16 +357,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)
|
||||
set_light(2.3)
|
||||
update_icon()
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
@@ -417,7 +396,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
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, TRUE)
|
||||
U << msg
|
||||
to_chat(U, msg)
|
||||
|
||||
|
||||
//NOTEKEEPER FUNCTIONS===================================
|
||||
@@ -447,7 +426,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(t)
|
||||
if(hidden_uplink && (trim(lowertext(t)) == trim(lowertext(lock_code))))
|
||||
hidden_uplink.interact(U)
|
||||
U << "The PDA softly beeps."
|
||||
to_chat(U, "The PDA softly beeps.")
|
||||
U << browse(null, "window=pda")
|
||||
src.mode = 0
|
||||
else
|
||||
@@ -472,7 +451,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U.show_message("<span class='notice'>Virus sent!</span>", 1)
|
||||
P.honkamt = (rand(15,20))
|
||||
else
|
||||
U << "PDA not found."
|
||||
to_chat(U, "PDA not found.")
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
@@ -486,7 +465,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
P.silent = 1
|
||||
P.ttone = "silence"
|
||||
else
|
||||
U << "PDA not found."
|
||||
to_chat(U, "PDA not found.")
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
@@ -528,7 +507,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U.show_message("<span class='notice'>Success!</span>", 1)
|
||||
P.explode()
|
||||
else
|
||||
U << "PDA not found."
|
||||
to_chat(U, "PDA not found.")
|
||||
else
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
@@ -577,7 +556,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(id)
|
||||
usr << "<span class='notice'>You remove the ID from the [name].</span>"
|
||||
to_chat(usr, "<span class='notice'>You remove the ID from the [name].</span>")
|
||||
else
|
||||
id.loc = get_turf(src)
|
||||
id = null
|
||||
@@ -624,7 +603,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
log_pda("[user] (PDA: [src.name]) sent \"[message]\" to [P.name]")
|
||||
else
|
||||
if(!multiple)
|
||||
user << "<span class='notice'>ERROR: Server isn't responding.</span>"
|
||||
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
|
||||
return
|
||||
photo = null
|
||||
|
||||
@@ -651,7 +630,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
L = get(src, /mob/living/silicon)
|
||||
|
||||
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>)"
|
||||
to_chat(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()
|
||||
add_overlay(image(icon, icon_alert))
|
||||
@@ -660,7 +639,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
for(var/mob/M in player_list)
|
||||
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
M << "[link] <span class='name'>[msg.sender] </span><span class='game say'>PDA Message</span> --> <span class='name'>[multiple ? "Everyone" : msg.recipient]</span>: <span class='message'>[msg.message][msg.get_photo_ref()]</span></span>"
|
||||
to_chat(M, "[link] <span class='name'>[msg.sender] </span><span class='game say'>PDA Message</span> --> <span class='name'>[multiple ? "Everyone" : msg.recipient]</span>: <span class='message'>[msg.message][msg.get_photo_ref()]</span></span>")
|
||||
|
||||
/obj/item/device/pda/proc/can_send(obj/item/device/pda/P)
|
||||
if(!P || QDELETED(P) || P.toff)
|
||||
@@ -723,7 +702,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>"
|
||||
to_chat(usr, "<span class='warning'>This PDA does not have an ID in it!</span>")
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_pen()
|
||||
set category = "Object"
|
||||
@@ -743,11 +722,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
M.put_in_hands(inserted_item)
|
||||
else
|
||||
inserted_item.forceMove(loc)
|
||||
usr << "<span class='notice'>You remove \the [inserted_item] from \the [src].</span>"
|
||||
to_chat(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>"
|
||||
to_chat(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)
|
||||
@@ -776,7 +755,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
cartridge = C
|
||||
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You insert [cartridge] into [src].</span>")
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
update_icon()
|
||||
@@ -784,19 +763,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else if(istype(C, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/idcard = C
|
||||
if(!idcard.registered_name)
|
||||
user << "<span class='warning'>\The [src] rejects the ID!</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] rejects the ID!</span>")
|
||||
return
|
||||
if(!owner)
|
||||
owner = idcard.registered_name
|
||||
ownjob = idcard.assignment
|
||||
update_label()
|
||||
user << "<span class='notice'>Card scanned.</span>"
|
||||
to_chat(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))
|
||||
return
|
||||
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
|
||||
to_chat(user, "<span class='notice'>You put the ID into \the [src]'s slot.</span>")
|
||||
updateSelfDialog()//Update self dialog on success.
|
||||
return //Return in case of failed check or when successful.
|
||||
updateSelfDialog()//For the non-input related code.
|
||||
@@ -804,22 +783,22 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
pai = C
|
||||
user << "<span class='notice'>You slot \the [C] into [src].</span>"
|
||||
to_chat(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>"
|
||||
to_chat(user, "<span class='warning'>There is already \a [inserted_item] in \the [src]!</span>")
|
||||
else
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
user << "<span class='notice'>You slide \the [C] into \the [src].</span>"
|
||||
to_chat(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>"
|
||||
to_chat(user, "<span class='notice'>You scan \the [C].</span>")
|
||||
else if(hidden_uplink && hidden_uplink.active)
|
||||
hidden_uplink.attackby(C, user, params)
|
||||
else
|
||||
@@ -854,13 +833,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(!isnull(A.reagents))
|
||||
if(A.reagents.reagent_list.len > 0)
|
||||
var/reagents_length = A.reagents.reagent_list.len
|
||||
user << "<span class='notice'>[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.</span>"
|
||||
to_chat(user, "<span class='notice'>[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.</span>")
|
||||
for (var/re in A.reagents.reagent_list)
|
||||
user << "<span class='notice'>\t [re]</span>"
|
||||
to_chat(user, "<span class='notice'>\t [re]</span>")
|
||||
else
|
||||
user << "<span class='notice'>No active chemical agents found in [A].</span>"
|
||||
to_chat(user, "<span class='notice'>No active chemical agents found in [A].</span>")
|
||||
else
|
||||
user << "<span class='notice'>No significant chemical agents found in [A].</span>"
|
||||
to_chat(user, "<span class='notice'>No significant chemical agents found in [A].</span>")
|
||||
|
||||
if(5)
|
||||
if (istype(A, /obj/item/weapon/tank))
|
||||
@@ -884,7 +863,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (!scanmode && istype(A, /obj/item/weapon/paper) && owner)
|
||||
var/obj/item/weapon/paper/PP = A
|
||||
if (!PP.info)
|
||||
user << "<span class='warning'>Unable to scan! Paper is blank.</span>"
|
||||
to_chat(user, "<span class='warning'>Unable to scan! Paper is blank.</span>")
|
||||
return
|
||||
notehtml = PP.info
|
||||
note = replacetext(notehtml, "<BR>", "\[br\]")
|
||||
@@ -893,7 +872,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
note = replacetext(note, "</ul>", "\[/list\]")
|
||||
note = html_encode(note)
|
||||
notescanned = 1
|
||||
user << "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" //concept of scanning paper copyright brainoblivion 2009
|
||||
to_chat(user, "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" )
|
||||
|
||||
|
||||
/obj/item/device/pda/proc/explode() //This needs tuning.
|
||||
@@ -941,7 +920,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return //won't work if dead
|
||||
|
||||
if(src.aiPDA.toff)
|
||||
user << "Turn on your receiver in order to send messages."
|
||||
to_chat(user, "Turn on your receiver in order to send messages.")
|
||||
return
|
||||
|
||||
for (var/obj/item/device/pda/P in get_viewable_pdas())
|
||||
@@ -974,9 +953,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return //won't work if dead
|
||||
if(!isnull(aiPDA))
|
||||
aiPDA.toff = !aiPDA.toff
|
||||
usr << "<span class='notice'>PDA sender/receiver toggled [(aiPDA.toff ? "Off" : "On")]!</span>"
|
||||
to_chat(usr, "<span class='notice'>PDA sender/receiver toggled [(aiPDA.toff ? "Off" : "On")]!</span>")
|
||||
else
|
||||
usr << "You do not have a PDA. You should make an issue report about this."
|
||||
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
|
||||
|
||||
/mob/living/silicon/ai/verb/cmd_toggle_pda_silent()
|
||||
set category = "AI Commands"
|
||||
@@ -986,9 +965,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(!isnull(aiPDA))
|
||||
//0
|
||||
aiPDA.silent = !aiPDA.silent
|
||||
usr << "<span class='notice'>PDA ringer toggled [(aiPDA.silent ? "Off" : "On")]!</span>"
|
||||
to_chat(usr, "<span class='notice'>PDA ringer toggled [(aiPDA.silent ? "Off" : "On")]!</span>")
|
||||
else
|
||||
usr << "You do not have a PDA. You should make an issue report about this."
|
||||
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
|
||||
|
||||
/mob/living/silicon/ai/proc/cmd_show_message_log(mob/user)
|
||||
if(user.stat == 2)
|
||||
@@ -997,7 +976,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/HTML = "<html><head><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
|
||||
user << "You do not have a PDA. You should make an issue report about this."
|
||||
to_chat(user, "You do not have a PDA. You should make an issue report about this.")
|
||||
|
||||
/obj/item/weapon/storage/box/PDAs/New()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user