Merge remote-tracking branch 'bay12-upstream/master' into development

This commit is contained in:
skull132
2016-10-07 00:58:39 +03:00
1594 changed files with 53994 additions and 48590 deletions
+51 -77
View File
@@ -11,6 +11,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
item_state = "electronic"
w_class = 2.0
slot_flags = SLOT_ID | SLOT_BELT
sprite_sheets = list("Resomi" = 'icons/mob/species/resomi/id.dmi')
//Main variables
var/owner = null
@@ -746,7 +747,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(!isnull(P))
if (!P.toff && cartridge.charges > 0)
cartridge.charges--
U.show_message("\blue Virus sent!", 1)
U.show_message("<span class='notice'>Virus sent!</span>", 1)
P.honkamt = (rand(15,20))
else
U << "PDA not found."
@@ -759,7 +760,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(!isnull(P))
if (!P.toff && cartridge.charges > 0)
cartridge.charges--
U.show_message("\blue Virus sent!", 1)
U.show_message("<span class='notice'>Virus sent!</span>", 1)
P.message_silent = 1
P.news_silent = 1
P.ttone = "silence"
@@ -787,10 +788,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/obj/item/device/pda/P = locate(href_list["target"])
var/datum/reception/reception = get_reception(src, P, "", do_sleep = 0)
if(!(reception.message_server && reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER))
U.show_message("\red An error flashes on your [src]: Connection unavailable", 1)
U.show_message("<span class='warning'>An error flashes on your [src]: Connection unavailable</span>", 1)
return
if(reception.telecomms_reception & TELECOMMS_RECEPTION_RECEIVER == 0) // Does our recepient have a broadcaster on their level?
U.show_message("\red An error flashes on your [src]: Recipient unavailable", 1)
U.show_message("<span class='warning'>An error flashes on your [src]: Recipient unavailable</span>", 1)
return
if(!isnull(P))
if (!P.toff && cartridge.charges > 0)
@@ -808,15 +809,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
difficulty += 3
if(prob(difficulty))
U.show_message("\red An error flashes on your [src].", 1)
U.show_message("<span class='warning'>An error flashes on your [src].</span>", 1)
else if (prob(difficulty * 7))
U.show_message("\red Energy feeds back into your [src]!", 1)
U.show_message("<span class='warning'>Energy feeds back into your [src]!</span>", 1)
ui.close()
detonate_act(src)
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up")
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed.", 1)
else
U.show_message("\blue Success!", 1)
U.show_message("<span class='notice'>Success!</span>", 1)
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge and succeeded")
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge and succeeded.", 1)
detonate_act(P)
@@ -933,7 +934,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
message += "Your [P] shatters in a thousand pieces!"
if(M && isliving(M))
message = "\red" + message
message = "<span class='warning'>[message]</span>"
M.show_message(message, 1)
/obj/item/device/pda/proc/remove_id()
@@ -948,8 +949,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P, var/tap = 1)
if(tap)
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
U.last_target_click = world.time
U.visible_message("<span class='notice'>\The [U] taps on \his PDA's screen.</span>")
var/t = input(U, "Please enter message", P.name, null) as text
t = sanitize(t)
//t = readd_quotes(t)
@@ -1147,21 +1147,22 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(choice == 1)
if (id)
remove_id()
return 1
else
var/obj/item/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
user.drop_item()
if (istype(I, /obj/item/weapon/card/id) && user.unEquip(I))
I.loc = src
id = I
return 1
else
var/obj/item/weapon/card/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
if (istype(I, /obj/item/weapon/card/id) && I:registered_name && user.unEquip(I))
var/obj/old_id = id
user.drop_item()
I.loc = src
id = I
user.put_in_hands(old_id)
return
return 1
return 0
// access to status display signals
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
@@ -1189,9 +1190,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
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)) )
id_check(user, 2)
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
updateSelfDialog()//Update self dialog on success.
if(id_check(user, 2))
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.
else if(istype(C, /obj/item/device/paicard) && !src.pai)
@@ -1217,53 +1218,59 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(1)
for (var/mob/O in viewers(C, null))
O.show_message("\red [user] has analyzed [C]'s vitals!", 1)
O.show_message("<span class='warning'>\The [user] has analyzed [C]'s vitals!</span>", 1)
user.show_message("\blue Analyzing Results for [C]:")
user.show_message("\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health - C.halloss]% healthy"]", 1)
user.show_message("\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.getFireLoss() > 50 ? "\red" : "\blue"][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]", 1)
user.show_message("\blue \t Key: Suffocation/Toxin/Burns/Brute", 1)
user.show_message("\blue \t Body Temperature: [C.bodytemperature-T0C]&deg;C ([C.bodytemperature*1.8-459.67]&deg;F)", 1)
user.show_message("<span class='notice'>Analyzing Results for [C]:</span>")
user.show_message("<span class='notice'> Overall Status: [C.stat > 1 ? "dead" : "[C.health - C.halloss]% healthy"]</span>", 1)
user.show_message(text("<span class='notice'> Damage Specifics:</span> <span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>-<span class='[]'>[]</span>",
(C.getOxyLoss() > 50) ? "warning" : "", C.getOxyLoss(),
(C.getToxLoss() > 50) ? "warning" : "", C.getToxLoss(),
(C.getFireLoss() > 50) ? "warning" : "", C.getFireLoss(),
(C.getBruteLoss() > 50) ? "warning" : "", C.getBruteLoss()
), 1)
user.show_message("<span class='notice'> Key: Suffocation/Toxin/Burns/Brute</span>", 1)
user.show_message("<span class='notice'> Body Temperature: [C.bodytemperature-T0C]&deg;C ([C.bodytemperature*1.8-459.67]&deg;F)</span>", 1)
if(C.tod && (C.stat == DEAD || (C.status_flags & FAKEDEATH)))
user.show_message("\blue \t Time of Death: [C.tod]")
user.show_message("<span class='notice'> Time of Death: [C.tod]</span>")
if(istype(C, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C
var/list/damaged = H.get_damaged_organs(1,1)
user.show_message("\blue Localized Damage, Brute/Burn:",1)
user.show_message("<span class='notice'>Localized Damage, Brute/Burn:</span>",1)
if(length(damaged)>0)
for(var/obj/item/organ/external/org in damaged)
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.name),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
user.show_message(text("<span class='notice'> []: <span class='[]'>[]</span>-<span class='[]'>[]</span></span>",
capitalize(org.name), (org.brute_dam > 0) ? "warning" : "notice", org.brute_dam, (org.burn_dam > 0) ? "warning" : "notice", org.burn_dam),1)
else
user.show_message("\blue \t Limbs are OK.",1)
user.show_message("<span class='notice'> Limbs are OK.</span>",1)
for(var/datum/disease/D in C.viruses)
if(!D.hidden[SCANNER])
user.show_message(text("\red <b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]"))
user.show_message("<span class='warning'><b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]</span>")
if(2)
if (!istype(C:dna, /datum/dna))
user << "\blue No fingerprints found on [C]"
user << "<span class='notice'>No fingerprints found on [C]</span>"
else
user << text("\blue [C]'s Fingerprints: [md5(C:dna.uni_identity)]")
user << text("<span class='notice'>\The [C]'s Fingerprints: [md5(C:dna.uni_identity)]</span>")
if ( !(C:blood_DNA) )
user << "\blue No blood found on [C]"
user << "<span class='notice'>No blood found on [C]</span>"
if(C:blood_DNA)
qdel(C:blood_DNA)
else
user << "\blue Blood found on [C]. Analysing..."
user << "<span class='notice'>Blood found on [C]. Analysing...</span>"
spawn(15)
for(var/blood in C:blood_DNA)
user << "\blue Blood type: [C:blood_DNA[blood]]\nDNA: [blood]"
user << "<span class='notice'>Blood type: [C:blood_DNA[blood]]\nDNA: [blood]</span>"
if(4)
for (var/mob/O in viewers(C, null))
O.show_message("\red [user] has analyzed [C]'s radiation levels!", 1)
O.show_message("<span class='warning'>\The [user] has analyzed [C]'s radiation levels!</span>", 1)
user.show_message("\blue Analyzing Results for [C]:")
user.show_message("<span class='notice'>Analyzing Results for [C]:</span>")
if(C.radiation)
user.show_message("\green Radiation Level: \black [C.radiation]")
user.show_message("<span class='notice'>Radiation Level: [C.radiation]</span>")
else
user.show_message("\blue No radiation detected.")
user.show_message("<span class='notice'>No radiation detected.</span>")
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
@@ -1275,49 +1282,16 @@ 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 << "\blue [reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found."
user << "<span class='notice'>[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.</span>"
for (var/re in A.reagents.reagent_list)
user << "\blue \t [re]"
user << "<span class='notice'> [re]</span>"
else
user << "\blue No active chemical agents found in [A]."
user << "<span class='notice'>No active chemical agents found in [A].</span>"
else
user << "\blue No significant chemical agents found in [A]."
user << "<span class='notice'>No significant chemical agents found in [A].</span>"
if(5)
if((istype(A, /obj/item/weapon/tank)) || (istype(A, /obj/machinery/portable_atmospherics)))
var/obj/icon = A
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [A]"
var/pressure = A:air_contents.return_pressure()
var/total_moles = A:air_contents.total_moles
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
for(var/g in A:air_contents.gas)
user << "\blue [gas_data.name[g]]: [round((A:air_contents.gas[g] / total_moles) * 100)]%"
user << "\blue Temperature: [round(A:air_contents.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
if (istype(A, /obj/machinery/atmospherics/pipe/tank))
var/obj/icon = A
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [A]"
var/obj/machinery/atmospherics/pipe/tank/T = A
var/pressure = T.parent.air.return_pressure()
var/total_moles = T.parent.air.total_moles
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
for(var/g in T.parent.air.gas)
user << "\blue [gas_data.name[g]]: [round((T.parent.air.gas[g] / total_moles) * 100)]%"
user << "\blue Temperature: [round(T.parent.air.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
analyze_gases(A, user)
if (!scanmode && istype(A, /obj/item/weapon/paper) && owner)
// JMO 20140705: Makes scanned document show up properly in the notes. Not pretty for formatted documents,
@@ -1366,7 +1340,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
// feature to the PDA, which would better convey the availability of the feature, but this will work for now.
// Inform the user
user << "\blue Paper scanned and OCRed to notekeeper." //concept of scanning paper copyright brainoblivion 2009
user << "<span class='notice'>Paper scanned and OCRed to notekeeper.</span>" //concept of scanning paper copyright brainoblivion 2009
+2 -2
View File
@@ -1,6 +1,6 @@
/obj/item/radio/integrated
name = "\improper PDA radio module"
desc = "An electronic radio system of nanotrasen origin."
desc = "An electronic radio system."
icon = 'icons/obj/module.dmi'
icon_state = "power_mod"
var/obj/item/device/pda/hostpda = null
@@ -221,7 +221,7 @@
if(!radio_controller)
return
if (src.frequency < 1441 || src.frequency > 1489)
if (src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
src.frequency = sanitize_frequency(src.frequency)
set_frequency(frequency)