mob
var/list/screenlist=list()
var/list
HotKeys=list("F1","F2","F3","F4","F5","F6","F7","F8")
verb/UseKey(key as text)
set hidden=1
if(HotKeys[key])
var/obj/Skill/O=HotKeys[key]
O.Initiate(src)
proc/SetKey(key,object) HotKeys[key]=object
obj
icon='TechList.dmi'
Skill
proc
Initiate(mob/Owner)
MouseDrag()
mouse_drag_pointer=icon(icon,icon_state)
MouseDrop(over_location)
mouse_drag_pointer=null
if(istype(over_location,/obj/Hud/HotKeys))
var/obj/O=over_location
O.overlays=list(icon(icon,icon_state))
usr.SetKey(O.name,src)
Punch
icon_state="Punch"
Initiate(mob/Owner)
Owner.Punch()
Kick
icon_state="Kick"
Initiate(mob/Owner)
Owner.Punch()
Hud
HotKeys
mouse_drop_zone=1
icon='Hotkeys.dmi'
New() icon_state=name
Click()
overlays=null
usr.HotKeys[name]=null
F1/screen_loc="12,2:-16"
F2/screen_loc="13:16,2:-16"
F3/screen_loc="15,2:-16"
F4/screen_loc="16:16,2:-16"
F5/screen_loc="18,2:-16"
F6/screen_loc="19:16,2:-16"
F7/screen_loc="21,2:-16"
F8/screen_loc="22:16,2:-16"
mob
proc
StartHotkeys()
for(var/obj/Hud/HotKeys/m in src.screenlist)
if(m)
src.client.screen+=m
Problem description:
I know I need to add tehniques into list and than save/read from the list. But how can I save/read the number where tehniques was on.
For example 3 tehniques: "kick", "block", "punch" on 1 2 3. If I save the number-position in list and reread it it would work. But if I remove 2 the 3 will be pushed into number 2 in list.
Sorry for my bad English
Do this:
An uncluttered type tree is your friend.