obj
clothes_grid
cloth1
name=""
icon='System Icons/Clothes/cloth1.dmi'
Click()
var/obj/T = new /obj/clothes/cloth1
T += input(usr,"What colour would you like to colour this item.") as color
usr.contents += T
cloth2
name = ""
icon = 'System Icons/Clothes/cloth2.dmi'
Click()
var/obj/T = new /obj/clothes/cloth2
T += input(usr,"What colour would you like to colour this item.") as color
usr.contents += T
cloth3
name = ""
icon = 'System Icons/Clothes/cloth3.dmi'
Click()
var/obj/T = new /obj/clothes/cloth3
T += input(usr,"What colour would you like to colour this item.") as color
usr.contents += T
cloth4
name = ""
icon = 'System Icons/Clothes/cloth4.dmi'
Click()
var/obj/T = new /obj/clothes/cloth4
T += input(usr,"What colour would you like to colour this item.") as color
usr.contents += T
cloth5
name = ""
icon = 'System Icons/Clothes/cloth5.dmi'
Click()
var/obj/T = new /obj/clothes/cloth5
T += input(usr,"What colour would you like to colour this item.") as color
usr.contents += T
Problem description:
Instead of using the code that is seen above, and contiously spam creating those for like 100 Objects, couldn't I do something like this ? ( Look below. )
obj
clothes_grid
Click()
var/obj/T = new src
T += input(usr,"What colour would you like to colour this item.") as color
usr.contents += T
cloth1
name=""
icon='System Icons/Clothes/cloth1.dmi'
cloth2
name = ""
icon = 'System Icons/Clothes/cloth2.dmi'
Click()
cloth3
name = ""
icon = 'System Icons/Clothes/cloth3.dmi'
cloth4
name = ""
icon = 'System Icons/Clothes/cloth4.dmi'
cloth5
name = ""
icon = 'System Icons/Clothes/cloth5.dmi'