ID:142095
 
Code:
obj/var
Buildable = 0

mob/proc/Buildz(var/obj/O)
if(O.Buildable==1)
usr<<"you cant build here"
return
else
...

mob
Build
verb
Wall()
set name = "Wall"
set category = "Build"
Buildz()
new/obj/Wall(usr.loc)

Sidewalk()
set name = "Sidewalk"
set category = "Build"
Buildz()
new/obj/S_Walk(usr.loc)

obj
Wall
icon = 'turfs.dmi'
icon_state = "Wall"
density = 1

S_Walk
icon = 'turfs.dmi'
icon_state = "S-Walk"
Buildable=1
density = 0


Problem description:
how do i make it to where you cant build on the sidewalk
When you build, do a check to see if your standing on a sidewalk. If it returns true then simply deny the process.
turf
proc
CheckBuildable()
for(var/obj/A in src.contents)
if(istype(A,/obj/S_Walk))
return 1
return
mob
Build
verb
Wall()
set name = "Wall"
set category = "Build"
var/turf/Spot = usr.loc
if(Spot.CheckBuildable())
return
new/obj/Wall(usr.loc)

Sidewalk()
set name = "Sidewalk"
set category = "Build"
var/turf/Spot = usr.loc
if(Spot.CheckBuildable())
return
new/obj/S_Walk(usr.loc)

obj
Wall
icon = 'turfs.dmi'
icon_state = "Wall"
density = 1

S_Walk
icon = 'turfs.dmi'
icon_state = "S-Walk"
Buildable=1
density = 0


I think that's what you need? o.o Kinda tired though, so I may be wrong. (Untested, btw, and typed out in the forum, so it may have indentation problems.)
In response to Mendon
thx that worked