You need to actually take a look at the code and figure out where it goes in. For instance, that snippet I provided for MouseDrop() only replaces the redundant if checks on all the various pieces of equipment. You would still need the if(src in usr.contents) line.

Likewise, I said the equipped var should be annihilated outright. It doesn't belong under /mob, since a mob can't be equipped. It doesn't belong under /obj/Armor either, because it shouldn't exist. You don't need that var.

In the last couple of posts you've moved the MouseDrop() code from obj/Armor to mob. It belongs under obj/Armor where it was; it was fine there. That's why it's complaining that Equip() is undefined.
Well, that got ride of 1 of the errors but I'm still getting the following after making all these changes.

inventory2.dm:386:error: overlay_icon: undefined var
inventory2.dm:235:error: A.overlay_icon: undefined var
The After Zone.dmb - 2 errors, 0 warnings
Yeah, you would have to define an overlay_icon var belonging to obj/Armor. It's in place of shoulderpiece, glovepiece, etc. which ere all unnecessary.
Well for some reason now when it runs, the only item I can't equip is the chest piece, and legs are forced on top of back.
Can you post your updated code?
Not to mention its also not removing stuff from the inventory when moved to equipped

mob
var
bagopened = 1
verb/bagopen()
if(bagopened==1)
bagopened = 0
winshow(src,"inventory",1)
winset(src, "inventory", "can-minimize=false")
else if(bagopened==0)
bagopened = 1
winshow(src, "inventory",0)
else
src<<"Unknown bag opening error bagopen !=1/0"


mob
var
chest
legs
shoulder
face
feet
head
back
mainhand
offhand
glove

list/hiddenlist = list()




Entered(obj/Armor/A)
..()
if(istype(A))
var/obj/Armor/X=locate(A.type) in src.contents-A
if(X)
A.amount+=X.amount
del X
Inventory()

Exited()
..()
Inventory()

proc/Inventory()
var/i=1
winset(src,"inventory.invent",{"cells="2x[contents.len+1]""})
src<<output("<b>Item</b>","inventory.invent:1,1")
src<<output("<b>Amount</b>","inventory.invent:2,1")
for(var/obj/Armor/I in contents)
src<<output(I,"inventory.invent:1,[++i]")
src<<output(I.amount,"inventory.invent:2,[i]")

MouseDrag(src_object,over_object,src_location,over_location,src_control,over_control,params)
if(!(src in usr.contents)) return




proc/InvLayer()
var/list/new_overlays = list()
for(var/slot in list("shoulder","mainhand","offhand","back","legs","feet","chest","glove","face","head"))
var/obj/Armor/A = vars[slot]
if(A) new_overlays += A.overlay_icon

overlays = new_overlays

atom/proc/Bumped(atom/A) return 1


obj/Armor

MouseDrop(over_object=src,src_location,over_location,src_control,over_control,params)
if(src in usr.contents)
if(findtextEx(over_control,"inventory.")==1)
if(over_control == "inventory.[equiptype]")
Equip(usr)
else
usr << output(null,"inventory.about")
usr << output(equiptype ? "That doesn't go there!" : "That isn't an equippable item!", "inventory.about")


density = 1
var/amount = 1


verb/Pickup()
set src in oview(1)
Pickup_proc(usr)


proc/Pickup_proc(mob/M)
if(!(M in oview(1,src))) return
.=Move(M)
M << "[(.)?"\green":"\red"] You[(.)?"":" did not"] pick up [src.name]."


var/equiptype
var/overlay_icon

KasablancRobeMale
icon = 'Kasablanc Robe Male.dmi'
icon_state = ""
name = "Kasablanc Robe (M)"
equiptype = "chest"
KasablancRobeFemale
icon = 'Kasablanc Robe female.dmi'
icon_state = ""
name = "Kasablanc Robe (F)"
equiptype = "chest"
KasablancPants
icon = 'Kasablanc pants.dmi'
icon_state = ""
name = "Kasablanc Pants"
equiptype = "legs"
KasablancCloak
icon = 'Kasablanc Cloak.dmi'
icon_state = ""
name = "Kasablanc Cloak"
equiptype = "back"
KreptkinPantsMale
icon = 'Kreptkin Pants Male.dmi'
icon_state = ""
name = "Kreptkin Pants"
equiptype = "legs"
KreptkinShirtFemale
icon = 'Kreptkin shirt female.dmi'
icon_state = ""
name = "Kreptkin Blouse (F)"
equiptype = "chest"
KreptkinSkirt
icon = 'Kreptkin skirt.dmi'
icon_state = ""
name = "Kreptkin Skirt"
equiptype = "legs"
KreptkinSuitMale
icon = 'Kreptkin Suit Male.dmi'
icon_state = ""
name = "Kreptkin Suit (M)"
equiptype = "chest"
NutoriRobeFemale
icon = 'Nutori Robe female.dmi'
icon_state = ""
name = "Nutori Robes (F)"
equiptype = "chest"
NutoriRobeMale
icon = 'Nutori Robe Male.dmi'
icon_state = ""
name = "Nutori Robes (M)"
equiptype = "chest"
PuraelicChest
icon = 'Puraelic chest m.dmi'
icon_state = ""
name = "Puraelic Chestpiece"
equiptype = "chest"
PuraelicGauntlets
icon = 'Puraelic gauntlets.dmi'
icon_state = ""
name = "Puraelic Gauntlets"
equiptype = "glove"
PuraelicPantsMale
icon = 'Puraelic pants male.dmi'
icon_state = ""
name = "Puraelic Greaves (M)"
equiptype = "legs"
PuraelicPantsFemale
icon = 'Puraelic pants female.dmi'
icon_state = ""
name = "Puraelic Greaves (F)"
equiptype = "legs"
ShaedralGoggles
icon = 'Shaedral Goggles.dmi'
icon_state = ""
name = "Shaedral Goggles"
equiptype = "head"
ShaedralMask
icon = 'Shaedral Mask.dmi'
icon_state = ""
name = "Shaedral Facemask"
equiptype = "face"
ShaedralPants
icon = 'Shaedral Pants.dmi'
icon_state = ""
name = "Shaedral Pants"
equiptype = "legs"
ShaedralShirtFemale
icon = 'Shaedral shirt female.dmi'
icon_state = ""
name = "Shaedral Shirt (F)"
equiptype = "chest"
ShaedralShirtMale
icon = 'Shaedral shirt male.dmi'
icon_state = ""
name = "Shaedral Shirt (M)"
equiptype = "chest"


obj/Armor/proc/Equip(mob/M)
var/obj/Armor/old = M.vars[equiptype]
if(old && old != src) old.Unequip(M, 1)

M << "Equipped [name]"
M.vars[equiptype] = src
loc = M.hiddenlist
M << output(src, "inventory.[equiptype]")
overlay_icon = icon
M.InvLayer()

obj/Armor/proc/Unequip(mob/M, auto)
if(M.vars[equiptype] != src) return
M << "Removed [name]"
M.vars[equiptype] = null
loc = M
if(!auto)
M << output(null, "inventory.[equiptype]")
M.InvLayer()
Hmm. loc=hiddenlist can't be right if hiddenlist is just a regular list, not an atom. I'm not sure what purpose hiddenlist is supposed to serve.
apparently hiddenlist is just a seperate list for storing and remembering what's been equipped.
Just to chip in some advice in general, you should try and post only the code that is relevant to your problem (e.g. all the armour type definitions from the 'K...'s to the 'S[...]'s are unnecessary), that way the task of helping might not appear as tedious to anyone trying to look through your posts.
do you have to put in a verb input for every movement?
In response to Robinhood8
Robinhood8 wrote:
do you have to put in a verb input for every movement?


What do you mean?
In response to Lummox JR
Lummox JR wrote:
Hmm. loc=hiddenlist can't be right if hiddenlist is just a regular list, not an atom. I'm not sure what purpose hiddenlist is supposed to serve.

As far as I'm seeing now, hiddenlist is essentially useless and serves no purpose. It literally is just a list that is added to everytime someone equips something, but never seems to be used otherwise.
Best response
In that case, nix hiddenlist from your code and then post the new changes.
I figured out the problem with the chest one, fixed it by renaming the layout grid 'chestslot' to chest. I think the reason the inventory isn't changing though is because the Mousedrop can't call Inventory() to update the inventory though.
I added M.Inventory() to the equip and Unequip procs. Works beautifully now. Thanks for all your help

Also the legs kept equipping over the backpiece cause of the order in the list, so I fixed that too
Page: 1 2