chui/window/chem var/global/list/CHEMS = list( "Aluminium", "Bromine", "Copper", "Sugar", "Water" ) var/list/chems = list() name = "Chemical Dispensor" New() ..() OnClick( var/client/who, var/id ) if( !(id in CHEMS)) return//?? if( isnull( chems[ id ] ) ) chems[ id ] = 0 chems[ id ] += 10 CallJSFunction( "addChem", list( id ) ) OnTopic( href, href_list[] ) switch( href_list[ "action" ] ) if( "remove" ) chems[href_list[ "chem" ]] = null CallJSFunction( "removeChem", list( href_list[ "chem" ] ) ) proc/getChems() var/ret = "Chem(trails):