ID:143542
 
Code:
obj/addons/moat_empty
icon='moat.dmi'
name="Empty Moat"
saveable=1
icon_state="empty"
verb
Dig()
set src in oview(1)
if(!shovelcheck(1))
usr<<"I have no shovel to dig."
else
usr<<"Digging..."
sleep(100)
del(src)
view()<<"[usr] digs up the moat."

Fill_Moat(obj/O in usr)
set src in view(1)
if(istype(O,/obj/addons/bucket_full))
sleep(300)
new /obj/addons/moat_full(src.loc,owner=usr)
del(O)
new /obj/addons/bucket_empty(usr)
del(src)
else
usr<<"You can't fill the moat with this."
return
obj/addons/moat_full
icon='moat.dmi'
name="moat"
density=1
saveable=1
icon_state="filled"
verb
Lay_Bridge(obj/O in usr)
set src in view(1)
if(owner==usr)
if(istype(O,/obj/addons/bridge))
switch(input(usr,"It will face your direction is this ok?") in list ("Yes","No"))
if("Yes")
src.dir=usr.dir
del(O)
src.icon='bridge.dmi'
src.name="Bridge"
src.icon_state=""
src.verbs -= /obj/addons/moat_full/verb/Lay_Bridge
src.density=0
if("No")
return
else
usr<<"I don't have a bridge to lay."
else
usr<<"You do not own this moat."
return


Problem description:
The ownership of the item is not working! if you build a moat... it does not let you build a bridge on it cause it says your not the owner... it should be like you build the moat only you can build the bridge on it...
Change this line:
new /obj/addons/moat_full(src.loc,owner=usr)


to:

var/obj/o = new /obj/addons/moat_full(src.loc)
o.owner=usr
In response to Miran94
i c so it needs to be defined.