turf/Grass/Click()
if(usr.cur_building)
if(usr.cur_building == /obj/Building/Hovel)
if(usr.Wood>= 25)
new usr.cur_building (src)
usr<<"A Hovel was built!"
usr.Wood -= 25
else
usr<<"You need more wood!"
if(usr.cur_building == /obj/Building/Farm)
if(usr.Wood>= 25)
new usr.cur_building (src)
usr<<"A Farm was built!"
usr.Wood -= 25
else
usr<<"You need more Wood!"
else
usr<<"You need to select a building first!"
How would I name, or add overlays to the building (which is an object) which I have just created?
~GokuSS4Neo~
if(usr.cur_building)
if(usr.cur_building == /obj/Building/Hovel)
if(usr.Wood>= 25)
var/obj/O = new usr.cur_building (src)
O.overlays += OVERLAY
usr<<"A Hovel was built!"
usr.Wood -= 25
else
usr<<"You need more wood!"
Simply just making the new item the object variable O (only works for the rest of that click proc though)