KISS principal

This commit is contained in:
Poojawa
2019-06-06 21:35:50 -05:00
parent 2e42656b6d
commit c2cf8b28df
9 changed files with 86 additions and 76 deletions
+3 -3
View File
@@ -739,9 +739,9 @@
for(var/obj/effect/decal/cleanable/trail_holder/TH in view(T, 2))
qdel(TH)
var/obj/item/clothing/shoes/shoecheck = user.shoes
if(shoecheck && shoecheck.blood_smear["blood"])
temp += shoecheck.blood_smear["blood"]/20
shoecheck.blood_smear["blood"] = 0
if(shoecheck && shoecheck.bloody_shoes["blood"])
temp += shoecheck.bloody_shoes["blood"]/20
shoecheck.bloody_shoes["blood"] = 0
if(temp)
user.Beam(T,icon_state="drainbeam",time=15)
new /obj/effect/temp_visual/cult/sparks(get_turf(user))
+1 -10
View File
@@ -41,11 +41,6 @@
var/dynamic_hair_suffix = ""//head > mask for head hair
var/dynamic_fhair_suffix = ""//mask > head for facial hair
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/blood_smear = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
var/last_bloodtype = ""//used to track the last bloodtype to have graced these shoes; makes for better performing footprint shenanigans
var/last_blood_DNA = ""//same as last one
/obj/item/clothing/Initialize()
. = ..()
if(ispath(pocket_storage_component_path))
@@ -159,11 +154,7 @@
damaged_clothes = 0
cut_overlay(damaged_clothes_icons[index], TRUE)
/obj/item/clothing/transfer_blood_dna(list/blood_dna)
..()
if(blood_dna.len)
last_bloodtype = blood_dna[blood_dna[blood_dna.len]]//trust me this works
last_blood_DNA = blood_dna[blood_dna.len]
/*
SEE_SELF // can see self, no matter what
+14 -3
View File
@@ -13,6 +13,11 @@
var/offset = 0
var/equipped_before_drop = FALSE
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/bloody_shoes = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
var/last_bloodtype = ""//used to track the last bloodtype to have graced these shoes; makes for better performing footprint shenanigans
var/last_blood_DNA = ""//same as last one
//CITADEL EDIT Enables digitigrade shoe styles
var/adjusted = NORMAL_STYLE
mutantrace_variation = MUTANTRACE_VARIATION
@@ -45,7 +50,7 @@
if(blood_DNA)
bloody = TRUE
else
bloody = blood_smear[BLOOD_STATE_BLOOD]
bloody = bloody_shoes[BLOOD_STATE_BLOOD]
if(damaged_clothes)
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedshoe")
@@ -91,7 +96,7 @@
/obj/item/clothing/shoes/clean_blood()
..()
blood_smear = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
bloody_shoes = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
blood_state = BLOOD_STATE_NOT_BLOODY
blood_color = null
if(ismob(loc))
@@ -99,4 +104,10 @@
M.update_inv_shoes()
/obj/item/proc/negates_gravity()
return FALSE
return FALSE
/obj/item/clothing/shoes/transfer_blood_dna(list/blood_dna)
..()
if(blood_dna.len)
last_bloodtype = blood_dna[blood_dna[blood_dna.len]]//trust me this works
last_blood_DNA = blood_dna[blood_dna.len]
@@ -2,6 +2,8 @@
/mob
var/bloody_hands = 0
var/bloody_feet = 0
var/last_bloodtype = ""//used to track the last bloodtype to have graced this filthy spaceman; makes for better performing footprint shenanigans
var/last_blood_DNA = ""//same as last one
/obj/item/clothing/gloves
var/transfer_blood = 0
@@ -43,8 +43,6 @@
var/bleed_rate = 0 //how much are we bleeding
var/bleedsuppress = 0 //for stopping bloodloss, eventually this will be limb-based like bleeding
var/last_bloodtype = ""//used to track the last bloodtype to have graced this filthy spaceman; makes for better performing footprint shenanigans
var/last_blood_DNA = ""//same as last one
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/blood_smear = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
@@ -52,25 +52,27 @@
if(!has_gravity(loc))
return
var/obj/item/clothing/shoes/S = shoes
var/step_print = dna.species.get_move_trail(src)
//Bloody footprints
var/turf/T = get_turf(src)
var/step_print = dna.species.get_move_trail(src)
if(S.blood_smear && S.blood_smear[S.blood_state])
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(step_print) in T
if(oldFP && (oldFP.blood_state == S.blood_state && oldFP.color == bloodtype_to_color(S.last_bloodtype)))
return
S.blood_smear[S.blood_state] = max(0, S.blood_smear[S.blood_state]-BLOOD_LOSS_PER_STEP)
var/obj/effect/decal/cleanable/blood/footprints/tracks/FP = new step_print(T)
FP.blood_state = S.blood_state
FP.entered_dirs |= dir
FP.bloodiness = S.blood_smear[S.blood_state]
if(S.last_blood_DNA && S.last_bloodtype)
FP.blood_DNA += list(S.last_blood_DNA = S.last_bloodtype)
//hacky as heck; we need to move the LAST entry to there, otherwise we mix all the blood
FP.update_icon()
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(step_print) in T
if(S.bloody_shoes && S.bloody_shoes[S.blood_state])
for(oldFP)
if(oldFP && (oldFP.blood_state == S.blood_state && oldFP.color == bloodtype_to_color(last_bloodtype)))
return
//No oldFP or they're all a different kind of blood
S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state] - BLOOD_LOSS_PER_STEP)
if (S.bloody_shoes[S.blood_state] > BLOOD_LOSS_IN_SPREAD)
var/obj/effect/decal/cleanable/blood/footprints/tracks/FP = new step_print(T)
FP.blood_state = S.blood_state
FP.entered_dirs |= dir
FP.bloodiness = S.bloody_shoes[S.blood_state] - BLOOD_LOSS_IN_SPREAD
if(S.last_blood_DNA && S.last_bloodtype)
FP.blood_DNA += list(last_blood_DNA = last_bloodtype)
//hacky as heck; we need to move the LAST entry to there, otherwise we mix all the blood
FP.update_icon()
update_inv_shoes()
//End bloody footprints
S.step_action()
else if(!shoes)
@@ -78,25 +80,27 @@
if(loc == NewLoc)
if(!has_gravity(loc))
return
var/step_print = dna.species.get_move_trail(src)
var/mob/living/carbon/human/H = src
//Bloody footprints without shoes
var/turf/T = get_turf(src)
var/step_print = dna.species.get_move_trail(src)
if(blood_smear && blood_smear[blood_state])
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(step_print) in T
if(oldFP && (oldFP.blood_state == blood_state && oldFP.color == bloodtype_to_color(last_bloodtype)))
return
blood_smear[blood_state] = max(0, blood_smear[blood_state]-BLOOD_LOSS_PER_STEP)
var/obj/effect/decal/cleanable/blood/footprints/tracks/FP = new step_print(T)
FP.blood_state = blood_state
FP.entered_dirs |= dir
FP.bloodiness = blood_smear[blood_state]
if(last_blood_DNA && last_bloodtype)
FP.blood_DNA += list(last_blood_DNA = last_bloodtype)
//hacky as heck; we need to move the LAST entry to there, otherwise we mix all the blood
FP.update_icon()
update_inv_shoes()
//End bloody footprints
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(step_print) in T
if(H.blood_smear && H.blood_smear[H.blood_state])
for(oldFP)
if(oldFP && (oldFP.blood_state == H.blood_state && oldFP.color == bloodtype_to_color(last_bloodtype)))
return
//No oldFP or they're all a different kind of blood
H.blood_smear[H.blood_state] = max(0, H.blood_smear[H.blood_state] - BLOOD_LOSS_PER_STEP)
if (H.blood_smear[H.blood_state] > BLOOD_LOSS_IN_SPREAD)
var/obj/effect/decal/cleanable/blood/footprints/tracks/FP = new step_print(T)
FP.blood_state = H.blood_state
FP.entered_dirs |= dir
FP.bloodiness = H.blood_smear[H.blood_state] - BLOOD_LOSS_IN_SPREAD
if(H.last_blood_DNA && H.last_bloodtype)
FP.blood_DNA += list(H.last_blood_DNA = H.last_bloodtype)
//hacky as heck; we need to move the LAST entry to there, otherwise we mix all the blood
FP.update_icon()
H.update_inv_shoes()
/mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee.
if(dna.species.space_move(src))