diff --git a/baystation12.dme b/baystation12.dme index d972490d4bb..4a5685547d2 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -896,7 +896,6 @@ #include "code\modules\food\meat.dm" #include "code\modules\food\recipes_microwave.dm" #include "code\modules\maps\dmm_suite.dm" -#include "code\modules\maps\randomZlevel.dm" #include "code\modules\maps\reader.dm" #include "code\modules\maps\SwapMaps.dm" #include "code\modules\maps\writer.dm" diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index 5ba10519160..8bfb13504d1 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -1024,13 +1024,6 @@ Turf and target are seperate in case you want to teleport some distance from a t output += A return output -/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc - //in case they're in a closet or sleeper or something - var/atom/loc = M.loc - while(!istype(loc, /turf/)) - loc = loc.loc - return loc - // returns the turf located at the map edge in the specified direction relative to A // used for mass driver /proc/get_edge_target_turf(var/atom/A, var/direction) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 24cdd185011..18967989a51 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -392,3 +392,30 @@ mob << "Gravity!" +/area/proc/absorb(var/area/A) + if(!istype(A)) + return + var/list/total_contents = list() + for(var/area/RA in A.related) + total_contents |= RA.contents + RA.contents = list() + src += total_contents + spawn(5) + power_change() + set_area_machinery_title() + + +/area/proc/set_area_machinery_title(var/oldtitle) + if(!oldtitle) + return + for(var/area/RA in related) + for(var/obj/machinery/alarm/M in RA) + M.name = dd_replacetext(M.name,oldtitle,name) + for(var/obj/machinery/power/apc/M in RA) + M.name = dd_replacetext(M.name,oldtitle,name) + for(var/obj/machinery/atmospherics/unary/vent_scrubber/M in RA) + M.name = dd_replacetext(M.name,oldtitle,name) + for(var/obj/machinery/atmospherics/unary/vent_pump/M in RA) + M.name = dd_replacetext(M.name,oldtitle,name) + for(var/obj/machinery/door/M in RA) + M.name = dd_replacetext(M.name,oldtitle,name) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index d2b1c1923e9..5036d737e0f 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -55,7 +55,7 @@ //might need an else for the ..() DblClick() if((usr.hand && istype(usr.l_hand, /obj/item/weapon/flamethrower)) || (!usr.hand && istype(usr.r_hand, /obj/item/weapon/flamethrower))) - var/turf/location = get_turf_loc(src) + var/turf/location = get_turf(src) location.DblClick() return ..() diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index f478d8656e6..21dcb39a368 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -50,7 +50,7 @@ var/loc_display = "Unknown" var/mob/living/carbon/M = T.imp_in if(M.z == 1 && !istype(M.loc, /turf/space)) - var/turf/mob_loc = get_turf_loc(M) + var/turf/mob_loc = get_turf(M) loc_display = mob_loc.loc dat += "ID: [T.id] | Location: [loc_display]
" dat += "(Message Holder) |
" diff --git a/code/game/master_controller.dm b/code/game/master_controller.dm index 33dffbcb83b..f77e9f4a77a 100644 --- a/code/game/master_controller.dm +++ b/code/game/master_controller.dm @@ -47,7 +47,7 @@ datum/controller/game_controller world.tick_lag = config.Ticklag - createRandomZlevel() +// createRandomZlevel() // Sleep for about 5 seconds to allow background initialization procs to finish sleep(50) diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm index 10791618fbf..ba1a2597c18 100644 --- a/code/game/objects/items/apc_frame.dm +++ b/code/game/objects/items/apc_frame.dm @@ -12,7 +12,7 @@ var/ndir = get_dir(usr,on_wall) if (!(ndir in cardinal)) return - var/turf/loc = get_turf_loc(usr) + var/turf/loc = get_turf(usr) var/area/A = loc.loc if (!istype(loc, /turf/simulated/floor)) usr << "\red APC cannot be placed on this spot." diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 325a6cbdc75..11ea1670586 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -1,4 +1,11 @@ /obj/item/blueprints + name = "station blueprints" + desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it. Looks like you can edit the station's layout with these." + icon = 'items.dmi' + icon_state = "blueprints" + + var/list/image/helper_images = list() + var/const/AREA_ERRNONE = 0 var/const/AREA_STATION = 1 var/const/AREA_SPACE = 2 @@ -9,6 +16,7 @@ var/const/BORDER_BETWEEN = 2 var/const/BORDER_2NDTILE = 3 var/const/BORDER_SPACE = 4 + var/const/BORDER_AREA = 5 var/const/ROOM_ERR_LOLWAT = 0 var/const/ROOM_ERR_SPACE = -1 @@ -16,7 +24,7 @@ /obj/item/blueprints/attack_self(mob/M as mob) if (!istype(M,/mob/living/carbon/human)) - M << "This is stack of useless pieces of harsh paper." //monkeys cannot into projecting + M << "This is stack of useless pieces of heavy paper." //monkeys cannot into projecting return interact() return @@ -32,12 +40,24 @@ if (get_area_type()!=AREA_SPACE) interact() return - create_area() + spawn() + create_area(usr.client) + if(usr && usr.client) + for(var/image/to_remove in helper_images) + if(to_remove in usr.client.images) + usr.client.images.Remove(to_remove) + del(to_remove) if ("edit_area") if (get_area_type()!=AREA_STATION) interact() return - edit_area() + spawn() + edit_area(usr.client) + if(usr && usr.client) + for(var/image/to_remove in helper_images) + if(to_remove in usr.client.images) + usr.client.images.Remove(to_remove) + del(to_remove) /obj/item/blueprints/proc/interact() var/area/A = get_area() @@ -48,18 +68,18 @@ switch (get_area_type()) if (AREA_SPACE) text += {" -

According this blueprints you are in open space now.

-

Mark this place as new area.

+

According \the [src] you are in open space now.

+

Mark this place as a new area.

"} if (AREA_STATION) text += {" -

According this blueprints you are in [A.name] now.

+

According \the [src] you are in \The [A] now.

You may -move an amendment to the drawing.

+move an amendment to the designs.

"} if (AREA_SPECIAL) text += {" -

This place doesn't noted on this blueprints.

+

This place isn't noted on \the [src].

"} else return @@ -67,14 +87,10 @@ move an amendment to the drawing.

usr << browse(text, "window=blueprints") onclose(usr, "blueprints") - -/obj/item/blueprints/proc/get_area() - var/turf/T = get_turf_loc(usr) - var/area/A = T.loc - A = A.master - return A - -/obj/item/blueprints/proc/get_area_type(var/area/A = get_area()) +/obj/item/blueprints/proc/get_area_type(var/turf/T = get_turf(src)) + if(!T) + return AREA_SPECIAL + var/area/A = get_area(T) if (A.name == "Space") return AREA_SPACE var/list/SPECIALS = list( @@ -87,99 +103,235 @@ move an amendment to the drawing.

/area/syndicate_station, /area/wizard_station, /area/prison - // /area/derelict //commented out, all hail derelict-rebuilders! ) for (var/type in SPECIALS) if ( istype(A,type) ) return AREA_SPECIAL return AREA_STATION -/obj/item/blueprints/proc/create_area() +/obj/item/blueprints/proc/create_area(var/client/user) //world << "DEBUG: create_area" - var/res = detect_room(get_turf_loc(usr)) - if(!istype(res,/list)) - switch(res) + var/list/turf/turfs = detect_room(get_turf(user.mob),user) + if(!istype(turfs)) + switch(turfs) if(ROOM_ERR_SPACE) - usr << "\red New area must be complete airtight!" + usr << "\red The new area must be completly airtight!" return if(ROOM_ERR_TOOLARGE) - usr << "\red New area too large!" + usr << "\red The new area is too large!" return else usr << "\red Error! Please notify administration!" return - var/list/turf/turfs = res - var/str = sanitize(trim(input(usr,"New area title","Blueprints editing"))) - if(!str || !length(str)) //cancel - return - if(length(str) > 50) - usr << "\red Text too long." - return - var/area/A = new - A.name = str - A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing - //var/ma - //ma = A.master ? "[A.master]" : "(null)" - //world << "DEBUG: create_area:
A.name=[A.name]
A.tag=[A.tag]
A.master=[ma]" - A.power_equip = 0 - A.power_light = 0 - A.power_environ = 0 - move_turfs_to_area(turfs, A) + var/choice = alert("Would you like to add this to an adjacent area, or make a brand new one?","Creating new area.","New Area", "Add to Area", "Cancel") + switch(choice) + + if("New Area") + var/list/turf/new_turfs = list() + for(var/reference in turfs) + if(turfs[reference] == "Space") + var/turf/simulated/T = locate(reference) in world + if(istype(T)) + new_turfs |= T + if(!new_turfs.len) + usr << "No aporpriate tiles found." + return + if(new_turfs.len > 500) + usr << "\red Too big of an area!" + return + + var/str = sanitize(trim(input(usr,"New area title","Blueprints editing") as null|text)) + if(!str || !length(str)) //cancel + return + if(length(str) > 50) + usr << "\red Text too long." + return + var/area/A = new + A.name = str + A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing + A.power_equip = 0 + A.power_light = 0 + A.power_environ = 0 + A.contents |= new_turfs + + + if("Add to Area") + var/list/adjacent_areas = list() + for(var/reference in turfs) + adjacent_areas |= turfs[reference] + + +//POSSIBLE FUTURE CHANGE + adjacent_areas.Remove("Space") //It's not something you want... or is it? We can try this out later. + + + var/decision = input("Which adjacent area do you want to combine with?","Blueprints Interface") as null|anything in adjacent_areas + if(decision && decision in adjacent_areas) + var/area/merge_target + for(var/reference in turfs) + if(turfs[reference] == decision) + var/turf/simulated/T = locate(reference) + if(istype(T)) + merge_target = get_area(T) + break + if(!merge_target) + usr << "Something's gone badly wrong. Sorry!" + return + + var/list/turf/new_turfs = list() + for(var/reference in turfs) + if(turfs[reference] == "Space") + var/turf/simulated/T = locate(reference) in world + if(istype(T)) + new_turfs |= T + merge_target.contents |= new_turfs + spawn(2) + merge_target.power_change() + + else + return + + if("Cancel") + return + spawn(5) - //ma = A.master ? "[A.master]" : "(null)" - //world << "DEBUG: create_area(5):
A.name=[A.name]
A.tag=[A.tag]
A.master=[ma]" interact() return -/obj/item/blueprints/proc/move_turfs_to_area(var/list/turf/turfs, var/area/A) - A.contents.Add(turfs) - //oldarea.contents.Remove(usr.loc) // not needed - //T.loc = A //error: cannot change constant value - - -/obj/item/blueprints/proc/edit_area() - var/area/A = get_area() +/obj/item/blueprints/proc/edit_area(var/client/user) + var/area/A = get_area(src) //world << "DEBUG: edit_area" - var/prevname = A.name - var/str = sanitize(trim(input(usr,"New area title","Blueprints editing",prevname))) - if(!str || !length(str) || str==prevname) //cancel - return - if(length(str) > 50) - usr << "\red Text too long." - return - set_area_machinery_title(A,str,prevname) - for(var/area/RA in A.related) - RA.name = str - usr << "\blue You set the area '[prevname]' title to '[str]'." - interact() + var/choice = alert("Would you like to rename the area, or merge it with an adjacent one?", "Blueprint Interface", "Rename", "Merge", "Cancel") + switch(choice) + if("Rename") + var/str = sanitize(trim(input(usr,"New area title","Blueprints editing",A.name) as null|text)) + if(!str || !length(str) || str==A.name) //cancel + return + if(length(str) > 50) + usr << "\red Text too long." + return + var/old_name = A.name + for(var/area/RA in A.related) + RA.name = str + A.name = str + A.set_area_machinery_title(old_name) + usr << "\blue You retitle the area '[A.name]' to '[str]'." + + + if("Merge") + var/list/turf/search_remaining_turfs = A.contents.Copy() + var/list/turfs = list() + for(var/turf/simulated/T in search_remaining_turfs) + if(T.density || locate(/obj/machinery/door) in T || locate(/obj/machinery/door) in T) + search_remaining_turfs.Remove(T) + + var/limiter = 50 + + var/iteration = 0 + while(search_remaining_turfs.len > (A.contents.len)/10 ) + iteration++ + if(iteration > limiter) + break + var/turf/simulated/test_turf = pick(search_remaining_turfs) + if(!istype(test_turf)) + continue + var/list/turf/temp_turf_list = detect_room(test_turf,user) + if(!istype(temp_turf_list)) + switch(temp_turf_list) + if(ROOM_ERR_SPACE) + usr << "\red \The [A] is not completly airtight!" + return + if(ROOM_ERR_TOOLARGE) + usr << "\red \The [A] is too large to expand!" + return + else + usr << "\red Error! Please notify administration!" + return + for(var/reference in temp_turf_list) + var/turf/simulated/T = locate(reference) + if(T) + search_remaining_turfs.Remove(T) + turfs |= temp_turf_list + + var/list/adjacent_areas = list() + for(var/reference in turfs) + adjacent_areas |= turfs[reference] + adjacent_areas.Remove("[A]") + + var/decision = input("Which adjacent area do you want to merge with?","Blueprints Interface") as null|anything in adjacent_areas + if(decision && decision in adjacent_areas) + var/area/merge_target + for(var/reference in turfs) + if(turfs[reference] == decision) + var/turf/simulated/T = locate(reference) + if(istype(T)) + merge_target = get_area(T) + break + + if(!merge_target) + usr << "Something's gone badly wrong. Sorry!" + return + + search_remaining_turfs = merge_target.contents.Copy() + for(var/turf/simulated/T in search_remaining_turfs) + if(T.density || locate(/obj/machinery/door) in T || locate(/obj/machinery/door) in T) + search_remaining_turfs.Remove(T) + + var/turf/simulated/T + iteration = 0 + while(search_remaining_turfs.len > (merge_target.contents.len)/10 ) + T = pick(search_remaining_turfs) + if(istype(T)) + var/list/turf_references = detect_room(T,user) + if(!istype(turf_references)) + switch(turf_references) + if(ROOM_ERR_SPACE) + usr << "\red \The [merge_target] is not completly airtight!" + return + if(ROOM_ERR_TOOLARGE) + usr << "\red \The [merge_target] is too large to expand!" + return + else + usr << "\red Error! Please notify administration!" + return + for(var/reference in turf_references) + T = locate(reference) + if(T) + search_remaining_turfs.Remove(T) + iteration++ + if(iteration >= limiter) + break + + var/area_master = alert("If this is approximately the right shape for the combined area, which should the new area be?", "Blueprint Interface", "\The [A]", "\The [merge_target]", "Looks Wrong/Cancel") + if(area_master == "\The [A]") + + A.absorb(merge_target) + + else if(area_master == "\The [merge_target]") + + merge_target.absorb(A) + + else if(area_master == "Looks Wrong/Cancel") + return + + else + return + + if("Cancel") + return + + spawn(5) + interact() return -/obj/item/blueprints/proc/set_area_machinery_title(var/area/A,var/title,var/oldtitle) - if (!oldtitle) // or dd_replacetext goes to infinite loop - return - for(var/area/RA in A.related) - for(var/obj/machinery/alarm/M in RA) - M.name = dd_replacetext(M.name,oldtitle,title) - for(var/obj/machinery/power/apc/M in RA) - M.name = dd_replacetext(M.name,oldtitle,title) - for(var/obj/machinery/atmospherics/unary/vent_scrubber/M in RA) - M.name = dd_replacetext(M.name,oldtitle,title) - for(var/obj/machinery/atmospherics/unary/vent_pump/M in RA) - M.name = dd_replacetext(M.name,oldtitle,title) - for(var/obj/machinery/door/M in RA) - M.name = dd_replacetext(M.name,oldtitle,title) - //TODO: much much more. Unnamed airlocks, cameras, etc. - /obj/item/blueprints/proc/check_tile_is_border(var/turf/T2,var/dir) if (istype(T2, /turf/space)) return BORDER_SPACE //omg hull breach we all going to die here if (istype(T2, /turf/simulated/shuttle)) return BORDER_SPACE - if (get_area_type(T2.loc)!=AREA_SPACE) - return BORDER_BETWEEN if (istype(T2, /turf/simulated/wall)) return BORDER_2NDTILE if (!istype(T2, /turf/simulated)) @@ -200,41 +352,80 @@ move an amendment to the drawing.

if (locate(/obj/structure/falserwall) in T2) return BORDER_2NDTILE + + if(get_area_type(T2) == AREA_SPECIAL) + return BORDER_BETWEEN + return BORDER_NONE -/obj/item/blueprints/proc/detect_room(var/turf/first) - var/list/turf/found = new - var/list/turf/pending = list(first) - while(pending.len) - if (found.len+pending.len > 300) +/obj/item/blueprints/proc/detect_room(var/turf/first, var/client/user) + var/list/found = list() + var/list/pending = list(first) + var/area/B = get_area(first) + var/list/areas = list(B.name) + do + if (found.len+pending.len > 800) return ROOM_ERR_TOOLARGE - var/turf/T = pending[1] //why byond havent list::pop()? - pending -= T + var/turf/T = pending[1] + pending.Remove(T) + B = get_area(T) for (var/dir in cardinal) var/skip = 0 for (var/obj/structure/window/W in T) if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST))) - skip = 1; break - if (skip) continue + skip = 1 + break + if (skip) + continue for(var/obj/machinery/door/window/D in T) if(dir == D.dir) - skip = 1; break - if (skip) continue + skip = 1 + break + if (skip) + continue var/turf/NT = get_step(T,dir) - if (!isturf(NT) || (NT in found) || (NT in pending)) + + if (!istype(NT)) + continue + if("\ref[NT]" in found) + continue + if("\ref[NT]" in pending) continue switch(check_tile_is_border(NT,dir)) if(BORDER_NONE) - pending+=NT + var/area/A = get_area(NT) + if( ( A.name in areas || A.name == "Space" || B.name == "Space" ) &&\ + !( "\ref[NT]" in pending || "\ref[NT]" in found) ) + //If it is another area, and neither of them are space AND it is not in the list of adjacent areas, then do not add it. + pending |= NT + areas |= A.name if(BORDER_BETWEEN) - //do nothing, may be later i'll add 'rejected' list as optimization + found["\ref[NT]"] = "[get_area(NT)]" + if(user && !locate(/image) in NT) + var/image/Z = image('ULIcons.dmi',NT,"7-0-0",19) + helper_images |= Z + user.images += Z + if(BORDER_2NDTILE) - found+=NT //tile included to new area, but we dont seek more + found["\ref[NT]"] = "[get_area(NT)]" //tile included to new area, but we dont seek more + if(user && !locate(/image) in NT) + var/image/Z = image('ULIcons.dmi',NT,"7-0-0",19) + helper_images |= Z + user.images += Z if(BORDER_SPACE) return ROOM_ERR_SPACE - found+=T + found["\ref[T]"] = "[get_area(T)]" + if(user) + for(var/image/I in user.images) + if(I.loc == T) + user.images.Remove(I) + del(I) + var/image/Z = image('ULIcons.dmi',T,"0-0-7",19) + helper_images |= Z + user.images += Z + while(pending.len) return found /* diff --git a/code/game/objects/items/food.dm b/code/game/objects/items/food.dm index cce942fa728..d42a66757b8 100644 --- a/code/game/objects/items/food.dm +++ b/code/game/objects/items/food.dm @@ -82,7 +82,7 @@ MONKEY CUBE BOX usr.put_in_hand(D) usr << "You take a donut out of the box." else - D.loc = get_turf_loc(src) + D.loc = get_turf(src) usr << "You take a donut out of the box." src.update() diff --git a/code/game/objects/items/weapons/papers_bins.dm b/code/game/objects/items/weapons/papers_bins.dm index e284daf9ca9..c3b8a87196d 100644 --- a/code/game/objects/items/weapons/papers_bins.dm +++ b/code/game/objects/items/weapons/papers_bins.dm @@ -360,7 +360,7 @@ NOTEBOOK usr.put_in_hand(P) usr << "You take a paper out of the bin." else - P.loc = get_turf_loc(src) + P.loc = get_turf(src) usr << "You take a paper out of the bin." src.update() diff --git a/code/game/objects/shooting_range.dm b/code/game/objects/shooting_range.dm index 6731b3e9e2c..8bb6edd4ab4 100644 --- a/code/game/objects/shooting_range.dm +++ b/code/game/objects/shooting_range.dm @@ -52,7 +52,7 @@ user.put_in_hand(pinned_target) user << "You take the target out of the stake." else - pinned_target.loc = get_turf_loc(user) + pinned_target.loc = get_turf(user) user << "You take the target out of the stake." pinned_target = null @@ -122,7 +122,7 @@ user.put_in_hand(src) user << "You take the target out of the stake." else - src.loc = get_turf_loc(user) + src.loc = get_turf(user) user << "You take the target out of the stake." stake.pinned_target = null diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 408815774e9..4fcb919ef5b 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -341,7 +341,7 @@ if(M) dat += "[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]" dat += "PM" - var/turf/mob_loc = get_turf_loc(M) + var/turf/mob_loc = get_turf(M) dat += "[mob_loc.loc]" else dat += "Head not found!" diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 4ca0125f63a..9b4fe6ac589 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -45,7 +45,7 @@ if(src.holder.rank == "Game Master" || src.holder.rank == "Game Admin") log_admin("[key_name(src)] played a local sound [S]") message_admins("[key_name_admin(src)] played a local sound [S]", 1) - playsound(get_turf_loc(src.mob), S, 50, 0, 0) + playsound(get_turf(src.mob), S, 50, 0, 0) return //feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/chemical/Chemistry-Recipes.dm b/code/modules/chemical/Chemistry-Recipes.dm index 098f1ccb9ee..43052a475f3 100644 --- a/code/modules/chemical/Chemistry-Recipes.dm +++ b/code/modules/chemical/Chemistry-Recipes.dm @@ -684,8 +684,8 @@ datum if(chosen) // Calculate previous position for transition - var/turf/FROM = get_turf_loc(holder.my_atom) // the turf of origin we're travelling FROM - var/turf/TO = get_turf_loc(chosen) // the turf of origin we're travelling TO + var/turf/FROM = get_turf(holder.my_atom) // the turf of origin we're travelling FROM + var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO playsound(TO, 'phasein.ogg', 100, 1) @@ -733,16 +733,16 @@ datum var/list/critters = typesof(/obj/effect/critter) - /obj/effect/critter // list of possible critters - playsound(get_turf_loc(holder.my_atom), 'phasein.ogg', 100, 1) + playsound(get_turf(holder.my_atom), 'phasein.ogg', 100, 1) - for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null)) + for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null)) if(M:eyecheck() <= 0) flick("e_flash", M.flash) for(var/i = 1, i <= created_volume, i++) var/chosen = pick(critters) var/obj/effect/critter/C = new chosen - C.loc = get_turf_loc(holder.my_atom) + C.loc = get_turf(holder.my_atom) if(prob(50)) for(var/j = 1, j <= rand(1, 3), j++) step(C, pick(NORTH,SOUTH,EAST,WEST)) @@ -759,9 +759,9 @@ datum var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks // BORK BORK BORK - playsound(get_turf_loc(holder.my_atom), 'phasein.ogg', 100, 1) + playsound(get_turf(holder.my_atom), 'phasein.ogg', 100, 1) - for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null)) + for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null)) if(M:eyecheck() <= 0) flick("e_flash", M.flash) @@ -769,7 +769,7 @@ datum var/chosen = pick(borks) var/obj/B = new chosen if(B) - B.loc = get_turf_loc(holder.my_atom) + B.loc = get_turf(holder.my_atom) if(prob(50)) for(var/j = 1, j <= rand(1, 3), j++) step(B, pick(NORTH,SOUTH,EAST,WEST)) diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 840a5cbb826..61ca2c72c40 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -149,7 +149,7 @@ I kind of like the right click only--the window version can get a little confusi vents.Add(temp_vent) - var/atom/a = get_turf_loc(temp_vent) + var/atom/a = get_turf(temp_vent) ventAreas.Add(a.loc) diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm index 0f632a380be..17c2ee70f4b 100644 --- a/code/modules/mob/living/carbon/alien/larva/powers.dm +++ b/code/modules/mob/living/carbon/alien/larva/powers.dm @@ -23,7 +23,7 @@ for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents) if(vent.loc.z != loc.z) continue - var/atom/a = get_turf_loc(vent) + var/atom/a = get_turf(vent) choices.Add(a.loc) var/turf/startloc = loc var/obj/selection = input("Select a destination.", "Duct System") in choices diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm index 63169dedad6..fb1fd241041 100644 --- a/code/modules/mob/living/carbon/metroid/powers.dm +++ b/code/modules/mob/living/carbon/metroid/powers.dm @@ -258,7 +258,7 @@ for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents) if(vent.loc.z != loc.z) continue - var/atom/a = get_turf_loc(vent) + var/atom/a = get_turf(vent) choices.Add(a.loc) var/turf/startloc = loc var/obj/selection = input("Select a destination.", "Duct System") in choices diff --git a/code/modules/mob/living/carbon/monkey/powers.dm b/code/modules/mob/living/carbon/monkey/powers.dm index 9a8f95283e8..3f170b6a4d1 100644 --- a/code/modules/mob/living/carbon/monkey/powers.dm +++ b/code/modules/mob/living/carbon/monkey/powers.dm @@ -22,7 +22,7 @@ for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents) if(vent.loc.z != loc.z) continue - var/atom/a = get_turf_loc(vent) + var/atom/a = get_turf(vent) choices.Add(a.loc) var/turf/startloc = loc var/obj/selection = input("Select a destination.", "Duct System") in choices diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 05b1c48a284..31b0c8870a8 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -354,7 +354,7 @@ user << "You start adding cables to the APC frame..." playsound(src.loc, 'Deconstruct.ogg', 50, 1) if(do_after(user, 20) && C.amount >= 10) - var/turf/T = get_turf_loc(src) + var/turf/T = get_turf(src) var/obj/structure/cable/N = T.get_cable_node() if (prob(50) && electrocute_mob(usr, N, N)) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread