on second thought, let's not try to half ass fancy ideas.

This commit is contained in:
Poojawa
2019-08-26 14:45:36 -05:00
parent 74a24fdcc1
commit bd49187ea7
4 changed files with 4 additions and 58 deletions
-32
View File
@@ -492,14 +492,6 @@ Turf and target are separate in case you want to teleport some distance from a t
assembled += A
return assembled
//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(var/atom/here, var/type, var/check_shift, var/shift_x = 0, var/shift_y = 0)
. = list()
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
//Step-towards method of determining whether one atom can see another. Similar to viewers()
/proc/can_see(atom/source, atom/target, length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
var/turf/current = get_turf(source)
@@ -764,30 +756,6 @@ Turf and target are separate in case you want to teleport some distance from a t
loc = loc.loc
return null
/proc/pixel_shift_dir(var/dir, var/amount_x = 32, var/amount_y = 32) //Returns a list with pixel_shift values that will shift an object's icon one tile in the direction passed.
amount_x = min(max(0, amount_x), 32) //No less than 0, no greater than 32.
amount_y = min(max(0, amount_x), 32)
var/list/shift = list("x" = 0, "y" = 0)
switch(dir)
if(NORTH)
shift["y"] = amount_y
if(SOUTH)
shift["y"] = -amount_y
if(EAST)
shift["x"] = amount_x
if(WEST)
shift["x"] = -amount_x
if(NORTHEAST)
shift = list("x" = amount_x, "y" = amount_y)
if(NORTHWEST)
shift = list("x" = -amount_x, "y" = amount_y)
if(SOUTHEAST)
shift = list("x" = amount_x, "y" = -amount_y)
if(SOUTHWEST)
shift = list("x" = -amount_x, "y" = -amount_y)
return shift
//For objects that should embed, but make no sense being is_sharp or is_pointed()
//e.g: rods
GLOBAL_LIST_INIT(can_embed_types, typecacheof(list(