mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-31 12:41:46 +00:00
* Ports Bay/ss220 detective work * Removs detective scanner from circulation * forensic supply crate * Ports Bay/ss220 detective work * Removs detective scanner from circulation * forensic supply crate * Mapping changes * Mapping changes * Ports Bay/ss220 detective work * Removs detective scanner from circulation * makes linters work * i hate vscode * fixes some nonsence * may fix CI * restore maps to CURRENT * QOL * makes gunshot residue actually work. * fixes cursed logic * adds scene cards again * scene cards but real! * fix med records, breaks attack chain * Revives the PR * fixes swabs * TGUI update * lewc and dgl first reviews * dna medical records * LINTERS FIX * linter fix 2 * blood fix and linters again * oops * updated but broke * help * Chuga suggestion * Fix shoes ending up with a null blood_DNA entry * replace astype() because linters are still in the stone age * 2 fixes, adds fingerprint cards to HOP locker. * check user intent instead of target intent when swabbing * adds 2 boxes of swabs to the det drobe * comma important * adds new det tools to sec belt * Chuga review * fuckin github * should fix TM * oops * how about now * also fixes cere * fixes mobvars * Update code/modules/detective_work/swabs.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * Update code/game/objects/effects/decals/cleanable.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * Update code/game/objects/structures/crates_lockers/closets/secure/security_lockers.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * Lewc review easy changes Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * Updated related bugfixes * add swab to lathe * fix metastation * Fixes scene_cards * fix cerestation * fixes forensic kits * Changes and fixes forensic_machines * changes /obj/item/sample to use initialize * spaces * fix initialize to use a capital I * mapload * fixes linters probably * meta fix * swab fix maybe * oops * actual fix probably * ma ybe * bundle rebuild * fixes fingerprint cards * remove duplicate proc call * /obj/item/sample migration * /obj/item/forensics migration * microscope and dnaforensics machines migrated * I FORGOT DA VARS * linter fix * linter fix 2 * Funny review part 1 Co-authored-by: Charlie Nolan <funnyman3595@gmail.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * bundle update * contra/funny review * fixes CI probably * CI fix * cere mapping fix yipee * screwdriver panel fixes * improve forensic machine interactions * improve open panel msg * pollard review Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * linter fix * Apply suggestions from pope review Co-authored-by: PopeDaveThe3th <80988376+PopeDaveThe3th@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * rebuild * rebuild * Detective Rework --------- Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Chuga <98280110+chuga-git@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Arthri <41360489+a@users.noreply.github.com> Co-authored-by: Toastical <20125180+Toastical@users.noreply.github.com> Co-authored-by: Charlie Nolan <funnyman3595@gmail.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: PopeDaveThe3th <80988376+PopeDaveThe3th@users.noreply.github.com>
125 lines
4.4 KiB
Plaintext
125 lines
4.4 KiB
Plaintext
#define ALWAYS_IN_GRAVITY 2
|
|
|
|
/obj/effect/decal/cleanable
|
|
///when Initialized() its icon_state will be chosen from this list
|
|
var/list/random_icon_states = list()
|
|
///0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
|
|
var/bloodiness = 0
|
|
///when another of the same type is made on the same tile will they merge --- YES=TRUE; NO=FLASE
|
|
var/mergeable_decal = TRUE
|
|
///prevents Ambient Occlusion effects around it ; Set to GAME_PLANE in Initialize() if on a wall
|
|
///for blood n vomit in zero G --- IN GRAVITY=TRUE; NO GRAVITY=FALSE
|
|
var/gravity_check = TRUE
|
|
hud_possible = list(JANI_HUD)
|
|
|
|
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
|
|
if(mergeable_decal)
|
|
return TRUE
|
|
|
|
/obj/effect/decal/cleanable/cleaning_act(mob/user, atom/cleaner, cleanspeed = 5 SECONDS, text_verb = "scrub out", text_description = " with [cleaner].")
|
|
if(issimulatedturf(loc))
|
|
var/turf/simulated/T = get_turf(src)
|
|
T.cleaning_act(user, cleaner, cleanspeed = cleanspeed, text_verb = text_verb, text_description = text_description, text_targetname = name) //Strings are deliberately "A = A" to avoid overrides
|
|
return
|
|
else
|
|
..()
|
|
|
|
//Add "bloodiness" of this blood's type, to the human's shoes
|
|
//This is on /cleanable because fuck this ancient mess
|
|
/obj/effect/decal/cleanable/blood/proc/on_atom_entered(datum/source, atom/movable/entered)
|
|
if(!ishuman(entered))
|
|
return
|
|
|
|
if(!gravity_check && ishuman(entered))
|
|
bloodyify_human(entered)
|
|
|
|
if(!off_floor)
|
|
var/mob/living/carbon/human/H = entered
|
|
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
|
|
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
|
|
var/hasfeet = TRUE
|
|
if(IS_HORIZONTAL(H) && !H.buckled) //Make people bloody if they're lying down and move into blood
|
|
if(bloodiness > 0 && length(blood_DNA))
|
|
H.add_blood(H.blood_DNA, basecolor)
|
|
if(!l_foot && !r_foot)
|
|
hasfeet = FALSE
|
|
if(H.shoes && blood_state && bloodiness)
|
|
var/obj/item/clothing/shoes/S = H.shoes
|
|
var/add_blood = 0
|
|
if(bloodiness >= BLOOD_GAIN_PER_STEP)
|
|
add_blood = BLOOD_GAIN_PER_STEP
|
|
else
|
|
add_blood = bloodiness
|
|
bloodiness -= add_blood
|
|
S.bloody_shoes[blood_state] = min(MAX_SHOE_BLOODINESS, S.bloody_shoes[blood_state] + add_blood)
|
|
S.bloody_shoes[BLOOD_BASE_ALPHA] = BLOODY_FOOTPRINT_BASE_ALPHA * (alpha/255)
|
|
if(length(blood_DNA))
|
|
S.add_blood(blood_DNA, basecolor)
|
|
S.blood_state = blood_state
|
|
S.blood_color = basecolor
|
|
update_icon()
|
|
H.update_inv_shoes()
|
|
else if(hasfeet && blood_state && bloodiness)//Or feet
|
|
var/add_blood = 0
|
|
if(bloodiness >= BLOOD_GAIN_PER_STEP)
|
|
add_blood = BLOOD_GAIN_PER_STEP
|
|
else
|
|
add_blood = bloodiness
|
|
bloodiness -= add_blood
|
|
H.bloody_feet[blood_state] = min(MAX_SHOE_BLOODINESS, H.bloody_feet[blood_state] + add_blood)
|
|
H.bloody_feet[BLOOD_BASE_ALPHA] = BLOODY_FOOTPRINT_BASE_ALPHA * (alpha/255)
|
|
if(!H.feet_blood_DNA)
|
|
H.feet_blood_DNA = list()
|
|
H.blood_state = blood_state
|
|
H.feet_blood_DNA |= blood_DNA.Copy()
|
|
H.feet_blood_color = basecolor
|
|
update_icon()
|
|
H.update_inv_shoes()
|
|
|
|
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
|
|
return FALSE
|
|
|
|
/obj/effect/decal/cleanable/is_cleanable()
|
|
return TRUE
|
|
|
|
/obj/effect/decal/cleanable/Initialize(mapload)
|
|
. = ..()
|
|
prepare_huds()
|
|
if(should_merge_decal(loc))
|
|
return INITIALIZE_HINT_QDEL
|
|
var/datum/atom_hud/data/janitor/jani_hud = GLOB.huds[DATA_HUD_JANITOR]
|
|
jani_hud.add_to_hud(src)
|
|
jani_hud_set_sign()
|
|
if(random_icon_states && length(src.random_icon_states) > 0)
|
|
src.icon_state = pick(src.random_icon_states)
|
|
if(smoothing_flags)
|
|
QUEUE_SMOOTH(src)
|
|
QUEUE_SMOOTH_NEIGHBORS(src)
|
|
if(iswallturf(loc) && plane == FLOOR_PLANE)
|
|
plane = GAME_PLANE // so they can be seen above walls
|
|
|
|
/obj/effect/decal/cleanable/Destroy()
|
|
if(smoothing_flags)
|
|
QUEUE_SMOOTH_NEIGHBORS(src)
|
|
var/datum/atom_hud/data/janitor/jani_hud = GLOB.huds[DATA_HUD_JANITOR]
|
|
jani_hud.remove_from_hud(src)
|
|
return ..()
|
|
|
|
/obj/effect/decal/cleanable/proc/should_merge_decal(turf/T)
|
|
if(!T)
|
|
T = loc
|
|
if(isturf(T))
|
|
for(var/obj/effect/decal/cleanable/C in T)
|
|
if(C != src && C.type == type && !QDELETED(C))
|
|
if(C.gravity_check && replace_decal(C))
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/obj/effect/decal/cleanable/proc/check_gravity(turf/T)
|
|
if(isnull(T))
|
|
T = get_turf(src)
|
|
if(gravity_check != ALWAYS_IN_GRAVITY)
|
|
gravity_check = has_gravity(src, T)
|
|
|
|
#undef ALWAYS_IN_GRAVITY
|