Merge pull request #5207 from mwerezak/get_turf_loc-cleanup

Cleans up get_turf_loc()
This commit is contained in:
Zuhayr
2014-06-12 18:13:01 +09:30
12 changed files with 51 additions and 58 deletions

View File

@@ -439,7 +439,7 @@
if(M)
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
var/turf/mob_loc = get_turf_loc(M)
var/turf/mob_loc = get_turf(M)
dat += "<td>[mob_loc.loc]</td></tr>"
else
dat += "<tr><td><i>Head not found!</i></td></tr>"

View File

@@ -22,7 +22,7 @@
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)
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -507,7 +507,7 @@
user << "You start adding cables to the APC frame..."
playsound(src.loc, 'sound/items/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

View File

@@ -34,7 +34,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)
if (!istype(loc, /turf/simulated/floor))
usr << "\red [src.name] cannot be placed on this spot."
return

View File

@@ -841,8 +841,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, 'sound/effects/phasein.ogg', 100, 1)
@@ -903,16 +903,16 @@ datum
)//exclusion list for things you don't want the reaction to create.
var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
playsound(get_turf(holder.my_atom), 'sound/effects/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/mob/living/simple_animal/hostile/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))
@@ -929,9 +929,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), 'sound/effects/phasein.ogg', 100, 1)
playsound(get_turf(holder.my_atom), 'sound/effects/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)
@@ -939,7 +939,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))
@@ -1009,10 +1009,10 @@ datum
required_container = /obj/item/slime_extract/grey
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red Infused with phoron, the core begins to quiver and grow, and soon a new baby slime emerges from it!"), 1)
var/mob/living/carbon/slime/S = new /mob/living/carbon/slime
S.loc = get_turf_loc(holder.my_atom)
S.loc = get_turf(holder.my_atom)
slimemonkey
@@ -1026,7 +1026,7 @@ datum
on_reaction(var/datum/reagents/holder)
for(var/i = 1, i <= 3, i++)
var /obj/item/weapon/reagent_containers/food/snacks/monkeycube/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube
M.loc = get_turf_loc(holder.my_atom)
M.loc = get_turf(holder.my_atom)
//Green
slimemutate
@@ -1050,10 +1050,10 @@ datum
on_reaction(var/datum/reagents/holder)
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal
M.amount = 15
M.loc = get_turf_loc(holder.my_atom)
M.loc = get_turf(holder.my_atom)
var/obj/item/stack/sheet/plasteel/P = new /obj/item/stack/sheet/plasteel
P.amount = 5
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
//Gold
slimecrit
@@ -1085,9 +1085,9 @@ datum
)//exclusion list for things you don't want the reaction to create.
var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
playsound(get_turf(holder.my_atom), 'sound/effects/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)
@@ -1095,11 +1095,11 @@ datum
var/chosen = pick(critters)
var/mob/living/simple_animal/hostile/C = new chosen
C.faction = "slimesummon"
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))*/
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The slime core fizzles disappointingly,"), 1)
//Silver
@@ -1116,9 +1116,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), 'sound/effects/phasein.ogg', 100, 1)
playsound(get_turf(holder.my_atom), 'sound/effects/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)
@@ -1126,7 +1126,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))
@@ -1151,11 +1151,11 @@ datum
required_container = /obj/item/slime_extract/darkblue
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
sleep(50)
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/M in range (get_turf_loc(holder.my_atom), 7))
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/M in range (get_turf(holder.my_atom), 7))
M.bodytemperature -= 140
M << "\blue You feel a chill!"
@@ -1178,7 +1178,7 @@ datum
required_container = /obj/item/slime_extract/orange
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
sleep(50)
var/turf/location = get_turf(holder.my_atom.loc)
@@ -1202,7 +1202,7 @@ datum
required_container = /obj/item/slime_extract/yellow
required_other = 1
on_reaction(var/datum/reagents/holder, var/created_volume)
empulse(get_turf_loc(holder.my_atom), 3, 7)
empulse(get_turf(holder.my_atom), 3, 7)
slimecell
@@ -1215,7 +1215,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder, var/created_volume)
var/obj/item/weapon/cell/slime/P = new /obj/item/weapon/cell/slime
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
slimeglow
name = "Slime Glow"
@@ -1226,7 +1226,7 @@ datum
required_container = /obj/item/slime_extract/yellow
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The contents of the slime core harden and begin to emit a warm, bright light."), 1)
var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime
F.loc = get_turf(holder.my_atom)
@@ -1243,7 +1243,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder)
var/obj/item/weapon/slimesteroid/P = new /obj/item/weapon/slimesteroid
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
@@ -1269,7 +1269,7 @@ datum
on_reaction(var/datum/reagents/holder)
var/obj/item/stack/sheet/mineral/phoron/P = new /obj/item/stack/sheet/mineral/phoron
P.amount = 10
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
//Red
slimeglycerol
@@ -1291,10 +1291,10 @@ datum
required_container = /obj/item/slime_extract/red
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/living/carbon/slime/slime in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null))
slime.tame = 0
slime.rabid = 1
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The [slime] is driven into a frenzy!."), 1)
//Pink
@@ -1308,7 +1308,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder)
var/obj/item/weapon/slimepotion/P = new /obj/item/weapon/slimepotion
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
//Black
@@ -1331,10 +1331,10 @@ datum
required_container = /obj/item/slime_extract/oil
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
sleep(50)
explosion(get_turf_loc(holder.my_atom), 1 ,3, 6)
explosion(get_turf(holder.my_atom), 1 ,3, 6)
//Light Pink
slimepotion2
name = "Slime Potion 2"
@@ -1346,7 +1346,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder)
var/obj/item/weapon/slimepotion2/P = new /obj/item/weapon/slimepotion2
P.loc = get_turf_loc(holder.my_atom)
P.loc = get_turf(holder.my_atom)
//Adamantine
slimegolem
name = "Slime Golem"
@@ -1358,7 +1358,7 @@ datum
required_other = 1
on_reaction(var/datum/reagents/holder)
var/obj/effect/golemrune/Z = new /obj/effect/golemrune
Z.loc = get_turf_loc(holder.my_atom)
Z.loc = get_turf(holder.my_atom)
Z.announce_to_ghosts()
//////////////////////////////////////////FOOD MIXTURES////////////////////////////////////

View File

@@ -53,7 +53,7 @@
if(ishuman(user))
user.put_in_hands(wrapped)
else
wrapped.loc = get_turf_loc(src)
wrapped.loc = get_turf(src)
del(src)
return