ID:1751391
 
Code:
obj/Crew
MouseDrop(over_object,src_location,over_location,src_control,over_control,params)
var/mob/owner = usr
if(src_control == "warship.[Slot]")
if(Slot in owner.CrewEquiped)
var/obj/Crew/item = owner.CrewEquiped[Slot]
owner.CrewEquiped[Slot] = null
owner.CrewEquiped -= Slot
owner.crewcont += item
owner << output(null, "[Slot]:1,1")
On_Unequip(item)

if(src_control == Contents_Control && over_control == "warship.[Slot]")
if(Slot in owner.CrewEquiped)
if(!(owner.CrewEquiped[Slot] == src))
owner << output(null, "[Slot]:1,1")
var/obj/Crew/item = owner.CrewEquiped[Slot]
owner.CrewEquiped[Slot] = null
owner.CrewEquiped -= Slot
owner.crewcont += item
On_Unequip(item)
owner.CrewEquiped += Slot
owner.CrewEquiped[Slot] += src
owner.crewcont -= src
On_Equip(src)
owner << output(src, "[Slot]:1,1")

else
owner.CrewEquiped += Slot
owner.CrewEquiped[Slot] += src
owner.crewcont -= src
On_Equip(src)
owner << output(src, "[Slot]:1,1")
else //if there no item equipped already of that type, equip
owner.CrewEquiped += Slot
owner.CrewEquiped[Slot] += src
owner.crewcont -= src
On_Equip(src)
owner << output(src, "[Slot]:1,1")

proc
Can_Equip(obj/Crew/item)
if(usr.level >= item.level_req) return 1
On_Equip(obj/Crew)
On_Unequip(obj/Crew)


Problem description:Im having a problem that i had think in it a lot of time but i dont know why then i drop the mouse on a grid that haves the name crew1, the item dosnt delete from my inv and displays on the grid as i want to be.
I am trying to equip the objs with the mousedrop() on a grid of 32x32.

What do you mean "drop the mouse on a grid"?
ok, i added the update of the invenotry to the code and works, but how to update the Slot? in my case the 32x32 gird called crew1

ah, im using RPG Equipment Window that maybe helps
In response to Xalexx16
So what you're trying to do is modify that to update a slot you added?
yes, update the slot to show the equiped item, and update it every time i unequip and equip other objs
this shouds update the Slot grid
owner << output(src, "[Slot]:1,1")

but it dosnt. why?