ID:267573
 
well, here's my code, except it doesn't create a new obj!
mob/var/color as obj

turf/palet/
icon = 'pallet.dmi'

turf
bg
icon = 'bg.dmi'
Click()
if(usr.color == "red")
red()
if(usr.color == "green")
green()
if(usr.color == "blue")
blue()
obj
blue
icon = 'blue.dmi'
Click()
usr.color = "blue"
green
icon = 'green.dmi'
Click()
usr.color = "green"
red
icon = 'red.dmi'
Click()
usr.color = "red"

proc
green()
var/obj/green/g = new(src)
red()
var/obj/red/r = new(src)
blue()
var/obj/blue/b = new(src)
It does so! (assuming that usr.color = "red", "green", or "blue")
src is not valid in procs that do not belong to an atom.