Skip to content

Commit

Permalink
Детектив с оникса.
Browse files Browse the repository at this point in the history
-Починил ДНК в лужах крови, на паре было сломано.
-Перенес машины детектива с оникса
-Перенес порох на руках/перчатках после выстрела
-Добавил десижны плат машин в РнД
-Убрал у ручного сканера возможность сканировать, оставил возможность искать рекордсы.
-Добавил всё добро на карту Кибериады.
В секурити вендор добавлены:
- Коробки с скребками 6шт
- Коробки с пластинками для снятия отпечатков 6шт
  • Loading branch information
RV666 committed Jan 27, 2021
1 parent 5a8b81c commit 53d11bd
Show file tree
Hide file tree
Showing 29 changed files with 1,246 additions and 179 deletions.
482 changes: 334 additions & 148 deletions _maps/map_files/cyberiad/cyberiad.dmm

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions code/datums/supplypacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,14 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY

/datum/supply_packs/security/forensics
name = "Forensics Crate"
contains = list(/obj/item/detective_scanner,
/obj/item/storage/box/evidence,
contains = list(/obj/item/storage/box/evidence,
/obj/item/camera,
/obj/item/taperecorder,
/obj/item/toy/crayon/white,
/obj/item/clothing/head/det_hat)
/obj/item/clothing/head/det_hat,
/obj/item/storage/box/swabs,
/obj/item/storage/box/fingerprints,
/obj/item/storage/briefcase/crimekit)
cost = 20
containername = "forensics crate"

Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@
l_pocket = /obj/item/toy/crayon/white
r_pocket = /obj/item/lighter/zippo
pda = /obj/item/pda/detective
l_hand = /obj/item/storage/briefcase/crimekit
backpack_contents = list(
/obj/item/storage/box/evidence = 1,
/obj/item/detective_scanner = 1,
/obj/item/melee/classic_baton/telescopic = 1
)

Expand Down
18 changes: 18 additions & 0 deletions code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,24 @@ to destroy them and players will be able to make replacements.
/obj/item/stock_parts/matter_bin = 1,
/obj/item/stock_parts/manipulator = 1)

/obj/item/circuitboard/dnaforensics
name = "circuit board (Анализатор ДНК)"
build_path = /obj/machinery/dnaforensics
board_type = "machine"
origin_tech = "programming=2;combat=2"
req_components = list(
/obj/item/stock_parts/micro_laser = 2,
/obj/item/stock_parts/manipulator = 1,)

/obj/item/circuitboard/microscope
name = "circuit board (Электронный микроскоп)"
build_path = /obj/machinery/microscope
board_type = "machine"
origin_tech = "programming=2;combat=2"
req_components = list(
/obj/item/stock_parts/micro_laser = 1,
/obj/item/stack/sheet/glass = 1)

/obj/item/circuitboard/smartfridge
name = "circuit board (Smartfridge)"
build_path = /obj/machinery/smartfridge
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@
req_access_txt = "1"
products = list(/obj/item/restraints/handcuffs = 8,/obj/item/restraints/handcuffs/cable/zipties = 8,/obj/item/grenade/flashbang = 4,/obj/item/flash = 5,
/obj/item/reagent_containers/food/snacks/donut = 12,/obj/item/storage/box/evidence = 6,/obj/item/flashlight/seclite = 4,/obj/item/restraints/legcuffs/bola/energy = 7,
/obj/item/clothing/mask/muzzle/safety = 4)
/obj/item/clothing/mask/muzzle/safety = 4, /obj/item/storage/box/swabs = 6, /obj/item/storage/box/fingerprints = 6)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/storage/fancy/donut_box = 2,/obj/item/hailer = 5)
refill_canister = /obj/item/vending_refill/security

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/decals/cleanable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
bloodiness -= add_blood
S.bloody_shoes[blood_state] = min(MAX_SHOE_BLOODINESS, S.bloody_shoes[blood_state] + add_blood)
if(blood_DNA && blood_DNA.len)
S.add_blood(H.blood_DNA, basecolor)
S.add_blood(blood_DNA, basecolor)
S.blood_state = blood_state
S.blood_color = basecolor
update_icon()
Expand Down
6 changes: 6 additions & 0 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
resistance_flags = FLAMMABLE
var/list/species_restricted = null //Only these species can wear this kit.
var/scan_reagents = 0 //Can the wearer see reagents while it's equipped?
var/gunshot_residue //Used by forensics.

/*
Sprites used when the clothing item is refit. This is done by setting icon_override.
Expand Down Expand Up @@ -61,6 +62,11 @@
if(visor_vars_to_toggle & VISOR_TINT)
tint ^= initial(tint)

// Aurora forensics port.
/obj/item/clothing/clean_blood()
. = ..()
gunshot_residue = null

/obj/item/clothing/proc/can_use(mob/user)
if(user && ismob(user))
if(!user.incapacitated())
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/gloves/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
desc = "These high-tech gloves don't leave any material traces on objects they touch. Perfect for leaving crime scenes undisturbed...both before and after the crime."
icon_state = "forensics"
can_leave_fibers = FALSE
transfer_prints = FALSE

/obj/item/clothing/gloves/combat
desc = "These tactical gloves are both insulated and offer protection from heat sources."
Expand Down
23 changes: 12 additions & 11 deletions code/modules/detective_work/scanner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// TODO: Split everything into easy to manage procs.

/obj/item/detective_scanner
name = "forensic scanner"
desc = "Used to remotely scan objects and biomass for DNA and fingerprints. Can print a report of the findings."
name = "Ручной детективный анализатор"
desc = "Анализатор, способный выдать отчет по человеку, исходя из имени, ДНК или отпечатков пальцев."
icon = 'icons/goonstation/objects/objects.dmi'
icon_state = "detscanner"
w_class = WEIGHT_CLASS_NORMAL
Expand All @@ -17,16 +17,16 @@
actions_types = list(/datum/action/item_action/print_forensic_report, /datum/action/item_action/clear_records)

/obj/item/detective_scanner/attack_self(mob/user)
var/search = input(user, "Enter name, fingerprint or blood DNA.", "Find record", "")
var/search = input(user, "Введите имя, отпечатки пальцев или код ДНК.", "Найти запись", "")

if(!search || user.stat || user.incapacitated())
return

search = lowertext(search) //This is here so that it doesn't run 'lowertext()' until the checks have passed.

var/name
var/fingerprint = "FINGERPRINT NOT FOUND"
var/dna = "BLOOD DNA NOT FOUND"
var/fingerprint = "ОТПЕЧАТКИ НЕ НАЙДЕНЫ"
var/dna = "ДНК НЕ НАЙДЕНО"

// I really, really wish I didn't have to split this into two seperate loops. But the datacore is awful.

Expand All @@ -42,7 +42,7 @@
if(M && (search == lowertext(M.fields["b_dna"]) || name == M.fields["name"])) // Get Blood DNA
dna = M.fields["b_dna"]

if(fingerprint == "FINGERPRINT NOT FOUND") // We have searched for DNA, and so do not have the relevant information from the fingerprint records.
if(fingerprint == "ОТПЕЧАТКИ НЕ НАЙДЕНЫ") // We have searched for DNA, and so do not have the relevant information from the fingerprint records.
name = M.fields["name"]
for(var/gen_record in GLOB.data_core.general)
var/datum/data/record/S = gen_record
Expand All @@ -53,12 +53,12 @@
break

if(name)
to_chat(user, "<span class='notice'>Match found in station records: <b>[name]</b></span><br>\
<i>Fingerprint:</i><span class='notice'> [fingerprint]</span><br>\
<i>Blood DNA:</i><span class='notice'> [dna]</span>")
to_chat(user, "<span class='notice'>Совпадение найдено в записях станции: <b>[name]</b></span><br>\
<i>Отпечатки пальцев:</i><span class='notice'> [fingerprint]</span><br>\
<i>ДНК:</i><span class='notice'> [dna]</span>")
else
to_chat(user, "<span class='warning'>No match found in station records.</span>")

to_chat(user, "<span class='warning'>В записях станции не найдено совпадений.</span>")
/*
/obj/item/detective_scanner/ui_action_click(mob/user, actiontype)
if(actiontype == /datum/action/item_action/print_forensic_report)
print_scanner_report()
Expand Down Expand Up @@ -228,3 +228,4 @@
/proc/get_timestamp()
return time2text(world.time + 432000, ":ss")
*/
164 changes: 164 additions & 0 deletions code/modules/detectivework/forensics.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
/*
//This is the output of the stringpercent(print) proc, and means about 80% of
//the print must be there for it to be complete. (Prints are 32 digits)
var/const/FINGERPRINT_COMPLETE = 6
proc/is_complete_print(print)
return stringpercent(print) <= FINGERPRINT_COMPLETE
atom/var/list/suit_fibers
atom/var/var/list/fingerprints
atom/var/var/list/fingerprintshidden
atom/var/var/fingerprintslast = null
/atom/proc/add_hiddenprint(mob/M)
if(!M || !M.key)
return
if(fingerprintslast == M.key)
return
fingerprintslast = M.key
if(!fingerprintshidden)
fingerprintshidden = list()
if (ishuman(M))
var/mob/living/carbon/human/H = M
if (H.gloves)
src.fingerprintshidden += "\[[time_stamp()]\] (Wearing gloves). Real name: [H.real_name], Key: [H.key]"
return 0
src.fingerprintshidden += "\[[time_stamp()]\] Real name: [M.real_name], Key: [M.key]"
return 1
/atom/proc/add_fingerprint(mob/M, ignoregloves, obj/item)
if(isnull(M)) return
if(isAI(M)) return
if(!M || !M.key)
return
if(istype(tool) && (tool.item_flags & ITEM_FLAG_NO_PRINT))
return
add_hiddenprint(M)
add_fibers(M)
if(!fingerprints)
fingerprints = list()
//Hash this shit.
var/full_print = M.get_full_print(ignoregloves)
if(!full_print)
return
var/obj/item/organ/external/E = M.get_active_hand()
if(src != E && istype(E) && E.get_fingerprint())
full_print = E.get_fingerprint()
ignoregloves = 1
if(!ignoregloves && ishuman(M))
var/mob/living/carbon/human/H = M
if (H.gloves && H.gloves.body_parts_covered & HANDS && H.gloves != src)
H.gloves.add_fingerprint(M)
if(!istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
else if(prob(75))
return 0
// Add the fingerprints
add_partial_print(full_print)
return 1
/atom/proc/add_partial_print(full_print)
if(!fingerprints[full_print])
fingerprints[full_print] = stars(full_print, rand(0, 20)) //Initial touch, not leaving much evidence the first time.
else
switch(stringpercent(fingerprints[full_print])) //tells us how many stars are in the current prints.
if(28 to 32)
if(prob(1))
fingerprints[full_print] = full_print // You rolled a one buddy.
else
fingerprints[full_print] = stars(full_print, rand(0,40)) // 24 to 32
if(24 to 27)
if(prob(3))
fingerprints[full_print] = full_print //Sucks to be you.
else
fingerprints[full_print] = stars(full_print, rand(15, 55)) // 20 to 29
if(20 to 23)
if(prob(5))
fingerprints[full_print] = full_print //Had a good run didn't ya.
else
fingerprints[full_print] = stars(full_print, rand(30, 70)) // 15 to 25
if(16 to 19)
if(prob(5))
fingerprints[full_print] = full_print //Welp.
else
fingerprints[full_print] = stars(full_print, rand(40, 100)) // 0 to 21
if(0 to 15)
if(prob(5))
fingerprints[full_print] = stars(full_print, rand(0,50)) // small chance you can smudge.
else
fingerprints[full_print] = full_print
/atom/proc/transfer_fingerprints_to(atom/A)
if(fingerprints)
if(!A.fingerprints)
A.fingerprints = list()
A.fingerprints |= fingerprints.Copy() //detective
if(fingerprintshidden)
if(!A.fingerprintshidden)
A.fingerprintshidden = list()
A.fingerprintshidden |= fingerprintshidden.Copy() //admin
A.fingerprintslast = fingerprintslast
atom/proc/add_fibers(mob/living/carbon/human/M)
if(!istype(M))
return
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.transfer_blood) //bloodied gloves transfer blood to touched objects
if(add_blood(G.bloody_hands_mob)) //only reduces the bloodiness of our gloves if the item wasn't already bloody
G.transfer_blood--
else if(M.bloody_hands)
if(add_blood(M.bloody_hands_mob))
M.bloody_hands--
if(!suit_fibers) suit_fibers = list()
var/fibertext
var/item_multiplier = istype(src,/obj/item)?1.2:1
var/suit_coverage = 0
if(istype(M.wear_suit, /obj/item/clothing))
var/obj/item/clothing/C = M.wear_suit
fibertext = C.get_fibers()
if(fibertext && prob(10*item_multiplier))
suit_fibers |= fibertext
suit_coverage = C.body_parts_covered
if(istype(M.w_uniform, /obj/item/clothing) && (M.w_uniform.body_parts_covered & ~suit_coverage))
var/obj/item/clothing/C = M.w_uniform
fibertext = C.get_fibers()
if(fibertext && prob(15*item_multiplier))
suit_fibers |= fibertext
if(istype(M.gloves, /obj/item/clothing) && (M.gloves.body_parts_covered & ~suit_coverage))
var/obj/item/clothing/C = M.gloves
fibertext = C.get_fibers()
if(fibertext && prob(20*item_multiplier))
suit_fibers |= fibertext
/mob/proc/get_full_print()
return FALSE
/mob/living/carbon/get_full_print()
if (!dna || (mFingerprints in mutations))
return FALSE
return md5(dna.uni_identity)
/mob/living/carbon/human/get_full_print(ignoregloves)
if(!..())
return FALSE
var/obj/item/organ/external/E = has_organ[hand ? "l_hand" : "r_hand"]
if(E)
return E.get_fingerprint()
*/
Loading

0 comments on commit 53d11bd

Please sign in to comment.