ID:140875
 
Code: Obj Macros
client
MouseDrop(obj/src_object,obj/over_object,src_location,over_location)
if(istype(over_object,/obj/Hotkeys))
if(istype(src_object,/obj/Attack))
over_object.overlays=null
over_object.overlays+=src_object.icon
over_object.KeyID=src_object.name
if(istype(src_object,/obj/Hotkeys))
over_object.overlays=null
over_object.overlays+=src_object.overlays
over_object.KeyID=src_object.KeyID
src_object.overlays=null
src_object.KeyID=null
if(istype(src_object,/obj/Hotkeys))
if(!istype(over_object,/obj/Hotkeys))
src_object.overlays=null
src_object.KeyID=null


mob/proc/UpdateInventory()
var/items = 0
for(var/obj/Attack/O in src.skills)
items++
winset(src, "Attacks", "cells=1x[items]")
items=0
for(var/obj/Attack/O in src.skills)
src << output(O, "Attacks:1,[++items]")


Problem description:Macro Saving

When i made the macros for the moves it worked fine but when you relog they dissapear and i have no idea how to save them so you can still use em when you log back in

To make them save you would add a list and configure it so byond saves and loads that list if your doing it manually. Then were you are creating the hotkey objects check to see if the Hotkeys are in the list if they are put them on the screen if not create them like normal.