ID:174336
 
How would I disable teleport/summon within a certain area? Those verbs follow if it helps.

Advanced_Teleport()
set desc = "() Teleport to a given coordinates or object."
set category = "Owner"
if(!world.maxx)
var/area/area = input("Teleport to which area?","Teleport:") as null|area in world
if(area) src.Move(area)
return
switch(input("Teleport to what?","Teleport:") as null|anything in \
list("Coordinates","Object"))
if(null) return
if("Coordinates")
var/_x = input("(Range: 1 - [world.maxx])","X Coordinate:",src.x) as null|num
var/_y = input("(Range: 1 - [world.maxy])","Y Coordinate:",src.y) as null|num
var/_z = input("(Range: 1 - [world.maxz])","Z Coordinate:",src.z) as null|num
if(_x > world.maxx || _x < 1) return
if(_y > world.maxy || _y < 1) return
if(_z > world.maxz || _z < 1) return
src.loc = locate(_x,_y,_z)
usr << "You teleport to coordinates [_x],[_y],[_z]."
if("Object")
var/atom/movable/O = input("Choose an object:","Object:") as null|mob|obj in world
src.loc = O.loc
O << "[usr] appears before you!"
usr << "You appear before [O]."

Summon(mob/M in world)
set category="Owner"
set name="Summon"
set desc="Brings someone or something to you."
M.loc=usr.loc
M << "[usr] has summoned you!"
usr << "You have summoned [M]."</1></1></1>
All you need is to have a check at the top of your verbs to see if you can teleport it or not.
For example:
var/turf/T = locate(usr.x,usr.y,usr.z) //Put the turf under the player into a var
if(!T.CanTeleport) //Check if the CanTeleport var of the turf is false
usr << "You can't teleport here!"
return //End the verb here, don't do anything else

Of course, that would require that /turf had a CanTeleport variable. You'd also have to change it for the turfs you want to not be able to teleport from.