result = NewObjectList()
foreach (obj, GetAllChildObjects(game.pov)) {
if (ContainsVisible(game.pov, obj)) {
list add (result, obj)
}
}
foreach (obj, GetAllChildObjects(Worn Clothing)) {
list add (result, obj)
}
return (result)
// I forgot what the built-in code for the openable/closeable container type (Object Type/Inherited Attribute), is... meh, so just pretend the 'storage' objects are openable/closeable containers... (initially starting as being closed obviously, as that's the point of this design, to NOT clutter up the inventory: you click on them to open them up seeing all their sub-items/objects, as you want to, and click again to hide them, keeping your inventory not cluttered, just like with folder organization), ??? : <inherit name="closed_container" />, <inherit name="openable_conainer" />, <inherit name="container" />
<object name="player">
<object name="storage_object">
<attr name="alias" type="string">storage</attr>
<object name="spell_storage_object">
<object name="fire_spell_storage_object">
</object>
<object name="water_spell_storage_object">
</object>
</object>
<object name="equipment_storage_object">
<object name="weapon_equipment_storage_object">
<object name="sword_weapon_equipment_storage_object"
</object>
<object name="axe_weapon_equipment_storage_object"
</object>
</object>
<object name="armor_equipment_storage_object">
<object name="headwear_armor_equipment_storage_object"
</object>
<object name="footwear_armor_equipment_storage_object"
</object>
</object>
</object>
<object name="item_storage">
<object name="healing/curative">
</object>
<object name="battle">
</object>
<object name="quest">
</object>
</object>
</object>
</object>
// and here's the "pseudo-scripting", *conceptual only*, for my custom 'store' Verb:
if (item.object_type = "spell") {
if (item.spell_type = "fire") {
item.parent = fire_spell_storage_object
} else if (item.spell_type = "water") {
item.parent = water_spell_storage_object
}
} else if (item.object_type = "equipment") {
if (item.equipment_type = "weapon") {
if (item.weapon_type = "sword") {
item.parent = sword_weapon_equipment_storage_object
} else if (item.weapon_type = "axe") {
item.parent = axe_weapon_equipment_storage_object
}
} else if (item.equipment_type = "armor") {
if (item.armor_type = "headwear") {
item.parent = headwear_armor_equipment_storage_object
} else if (item.armor_type = "footwear") {
item.parent = footwear_armor_equipment_storage_object
}
}
} else if (item.object_type = "item") {
if (item.item_type = "healing/curative") {
} else if (item.item_type = "battle") {
} else if (item.item_type = "quest/mission/non-useable/plot-story") {
}
}
Anonynn wrote:Actually, "Worn Clothing" is just an openable/closable object, not a room. I attached an object to the player.object called "Worn Clothing" and had it become a parent to clothing being worn by the player. The "Worn Clothing" object is inside the player inventory. Does that make it better or help any?
Okay, I misunderstood. Is the issue just that the container is closed?
the only reason I could possible see how it might not be removeable... is if you were to have an Object Type that prevents it from being dropped, and applied that to both your 'worn clothing' storage object and your 'shirt' object too, but even then I'm not sure if setting that built-in 'dropable' Boolean to false would prevent direct code of moving the object, such as using the 'parent' Object Attribute or 'MoveObject()' Script, but if the built-in/default 'remove' Verb's internal coding does/would check the Attribute, then it wouldn't thus do the drop. So, I'm confused... which is why I'd like to see your 'remove' Verb's code...
if (not object.parent = player or not GetBoolean(object, "worn") or not GetBoolean(object, "removeable")) {
if (object.removemsg = null) {
msg (DynamicTemplate("RemoveUnsuccessful",object))
}
else {
msg (object.removemsg)
}
}
else {
conflictedItem = null
// check if we are wearing anything over it
if (HasAttribute(object,"wear_slots")) {
foreach (item, ScopeReachableInventory()) {
if (HasAttribute(item,"wear_slots")) {
if (GetBoolean(item, "worn")) {
foreach (itemSlot, item.wear_slots) {
if (ListContains(object.wear_slots,itemSlot)) {
if (object.wear_layer < item.wear_layer) {
conflictedItem = item
}
}
}
}
}
}
}
if (conflictedItem = null) {
if (object.removemsg = null) {
msg (DynamicTemplate("RemoveSuccessful",object))
}
else {
msg (object.removemsg)
}
object.worn = false
object.drop = object.original_drop
object.alias = object.original_alias
object.original_drop = null
object.original_alias = null
object.display = null
// do after
if (HasScript(object, "onafterremove")) {
do (object, "onafterremove")
}
else if (HasString(object, "onafterremove")) {
msg (object.onafterremove)
}
}
else {
msg (DynamicTemplate("RemoveFirst", conflictedItem))
}
}
if (not object.parent = player or not GetBoolean(object, "worn") or not GetBoolean(object, "removeable"))
if (not object.parent.parent = player or not GetBoolean(object, "worn") or not GetBoolean(object, "removeable"))
if (not object.parent.parent = player or not GetBoolean(object, "worn") or not GetBoolean(object, "removeable"))