mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Finalizing blood trails
Makes trail_holder a child of cleanables instead of blood (this is to allow add_blood turf proc to spawn blood splatter on blood trails, also other kinds of blood effects), also cleaned up the blood code a bit. Big props to Aranclanos, Cheridan, Pewtershmitz and all other coders on #coderbus for making this happen.
This commit is contained in:
@@ -18,8 +18,9 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/New()
|
||||
..()
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
|
||||
return
|
||||
remove_ex_blood()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/proc/remove_ex_blood() //removes existant blood on the turf
|
||||
if(src.loc && isturf(src.loc))
|
||||
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
|
||||
if(B != src)
|
||||
@@ -34,23 +35,17 @@
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
|
||||
/*/obj/effect/decal/cleanable/blood/trails
|
||||
icon_state = "trails"
|
||||
desc = "redrum"
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
/obj/effect/decal/cleanable/blood/ltrails
|
||||
icon_state = "ltrails"
|
||||
desc = "Looks like someone forgot their bodybags."
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
*/
|
||||
/obj/effect/decal/cleanable/blood/trail_holder
|
||||
/obj/effect/decal/cleanable/trail_holder //not a child of blood on purpose
|
||||
name = "blood"
|
||||
icon_state = "blank"
|
||||
desc = "Your instincts say you shouldn't be following these."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
random_icon_states = null
|
||||
var/existing_dirs = list()
|
||||
var/list/existing_dirs = list()
|
||||
blood_DNA = list()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
name = "gibs"
|
||||
@@ -63,6 +58,9 @@
|
||||
icon_state = "gibbl5"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/remove_ex_blood()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
|
||||
|
||||
@@ -171,6 +171,9 @@
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/getTrail()
|
||||
return "xltrails"
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: AddInfectionImages()
|
||||
Des: Gives the client of the alien an image on each infected mob.
|
||||
|
||||
@@ -540,3 +540,8 @@
|
||||
return 1
|
||||
else
|
||||
return src.dna && src.dna.mutantrace ? 1 : 0
|
||||
|
||||
/mob/living/carbon/getTrail()
|
||||
if(getBruteLoss() < 300)
|
||||
return "ltrails"
|
||||
return "trails"
|
||||
@@ -1040,6 +1040,10 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
G << "Golem rune created in [A.name]."
|
||||
|
||||
/mob/living/carbon/slime/getTrail()
|
||||
return null
|
||||
|
||||
//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
|
||||
|
||||
/*
|
||||
|
||||
@@ -359,21 +359,9 @@
|
||||
//this is the gay blood on floor shit -- Added back -- Skie
|
||||
if (M.lying && (prob(M.getBruteLoss() / 2)))
|
||||
var/blood_exists = 0
|
||||
var/trail_type = "ltrails"
|
||||
var/blood_overwrite = 1
|
||||
for(var/obj/effect/decal/cleanable/blood/C in M.loc) //checks for blood splatter already on the floor
|
||||
var/trail_type = M.getTrail()
|
||||
for(var/obj/effect/decal/cleanable/trail_holder/C in M.loc) //checks for blood splatter already on the floor
|
||||
blood_exists = 1
|
||||
if(M.getBruteLoss() >= 300) //this is ugly, but I'd rather not make a mob variable just for this
|
||||
if(istype(M,/mob/living/carbon/alien))
|
||||
trail_type = "xtrails"
|
||||
else
|
||||
trail_type = "trails"
|
||||
else
|
||||
if(istype(M,/mob/living/carbon/alien))
|
||||
trail_type = "xltrails"
|
||||
else
|
||||
trail_type = "ltrails"
|
||||
blood_overwrite = 0 //light blood trails do not overwrite other blood trails
|
||||
if (istype(M.loc, /turf/simulated))
|
||||
var/newdir = get_dir(T, M.loc)
|
||||
if(newdir != M.dir)
|
||||
@@ -383,9 +371,9 @@
|
||||
else if(newdir == 12) //E + W
|
||||
newdir = EAST
|
||||
if(!blood_exists)
|
||||
new /obj/effect/decal/cleanable/blood/trail_holder(M.loc)
|
||||
for(var/obj/effect/decal/cleanable/blood/trail_holder/H in M.loc)
|
||||
if((!(newdir in H.existing_dirs) || blood_overwrite) && H.existing_dirs.len <= 16) //maximum amount of overlays is 16 (all light & heavy directions filled)
|
||||
new /obj/effect/decal/cleanable/trail_holder(M.loc)
|
||||
for(var/obj/effect/decal/cleanable/trail_holder/H in M.loc)
|
||||
if((!(newdir in H.existing_dirs) || trail_type == "trails") && H.existing_dirs.len <= 16) //maximum amount of overlays is 16 (all light & heavy directions filled)
|
||||
H.existing_dirs += newdir
|
||||
H.overlays.Add(image('icons/effects/blood.dmi',trail_type,dir = newdir))
|
||||
if(istype(M, /mob/living/carbon/human)) //blood DNA
|
||||
@@ -409,4 +397,6 @@
|
||||
|
||||
if(update_slimes)
|
||||
for(var/mob/living/carbon/slime/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
M.UpdateFeed(src)
|
||||
/mob/living/proc/getTrail() //silicon and simple_animals don't get blood trails
|
||||
return null
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 94 KiB |
Reference in New Issue
Block a user