just need to fine tweak gibs and we're gucci

This commit is contained in:
Poojawa
2019-06-09 11:10:23 -05:00
parent c2cf8b28df
commit 69cefb604b
23 changed files with 192 additions and 205 deletions
+4 -22
View File
@@ -1,11 +1,11 @@
/obj/effect/decal/cleanable
gender = PLURAL
layer = ABOVE_NORMAL_TURF_LAYER
var/list/random_icon_states = null
var/list/random_icon_states = list()
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one?
var/blood_color
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
. = ..()
@@ -26,9 +26,9 @@
if(LAZYLEN(diseases_to_add))
AddComponent(/datum/component/infective, diseases_to_add)
/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
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C)
if(mergeable_decal)
return TRUE
qdel(C)
/obj/effect/decal/cleanable/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/reagent_containers/glass) || istype(W, /obj/item/reagent_containers/food/drinks))
@@ -70,7 +70,6 @@
//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/Crossed(atom/movable/O)
..()
if(ishuman(O))
var/mob/living/carbon/human/H = O
if(H.shoes && blood_state && bloodiness && (!H.has_trait(TRAIT_LIGHT_STEP) || !H.mind.assigned_role == "Detective"))
@@ -84,27 +83,10 @@
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(blood_DNA)
if(S.last_blood_DNA != blood_DNA)
S.last_blood_DNA += blood_DNA
S.blood_state = blood_state
update_icon()
H.update_inv_shoes()
else if(!H.shoes && blood_state && bloodiness && (!H.has_trait(TRAIT_LIGHT_STEP) || !H.mind.assigned_role == "Detective"))
var/add_blood = 0
if(bloodiness >= BLOOD_GAIN_PER_STEP)
add_blood = BLOOD_GAIN_PER_STEP
else
add_blood = bloodiness
bloodiness -= add_blood
H.blood_smear[blood_state] = min(MAX_SHOE_BLOODINESS,H.blood_smear[blood_state]+add_blood)
if(blood_DNA && blood_DNA.len)
if(H.last_blood_DNA != blood_DNA)
H.last_blood_DNA += blood_DNA
H.blood_state = blood_state
update_icon()
//H.update_inv_shoes()
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
return bloodiness