Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ Programming
➜ General
➜ Help with coding multi-wear locations for SMAUG/SMAUGfuss
|
Help with coding multi-wear locations for SMAUG/SMAUGfuss
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Ntechh
(2 posts) Bio
|
| Date
| Wed 17 Jul 2019 04:52 PM (UTC) |
| Message
| I'm running a customized version of SMAUGfuss, and as you know, it supports layering of clothing, but not clothing covering multiple parts (for example, a shirt that when worn covers neck, chest and arms).
How would I implement such a system, where an item takes up all the wear locations of its wear-flags?
Perhaps the item could be duplicated and put in each slot (as placeholders)? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Wed 17 Jul 2019 09:42 PM (UTC) |
| Message
| | Or you could have a check that, if you have a multi-part shirt, then you can't equip neck or arms items. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Ntechh
(2 posts) Bio
|
| Date
| Reply #2 on Thu 18 Jul 2019 02:50 PM (UTC) |
| Message
| Yep. So what I decided to go with was to create a new item-type flag, ITEM_CLONE, which, if enabled, would mean that an item is simply a placeholder.
So I modified the wear code to create a duplicate of an item for each wear flag it has, to add the ITEM_CLONE item-type flag, and to put it on. I also modified the remove code to serach for all gear currently equipped and delete each one that matchces the keyword, if it has the flag ITEM_CLONE.
This would prevent the stacking of bonuses, and seems to be the simplest solution. | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,867 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top