Player Built Houses in Developer Help
Question on Keys.
Lummox JR using the key code you gave me how would I make a copy of the key?
obj/key ... verb/Copy() var/mob/M=usr if(keyname!="[M.client.ckey]:[M.name]") usr << "You can't make a copy of [src]." return new /obj/key(loc,purpose,keyname)
How would I add the area plot to the deed like I mentioned earlier.
obj/item/landdeed name="land deed" var/keyname // indicates the owner var/list/history // keeps track of previous owners var/area/plot New(newloc,area/A,mob/M) ..() plot=A history=list() Transfer(M) proc/Transfer(mob/M) if(M.client) keyname="[M.client.ckey]:[M.name]" else keyname=":[M.name]" history["[world.realtime]"]=keyname // tell the area it's been sold, so it can adjust housekeys and such if(hascall(A,"Transfer")) A:Transfer(M)
how would I check variables made in the area. I think I mentioned these earlier but I am not sure.
Every area has variables like price and size so how can I get it so the seller mob can access the variables in the area.
mob // you should check buyer.gold before an offer is made, // but be sure to check a second time in case he does // other buying before the seller says yes proc/BuyOffer(mob/buyer,area/plot) if(!client) ... // handle AI yourself return var/obj/landdeed/deed for(deed in src) if(deed.plot==plot) break if(!deed) buyer << "[src] isn't carrying the deed." src << "[buyer] wants to buy a plot of land (#[plot.n]) from you, but you need the deed if you want to sell it." return var/ans=alert(src,"[buyer] has made an offer to buy a plot of land from you. (Plot #[plot.n], [plot.width*plot.height] square yard\s, worth $[plot.price].) Would you like to sell it?","Buy offer from [buyer]","Yes","It's not for sale") if(ans!="Yes") buyer << "Sorry, but [src] won't sell that plot." return if(buyer.gold<plot.price) src << "Nevermind. Turns out [buyer] doesn't have enough money." buyer << "You can't afford to pay $[plot.price] for the land." return buyer.gold-=plot.price gold+=plot.price deed.Transfer(buyer) src << "You've just sold plot #[plot.n] to [buyer] for $[plot.price]." buyer << "You've just bought plot #[plot.n] from [buyer] for $[plot.price]."
verb//POH verbs Build_Door() set category = "POH" for(var/obj/deed/POH/D in usr.contents) for(var/area/POH/A in world) if(A.num == D.plotnumber && A.loc == dd_area()) break var/obj/door/POH/N = new(src.loc) N.SetOwner(usr) N.CreateKey(usr) continue return 1 else usr << "You cannot build here" return