mob
verb
Edit_Object(obj/A in view()) // obj/A in view(1) means an object (with the A variable) from 1 tile away from you.
switch(input("What would you like to do?","Edit Object's Icon","Edit Object's Icon State","Edit Object's Density") as null|anything in list("Edit Object's Icon","Edit Object's Icon State","Edit Object's Density"))
if("Edit Object's Icon")
A.icon = input("What would you like the [A]'s icon to be?","The [A]'s Icon") as icon
A.icon_state = input("What would you like the [A]'s iconstate to be?","The [A]'s IconState") as null|anything in icon_states(A.icon)
src << "<b>You change the [A]'s icon!"
if("Edit Object's Icon State")
A.icon_state = input("What would you like the [A]'s iconstate to be?","The [A]'s IconState") as null|anything in icon_states(A.icon)
src << "<b>You change the [A]'s iconstate!</b>"
if("Edit Object's Density")
var/t=input("What would you like to set the density to?(Either 1 or 0)") as num
for(var/obj/o in view())
o.density = t
else
return
What I don't understand is why it only ask me about Edit Object's Density when I want to access the other 2 options as well.
Thanks for helping!
-The Grimster.
Look up input() and see the order of arguments.