You can usually work there things out by looking at the source.
Quote:
"Use the Source, Luke!"
Even if you are not an expert in reading C, you can usually get the gist by browsing the source code.
Most of the operations in SMAUG are in the source preceded by the word "do_", therefore I looked for a function called "do_cook".
Inside do_cook (in skills.c) I found what looked relevant, namely:
if ( food->item_type != ITEM_COOK )
{
send_to_char("How can you cook that?\n\r", ch );
return;
}
It seems you need to cook things which are marked as item type "ITEM_COOK".
Now to get cooking to work I need to create such an item, so I used the Area Editor, but couldn't find a "cook" item type. OK, time to open the editor configuration file, and compare the item types to the ones listed in the SMAUG mud.h file...
/*
* Item types.
* Used in #OBJECTS.
*/
typedef enum
{
ITEM_NONE, ITEM_LIGHT, ITEM_SCROLL, ITEM_WAND, ITEM_STAFF, ITEM_WEAPON,
ITEM_FIREWEAPON, ITEM_MISSILE, ITEM_TREASURE, ITEM_ARMOR, ITEM_POTION,
ITEM_WORN, ITEM_FURNITURE, ITEM_TRASH, ITEM_OLDTRAP, ITEM_CONTAINER,
ITEM_NOTE, ITEM_DRINK_CON, ITEM_KEY, ITEM_FOOD, ITEM_MONEY, ITEM_PEN,
ITEM_BOAT, ITEM_CORPSE_NPC, ITEM_CORPSE_PC, ITEM_FOUNTAIN, ITEM_PILL,
ITEM_BLOOD, ITEM_BLOODSTAIN, ITEM_SCRAPS, ITEM_PIPE, ITEM_HERB_CON,
ITEM_HERB, ITEM_INCENSE, ITEM_FIRE, ITEM_BOOK, ITEM_SWITCH, ITEM_LEVER,
ITEM_PULLCHAIN, ITEM_BUTTON, ITEM_DIAL, ITEM_RUNE, ITEM_RUNEPOUCH,
ITEM_MATCH, ITEM_TRAP, ITEM_MAP, ITEM_PORTAL, ITEM_PAPER,
ITEM_TINDER, ITEM_LOCKPICK, ITEM_SPIKE, ITEM_DISEASE, ITEM_OIL, ITEM_FUEL,
ITEM_EMPTY1, ITEM_EMPTY2, ITEM_MISSILE_WEAPON, ITEM_PROJECTILE, ITEM_QUIVER,
ITEM_SHOVEL, ITEM_SALVE, ITEM_COOK, ITEM_KEYRING, ITEM_ODOR
} item_types;
Now, looking at the relevant section in the area editor configuration file:
#ITEM
(none)
Light
Scroll
Wand
Staff
Weapon
Fireweapon
Missile
Treasure
Armor
Potion
Worn
Furniture
Trash
Oldtrap
Container
Note
Drinkcon
Key
Food
Money
Pen
Boat
Corpse
Corpse_pc
Fountain
Pill
Blood
Bloodstain
Scraps
Pipe
Herbcon
Herb
Incense
Fire
Book
Switch
Lever
Pullchain
Button
Dial
Rune
Runepouch
Match
Trap
Map
Portal
Paper
Tinder
Lockpick
Spike
Disease
Oil
Fuel
Shortbow
Longbow
Crossbow
Projectile
Quiver
Shovel
Salve
End
My item type list ended at "Salve", but I could see from the mud.h file that there were three new ones, cook, keyring, and odor. Thus, they needed to be added to the end of the list, between the word "Salve" and "End".
After reprocessing the configuration file in the area editor (by opening the preferences screen and then clicking OK) I was able to create a piece of meat of type "cook".
I put that into an area, along with a fire of type "fire", and restarted SMAUG.
Now I was able to cook something, but got this message:
A piece of steak catches on fire burning it to a crisp!
It seems my skill level wasn't high enough.
By giving myself the "cook" skill, like this:
sset self cook 100
I was able to cook the meat...
You roast a piece of steak.
|