Huh! Interesting - So basically, a path is truly defined as something completely different to that of an object then?

Well, I was of the opinion that the for loop would simply look for a type path that matches the object's own. Though, now that I think on it, the existence of the "type" variable for all atoms makes that seem unlikely....

Well, thanks for that, mate. That solved it
*Bump*

I've recently hit a new issue with this type of code again.

Basically, when creating objects using this method, they seem to be added to the mob's contents, and yet, they don't seem to be at the same time?

My Equip() function has been tweaked to allow the equipping only of objects which are within the contents; and it works. However, when I output a list of the objects within the mob's contents, these don't appear.

I've tweaked nothing else in anyway to move any object out of the mob's contents either upon creation, so I'm not sure why it seems to be allowing the objects to be equipped, but they're not showing up in the list of the mob's contents.

Ideas?
I'd have to see your latest code to answer your questions. Where are the contents being displayed, and how? What do you mean by "creating" objects, whch equipping doesn't involve creating? I don't have any context.
mob/proc/InfoSkinView(var/mob/M)
src << output(null, "System Output")
if(!src.Chatting)
src.OpenWindow("Chatting")
src.SwitchOutputScreen("System")
if(src == M)
src << output("CPU: [world.cpu]%", "System Output")
src << output("Key: [M.ckey]", "System Output")
src << output("Admin Level: [M.client.Admin]", "System Output")
src << output("Season: [Season] \nDay [Day] of Year [Year], [Era] | [Hr]:[Mins]", "System Output")
src << output("======================================", "System Output")
src << output("Lighting Ambience: [lighting.ambient]", "System Output")
src << output("======================================", "System Output")
src << output("Macro: [M.Macro]", "System Output")
src << output("Density: [M.density]", "System Output")
src << output("Mob Type: [M.Mode]", "System Output")
src << output("Interaction: [M.Interaction]", "System Output")
src << output("Wander Variable: [M.Miscellaneous["Wander"]]", "System Output")
src << output("Movement Variable: [M.Miscellaneous["Movement"]]", "System Output")
src << output("Commands Variable: [M.Miscellaneous["Commands"]]", "System Output")
src << output("======================================", "System Output")
src << output("Job: [M.Job]\tClass: [M.Class]", "System Output")
src << output("Name: [M.name]\tGender: [M.gender]\tAge: [M.Age]", "System Output")
src << output("Rank: [M.Rank]\t\tLevel: [M.Level]", "System Output")
src << output("Liege Lord: [M.Liege]", "System Output")
if(M.Keep)
var/atom/Structure/Keep/K = M.Keep
src << output("Keep: [K.name]", "System Output")
else
src << output("Keep: None", "System Output")
src << output("======================================", "System Output")
src << output("Health: [M.Cur_Health] / [M.Max_Health]", "System Output")
src << output("Stamina: [M.Cur_Stamina] / [M.Max_Stamina]", "System Output")
src << output("Hunger: [M.Hunger] || [M.Miscellaneous["Hunger"]]", "System Output")
src << output("======================================", "System Output")
src << output("Inventory: [src.contents.len]", "System Output")
for(var/obj/O in src.contents)
src << output(O, "System Output")
src << output("======================================", "System Output")
src << output("Equipped Armour", "System Output")
if(M.Armour.len > 0)
for(var/Slot in M.Armour)
var/obj/Armour/A = M.Armour[Slot]
src << output("[A] on [Slot]", "System Output")
else
src << output("None", "System Output")
src << output("======================================", "System Output")
src << output("Equipped Clothing", "System Output")
if(M.Clothing.len > 0)
for(var/Slot in M.Clothing)
var/obj/Clothing/C = M.Clothing[Slot]
src << output("[C] on [Slot]", "System Output")
else
src << output("None", "System Output")
src << output("======================================", "System Output")
src << output("Equipped Weapons", "System Output")
if(M.Weapons.len > 0)
for(var/Slot in M.Weapons)
var/obj/Weapon/W = M.Weapons[Slot]
if(W.Equipped == 2)
src << output("[W] in [Slot] (Armed)", "System Output")
else
src << output("[W] in [Slot] (Sheathed)", "System Output")
else
src << output("None", "System Output")
src << output("======================================", "System Output")


The above procedure is how I'm displaying these objects. Basically, I'm using that procedure to run checks on numerous things as I go along. It's called whenever I click the target.

    New()
src.Miscellaneous["Wander"] = 1

if(src.gender != "male" && src.gender != "female")
if(src.Nation == "Psyren")
if(prob(75))
src.gender = "female"
else
src.gender = "male"
else
src.gender = pick("male", "female")

if(src.Liege == " --- ")
src.Liege = src

if(src.name == src.Job || src.name == src.Class || lowertext(src.name) == src.gender)
src.name = null

while(!src.name)
if(src.gender == "male")
src.name = Male_RNG.Create()
if(lentext(src.name) > 7)
src.name = null
else if(src.gender == "female")
src.name = Female_RNG.Create()
if(lentext(src.name) > 7)
src.name = null

if(src.Nation)
if(src.Nation == "Garoh Mountains")
var/obj/O = new (src)
O.name = "Skin Tone"
O.icon = src.icon
O.layer = MOB_LAYER
O.color += "#8A5C2E"
O.icon_state = ""
src.Skin = O
src.Race = "Hrvati"
src.overlays += O

var/Hair = rand(1, 3)
var/obj/H = new (src)
switch(Hair)
if(1)
H.name = "Long Hair"
H.icon = 'Long Hair.dmi'
if(2)
H.name = "Short Hair"
H.icon = 'Short Hair.dmi'
if(3)
H.name = "Medium Hair"
H.icon = 'Medium Hair.dmi'
H.layer = MOB_LAYER + 1
H.icon_state = ""
H.color = pick(Hair_Colours)
src.Hair = H
src.overlays += H
src.contents.Remove(H)

if(src.House)
new src.House (src)

src.Celerity += round(src.Level / 4)
src.Tenacity += round(src.Level / 4)
src.Vitality += round(src.Level / 4)
src.Dexterity += round(src.Level / 4)

src.Experience += src.Level * rand(500, 1000)

src.Craftsmanship += rand(1,5) * round(src.Level / 16)
src.Marksmanship += rand(1,5) * round(src.Level / 16)
src.Architecture += rand(1,5) * round(src.Level / 16)
src.Environment += rand(1,5) * round(src.Level / 16)
src.Businessman += rand(1,5) * round(src.Level / 16)
src.Leadership += rand(1,5) * round(src.Level / 16)
src.Literature += rand(1,5) * round(src.Level / 16)
src.Seafaring += rand(1,5) * round(src.Level / 16)
src.Character += rand(1,5) * round(src.Level / 16)
src.Physique += rand(1,5) * round(src.Level / 16)
src.Sneaking += rand(1,5) * round(src.Level / 16)
src.Cooking += rand(1,5) * round(src.Level / 16)
src.History += rand(1,5) * round(src.Level / 16)
src.Tactics += rand(1,5) * round(src.Level / 16)
src.Alchemy += rand(1,5) * round(src.Level / 16)
src.Melee += rand(1,5) * round(src.Level / 16)

src.Vitals(50, "Hunger", "Addition")
src.Vitals(src.Max_Health, "Health", "Addition")
src.Vitals(src.Max_Stamina, "Stamina", "Addition")

/* --- Weapons --- */
for(var/obj/O in src.contents)
if(O.Equippable && O.Equipped == 0)
var/Slot
if(O.Core == "Item" || O.Core == "Weapon")
if(O.Slot == 2 && src.Weapons["Left Back"] == null && src.Weapons["Right Back"] == null)
Slot = "Left Back"
else if(O.Slot == 1)
var/list/List = list("Left Waist", "Right Waist", "Left Back", "Right Back")
if(src.Weapons["Left Back"] != null)
List.Remove("Left Back")
if(src.Weapons["Right Back"] != null)
List.Remove("Right Back")
Slot = pick(List)
else
Slot = O.Type
O.Holder = src
O.Equip(Slot)

/* --- Armour --- */
for(var/x=1; x<=7; x++)
if(prob(65))
var/O = pick(typesof(/obj/Armour) - /obj/Armour)
var/obj/Armour/A = new O
if(src.Armour[A.Type] == null)
A.loc = src
A.Holder = src
A.Equip(A.Type)
else
del A


The above procedure is called when a new AI is made. At first, the lines involving the Equipment (Weapons and Armour), were "W.Move(src)" and "A.Move(src)" in place of "W = new O (src)", and "A = new O (src)" respectively, but when I tried fidgeting with it to figure out why they were not appearing in the mob's contents, I switched them to what you see now.

obj/proc/Equip(var/Slot)
if(src.Equippable && Slot && src.Slot > 0)
var/mob/M = src.Holder
if(M.contents.Find(src))
switch(src.Core)

if("Item")
if(!M.Weapons[Slot])
if(src.Equipped)
src.Equipped = 0
src.icon_state = src.Type
M.overlays.Remove(src)
for(var/Spot in M.Weapons)
if(M.Weapons[Spot] == src)
M.Weapons[Spot] = null
else
src.Equipped = 1
src.icon_state = "[src.Type] - [Slot]"
M.overlays.Add(src)
M.Weapons[Slot] = src
else
var/obj/O = M.Weapons[Slot]
O.Equip(Slot)
src.Equip(Slot)

if("Armour")
if(Slot == "Head" && M.Clothing[Slot])
if(M.Mode == "Player")
M.client.sound_system.PlaySound('Notification Error.ogg', null, 0)
M << output("<font color=red>Game System: </font>You cannot have Equipment in both Clothing and \
Armour for your Head Slot. It must be either one or the other."
, "System Output")
return
else
if(!M.Armour[Slot])
if(src.Equipped)
src.Equipped = 0
src.icon_state = ""
M.overlays.Remove(src)
M.Armour[Slot] = null
else
src.Equipped = 1
src.icon_state = Slot
M.overlays.Add(src)
M.Armour[Slot] = src
else
var/obj/O = M.Armour[Slot]
O.Equip(Slot)
src.Equip(Slot)

if("Weapon")
if(!M.Weapons[Slot])
if(src.Equipped)
src.Equipped = 0
src.icon_state = ""
M.overlays.Remove(src)
for(var/Spot in M.Weapons)
if(M.Weapons[Spot] == src)
M.Weapons[Spot] = null
for(var/Spot in M.Hands)
if(M.Hands[Spot] == src)
M.Hands[Spot] = null
else
if(src.Slot == 1)
src.Equipped = 1
src.icon_state = Slot
M.overlays.Add(src)
M.Weapons[Slot] = src
else if(src.Slot == 2)
src.Equipped = 1
src.icon_state = "Full Back"
M.Weapons["Right Back"] = src
M.Weapons["Left Back"] = src
M.overlays.Add(src)
else
var/obj/O = M.Weapons[Slot]
O.Equip(Slot)
src.Equip(Slot)

if("Clothing")
if(Slot == "Head" && M.Armour[Slot])
if(M.Mode == "Player")
M.client.sound_system.PlaySound('Notification Error.ogg', null, 0)
M << output("<font color=red>Game System: </font>You cannot have Equipment in both Clothing and \
Armour for your Head Slot. It must be either one or the other."
, "System Output")
return
else
if(!M.Clothing[Slot])
if(src.Equipped)
src.Equipped = 0
src.icon_state = ""
M.overlays.Remove(src)
M.Clothing[Slot] = null
else
src.Equipped = 1
src.icon_state = Slot
M.overlays.Add(src)
M.Clothing[Slot] = src
else
var/obj/O = M.Clothing[Slot]
O.Equip(Slot)
src.Equip(Slot)


The new Equip() which has undergone very few changes.
The line A=new O(src) should just be changed to A.loc=src, because A already exists; you don't need to re-create it.

So when you look at the contents for this mob you've created, what does it display?

I'm also wondering if your New() proc has any issues in it. I wouldn't call that var loc because it could be confused with src.loc, but as it happens you don't even need it; objs and mobs are automatically moved to the contents of whatever atom is supplied as the first argument, if any.
Well, from how I've used the New(), I've gotten no issues with it. Also, yeah, you're right, I don't need that loc variable. Not 100% sure why it's even there anymore, to be honest.

Prior to your suggestion, I would get nothing in the output for my inventory list (everything else of the output appears as intended).

After the change however, it seems to be a mix of good and bad:

The Good:
The amount of objects within the mob's contents seemed to be correct now. Upon the creation of every new mob, it's given money. The AI being special, also got the hair object within their contents, but I took care of that (src.contents.Remove(H)). It even lists the exact amount of objects within the mob's contents...

The Bad:
Even though it lists the mob's contents perfectly, they're not accurate. The take the name of the mob, and the mob's hair-style as their icon. As such, if I had an AI created named "Bob", I'm seeing 5 items each named "Bob" with a hair icon under the Inventory list; but, I'll see the Equipped Armour and Weapons listed in their own lists with their correct names but no icons (as they have no icons currently).

Note: I had to un-include my interface file as the application I use to capture screenshots was not capturing the information rendered on the "System Output" screen. So, I also made a "InfoNormalView(var/mob/M)" to be used in situations like this which is a duplicate of the "InfoSkinView(var/mob/M)" code, but simply using Dream Seeker's built in output screen.

EDIT: I just realized that the "Equipped Weapons" section might prove a bit confusing. Just know, that in the screenshot provided, it is only 1 object which is just listed twice. However, it still counts correctly, for the mob I had taken the screenshot of has 2 items predefined for it: a Spear (which you is what you should see twice under Equipped Weapons), and a crown (which is one of those hair-icons named "Alize"), so it should still be correct.

Screenshot:
http://puu.sh/itesR/2bbb68e2a2.png
Erh..

*Bump*

Been a few days and I've gotten no further assistance with this matter? Just trying to ensure that I've not been forgotten, is all.
It's kind of hard to say without seeing what you changed. Any time you change your code and have new results, it's a good idea to see the new code.
Fair enough.

The code above has been updated to reflect that. It was literally just adding the one line, src.contents.Remove(H) after applying the hair as an overlay, like I mentioned.
In the previous code I pointed out one issue that if nothing else is clouding things (the creation of a brand new obj when you already have one), and the fact that the argument is named loc is kind of iffy (and you don't need it anyway). Those issues remain unchanged.

To diagnose the problem with the contents list, I recommend in that output loop that you follow each object line with a line outputting the object's \ref and type. That would clarify a little about what's actually in src.contents at the time the inventory is printed.

The new src.contents.Remove(H) line isn't necessary, because it's covering up a much worse issue. When you create H you should not be giving it a loc at all. That's something you're doing with the skin overlay as well. If it's just a temporary obj being used to build an overlay, then when you call new() you should leave out any arguments.

These two lines I'm really not sure about:

        if(src.House)
new src.House (src)

Unrelated, but it appears the way you're removing the equipment overlays is wrong. When you add it it has a specific icon_state, but when you remove it you reset the icon_state to empty first. Remember, you're only adding or removing a copy of its current appearance, so the appearance you're trying to remove from overlays is not the same one you added.

Also I should mention this: Spaces in skin element names are a bad thing. (I eventually plan to prevent that from being possible at all.) Best to stick with the same kinds of characters that are usable in var names: alphanumerics and underscores.
Firstly, my apologies on how I updated that code snippet, it was rushed and I forgot to change the things which I did say I changed.

Secondly, I didn't understand what you were explaining about the overlays, until I double checked the DM Reference just now, and tried to make sense of it all; and now, I think I see the issue you're speaking of, that's been corrected now; that's if I understood you correctly anyway.

Thirdly, the use of skin in your 3rd paragraph completely threw me off guard when used again in your 6th / final paragraph, took me a while, but I think you mean interface elements? If so, then, how is it a problem to use spaces as the names for interface elements when it's double-quoted as a string? I've always assumed that the names are used to find / locate the elements only at compile / runtime, since there's never a complaint of syntax about them, and that worked like a "string compare" type of set up, making the use of spaces absolutely fine. So, what's the harm in it?

Below, you'll find a new update of all the code and a screenshot of the list of inventory items displaying (a much more confusing) output after the changes made:

        obj/proc/Equip(var/Slot)
if(src.Equippable && Slot && src.Slot > 0)
var/mob/M = src.Holder
if(M.contents.Find(src))
switch(src.Core)

if("Item")
if(!M.Weapons[Slot])
if(src.Equipped)
src.Equipped = 0
M.overlays.Remove(src)
src.icon_state = src.Type
for(var/Spot in M.Weapons)
if(M.Weapons[Spot] == src)
M.Weapons[Spot] = null
else
src.Equipped = 1
src.icon_state = "[src.Type] - [Slot]"
M.overlays.Add(src)
M.Weapons[Slot] = src
else
var/obj/O = M.Weapons[Slot]
O.Equip(Slot)
src.Equip(Slot)

if("Armour")
if(Slot == "Head" && M.Clothing[Slot])
if(M.Mode == "Player")
M.client.sound_system.PlaySound('Notification Error.ogg', null, 0)
M << output("<font color=red>Game System: </font>You cannot have Equipment in both Clothing and \
Armour for your Head Slot. It must be either one or the other."
, "System Output")
return
else
if(!M.Armour[Slot])
if(src.Equipped)
src.Equipped = 0
M.overlays.Remove(src)
src.icon_state = ""
M.Armour[Slot] = null
else
src.Equipped = 1
src.icon_state = Slot
M.overlays.Add(src)
M.Armour[Slot] = src
else
var/obj/O = M.Armour[Slot]
O.Equip(Slot)
src.Equip(Slot)

if("Weapon")
if(!M.Weapons[Slot])
if(src.Equipped)
src.Equipped = 0
M.overlays.Remove(src)
src.icon_state = ""
for(var/Spot in M.Weapons)
if(M.Weapons[Spot] == src)
M.Weapons[Spot] = null
for(var/Spot in M.Hands)
if(M.Hands[Spot] == src)
M.Hands[Spot] = null
else
if(src.Slot == 1)
src.Equipped = 1
src.icon_state = Slot
M.overlays.Add(src)
M.Weapons[Slot] = src
else if(src.Slot == 2)
src.Equipped = 1
src.icon_state = "Full Back"
M.Weapons["Right Back"] = src
M.Weapons["Left Back"] = src
M.overlays.Add(src)
else
var/obj/O = M.Weapons[Slot]
O.Equip(Slot)
src.Equip(Slot)

if("Clothing")
if(Slot == "Head" && M.Armour[Slot])
if(M.Mode == "Player")
M.client.sound_system.PlaySound('Notification Error.ogg', null, 0)
M << output("<font color=red>Game System: </font>You cannot have Equipment in both Clothing and \
Armour for your Head Slot. It must be either one or the other."
, "System Output")
return
else
if(!M.Clothing[Slot])
if(src.Equipped)
src.Equipped = 0
src.icon_state = ""
M.overlays.Remove(src)
M.Clothing[Slot] = null
else
src.Equipped = 1
src.icon_state = Slot
M.overlays.Add(src)
M.Clothing[Slot] = src
else
var/obj/O = M.Clothing[Slot]
O.Equip(Slot)
src.Equip(Slot)

mob/AI/New()
src.Miscellaneous["Wander"] = 1

if(src.gender != "male" && src.gender != "female")
if(src.Nation == "Psyren")
if(prob(75))
src.gender = "female"
else
src.gender = "male"
else
src.gender = pick("male", "female")

if(src.Liege == " --- ")
src.Liege = src

if(src.name == src.Job || src.name == src.Class || lowertext(src.name) == src.gender)
src.name = null

while(!src.name)
if(src.gender == "male")
src.name = Male_RNG.Create()
if(lentext(src.name) > 7)
src.name = null
else if(src.gender == "female")
src.name = Female_RNG.Create()
if(lentext(src.name) > 7)
src.name = null

if(src.Nation)
if(src.Nation == "Garoh Mountains")
var/obj/O = new ()
O.name = "Skin Tone"
O.icon = src.icon
O.layer = MOB_LAYER
O.color += "#8A5C2E"
O.icon_state = ""
src.Skin = O
src.Race = "Hrvati"
src.overlays += O

var/Hair = rand(1, 3)
var/obj/H = new ()
switch(Hair)
if(1)
H.name = "Long Hair"
H.icon = 'Long Hair.dmi'
if(2)
H.name = "Short Hair"
H.icon = 'Short Hair.dmi'
if(3)
H.name = "Medium Hair"
H.icon = 'Medium Hair.dmi'
H.icon_state = ""
H.layer = MOB_LAYER + 1
H.color = pick(Hair_Colours)
src.Hair = H
src.overlays += H

//if(src.House)
// new src.House (src)

src.Celerity += round(src.Level / 4)
src.Tenacity += round(src.Level / 4)
src.Vitality += round(src.Level / 4)
src.Dexterity += round(src.Level / 4)

src.Experience += src.Level * rand(500, 1000)

src.Craftsmanship += rand(1,5) * round(src.Level / 16)
src.Marksmanship += rand(1,5) * round(src.Level / 16)
src.Architecture += rand(1,5) * round(src.Level / 16)
src.Environment += rand(1,5) * round(src.Level / 16)
src.Businessman += rand(1,5) * round(src.Level / 16)
src.Leadership += rand(1,5) * round(src.Level / 16)
src.Literature += rand(1,5) * round(src.Level / 16)
src.Seafaring += rand(1,5) * round(src.Level / 16)
src.Character += rand(1,5) * round(src.Level / 16)
src.Physique += rand(1,5) * round(src.Level / 16)
src.Sneaking += rand(1,5) * round(src.Level / 16)
src.Cooking += rand(1,5) * round(src.Level / 16)
src.History += rand(1,5) * round(src.Level / 16)
src.Tactics += rand(1,5) * round(src.Level / 16)
src.Alchemy += rand(1,5) * round(src.Level / 16)
src.Melee += rand(1,5) * round(src.Level / 16)

src.Vitals(50, "Hunger", "Addition")
src.Vitals(src.Max_Health, "Health", "Addition")
src.Vitals(src.Max_Stamina, "Stamina", "Addition")

/* --- Weapons --- */
for(var/obj/O in src.contents)
if(O.Equippable && O.Equipped == 0)
var/Slot
if(O.Core == "Item" || O.Core == "Weapon")
if(O.Slot == 2 && src.Weapons["Left Back"] == null && src.Weapons["Right Back"] == null)
Slot = "Left Back"
else if(O.Slot == 1)
var/list/List = list("Left Waist", "Right Waist", "Left Back", "Right Back")
if(src.Weapons["Left Back"] != null)
List.Remove("Left Back")
if(src.Weapons["Right Back"] != null)
List.Remove("Right Back")
Slot = pick(List)
else
Slot = O.Type
O.Holder = src
O.Equip(Slot)

/* --- Armour --- */
for(var/x=1; x<=7; x++)
if(prob(65))
var/O = pick(typesof(/obj/Armour) - /obj/Armour)
var/obj/Armour/A = new O
if(src.Armour[A.Type] == null)
A.loc = src
A.Holder = src
A.Equip(A.Type)
else
del A

mob/proc/InfoNormalView(var/mob/M)
if(src == M)
src << "CPU: [world.cpu]%"
src << "Key: [M.ckey]"
src << "Admin Level: [M.client.Admin]"
src << "Season: [Season] \nDay [Day] of Year [Year], [Era] | [Hr]:[Mins]"
src << "======================================"
src << "Lighting Ambience: [lighting.ambient]"
src << "======================================"
src << "Macro: [M.Macro]"
src << "Density: [M.density]"
src << "Mob Type: [M.Mode]"
src << "Interaction: [M.Interaction]"
src << "Wander Variable: [M.Miscellaneous["Wander"]]"
src << "Movement Variable: [M.Miscellaneous["Movement"]]"
src << "Commands Variable: [M.Miscellaneous["Commands"]]"
src << "======================================"
src << "Job: [M.Job]\tClass: [M.Class]"
src << "Name: [M.name]\tGender: [M.gender]\tAge: [M.Age]"
src << "Rank: [M.Rank]\t\tLevel: [M.Level]"
src << "Liege Lord: [M.Liege]"
if(M.Keep)
var/atom/Structure/Keep/K = M.Keep
src << "Keep: [K.name]"
else
src << "Keep: None"
src << "======================================"
src << "Health: [M.Cur_Health] / [M.Max_Health]"
src << "Stamina: [M.Cur_Stamina] / [M.Max_Stamina]"
src << "Hunger: [M.Hunger] || [M.Miscellaneous["Hunger"]]"
src << "======================================"
src << "Inventory: [M.contents.len]"
for(var/obj/O in M.contents)
src << "[M] -- [M.type]"
src << "======================================"
src << "Equipped Armour"
if(M.Armour.len > 0)
for(var/Slot in M.Armour)
var/obj/Armour/A = M.Armour[Slot]
src << "[A] on [Slot] | Endurance: [A.Endurance] / [A.Prev_Endurance]"
else
src << "None"
src << "======================================"
src << "Equipped Clothing"
if(M.Clothing.len > 0)
for(var/Slot in M.Clothing)
var/obj/Clothing/C = M.Clothing[Slot]
src << "[C] on [Slot] | Endurance: [C.Endurance] / [C.Prev_Endurance]"
else
src << "None"
src << "======================================"
src << "Equipped Weapons"
if(M.Weapons.len > 0)
for(var/Slot in M.Weapons)
var/obj/Weapon/W = M.Weapons[Slot]
if(W.Equipped == 2)
src << "[W] in [Slot] (Armed)"
else
src << "[W] in [Slot] (Sheathed)"
else
src << "None"
src << "======================================"


Screenshot:
http://puu.sh/iwSf8/0557c772a3.png

Note: Again, the Spear object, though shown twice in the "Equipped Weapons" section, is only 1 object. It's supposed to be shown twice, so don't worry about it. You'll also note I took out 2 lines in the New() for the AI to imply to you also not worry about it as that has nothing to do with the problem.
In response to Yoren
Yoren wrote:
Thirdly, the use of skin in your 3rd paragraph completely threw me off guard when used again in your 6th / final paragraph, took me a while, but I think you mean interface elements? If so, then, how is it a problem to use spaces as the names for interface elements when it's double-quoted as a string? I've always assumed that the names are used to find / locate the elements only at compile / runtime, since there's never a complaint of syntax about them, and that worked like a "string compare" type of set up, making the use of spaces absolutely fine. So, what's the harm in it?

Skin controls weren't really meant to handle characters like spaces; it's an oversight I never got around to correcting. (The webclient forces skins to conform to a better standard, since it needs to use HTML-compatible IDs.) Spaces actually do have meaning in advanced winset commands, and other special characters also have meaning or may be given meaning in the future. So this may work now but it isn't future-proof, and in the future I do plan to prevent controls from being named with non-ID characters.

The new output you put in for the inventory list is incorrect; you're listing M and M.type instead of O and O.type, so it's not providing any useful info. Basically I'd like to know what objs are in the mob's contents, and where they came from. If you can trace where they came from it should clarify what's causing the issue.
Skin controls weren't really meant to handle characters like spaces; it's an oversight I never got around to correcting. (The webclient forces skins to conform to a better standard, since it needs to use HTML-compatible IDs.) Spaces actually do have meaning in advanced winset commands, and other special characters also have meaning or may be given meaning in the future. So this may work now but it isn't future-proof, and in the future I do plan to prevent controls from being named with non-ID characters.

I see... So it's mainly an issue when considering functionalities in the future then. I guess I'll have to go about changing those at some point.

The new output you put in for the inventory list is incorrect; you're listing M and M.type instead of O and O.type, so it's not providing any useful info. Basically I'd like to know what objs are in the mob's contents, and where they came from. If you can trace where they came from it should clarify what's causing the issue.

Whoa... Sorry, that was horribly done on my part myself... It was close to 2 AM and I was sleepy and completely messed that up, it seems, derp. Really sorry about that, mate.

But yeah, it works now without a problem, cheers.
Page: 1 2