So lets start with what I got -
var/list/ITEM_DATA=list("food cost"=10,"Stone cost"=10,"Rock cost"=20)
var/list/items=list("food","Stone","Rock")
mob/verb/Market()
var/t=input("What would you like to buy today?") as null|anything in items
if(isnull(t)) return
if(!client) return
var/et=input("How many you want to buy") as null|num
if(t=="food")
if(src.money>=ITEM_DATA["[t] cost"])
src.money-=ITEM_DATA["[t] cost"]
src.fd+=et
else
//do the rest.. with having to input each individual variable
the problem with this is I have to do an if check for every single item because I keep my variable names short and sweet for easy typing and my game is a strategy game so I don't know why but variables for each resource seem necessary unless I bother making 20 different types of resources into objects and such and completely changing all the systems that I have in place... this could be a real pain. Well I could just make one object and change the icon_state, name etc at creation to avoid types... but I've got about 10-20 procedures that are fine and dandy with no problems and using objects would mean having to completely redo them... hmm well any opinions are appreciated. If only vars[] worked like how I thought it did this wouldn't be a problem :P
Hopefully I don't end up having to go with the long approach and doing if statements... But I'd rather do that then change all the procedures I currently have :P
Lummox JR