generic workbench #147

Parent #54Owner #29Flags read, fertileSource hellcore/hellcore.db

Aliases: generic workbench

25 verbs · 92 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
do_putthis none thisrxd#14712
acceptablethis none thisrxd#1471
do_getthis none thisrxd#14713
tell_contents_oldthis none thisrxd#14724
look_selfthis none thisrxd#1477
make_oldany with/using thisrxd#14710
is_accepted_recipethis none thisrxd#14714
feasible_recipesthis none thisrxd#1477
is_feasiblethis none thisrxd#1476
accepted_productsthis none thisrxd#14710
do_makethis none thisrxd#14785
skill_checkthis none thisrxd#14711
skill_check_failedthis none thisrxd#14719
match_recipethis none thisrxd#14722
weightthis none thisrxd#1475
is_feasible_oldthis none thisrxd#14721
make_productthis none thisrxd#14715
add_bloodthis none thisrxd#14716
listthis none nonerxd#1472
make cook build ass*emble make1any on top of/on/onto/upon thisrxd#14737
make make2any none nonerxd#1479
tell_recipesthis none thisrxd#14729
all_recipesthis none thisrxd#14713
readany any thisrxd#14718
_bolt _unboltthis none thisrxd#1472

Properties

PropertyDefinerFlagsOwnerValue
put_to_msg#147rc#29"You put %id on %dt."
oput_to_msg#147rc#29"%N puts %id on %p %t."
_old_get_from_msg#147rc#29"You get %id from %t."
oget_from_msg#147rc#29"%N gets %id from %t."
oget_from_failed_msg#147rc#29"%N tries to get %id from %p %t, but can't."
get_from_failed_msg#147rc#29"You try to get %id from %dt, but can't."
put_to_failed_msg#147rc#29"You try to put %id on %dt, but can't."
oput_to_failed_msg#147rc#29"%N tries to put %id on %p %t, but can't."
recipe_type#147rc#29#-1
make_failed_msg#147rc#29"You can't make that on %dt."
omake_msg#147rc#29"%DN looks up from %dt, smiling."
make_msg#147rc#29"You make %id with %dt."
start_make_msg#147rc#29"You start making %id on %dt."
ostart_make_msg#147rc#29"%DN bends over %dt and gets to work."
make_botched_msg#147rc#29"You botched the project."
omake_botched_msg#147rc#29"%DN looks up from %dt, frowning."
help_msg#147rc#29
list of 9{"Makes end-products out of component parts based on a $recipe. Put all components and the $recipe on the $workbench and do:", "", "\tmake <item> with <workbech>", "", "SEE ALSO: $recipe", "", "PROPERTIES", "$workbench.recipe_type => OBJ type", "\t- Accept only recipes of this kind (children of this OBJ)"}
cant_make_msg#147rc#29"You can't make that using the materials on the %dt."
make_fuckup_msg#147rc#29"Dammit! You burned yourself."
omake_fuckup_msg#147rc#29"%DN yelps and yanks %p hand back from %dt, rubbing it in pain."
damage_type#147rc#29#-1
damage_mod#147rc#290
bolted#147rc#290
quality#147rc#290
is_skate_ok#147rc#291
can_mix_drugs#147rc#290
craft_announce#147rc#291
bolted_by#147rc#29#-1
boltable_in_public#147rc#291
boltable_duplicate#147rc#29#-1
capacity#54rc#2950000
weight_reduction#54rc#29<clear>
opaque#54rc#29<clear>
dark#54rc#29<clear>
close_msg#54rc#29<clear>
open_msg#54rc#29<clear>
remove_msg#54rc#29<clear>
put_msg#54rc#29<clear>
empty_msg#54rc#29<clear>
contents_msg#54rc#29<clear>
open_fail_msg#54rc#29<clear>
put_fail_msg#54rc#29<clear>
closed_msg#54rc#29<clear>
closable#54rc#291
open#54rwc#291
get_from_msg#54rc#29<clear>
max_objects#54rc#29200
spill_on_break#54rc#29<clear>
peek_msg#54rc#29<clear>
clean_start_msg#54rc#29<clear>
oclean_start_msg#54rc#29<clear>
clean_finish_msg#54rc#29<clear>
oclean_finish_msg#54rc#29<clear>
break_msg#255rc#29<clear>
repair_difficulty#255rc#29<clear>
junk_on_break#255rc#29<clear>
rename_on_break#255rc#29<clear>
smashable#255rc#29<clear>
repairable#255rc#29<clear>
armor#255rc#29<clear>
held_break_msg#255rc#29<clear>
oheld_break_msg#255rc#29<clear>
handed#5rc#29<clear>
wield_msg#5rc#29<clear>
unwield_msg#5rc#29<clear>
size#5rc#29<clear>
look_place_msg#5rc#29"There is %it set up here."
value#5rc#29<clear>
get_msg#5rc#29""
drop_msg#5rc#29<clear>
get_fail_msg#5rc#29<clear>
junk_ok#5rc#29<clear>
floats#5rc#29<clear>
long_name_msg#5rc#29<clear>
article#5rc#29<clear>
setup_list#5rc#29<clear>
health#5rc#29<clear>
health_max#5rc#29<clear>
min_skill#5rc#29<clear>
skill#5rc#29<clear>
recipe_for#5rc#29<clear>
carried_msg#5rc#29<clear>
aliases#1rc#29{"generic workbench"}
description#1rc#29<clear>
object_size#1r#29{21967, 1298433826}
hidden_verbs#1rc#29
list of 14{"hold", "stow", "@setup", "throw", "give", "junk", "appraise", "stash", "feed", "breakdown", "open", "close", "clean", "make_old"}
phelp_msg#1rc#29
list of 12{"This is a type of workbench -- a crafting station for making new things out of old things. Crafting mostly uses craft skill (though other skills may be required -- consult your recipe!) and can not only get you some items unobtainable anywhere else, but also earns you XP.", "", "How to use:", "", "(1) Find a recipe (or turn a recipe book to a recipe page).", "(2) Gather up all the ingredients called for in the recipe.", "(3) Put the ingredients AND the recipe (or recipe book) into the workbench.", "(4) 'make workbench'.", "", "If all goes well (and you have sufficient skill) you'll make a new item, using up the ingredients. The new item will be found in the workbench. If all doesn't go well, you not only won't make an item, you might lose one or more of the ingredients.", "", "For mass-crafting, you can load up the workbench with a lot of each ingredient, then repeat the 'make' command several times. You can also put several recipes on the workbench, and differentiate between them with 'make <recipe> on workbench'."}
weight#1rc#2915000
owner_verbs#1rc#29<clear>
plural_name#1rc#29<clear>
client_image#1rc#29<clear>
listening#1rc#29<clear>

Ancestry

Ancestors (nearest first): #54 generic container#255 generic smashable thing#5 generic thing#1 root

Children: none

Call graph

calls n147_0 #147:do_put n20_34 #20:pronoun_sub n147_0->n20_34 n147_2 #147:do_get n147_2->n20_34 n147_3 #147:tell_contents_old n1_23 #1:contents n147_3->n1_23 n20_83 #20:message_db n147_3->n20_83 n20_80 #20:aggregate_number n147_3->n20_80 n107_43 #107:tell n147_3->n107_43 n20_6 #20:english_list n147_3->n20_6 n1_31 #1:dname n147_3->n1_31 n147_4 #147:look_self n147_4->n107_43 n54_7 #54:description n147_4->n54_7 n1_11 #1:tell_lines n147_4->n1_11 n54_16 #54:tell_contents n147_4->n54_16 n147_5 #147:make_old n147_5->n20_34 n147_5->n107_43 n1_39 #1:dnamec n147_5->n1_39 n92_2 #92:queue_action n147_5->n92_2 n147_13 #147:match_recipe n147_5->n147_13 n147_13->n107_43 n147_7 #147:feasible_recipes n147_8 #147:is_feasible n147_7->n147_8 n147_6 #147:is_accepted_recipe n147_8->n147_6 n147_9 #147:accepted_products n147_9->n147_6 n1_42 #1:occupants n147_9->n1_42 n147_10 #147:do_make n147_10->n20_34 n147_10->n147_8 n147_11 #147:skill_check n147_10->n147_11 n147_17 #147:add_blood n147_10->n147_17 n147_16 #147:make_product n147_10->n147_16 n17_2 #17:set_owner n147_10->n17_2 n20_79 #20:plural n147_10->n20_79 n147_12 #147:skill_check_failed n147_10->n147_12 n103_1 #103:spawn n147_16->n103_1 n147_12->n20_34 n147_12->n107_43 n6_61 #6:take_damage n147_12->n6_61 n47_25 #47:randomly_permute n147_12->n47_25 n103_2 #103:junk n147_12->n103_2 n6_86 #6:gain_stress n147_12->n6_86 n147_14 #147:weight n54_0 #54:weight n147_14->n54_0 n147_15 #147:is_feasible_old n45_5 #45:isa n147_15->n45_5 n147_18 #147:list n147_21 #147:tell_recipes n147_18->n147_21 n147_21->n107_43 n147_21->n147_8 n147_21->n147_6 n147_22 #147:all_recipes n147_21->n147_22 n48_8 #48:suspend_if_needed n147_21->n48_8 n147_19 #147:make n147_19->n107_43 n147_19->n1_31 n147_19->n92_2 n147_19->n147_6 n147_19->n147_22 n5_9 #5:iname n147_19->n5_9 n147_22->n1_23 n147_20 #147:make n147_20->n107_43 n147_20->n1_31 n147_20->n147_8 n147_20->n147_6 n147_20->n147_19 n147_20->n147_22 n147_23 #147:read n147_23->n107_43 n147_23->n1_31 n147_23->n147_22

Source

do_put

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

none

Source

1{who, what} = args;
2if (who:cant_take(what))
3who:tell($su:ps(this.put_to_failed_msg, who, this, who.location, what, this));
4return;
5endif
6what:moveto(this);
7if (what.location == this)
8who:tell($su:ps(this.put_to_msg, who, this, who.location, what, this));
9who.location:announce_all_but({who}, $su:ps(this.oput_to_msg, who, this, who.location, what, this));
10else
11who:tell($su:ps(this.put_to_failed_msg, who, this, who.location, what, this));
12endif

acceptable

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

none

Source

1return 1;

do_get

Spec this none thisFlags rxdOwner #361Definer #147

Referenced by

none

Source

1{who, what} = args;
2if (who:cant_take(what))
3who:tell($su:ps(this.get_from_failed_msg, who, this, who.location, what, this));
4return;
5endif
6what:moveto(who);
7if (what.location == who)
8who:tell($su:ps(this.get_from_msg, who, this, who.location, what, this));
9who.location:announce_all_but({who}, $su:ps(this.oget_from_msg, who, this, who.location, what, this));
10else
11who:tell($su:ps(this.get_from_failed_msg, who, this, who.location, what, this));
12who.location:announce_all_but({who}, $su:ps(this.oget_from_failed_msg, who, this, who.location, what, this));
13endif

tell_contents_old

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

none

Source

1msg_db = {};
2names = {};
3if (args)
4things = args[1];
5else
6things = this:contents();
7endif
8for x in (things)
9if (is_a(x, $exit))
10things = setremove(things, x);
11endif
12endfor
13if (things)
14msg_db = $su:message_db(things, "iname");
15for x in (msg_db)
16if (length(x[1]) > 1)
17name = ($string_utils:aggregate_number(length(x[1])) + " ") + x[1][1]:pname();
18else
19name = x[2];
20endif
21names = {@names, name};
22endfor
23player:tell("You see ", $su:english_list(names), " on ", this:dname(), ".");
24endif

look_self

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

none

Source

1desc = this:description();
2if (desc)
3player:tell_lines(desc);
4else
5player:tell("You see nothing special.");
6endif
7this:tell_contents();

make_old

Spec any with/using thisFlags rxdOwner #29Definer #147

Referenced by

none

Source

1product = this:match_product(dobjstr);
2if (length(this.contents) >= this.max_objects)
3player:tell(this:dnamec(), " is full, and you don't have room to make anything else on it.");
4return;
5endif
6if (!valid(product))
7player:tell($su:ps(this.make_failed_msg, player, this, this.location));
8else
9player:queue_action($actions.assemble, {this:match_recipe(dobjstr), player, this}, 1, ("assemble" + " ") + product.name);
10endif

is_accepted_recipe

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

Source

1{object} = args;
2if (is_a(object, $recipe) && is_a(this, object.needs_bench))
3return 1;
4endif
5recipes = this.recipe_type;
6if (typeof(recipes) != LIST)
7recipes = {recipes};
8endif
9for x in (recipes)
10if (is_a(object, x))
11return 1;
12endif
13endfor
14return 0;

feasible_recipes

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

none

Source

1recipes = {};
2for recipe in (this:accepted_recipes())
3if (this:is_feasible(recipe))
4recipes = {@recipes, recipe};
5endif
6endfor
7return recipes;

is_feasible

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

Source

1{recipe} = args;
2if (this:is_accepted_recipe(recipe))
3if (ingredients = recipe:find_ingredients(this))
4return ingredients;
5endif
6endif

accepted_products

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

none

Source

1items = {};
2for item in ({@this:occupants($recipe), @this:occupants(#39999)})
3if (this:is_accepted_recipe(item))
4items = {@items, item.makes};
5endif
6if ((this:is_accepted_cookbook_page(item) && (length(item.pages) >= item.current_page)) && (item.current_page > 0))
7items = {@items, item.pages[item.current_page].makes};
8endif
9endfor
10return items;

do_make

Spec this none thisFlags rxdOwner #361Definer #147

Referenced by

none

Source

1{recipe, who} = args;
2if (requires = this:is_feasible(recipe))
3check = this:skill_check(who, recipe);
4if (check >= 0)
5blood = {};
6product = recipe.makes;
7containers = {};
8ingparents = {product};
9for x in (recipe.ingredients)
10ingparents = {@ingparents, x[1]};
11endfor
12for each in (requires)
13if (is_a(each, $liquid))
14liquid_amount = 0;
15for xx in (recipe.ingredients)
16if (is_a(each, xx[1]))
17liquid_amount = xx[2];
18endif
19endfor
20each:reduce_by(liquid_amount);
21containers = setadd(containers, each.location);
22else
23if (is_a(each, $food) && each.blood)
24blood = `this:add_blood(blood, each.blood) ! ANY => blood';
25endif
26each:moveto($tomb);
27endif
28endfor
29diff = -2;
30if (this.can_mix_drugs && has_property(product, "blood"))
31for x in (this.contents)
32if (((!(x in requires)) && (!(x in containers))) && `xb = x:cooked_blood() ! ANY')
33is_ing = 0;
34for y in (ingparents)
35if (is_a(x, y))
36is_ing = 1;
37endif
38endfor
39if (!is_ing)
40who:aat(who:dnamec(), " mixes ", x:iname(), " into the recipe.");
41if ((check = $skills.chemistry:check(who, diff)) > 0)
42blood = `this:add_blood(blood, xb) ! ANY => {}';
43elseif (check < -3)
44who:tell(x:dnamec(), " fizzles, then dissipates through the mixture...ruining it all.");
45who:aat(who:dnamec(), " curses loudly.");
46x:moveto($tomb);
47return E_NONE;
48else
49who:tell(x:dnamec(), " dissolves uselessly. You fucked it up!  Oh well.");
50endif
51diff = diff - 3;
52x:moveto($tomb);
53endif
54endif
55endfor
56endif
57models = {};
58for i in [1..recipe.makes_count]
59model = this:make_product(product, check, who, requires);
60`blood = model:blood_adjustment(blood) ! E_VERBNF';
61`model.blood = blood ! ANY';
62if (recipe.player_owned)
63$wiz_utils:set_owner(model, who);
64endif
65`model = recipe:on_make(who, model, requires) ! E_VERBNF';
66models = {@models, model};
67endfor
68xp = recipe:xp_value(who);
69if (xp > 0)
70who:award_xp(xp);
71endif
72m = this.make_msg;
73om = this.omake_msg;
74m = (recipe.makes_count > 1) ? strsub(m, "%id", tostr(recipe.makes_count, " ", $su:plural(model:name()))) | m;
75om = (recipe.makes_count > 1) ? strsub(om, "%id", tostr(recipe.makes_count, " ", $su:plural(model:name()))) | om;
76who:tell($su:ps(m, who, this, this.location, model, this));
77who.location:announce_all_but({who}, $su:ps(om, who, this, who.location, model, this));
78return models;
79else
80this:skill_check_failed(check, recipe, requires);
81who:tell($su:ps(this.make_botched_msg, who, this, this.location, recipe, this));
82who.location:announce_all_but({who}, $su:ps(this.omake_botched_msg, who, this, who.location, recipe, this));
83return 0;
84endif
85endif

skill_check

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

Source

1{player, recipe} = args;
2check = 0;
3for skillspec in (recipe.skill_required)
4{skill, difficulty} = skillspec;
5skill = (typeof(skill) == OBJ) ? skill | $skills.(skill);
6check = skill:check(player, difficulty + this.quality);
7if (check < 0)
8return check;
9endif
10endfor
11return check;

skill_check_failed

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

Source

1{score, recipe, requires} = args;
2score = abs(score);
3if ((score >= 5) && (this.damage_type != #-1))
4ouch = (score + this.damage_mod) - 4;
5ouch = max(1, ouch);
6player:take_damage(this.damage_type, ouch, #3547);
7player:tell($su:pronoun_sub(this.make_fuckup_msg));
8player.location:announce($su:pronoun_sub(this.omake_fuckup_msg));
9endif
10score_percentage = (score * 100) / 20;
11parts = length(requires);
12i = parts / max(100 / max(1, score_percentage), 1);
13if (i > 0)
14player:tell("You lost ", tostr(i), " of your parts.");
15for each in ($lu:randomly_permute(requires)[1..i])
16$rpg:junk(each);
17player:gain_stress(15);
18endfor
19endif

match_recipe

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

Source

1{matchstring} = args;
2if (!matchstring)
3if (length(r = this:accepted_recipes()) == 1)
4return r[1];
5endif
6endif
7if (typeof(matchstring) == OBJ)
8item = matchstring;
9else
10item = this:match_product(matchstring);
11endif
12if (item == #-2)
13"ambiguous";
14player:tell("You need to be more specific -- I don't know what you mean by '", matchstring, "'. Also make sure you only have one book on your workbench at a time.");
15return #-2;
16endif
17for each in (this:accepted_recipes())
18if (each.makes == item)
19return each;
20endif
21endfor
22return #-1;

weight

Spec this none thisFlags rxdOwner #361Definer #147

Referenced by

none

Source

1if (this.bolted)
2return -1;
3else
4return pass(@args);
5endif

is_feasible_old

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

none

Source

1"Copied from generic workbench (#5144):is_feasible by Hasu (#4622) Fri Oct  5 02:07:45 2007 CDT";
2{recipe} = args;
3ingredients = recipe.ingredients;
4requires = {};
5for item in (this.contents)
6for i in [1..length(ingredients)]
7{ingredient, quantity} = ingredients[i];
8if ($ou:isa(item, ingredient) && (ingredients[i][2] > 0))
9ingredients[i] = {ingredient, quantity - 1};
10requires = {@requires, item};
11break;
12endif
13endfor
14endfor
15for each in (ingredients)
16{ingredient, quantity} = each;
17if (quantity > 0)
18return 0;
19endif
20endfor
21return requires;

make_product

Spec this none thisFlags rxdOwner #361Definer #147

Referenced by

Source

1product = args[1];
2check = args[2];
3maker = (length(args) > 2) ? args[3] | #-1;
4ingredients = (length(args) > 3) ? args[4] | {};
5model = $rpg:spawn(product);
6`model = model:on_craft(maker, check, ingredients) ! E_VERBNF';
7"if (this.craft_announce)";
8"  $nets.craftnet:_announce(#-1, ((((maker:dnamec() + \" says, \\\"Made \") + model:iname()) + \" on \") + this:iname()) + \"!\\\"\", 1);";
9"endif";
10if (((model.weight == -1) || (model.weight > 50000)) && (!is_a(model, #105855)))
11model:moveto(this.location);
12else
13model:moveto(this);
14endif
15return model;

add_blood

Spec this none thisFlags rxdOwner #29Definer #147

Referenced by

Source

1{old, new} = args;
2blood = old;
3for newdrugspec in (new)
4yield;
5{newdrug, newtime, newdose} = newdrugspec;
6for i in [1..length(blood)]
7{drug, time, dose} = blood[i];
8if (drug == newdrug)
9blood[i][3] = dose + newdose;
10continue newdrugspec;
11endif
12endfor
13"must add it";
14blood = {@blood, newdrugspec};
15endfor
16return blood;

list

Spec this none noneFlags rxdOwner #361Definer #147

Referenced by

none

Source

1"List all recipes in the workbench, and show whether they can be made.";
2this:tell_recipes();

make cook build ass*emble make1

Spec any on top of/on/onto/upon thisFlags rxdOwner #361Definer #147

Referenced by

Source

1"Assemble a recipe indicated by number.";
2r = this:all_recipes();
3if (!r)
4player:tell("There aren't any recipes in ", this:dname(), ".  You'll have to put one in.");
5return;
6endif
7NUM = tonum(dobjstr);
8if (NUM < 1)
9player:tell("You need to give a number.  Try 'make 1 on ", this.name, "'.");
10return;
11elseif (NUM > length(r))
12player:tell("There are only ", length(r), " recipes in ", this:dname(), ".");
13return;
14endif
15recipe = r[NUM];
16if (!this:is_accepted_recipe(recipe))
17player:tell(recipe:dname(), " can't be assembled on ", this:iname(), ".");
18return;
19endif
20if (valid(recipe.needs_bench) && (!is_a(this, recipe.needs_bench)))
21player:tell("You realize you can't make ", recipe.makes:iname(), " on ", this:iname(), " -- you'd need ", recipe.needs_bench:iname(), ".");
22return;
23endif
24if (is_a(this, recipe.needs_bench))
25"";
26else
27if (!is_a(recipe, this.recipe_type))
28player:tell(recipe:dnamec(), " cannot be used on ", this:dname(), ".");
29return;
30endif
31endif
32ing = recipe:find_ingredients(this);
33if (typeof(ing) == OBJ)
34player:tell("According to ", recipe:dname(), ", you need ", ing:iname(), " -- and you don't have one on ", this:dname(), ".");
35return;
36endif
37player:queue_action($actions.craft, {recipe, player, this}, 1, "assemble");

make make2

Spec any none noneFlags rxdOwner #361Definer #147

Referenced by

none

Source

1"Make the first available feasible recipe.";
2i = 1;
3for x in (this:all_recipes())
4if (this:is_accepted_recipe(x) && this:is_feasible(x))
5return this:make1(dobjstr = tostr(i));
6endif
7i = i + 1;
8endfor
9player:tell("There's no recipe in ", this:dname(), " that can be made with the ingredients inside.");

tell_recipes

Spec this none thisFlags rxdOwner #361Definer #147

Referenced by

Source

1i = 1;
2player:tell("Available recipes:");
3for x in (this:all_recipes())
4print = 1;
5accepted = this:is_accepted_recipe(x);
6if (accepted)
7feasible = this:is_feasible(x);
8else
9feasible = 0;
10endif
11bold = "";
12if (feasible)
13check = (($ansi.green + $ansi.bold_on) + "*") + $ansi.reset;
14bold = $ansi.bold_on;
15elseif (accepted)
16check = (($ansi.yellow + $ansi.bold_on) + "x") + $ansi.reset;
17else
18print = 0;
19endif
20if (print)
21player:tell("  ", $ansi.bold_on, "[", check, $ansi.bold_on, "] ", $ansi.reset, bold, i, ". ", x.name, $ansi.reset);
22endif
23i = i + 1;
24$cu:sin();
25endfor
26if (i > 1)
27player:tell("To assemble a recipe: ", $ansi.bold_on, "make <number> on ", this.name, $ansi.reset, ".");
28player:tell("To read a recipe: ", $ansi.bold_on, "read <number> in ", this.name, $ansi.reset, ".");
29endif

all_recipes

Spec this none thisFlags rxdOwner #361Definer #147

Referenced by

Source

1r = {};
2for x in (this:contents())
3if (is_a(x, $recipe))
4r = {@r, x};
5elseif (is_a(x, $cookbook))
6for y in (x.pages)
7if (is_a(y, $recipe))
8r = {@r, y};
9endif
10endfor
11endif
12endfor
13return r;

read

Spec any any thisFlags rxdOwner #361Definer #147

Referenced by

none

Source

1"Read a recipe in the workbench by number.";
2r = this:all_recipes();
3if (!r)
4player:tell("There aren't any recipes in ", this:dname(), ".  You'll have to put one in.");
5return;
6endif
7n = toint(dobjstr);
8if (n < 1)
9player:tell("You need to give a number.  Try 'read 1 in ", this.name, "'.");
10return;
11elseif (n > length(r))
12player:tell("There are only ", length(r), " recipes in ", this:dname(), ".");
13return;
14endif
15recipe = r[n];
16player:tell("You peer into ", this:dname(), " to read ", recipe:dname(), ".");
17suspend(1);
18recipe:look_self();

_bolt _unbolt

Spec this none thisFlags rxdOwner #361Definer #147

Referenced by

none

Source

1"Automatically generated for the boltable API.";
2return $api.boltable.implementation:(verb)(this, @args);