generic programmer extension #284

Parent #68Owner #361Flags readSource hellcore/hellcore.db

Aliases: generic programmer extension, extension, gpe

9 verbs · 36 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
feature_okthis none thisxd#2846
@grantthis at/to anyxd#28422
@revokethis out of/from inside/from anyxd#28417
feature_addthis none thisxd#2846
feature_removethis none thisxd#2843
can_modify_propthis none thisxd#28421
can_add_prop can_remove_propthis none thisxd#28422
help_msgthis none thisrxd#2842
tree_tagthis none thisrxd#2841

Properties

PropertyDefinerFlagsOwnerValue
approved_list#284#361{}
users#284#361{}
warehouse#68r#29#404857
help_msg#68rc#361"This is an extension to a programmer's abilities, allowing one to do things he or she would not otherwise be able to do."
feature_verbs#68#29{}
feature_ok#68r#29<clear>
handed#5rc#361<clear>
wield_msg#5rc#361<clear>
unwield_msg#5rc#361<clear>
size#5rc#361<clear>
look_place_msg#5rc#361<clear>
value#5rc#361<clear>
get_msg#5rc#361<clear>
drop_msg#5rc#361<clear>
get_fail_msg#5rc#361<clear>
junk_ok#5rc#361<clear>
floats#5rc#361<clear>
long_name_msg#5rc#361<clear>
article#5rc#361<clear>
setup_list#5rc#361<clear>
health#5rc#361<clear>
health_max#5rc#361<clear>
min_skill#5rc#361<clear>
skill#5rc#361<clear>
recipe_for#5rc#361<clear>
carried_msg#5rc#361<clear>
aliases#1rc#361{"generic programmer extension", "extension", "gpe"}
description#1rc#361""
object_size#1r#29{6516, 1298434633}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361<clear>
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #68 Generic Feature Object#5 generic thing#1 root

Children: none

Call graph

calls n284_1 #284:@grant n107_43 #107:tell n284_1->n107_43 n44_0 #44:match n284_1->n44_0 n284_2 #284:@revoke n284_2->n107_43 n284_2->n44_0 n284_5 #284:can_modify_prop n284_5->n107_43 n20_59 #20:name_and_number n284_5->n20_59 n284_6 #284:can_add_prop n284_6->n107_43 n284_6->n20_59 n284_7 #284:help_msg n68_0 #68:help_msg n284_7->n68_0

Source

feature_ok

Spec this none thisFlags xdOwner #361Definer #284

Referenced by

none

Source

1{who} = args;
2if ((who.wizard || (who in this.approved_list)) || player.wizard)
3return 1;
4else
5return 0;
6endif

@grant

Spec this at/to anyFlags xdOwner #361Definer #284

Referenced by

none

Source

1if (!player.wizard)
2player:tell("Who do you think you are, huh?");
3return;
4endif
5if (!valid(iobj))
6iobj = $mu:match(iobjstr, children($prog));
7endif
8if (!valid(iobj))
9player:tell("Who is '", iobjstr, "'?");
10return;
11endif
12if (!iobj.programmer)
13player:tell(iobj.name, " isn't a programmer.");
14return;
15endif
16if (iobj in this.users)
17player:tell(iobj.name, " already has ", this.name, ".");
18return;
19endif
20iobj:add_feature(this);
21iobj:tell((((($ansi.bold_on + $ansi.yellow) + "[ You have been given the programmer extension '") + this.name) + "'. ]") + $ansi.reset);
22iobj:tell((((($ansi.bold_on + $ansi.yellow) + "[ Check 'help ") + tostr(this)) + "' for new commands. ]") + $ansi.reset);

@revoke

Spec this out of/from inside/from anyFlags xdOwner #361Definer #284

Referenced by

none

Source

1if (!player.wizard)
2player:tell("Who do you think you are, huh?");
3return;
4endif
5if (!valid(iobj))
6iobj = $mu:match(iobjstr, children($prog));
7endif
8if (!valid(iobj))
9player:tell("Who is '", iobjstr, "'?");
10return;
11endif
12if ((!iobj) in this.users)
13player:tell(iobj.name, " doesn't have ", this.name);
14return;
15endif
16iobj:remove_feature(this);
17iobj:tell((((($ansi.bold_on + $ansi.yellow) + "[ Your ability to use the programmer extension '") + this.name) + "' has been revoked. ]") + $ansi.reset);

feature_add

Spec this none thisFlags xdOwner #361Definer #284

Referenced by

none

Source

1who = args[1];
2if (!player.wizard)
3raise(E_PERM);
4endif
5this.users = setadd(this.users, who);
6$nets.prognet:announce(this, tostr($ansi.yellow, $ansi.bold_on, who.name, " has been granted the power of ", this.name, " [granted by ", player.name, "]."), 1);

feature_remove

Spec this none thisFlags xdOwner #361Definer #284

Referenced by

none

Source

1who = args[1];
2this.users = setremove(this.users, who);
3$nets.prognet:announce(this, tostr($ansi.yellow, $ansi.bold_on, who.name, " no longer has ", this.name, " [", player.name, "]."), 1);

can_modify_prop

Spec this none thisFlags xdOwner #361Definer #284

Referenced by

none

Source

1{who, object, propname} = args;
2found_once = 0;
3for ext in (children(#411927))
4if ((player in ext.users) && (ext in player.features))
5for t in (ext.trees_modifiable)
6if (is_a(object, t))
7found_once = 1;
8if (ext.modify_all_props || (propname in ext.props_modifiable))
9return 1;
10endif
11"otherwise, continue with next ext";
12continue ext;
13endif
14endfor
15endif
16endfor
17if (found_once)
18player:tell("You can't modify .", propname, " on ", $su:nn(object), ".");
19else
20player:tell("You can't modify ", $su:nn(object), ".");
21endif

can_add_prop can_remove_prop

Spec this none thisFlags xdOwner #361Definer #284

Referenced by

none

Source

1verbstr = (verb == "can_remove_prop") ? "remove" | "add";
2{who, object, propname} = args;
3found_once = 0;
4for ext in (children(#196768))
5if ((player in ext.users) && (ext in player.features))
6for t in (ext.trees_addable)
7if (is_a(object, t))
8found_once = 1;
9if (ext.add_all_props || (propname in ext.props_addable))
10return 1;
11endif
12"otherwise, continue with next ext";
13continue ext;
14endif
15endfor
16endif
17endfor
18if (found_once)
19player:tell("You can't ", verbstr, " .", propname, " on ", $su:nn(object), ".");
20else
21player:tell("You can't ", verbstr, " properties to ", $su:nn(object), ".");
22endif

help_msg

Spec this none thisFlags rxdOwner #361Definer #284

Referenced by

none

Source

1help = pass(@args);
2return {@help[1..max(1, $ - 1)], ""};

tree_tag

Spec this none thisFlags rxdOwner #361Definer #284

Referenced by

none

Source

1return this.f ? "" | this.description;