Generic Feature Object #68

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

Aliases: Generic Feature Object, Generic .Features_Huh Object, Feature Object, .Features_Huh Object

9 verbs · 34 properties · 11 children

Verbs

VerbSpecFlagsDefinerLines
help_msgthis none thisrxd#6820
using thisthis none thisrxd#6818
examine_commands_okthis none thisrxd#681
set_feature_okthis none thisrxd#685
hidden_verbsthis none thisrxd#6811
set_feature_verbsthis none thisrxd#685
initializethis none thisrxd#686
init_for_corethis none thisrxd#687
feature_removethis none thisrxd#681

Properties

PropertyDefinerFlagsOwnerValue
warehouse#68r#29#77
help_msg#68rc#29"The Generic Feature Object--not to be used as a feature object."
feature_verbs#68r#29{"Using"}
feature_ok#68r#291
handed#5rc#29<clear>
wield_msg#5rc#29<clear>
unwield_msg#5rc#29<clear>
size#5rc#29<clear>
look_place_msg#5rc#29<clear>
value#5rc#29<clear>
get_msg#5rc#29<clear>
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 Feature Object", "Generic .Features_Huh Object", "Feature Object", ".Features_Huh Object"}
description#1rc#29"This is the Generic Feature Object. It is not meant to be used as a feature object itself, but is handy for making new feature objects."
object_size#1r#29{6379, 1298433815}
hidden_verbs#1rc#29<clear>
phelp_msg#1rc#29<clear>
weight#1rc#29<clear>
owner_verbs#1rc#29<clear>
plural_name#1rc#29<clear>
client_image#1rc#29<clear>
listening#1rc#29<clear>

Ancestry

Ancestors (nearest first): #5 generic thing#1 root

Children: #84 Pasting Feature, #113 Useful Utilities for Programmers, #118 Generic Broadcast Object, #149 Social Feature with Event Broadcasting, #167 generic corp, #261 Memory, #284 generic programmer extension, #310 Posing Feature, #317 GameCheck FO, #318 who commands, #327 net commands

Call graph

calls n68_0 #68:help_msg n45_2 #45:has_verb n68_0->n45_2 n51_11 #51:verb_documentation n68_0->n51_11 n20_6 #20:english_list n68_0->n20_6 n68_3 #68:set_feature_ok n42_0 #42:controls n68_3->n42_0 n68_4 #68:hidden_verbs n1_26 #1:hidden_verbs n68_4->n1_26 n68_5 #68:set_feature_verbs n68_5->n42_0 n68_6 #68:initialize n68_6->n42_0 n1_0 #1:initialize n68_6->n1_0 n68_7 #68:init_for_core n1_22 #1:init_for_core n68_7->n1_22

Source

help_msg

Spec this none thisFlags rxdOwner #29Definer #68

Referenced by

Source

1all_help = this.help_msg;
2if (typeof(all_help) == STR)
3all_help = {all_help};
4endif
5helpless = {};
6for vrb in (this.feature_verbs)
7if (loc = $object_utils:has_verb(this, vrb))
8loc = loc[1];
9help = $code_utils:verb_documentation(loc, vrb);
10if (help)
11all_help = {@all_help, "", tostr(loc, ":", verb_info(loc, vrb)[3]), @help};
12else
13helpless = {@helpless, vrb};
14endif
15endif
16endfor
17if (helpless)
18all_help = {@all_help, "", ("No help found on " + $string_utils:english_list(helpless, "nothing", " or ")) + "."};
19endif
20return {@all_help, "----"};

using this

Spec this none thisFlags rxdOwner #29Definer #68

Referenced by

none

Source

1"Proper usage for the Generic Feature Object:";
2"";
3"First of all, the Generic Feature Object is constructed with the idea";
4"that its children will be @moved to #24300, which is kind of a warehouse";
5"for feature objects.  If there's enough interest, I'll try to make the";
6"stuff that works with that in mind optional.";
7"";
8"Make a short description.  This is so I can continue to have looking at";
9"#24300 give the descriptions of each of the objects in its .contents.";
10"The :look_msg automatically includes a pointer to `help <this object>',";
11"so you don't have to.";
12"";
13"Put a list of the commands you want people to use in";
14"<this object>.feature_verbs.  (You need to use the :set_feature_verbs";
15"verb to do this.)";
16"";
17"When someone types `help <this object>', they will be told the comment";
18"strings from each of the verbs named in .feature_verbs.";

examine_commands_ok

Spec this none thisFlags rxdOwner #361Definer #68

Referenced by

none

Source

1return this in args[1].features;

set_feature_ok

Spec this none thisFlags rxdOwner #29Definer #68

Referenced by

none

Source

1if ($perm_utils:controls(caller_perms(), this) || (caller == this))
2return this.feature_ok = args[1];
3else
4return E_PERM;
5endif

hidden_verbs

Spec this none thisFlags rxdOwner #29Definer #68

Referenced by

none

Source

1"Can't see `get' unless it's in the room; can't see `drop' unless it's in the player.  Should possibly go on $thing.";
2"Should use :contents, but I'm in a hurry.";
3hidden = pass(@args);
4if (this.location != args[1])
5hidden = setadd(hidden, {$thing, verb_info($thing, "drop")[3], {"this", "none", "none"}});
6hidden = setadd(hidden, {$thing, verb_info($thing, "give")[3], {"this", "at/to", "any"}});
7endif
8if (this.location != args[1].location)
9hidden = setadd(hidden, {$thing, verb_info($thing, "get")[3], {"this", "none", "none"}});
10endif
11return hidden;

set_feature_verbs

Spec this none thisFlags rxdOwner #29Definer #68

Referenced by

none

Source

1if ($perm_utils:controls(caller_perms(), this) || (caller == this))
2return this.feature_verbs = args[1];
3else
4return E_PERM;
5endif

initialize

Spec this none thisFlags rxdOwner #29Definer #68

Referenced by

none

Source

1if ((caller == this) || $perm_utils:controls(caller_perms(), this))
2pass(@args);
3this.feature_verbs = {};
4else
5return E_PERM;
6endif

init_for_core

Spec this none thisFlags rxdOwner #361Definer #68

Referenced by

none

Source

1if (($code_utils:verb_location() == this) && caller_perms().wizard)
2this.warehouse = $feature_warehouse;
3`delete_property(this, "guest_ok") ! ANY';
4`delete_verb(this, "set_ok_for_guest_use") ! ANY';
5`set_verb_code(this, "player_connected", {"return;"}) ! ANY';
6pass();
7endif

feature_remove

Spec this none thisFlags rxdOwner #361Definer #68

Referenced by

none

Source

1"This is just a blank verb definition to encourage others to use this verb name if they care when a user is no longer using that feature.";