Feature - Implemented When detecting new items, detect new outfits, too

Veracity

Developer
Staff member
The item description for one of the new topiary outfit pieces includes the following:

Code:
<tr><td valign=top>Outfit: </td><td valign=top><b><span style='cursor: hand; cursor:pointer;' onClick='javascript:window.open("desc_outfit.php?whichoutfit=112","","height=200,width=300")'>Topiaria</span></b><br>(3 items)</td></tr>
Note that the outfit name is clickable to call up desc_outfit.php?whichoutfit=112 - from which we can deduce the new outfit ID.

It would be nice to output the outfits.txt and modifiers.txt lines for previously unknown outfits.
 

Veracity

Developer
Staff member
The obvious problem is that an outfit has multiple pieces, so you cannot generate the entire outfits.txt line from only one piece. I guess I envision this:

When registering a new item, if it has an outfit:
If the outfit does not exist
-- create the outfit with the single item in it
else
-- add the new item to the existing outfit

In either case, parse the desc_outfit.php and print the outfits.txt and modifiers.txt lines

Edit: and I see that lost detected the same flaw and posted while I was composing this response. :)
 

Veracity

Developer
Staff member
Revision 15146 does this. As a test, I did the following:

test newitem 7985 973760204
test newitem 7986 785194437
test newitem 7987 752785902
test newitem 7988 363871695
test newitem 7989 904629891
test newitem 7990 163516524

Taking just the outfit parts of the output, this is what happened:

Code:
--------------------
113	Synthetic Suit	polytat.gif	polyester parachute
Synthetic Suit	Familiar Weight: +5
--------------------
--------------------
113	Synthetic Suit	polytat.gif	polyester pad, polyester parachute
Synthetic Suit	Familiar Weight: +5
--------------------
--------------------
113	Synthetic Suit	polytat.gif	polyester peeler, polyester pad, polyester parachute
Synthetic Suit	Familiar Weight: +5
--------------------
--------------------
113	Synthetic Suit	polytat.gif	polyester peeler, polyester pad, polyester parachute, polyester pettipants
Synthetic Suit	Familiar Weight: +5
--------------------
--------------------
113	Synthetic Suit	polytat.gif	polyester panama hat, polyester peeler, polyester pad, polyester parachute, polyester pettipants
Synthetic Suit	Familiar Weight: +5
--------------------
--------------------
113	Synthetic Suit	polytat.gif	polyester panama hat, polyester peeler, polyester pad, polyester parachute, polyester pettipants, polyester pulsera
Synthetic Suit	Familiar Weight: +5
--------------------
The outfit pieces are successively added in slot number order.
 
Top