cleanup and commits

This commit is contained in:
LetterJay
2017-06-19 12:35:05 -05:00
parent cc7c07ccf3
commit a544d99f9f
17 changed files with 2420 additions and 88 deletions
+1 -1
View File
@@ -236,7 +236,7 @@
return FALSE
if(cooldown > world.time)
if(!CM.active)
owner << "<span class='cultlarge'><b>You need to wait [round((cooldown - world.time) * 0.1)] seconds before you can mark another target!</b></span>"
to_chat(owner, "<span class='cultlarge'><b>You need to wait [round((cooldown - world.time) * 0.1)] seconds before you can mark another target!</b></span>")
return FALSE
return ..()
+1 -1
View File
@@ -66,4 +66,4 @@
cooldown = 0
icon_state = "pen"
var/mob/M = get(src, /mob)
to_chat(M, "<span class='notice'>[bicon(src)] [src][(src.loc == M)?(""):(" in your [src.loc]")] vibrates softly. It is ready to be used again.</span>")
to_chat(M, "<span class='notice'>[bicon(src)] [src][(src.loc == M)?(""):(" in your [src.loc]")] vibrates softly. It is ready to be used again.</span>")
+8 -8
View File
@@ -179,35 +179,35 @@
gang.message_gangtools("[usr] is attempting to recall the emergency shuttle.")
recalling = 1
to_chat(loc, "<span class='info'>\icon[src]Generating shuttle recall order with codes retrieved from last call signal...</span>")
to_chat(loc, "<span class='info'>[bicon(src)]Generating shuttle recall order with codes retrieved from last call signal...</span>")
sleep(rand(100,300))
if(SSshuttle.emergency.mode != SHUTTLE_CALL) //Shuttle can only be recalled when it's moving to the station
to_chat(user, "<span class='warning'>\icon[src]Emergency shuttle cannot be recalled at this time.</span>")
to_chat(user, "<span class='warning'>[bicon(src)]Emergency shuttle cannot be recalled at this time.</span>")
recalling = 0
return 0
to_chat(loc, "<span class='info'>\icon[src]Shuttle recall order generated. Accessing station long-range communication arrays...</span>")
to_chat(loc, "<span class='info'>[bicon(src)]Shuttle recall order generated. Accessing station long-range communication arrays...</span>")
sleep(rand(100,300))
if(!gang.dom_attempts)
to_chat(user, "<span class='warning'>\icon[src]Error: Unable to access communication arrays. Firewall has logged our signature and is blocking all further attempts.</span>")
to_chat(user, "<span class='warning'>[bicon(src)]Error: Unable to access communication arrays. Firewall has logged our signature and is blocking all further attempts.</span>")
recalling = 0
return 0
var/turf/userturf = get_turf(user)
if(userturf.z != ZLEVEL_STATION) //Shuttle can only be recalled while on station
to_chat(user, "<span class='warning'>\icon[src]Error: Device out of range of station communication arrays.</span>")
to_chat(user, "<span class='warning'>[\bicon(src)]Error: Device out of range of station communication arrays.</span>")
recalling = 0
return 0
var/datum/station_state/end_state = new /datum/station_state()
end_state.count()
if((100 * GLOB.start_state.score(end_state)) < 80) //Shuttle cannot be recalled if the station is too damaged
to_chat(user, "<span class='warning'>\icon[src]Error: Station communication systems compromised. Unable to establish connection.</span>")
to_chat(user, "<span class='warning'>[bicon(src)]Error: Station communication systems compromised. Unable to establish connection.</span>")
recalling = 0
return 0
to_chat(loc, "<span class='info'>\icon[src]Comm arrays accessed. Broadcasting recall signal...</span>")
to_chat(loc, "<span class='info'>[bicon(src)]Comm arrays accessed. Broadcasting recall signal...</span>")
sleep(rand(100,300))
@@ -220,7 +220,7 @@
gang.recalls -= 1
return 1
to_chat(loc, "<span class='info'>\icon[src]No response recieved. Emergency shuttle cannot be recalled at this time.</span>")
to_chat(loc, "<span class='info'>[bicon(src)]No response recieved. Emergency shuttle cannot be recalled at this time.</span>")
return 0
/obj/item/device/gangtool/proc/can_use(mob/living/carbon/human/user)
+18 -18
View File
@@ -413,26 +413,26 @@
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[src]'>[customsender]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
customrecepient.audible_message("\icon[customrecepient] *[customrecepient.ttone]*", null, 3)
customrecepient.audible_message("[bicon(customrecepient)] *[customrecepient.ttone]*", null, 3)
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
to_chat(H, "\icon[customrecepient] <b>Message from [customsender] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)")
to_chat(H, "[bicon(customrecepient)] <b>Message from [customsender] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)")
log_pda("[usr]/([usr.ckey]) (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]")
customrecepient.cut_overlays()
customrecepient.add_overlay(mutable_appearance('icons/obj/pda.dmi', "pda-r"))
customrecepient.add_overlay(mutable_appearance('icons/obj/pda.dmi', "pda-r"))
//Sender is faking as someone who exists
else
src.linkedServer.send_pda_message("[customrecepient.owner]", "[PDARec.owner]","[custommessage]")
customrecepient.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[customrecepient];choice=Message;target=\ref[PDARec]'>[PDARec.owner]</a> ([customjob]):</b></i><br>[custommessage]<br>"
if (!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
customrecepient.audible_message("\icon[customrecepient] *[customrecepient.ttone]*", null, 3)
customrecepient.audible_message("[bicon(customrecepient)] *[customrecepient.ttone]*", null, 3)
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
to_chat(H, "\icon[customrecepient] <b>Message from [PDARec.owner] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[customrecepient];choice=Message;skiprefresh=1;target=\ref[PDARec]'>Reply</a>)")
to_chat(H, "[bicon(customrecepient)] <b>Message from [PDARec.owner] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[customrecepient];choice=Message;skiprefresh=1;target=\ref[PDARec]'>Reply</a>)")
log_pda("[usr]/([usr.ckey]) (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]")
customrecepient.cut_overlays()
customrecepient.add_overlay(mutable_appearance('icons/obj/pda.dmi', "pda-r"))
customrecepient.add_overlay(mutable_appearance('icons/obj/pda.dmi', "pda-r"))
//Finally..
ResetMessage()
@@ -455,16 +455,16 @@
name = "monitor decryption key"
var/obj/machinery/message_server/server = null
/obj/item/weapon/paper/monitorkey/Initialize()
/obj/item/weapon/paper/monitorkey/Initialize()
..()
return INITIALIZE_HINT_LATELOAD
/obj/item/weapon/paper/monitorkey/LateInitialize()
if(GLOB.message_servers)
for(var/obj/machinery/message_server/server in GLOB.message_servers)
if(!isnull(server))
if(!isnull(server.decryptkey))
info = "<center><h2>Daily Key Reset</h2></center><br>The new message monitor key is '[server.decryptkey]'.<br>Please keep this a secret and away from the clown.<br>If necessary, change the password to a more secure one."
info_links = info
add_overlay("paper_words")
break
return INITIALIZE_HINT_LATELOAD
/obj/item/weapon/paper/monitorkey/LateInitialize()
if(GLOB.message_servers)
for(var/obj/machinery/message_server/server in GLOB.message_servers)
if(!isnull(server))
if(!isnull(server.decryptkey))
info = "<center><h2>Daily Key Reset</h2></center><br>The new message monitor key is '[server.decryptkey]'.<br>Please keep this a secret and away from the clown.<br>If necessary, change the password to a more secure one."
info_links = info
add_overlay("paper_words")
break
+25 -25
View File
@@ -51,7 +51,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/obj/item/device/paicard/pai = null // A slot for a personal AI device
var/icon/photo //Scanned photo
var/icon/photo //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.
@@ -82,24 +82,24 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/device/pda/update_icon()
cut_overlays()
var/mutable_appearance/overlay = new()
overlay.pixel_x = overlays_x_offset
var/mutable_appearance/overlay = new()
overlay.pixel_x = overlays_x_offset
if(id)
overlay.icon_state = "id_overlay"
add_overlay(new /mutable_appearance(overlay))
overlay.icon_state = "id_overlay"
add_overlay(new /mutable_appearance(overlay))
if(inserted_item)
overlay.icon_state = "insert_overlay"
add_overlay(new /mutable_appearance(overlay))
overlay.icon_state = "insert_overlay"
add_overlay(new /mutable_appearance(overlay))
if(fon)
overlay.icon_state = "light_overlay"
add_overlay(new /mutable_appearance(overlay))
overlay.icon_state = "light_overlay"
add_overlay(new /mutable_appearance(overlay))
if(pai)
if(pai.pai)
overlay.icon_state = "pai_overlay"
add_overlay(new /mutable_appearance(overlay))
overlay.icon_state = "pai_overlay"
add_overlay(new /mutable_appearance(overlay))
else
overlay.icon_state = "pai_off_overlay"
add_overlay(new /mutable_appearance(overlay))
overlay.icon_state = "pai_off_overlay"
add_overlay(new /mutable_appearance(overlay))
/obj/item/device/pda/MouseDrop(obj/over_object, src_location, over_location)
var/mob/M = usr
@@ -622,7 +622,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if (!silent)
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
audible_message("[bicon(src)] *[ttone]*", null, 3)
audible_message("[bicon(src)] *[ttone]*", null, 3)
//Search for holder of the PDA.
var/mob/living/L = null
if(loc && isliving(loc))
@@ -632,17 +632,17 @@ GLOBAL_LIST_EMPTY(PDAs)
L = get(src, /mob/living/silicon)
if(L && L.stat != UNCONSCIOUS)
var/hrefstart
var/hrefend
if (isAI(L))
hrefstart = "<a href='?src=\ref[L];track=[html_encode(source.owner)]'>"
hrefend = "</a>"
to_chat(L, "\icon[src.icon] <b>Message from [hrefstart][source.owner] ([source.ownjob])[hrefend], </b>\"[msg.message]\"[msg.get_photo_ref()] (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[source]'>Reply</a>)")
var/hrefstart
var/hrefend
if (isAI(L))
hrefstart = "<a href='?src=\ref[L];track=[html_encode(source.owner)]'>"
hrefend = "</a>"
to_chat(L, "[\bicon(src)] <b>Message from [hrefstart][source.owner] ([source.ownjob])[hrefend], </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(icon_alert)
add_overlay(icon_alert)
/obj/item/device/pda/proc/show_to_ghosts(mob/living/user, datum/data_pda_msg/msg,multiple = 0)
for(var/mob/M in GLOB.player_list)
@@ -897,9 +897,9 @@ GLOBAL_LIST_EMPTY(PDAs)
if(T)
T.hotspot_expose(700,125)
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
explosion(T, -1, 1, 3, 4)
explosion(T, -1, 1, 3, 4)
else
explosion(T, -1, -1, 2, 3)
explosion(T, -1, -1, 2, 3)
qdel(src)
return
+8 -8
View File
@@ -92,15 +92,15 @@
if(mapload && access_txt)
access = text2access(access_txt)
/obj/item/weapon/card/id/vv_edit_var(var_name, var_value)
. = ..()
if(.)
switch(var_name)
if("assignment","registered_name")
update_label()
/obj/item/weapon/card/id/vv_edit_var(var_name, var_value)
. = ..()
if(.)
switch(var_name)
if("assignment","registered_name")
update_label()
/obj/item/weapon/card/id/attack_self(mob/user)
user.visible_message("<span class='notice'>[user] shows you: \icon[src] [src.name].</span>", \
user.visible_message("<span class='notice'>[user] shows you: [bicon(src)] [src.name].</span>", \
"<span class='notice'>You show \the [src.name].</span>")
src.add_fingerprint(user)
return