ID:2804515
 
Code:
iconchoice = list("DW1 NES Unequipped"=list("dw1nesue","Male"),"DW1 NES Equipped"=list("dw1nese","Male"),"DW1 GBC Unequipped"=list("dw1gbcue","Male"),"DW1 GBC Equipped"=list("dw1gbcue","Male"),"DW1 SNES"=list("dw1snes","Male"),"DW2 NES Lorasia"=list("dw2nes","Male"),"DW2 GBC Lorasia"=list("dw2gbc","Male"),"DW3 NES Male"=list("dw3nes","Male"),"DW3 NES Ortega"=list("dw3ortega","Male"),"DW3 GBC Male"=list("dw3gbcm","Male"),"DW3 GBC Female"=list("dw3gbcf","Female"),"DW3 SNES Male"=list("dw3snesm","Male"),"DW3 SNES Female"=list("dw3snesf","Female"),"DW4 NES Male"=list("dw4nesm","Male"),"DW4 NES Female"=list("dw4nesf","Female"),"DQ5 Hero (Kid)"=list("dq5young","Male"),"DQ5 Hero (Adult)"=list("dq5adult","Male"),"DQ5 Papas (8-bit)"=list("dq5papas8bit","Male"),"DQ5 Papas (16-bit)"=list("dq5papas","Male"),"DQ5 Zenithian Hero"=list("dq5legendary","Male"))

proc/pickicon(list/iconlist)
var/choice = input("What icon do you want?") in iconlist
return choice

iconchoice = pickicon(newmob.iconchoice) //Pick icon
M.icon_state = iconchoice[1]

Problem description:

I'm trying to remove a lot of the redundant things in my 20 year old codebase and figured I'd give a shot at associative lists. However I'm not really sure how I can get the first item in the iconchoice variable at the end. Is there any way I could make this work or am I going about it the wrong way?

Edit:

I hate digging into this stuff for so long, making a post about it, then figuring out the issue but here we go. Just had to change my return.

return iconlist["[choice]"]