Gwyrdain / apprentices-workshop

Creative Commons Zero v1.0 Universal
5 stars 2 forks source link

Object Wear Slot reverts to null when you edit an item #144

Closed Cordir closed 8 years ago

Cordir commented 8 years ago

When I go into edit mode on an already existing item, the worn slot is reverting to a null field, rather than retaining what's there already.

lpkirby commented 8 years ago

I can't reproduce this. Does this happen on every item? When you say it's a null field what's the selected value in the select box? I'm not seeing a null value. Maybe I'm looking at something else or not understanding the issue.

Gwyrdain commented 8 years ago

When was the obj made? There were some updates earlier this year regarding wear location auto-assignments and validations (I think).

If you set it then come back does it revert again?

Cordir commented 8 years ago

It happens on object type Treasure. It defaults back to not worn/light. All of my books in the library are type Treasure per the Area Coordinator's recommendation, and I want them to be holdable. But any time I edit, it's reverting to the Not Worn selection.

PRE EDIT: image

CLICK EDIT: image

lpkirby commented 8 years ago

Thanks, I was able to reproduce that. I'll take a look.

lpkirby commented 8 years ago

The reason this was happening is there was some javascript enforcing a wear location of "not worn" if the object type was: treasure, boat, trash, furniture, decoration, or key.

If you select any of those object types, the javascript would change the location to not worn automatically. It would also do this on page load. However, it would let you change the wear location after the check.

I removed treasure, trash, and key from the list. I had taken out boat as well, but I decided to put it back. There is a boat in game that can be worn on finger so we may want to remove the restriction on the boat as well.

In the long term we'll probably want to either remove the wear slot checks all together, or disable the ones that cannot be selected. If you change change the wear slot later like this, it's allowed to save, and the javascript puts it back it causes some confusion.

Gwyrdain commented 8 years ago

So, I only took your first commit (so that boat is not forced to wear: NONE) and added a back check in area review to warn that special AC permission is needed for weird wearable boats (like floaties!).

Additional area review checks are still needed per #19.