Shortens Helper Proc Name

Way too long.
Also adds sanity.
This commit is contained in:
KasparoVy
2018-01-10 17:19:10 -05:00
parent f93c148c54
commit a8492ba115
3 changed files with 11 additions and 11 deletions
+5 -4
View File
@@ -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
@@ -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
+6 -6
View File
@@ -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)