View Single Post
  #2  
Old 08-12-2014, 03:52 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
stuff you could improve (yes i know you've said it's not perfect, still worth mentioning)
1. your this.keycount could be set as a const flag, as you're not altering it, just reading it.
2. might be optional, but instead of placing -'s for blank hotkey spots, i'd have just done this check
PHP Code:
if (client.hotkeys == NULLclient.hotkeys = new[this.keycount
this creates a new array with the size of this.keycount
3.
PHP Code:
temp.hk obj.substring(obj.pos("_") + 1) + 1;
temp.hki temp.hk -= 1
probably would've changed it to something like
PHP Code:
temp.hk obj.tokenize("_")[1]+1;
temp.hki temp.hk-1
for it's simplicy (ps: your temp.hki = temp.hk -= 1; reduces temp.hk by 1 again, could've left out the +1 than when creating the temp.hk)
__________________
MEEP!
Reply With Quote