mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
Merge pull request #511 from SkyMarshal/master
Altered detective scanner functionality.
This commit is contained in:
+1
-1
@@ -518,7 +518,7 @@
|
||||
#include "code\game\machinery\computer\id.dm"
|
||||
#include "code\game\machinery\computer\lockdown.dm"
|
||||
#include "code\game\machinery\computer\medical.dm"
|
||||
#include "code\game\machinery\computer\Operating.dm"
|
||||
#include "code\game\machinery\computer\operating.dm"
|
||||
#include "code\game\machinery\computer\power.dm"
|
||||
#include "code\game\machinery\computer\robot.dm"
|
||||
#include "code\game\machinery\computer\security.dm"
|
||||
|
||||
@@ -307,6 +307,12 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
target_types += /obj/effect/decal/cleanable/vomit
|
||||
target_types += /obj/effect/decal/cleanable/robot_debris
|
||||
target_types += /obj/effect/decal/cleanable/crayon
|
||||
target_types += /obj/effect/decal/cleanable/mucus
|
||||
target_types += /obj/effect/decal/cleanable/robot_debris
|
||||
target_types += /obj/effect/decal/cleanable/molten_item
|
||||
target_types += /obj/effect/decal/cleanable/tomato_smudge
|
||||
target_types += /obj/effect/decal/cleanable/egg_smudge
|
||||
target_types += /obj/effect/decal/cleanable/pie_smudge
|
||||
|
||||
if(src.blood)
|
||||
target_types += /obj/effect/decal/cleanable/xenoblood/
|
||||
|
||||
@@ -1496,6 +1496,8 @@ About the new airlock wires panel:
|
||||
return
|
||||
if (istype(C, /obj/item/device/hacktool))
|
||||
return src.attack_ai(user, C)
|
||||
if(ismob(C))
|
||||
return ..(C, user)
|
||||
src.add_fingerprint(user)
|
||||
switch(removal_step)
|
||||
if(0)
|
||||
|
||||
@@ -62,9 +62,9 @@ MASS SPECTROMETER
|
||||
/obj/item/device/detective_scanner
|
||||
name = "Scanner"
|
||||
desc = "Used to scan objects for DNA and fingerprints."
|
||||
icon_state = "forensic0"
|
||||
icon_state = "forensic1"
|
||||
var/amount = 20.0
|
||||
var/printing = 0.0
|
||||
// var/printing = 0.0
|
||||
var/list/stored = list()
|
||||
w_class = 3.0
|
||||
item_state = "electronic"
|
||||
@@ -90,15 +90,15 @@ MASS SPECTROMETER
|
||||
W.add_fingerprint(user)
|
||||
return
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
src.printing = !( src.printing )
|
||||
if(src.printing)
|
||||
user << "\blue Printing turned on"
|
||||
else
|
||||
user << "\blue Printing turned off"
|
||||
src.icon_state = text("forensic[]", src.printing)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
// attack_self(mob/user as mob)
|
||||
// src.printing = !( src.printing )
|
||||
// if(src.printing)
|
||||
// user << "\blue Printing turned on"
|
||||
// else
|
||||
// user << "\blue Printing turned off"
|
||||
// src.icon_state = text("forensic[]", src.printing)
|
||||
// add_fingerprint(user)
|
||||
// return
|
||||
|
||||
attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
if (!ishuman(M))
|
||||
@@ -108,11 +108,12 @@ MASS SPECTROMETER
|
||||
user << "\blue No fingerprints found on [M]"
|
||||
return 0
|
||||
else
|
||||
if ((src.amount < 1 && src.printing))
|
||||
if (src.amount < 1)
|
||||
user << text("\blue Fingerprints scanned on [M]. Need more cards to print.")
|
||||
src.printing = 0
|
||||
src.icon_state = text("forensic[]", src.printing)
|
||||
if (src.printing)
|
||||
// src.printing = 0
|
||||
// src.icon_state = text("forensic[]", src.printing)
|
||||
// if (src.printing)
|
||||
else
|
||||
src.amount--
|
||||
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user.loc )
|
||||
F.amount = 1
|
||||
|
||||
@@ -43,7 +43,6 @@ CIRCULAR SAW
|
||||
for(var/datum/disease/alien_embryo in M.viruses)
|
||||
alien_embryo.cure()
|
||||
return
|
||||
return
|
||||
|
||||
if(user.zone_sel.selecting == "groin")
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
@@ -55,7 +54,7 @@ CIRCULAR SAW
|
||||
M << "\red [user] begins to retract the flap in your abdomen with [src]!"
|
||||
user << "\red You retract the flap in [M]'s abdomen with [src]!"
|
||||
M:appendix_op_stage = 3.0
|
||||
return
|
||||
return
|
||||
|
||||
if (user.zone_sel.selecting == "eyes")
|
||||
|
||||
@@ -101,11 +100,11 @@ CIRCULAR SAW
|
||||
M.take_organ_damage(15)
|
||||
|
||||
M:eye_op_stage = 2.0
|
||||
return
|
||||
|
||||
else
|
||||
// bone surgery doable?
|
||||
if(!try_bone_surgery(M, user))
|
||||
return ..()
|
||||
// bone surgery doable?
|
||||
if(!try_bone_surgery(M, user))
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/retractor/proc/try_bone_surgery(mob/living/carbon/human/H as mob, mob/living/user as mob)
|
||||
if(!istype(H))
|
||||
@@ -194,6 +193,7 @@ CIRCULAR SAW
|
||||
M << "\red [user] begins to clamp bleeders in your abdomen with [src]!"
|
||||
user << "\red You clamp bleeders in [M]'s abdomen with [src]!"
|
||||
M:appendix_op_stage = 2.0
|
||||
return
|
||||
if(4.0)
|
||||
if(M != user)
|
||||
for(var/mob/O in (viewers(M) - user - M))
|
||||
@@ -207,7 +207,7 @@ CIRCULAR SAW
|
||||
return
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(M))
|
||||
M:appendix_op_stage = 5.0
|
||||
return
|
||||
return
|
||||
|
||||
if (user.zone_sel.selecting == "eyes")
|
||||
|
||||
@@ -252,7 +252,8 @@ CIRCULAR SAW
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
M:eye_op_stage = 3.0
|
||||
else if(user.zone_sel.selecting == "head")
|
||||
return
|
||||
if(user.zone_sel.selecting == "head")
|
||||
if(istype(M, /mob/living/carbon/human) && M:brain_op_stage == 1)
|
||||
M:brain_op_stage = 0
|
||||
var/datum/organ/external/S = M:organs["head"]
|
||||
@@ -264,10 +265,9 @@ CIRCULAR SAW
|
||||
return ..()
|
||||
else
|
||||
return ..()
|
||||
else
|
||||
// bone surgery doable?
|
||||
if(!try_bone_surgery(M, user))
|
||||
return ..()
|
||||
// bone surgery doable?
|
||||
if(!try_bone_surgery(M, user))
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/hemostat/proc/try_bone_surgery(mob/living/carbon/human/H as mob, mob/living/user as mob)
|
||||
@@ -357,7 +357,7 @@ CIRCULAR SAW
|
||||
|
||||
/obj/item/weapon/autopsy_scanner/verb/print_data()
|
||||
set src in view(usr, 1)
|
||||
if(usr.stat == 2)
|
||||
if(usr.stat)
|
||||
src << "No."
|
||||
return
|
||||
|
||||
@@ -411,7 +411,7 @@ CIRCULAR SAW
|
||||
n++
|
||||
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message("\red The [src] rattles and prints out a sheet of paper.", 1)
|
||||
O.show_message("\red \the [src] rattles and prints out a sheet of paper.", 1)
|
||||
|
||||
sleep(10)
|
||||
|
||||
@@ -441,7 +441,7 @@ CIRCULAR SAW
|
||||
usr << "<b>You have to cut the limb open first!</b>"
|
||||
return
|
||||
for(var/mob/O in viewers(M))
|
||||
O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.display_name] with the [src.name]", 1)
|
||||
O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.display_name] with \the [src.name]", 1)
|
||||
|
||||
src.add_data(S)
|
||||
|
||||
@@ -469,8 +469,6 @@ CIRCULAR SAW
|
||||
user << "\red You cauterize the incision in [M]'s torso with [src]!"
|
||||
M:embryo_op_stage = 0.0
|
||||
return
|
||||
else
|
||||
try_bone_surgery(M, user)
|
||||
|
||||
if(user.zone_sel.selecting == "groin")
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
@@ -485,9 +483,7 @@ CIRCULAR SAW
|
||||
for(var/datum/disease/appendicitis in M.viruses)
|
||||
appendicitis.cure()
|
||||
M.resistances += appendicitis
|
||||
else
|
||||
try_bone_surgery(M, user)
|
||||
return
|
||||
return
|
||||
|
||||
if (user.zone_sel.selecting == "eyes")
|
||||
|
||||
@@ -533,12 +529,10 @@ CIRCULAR SAW
|
||||
M.take_organ_damage(15)
|
||||
M.disabilities &= ~128
|
||||
M:eye_op_stage = 0.0
|
||||
return
|
||||
|
||||
else
|
||||
// bone surgery doable?
|
||||
try_bone_surgery(M, user)
|
||||
// if(!try_bone_surgery(M, user))
|
||||
// return ..()
|
||||
if(!try_bone_surgery(M, user))
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/cautery/proc/try_bone_surgery(mob/living/carbon/human/H as mob, mob/living/user as mob)
|
||||
if(!istype(H))
|
||||
@@ -562,7 +556,7 @@ CIRCULAR SAW
|
||||
"\red [user] begins to cauterize the incision in \his [S.display_name] with [src]!", \
|
||||
"\red You begin to cauterize the incision in your [S.display_name] with [src]!")
|
||||
|
||||
if(do_mob(user, H, 100))
|
||||
if(do_mob(user, H, rand(70,100)))
|
||||
if(H != user)
|
||||
H.visible_message( \
|
||||
"\red [user] cauterizes the incision in [H]'s [S.display_name] with [src]!", \
|
||||
@@ -763,9 +757,9 @@ CIRCULAR SAW
|
||||
M:brain_op_stage = 3.0
|
||||
else
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
else if(user.zone_sel.selecting == "eyes")
|
||||
if(user.zone_sel.selecting == "eyes")
|
||||
user << "\blue So far so good."
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -812,10 +806,9 @@ CIRCULAR SAW
|
||||
M.updatehealth()
|
||||
M:eye_op_stage = 1.0
|
||||
user << "\blue So far so good after."
|
||||
else
|
||||
// bone surgery doable?
|
||||
if(!try_bone_surgery(M, user))
|
||||
return ..()
|
||||
return
|
||||
if(!try_bone_surgery(M, user))
|
||||
return ..()
|
||||
|
||||
/* wat
|
||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
||||
|
||||
@@ -92,13 +92,16 @@ obj/machinery/computer/forensic_scanning
|
||||
scan_data = ""
|
||||
scan_name = ""
|
||||
scan_process = 0
|
||||
booked = 0
|
||||
|
||||
req_access = list(access_forensics_lockers)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/book/manual/detective(get_turf(src))
|
||||
if(!booked)
|
||||
new /obj/item/weapon/book/manual/detective(get_turf(src))
|
||||
booked = 1
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1419,6 +1419,7 @@
|
||||
/obj/effect/equip_e/human/process()
|
||||
if (item)
|
||||
item.add_fingerprint(source)
|
||||
var/item_loc = 0
|
||||
if (!item)
|
||||
switch(place)
|
||||
if("mask")
|
||||
@@ -1481,9 +1482,65 @@
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
switch(place)
|
||||
if("mask")
|
||||
if(target.wear_mask)
|
||||
item_loc = 1
|
||||
if("l_hand")
|
||||
if(target.l_hand)
|
||||
item_loc = 1
|
||||
if("r_hand")
|
||||
if(target.r_hand)
|
||||
item_loc = 1
|
||||
if("gloves")
|
||||
if(target.gloves)
|
||||
item_loc = 1
|
||||
if("eyes")
|
||||
if(target.glasses)
|
||||
item_loc = 1
|
||||
if("l_ear")
|
||||
if(target.l_ear)
|
||||
item_loc = 1
|
||||
if("r_ear")
|
||||
if(target.r_ear)
|
||||
item_loc = 1
|
||||
if("head")
|
||||
if(target.head)
|
||||
item_loc = 1
|
||||
if("shoes")
|
||||
if(target.shoes)
|
||||
item_loc = 1
|
||||
if("belt")
|
||||
if(target.belt)
|
||||
item_loc = 1
|
||||
if("suit")
|
||||
if(target.wear_suit)
|
||||
item_loc = 1
|
||||
if("back")
|
||||
if(target.back)
|
||||
item_loc = 1
|
||||
if("uniform")
|
||||
if(target.w_uniform)
|
||||
item_loc = 1
|
||||
if("s_store")
|
||||
if(target.s_store)
|
||||
item_loc = 1
|
||||
if("h_store")
|
||||
if(target.h_store)
|
||||
item_loc = 1
|
||||
if("id")
|
||||
if(target.wear_id)
|
||||
item_loc = 1
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
item_loc = 1
|
||||
if("handcuff")
|
||||
if (target.handcuffed)
|
||||
item_loc = 1
|
||||
|
||||
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel")
|
||||
if ((item && !( L.Find(place) )))
|
||||
if (item && !L.Find(place) && !item_loc)
|
||||
if(isrobot(source) && place != "handcuff")
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
isbreathing = 1
|
||||
holdbreath = 0
|
||||
lyingcheck = 0
|
||||
buckle_check = 0
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
set invisibility = 0
|
||||
@@ -24,7 +25,20 @@
|
||||
if(!loc) // Fixing a null error that occurs when the mob isn't found in the world -- TLE
|
||||
return
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
// Update clothing
|
||||
// update_clothing()
|
||||
if((lyingcheck != lying) || (buckle_check != (buckled ? 1 : 0))) //This is a fix for falling down / standing up not updating icons. Instead of going through and changing every
|
||||
spawn(5)
|
||||
update_clothing() //instance in the code where lying is modified, I've just added a new variable "lyingcheck" which will be compared
|
||||
lyingcheck = lying //to lying, so if lying ever changes, update_clothing() will run like normal.
|
||||
|
||||
if(stat == 2)
|
||||
if((!lying || !lyingcheck) && !buckled)
|
||||
lying = 1
|
||||
update_clothing()
|
||||
return
|
||||
|
||||
life_tick++
|
||||
@@ -88,18 +102,9 @@
|
||||
// Some mobs heal slowly, others die slowly
|
||||
handle_health_updates()
|
||||
|
||||
// Update clothing
|
||||
// update_clothing()
|
||||
if(lyingcheck != lying) //This is a fix for falling down / standing up not updating icons. Instead of going through and changing every
|
||||
update_clothing() //instance in the code where lying is modified, I've just added a new variable "lyingcheck" which will be compared
|
||||
lyingcheck = lying //to lying, so if lying ever changes, update_clothing() will run like normal.
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
@@ -1191,13 +1196,18 @@
|
||||
|
||||
|
||||
check_if_buckled()
|
||||
if (buckled)
|
||||
lying = istype(buckled, /obj/structure/stool/bed) || istype(buckled, /obj/machinery/conveyor)
|
||||
if(lying)
|
||||
if(buckle_check != (buckled ? 1 : 0))
|
||||
buckle_check = (buckled ? 1 : 0)
|
||||
if (buckled)
|
||||
lying = istype(buckled, /obj/structure/stool/bed) || istype(buckled, /obj/machinery/conveyor)
|
||||
if(lying)
|
||||
drop_item()
|
||||
density = 1
|
||||
else
|
||||
density = !lying
|
||||
if(buckle_check)
|
||||
if(istype(buckled, /obj/structure/stool/bed) || istype(buckled, /obj/machinery/conveyor))
|
||||
drop_item()
|
||||
density = 1
|
||||
else
|
||||
density = !lying
|
||||
|
||||
handle_stomach()
|
||||
spawn(0)
|
||||
|
||||
Reference in New Issue
Block a user