generic programmer extension #284
Aliases: generic programmer extension, extension, gpe
9 verbs · 36 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
feature_ok | this none this | xd | #284 | 6 |
@grant | this at/to any | xd | #284 | 22 |
@revoke | this out of/from inside/from any | xd | #284 | 17 |
feature_add | this none this | xd | #284 | 6 |
feature_remove | this none this | xd | #284 | 3 |
can_modify_prop | this none this | xd | #284 | 21 |
can_add_prop can_remove_prop | this none this | xd | #284 | 22 |
help_msg | this none this | rxd | #284 | 2 |
tree_tag | this none this | rxd | #284 | 1 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
approved_list | #284 | | #361 | {} |
users | #284 | | #361 | {} |
warehouse | #68 | r | #29 | #404857 |
help_msg | #68 | rc | #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 | #68 | r | #29 | <clear> |
handed | #5 | rc | #361 | <clear> |
wield_msg | #5 | rc | #361 | <clear> |
unwield_msg | #5 | rc | #361 | <clear> |
size | #5 | rc | #361 | <clear> |
look_place_msg | #5 | rc | #361 | <clear> |
value | #5 | rc | #361 | <clear> |
get_msg | #5 | rc | #361 | <clear> |
drop_msg | #5 | rc | #361 | <clear> |
get_fail_msg | #5 | rc | #361 | <clear> |
junk_ok | #5 | rc | #361 | <clear> |
floats | #5 | rc | #361 | <clear> |
long_name_msg | #5 | rc | #361 | <clear> |
article | #5 | rc | #361 | <clear> |
setup_list | #5 | rc | #361 | <clear> |
health | #5 | rc | #361 | <clear> |
health_max | #5 | rc | #361 | <clear> |
min_skill | #5 | rc | #361 | <clear> |
skill | #5 | rc | #361 | <clear> |
recipe_for | #5 | rc | #361 | <clear> |
carried_msg | #5 | rc | #361 | <clear> |
aliases | #1 | rc | #361 | {"generic programmer extension", "extension", "gpe"} |
description | #1 | rc | #361 | "" |
object_size | #1 | r | #29 | {6516, 1298434633} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rc | #361 | <clear> |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
Ancestors (nearest first): #68 Generic Feature Object → #5 generic thing → #1 root
Children: none
Call graph
Source
feature_ok
Referenced by
none
Source
1{who} = args; 2if ((who.wizard || (who in this.approved_list)) || player.wizard) 3return 1; 4else 5return 0; 6endif
@grant
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
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
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
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
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
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
Referenced by
none
Source
1help = pass(@args); 2return {@help[1..max(1, $ - 1)], ""};
tree_tag
Referenced by
none
Source
1return this.f ? "" | this.description;