diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 740dfdc5e51..873df0051ff 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1925,8 +1925,9 @@ var/mob/dview/dview_mob = new return shift //Return a list of atoms in a location of a given type. Can be refined to look for pixel-shift. -/proc/get_atoms_of_type_here(var/atom/here, var/type, var/p_x = 0, var/p_y = 0) +/proc/get_atoms_of_type(var/atom/here, var/type, var/check_shift, var/shift_x = 0, var/shift_y = 0) . = list() - for(var/atom/thing in here) - if(istype(thing, type) && (p_x && thing.pixel_x == p_x) && (p_y && thing.pixel_y == p_y)) - . += thing + if(here) + for(var/atom/thing in here) + if(istype(thing, type) && (check_shift && thing.pixel_x == shift_x && thing.pixel_y == shift_y)) + . += thing diff --git a/code/game/objects/effects/decals/Cleanable/aliens.dm b/code/game/objects/effects/decals/Cleanable/aliens.dm index 9e84f52a959..8bc9b6c42d5 100644 --- a/code/game/objects/effects/decals/Cleanable/aliens.dm +++ b/code/game/objects/effects/decals/Cleanable/aliens.dm @@ -6,7 +6,6 @@ bloodiness = MAX_SHOE_BLOODINESS blood_state = BLOOD_STATE_XENO - /obj/effect/decal/cleanable/blood/xeno/splatter random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5") amount = 2 diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index e7b2156c605..88e8341d37c 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -261,9 +261,9 @@ // Find a blood decal or create a new one. var/obj/effect/decal/cleanable/blood/splatter/B = locate() in T - var/list/bloods = get_atoms_of_type_here(T, B, 0, 0) //Get all the non-projectile-splattered blood on this turf. + var/list/bloods = get_atoms_of_type(T, B, TRUE, 0, 0) //Get all the non-projectile-splattered blood on this turf (not pixel-shifted). if(shift_x || shift_y) - bloods = get_atoms_of_type_here(T, B, shift_x, shift_y) //Get all the projectile-splattered blood at these pixels on this turf. + bloods = get_atoms_of_type(T, B, TRUE, shift_x, shift_y) //Get all the projectile-splattered blood at these pixels on this turf (pixel-shifted). B = locate() in bloods if(!B) B = new(T) @@ -287,9 +287,9 @@ T = get_turf(src) var/obj/effect/decal/cleanable/blood/xeno/splatter/B = locate() in T - var/list/bloods = get_atoms_of_type_here(T, B, 0, 0) //The more the better. + var/list/bloods = get_atoms_of_type(T, B, TRUE, 0, 0) //The more the better. if(shift_x || shift_y) - bloods = get_atoms_of_type_here(T, B, shift_x, shift_y) + bloods = get_atoms_of_type(T, B, TRUE, shift_x, shift_y) B = locate() in bloods if(!B) B = new(T) @@ -306,9 +306,9 @@ T = get_turf(src) var/obj/effect/decal/cleanable/blood/oil/streak/O = locate() in T - var/list/oils = get_atoms_of_type_here(T, O, 0, 0) //Don't let OSHA catch wind of this. + var/list/oils = get_atoms_of_type(T, O, TRUE, 0, 0) //Don't let OSHA catch wind of this. if(shift_x || shift_y) - oils = get_atoms_of_type_here(T, O, shift_x, shift_y) + oils = get_atoms_of_type(T, O, TRUE, shift_x, shift_y) O = locate() in oils if(!O) O = new(T)