Object Quota Utilities #82
Aliases: Object Quota Utilities
14 verbs · 6 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
initialize_quota | this none this | rxd | #82 | 5 |
init_for_core | this none this | rxd | #82 | 5 |
adjust_quota_for_programmer | this none this | rxd | #82 | 12 |
bi_create | this none this | rxd | #82 | 3 |
creation_permitted | this none this | rxd | #82 | 2 |
verb_addition_permitted property_addition_permitted | this none this | rxd | #82 | 1 |
display_quota | this none this | rxd | #82 | 16 |
get_quota quota_remaining | this none this | rxd | #82 | 5 |
charge_quota | this none this | rxd | #82 | 7 |
reimburse_quota | this none this | rxd | #82 | 7 |
set_quota | this none this | rxd | #82 | 7 |
preliminary_reimburse_quota | this none this | rxd | #82 | 1 |
can_peek | this none this | rxd | #82 | 2 |
can_touch | this none this | rxd | #82 | 2 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
byte_based | #82 | rc | #36 | 0 |
help_msg | #79 | rc | #36 | "This is the default package that interfaces to the $player/$prog quota manipulation verbs." |
key | #1 | c | #36 | 0 |
aliases | #1 | rc | #36 | {"Object Quota Utilities"} |
description | #1 | rc | #36 | {"This is the Object Quota Utilities utility package. See `help $object_quota_utils' for more details."} |
object_size | #1 | r | #36 | {6945, -1090650497} |
Ancestry
Ancestors (nearest first): #79 Generic Utilities Package → #1 Root Class
Children: none
Call graph
Source
initialize_quota
Referenced by
none
Source
1if (!caller_perms().wizard) 2return E_PERM; 3else 4args[1].ownership_quota = $wiz_utils.default_player_quota; 5endif
init_for_core
Referenced by
none
Source
1if (!caller_perms().wizard) 2return E_PERM; 3else 4pass(@args); 5endif
adjust_quota_for_programmer
Referenced by
none
Source
1if (!caller_perms().wizard) 2return E_PERM; 3else 4victim = args[1]; 5oldquota = victim.ownership_quota; 6if ($object_utils:has_property($local, "second_char_registry") && $local.second_char_registry:is_second_char(victim)) 7"don't increment quota for 2nd chars when programmering"; 8victim.ownership_quota = oldquota; 9else 10victim.ownership_quota = oldquota + ($wiz_utils.default_programmer_quota - $wiz_utils.default_player_quota); 11endif 12endif
bi_create
Referenced by
none
Source
1"Calls built-in create."; 2set_task_perms(caller_perms()); 3return `create(@args) ! ANY';
creation_permitted
Referenced by
none
Source
1$recycler:check_quota_scam(args[1]); 2return args[1].ownership_quota > 0;
verb_addition_permitted property_addition_permitted
Referenced by
none
Source
1return 1;
display_quota
Referenced by
none
Source
1who = args[1]; 2if (caller_perms() == who) 3q = who.ownership_quota; 4total = (typeof(who.owned_objects) == LIST) ? length(setremove(who.owned_objects, who)) | 0; 5if (q == 0) 6player:tell(tostr("You can't create any more objects", (total < 1) ? "." | tostr(" until you recycle some of the ", total, " you already own."))); 7else 8player:tell(tostr("You can create ", q, " new object", (q == 1) ? "" | "s", (total == 0) ? "." | tostr(" without recycling any of the ", total, " that you already own."))); 9endif 10else 11if ($perm_utils:controls(caller_perms(), who)) 12player:tell(tostr(who.name, "'s quota is currently ", who.ownership_quota, ".")); 13else 14player:tell("Permission denied."); 15endif 16endif
get_quota quota_remaining
Referenced by
none
Source
1if ($perm_utils:controls(caller_perms(), args[1]) || (caller == this)) 2return args[1].ownership_quota; 3else 4return E_PERM; 5endif
charge_quota
Referenced by
none
Source
1"Charge args[1] for the quota required to own args[2]"; 2{who, what} = args; 3if ((caller == this) || caller_perms().wizard) 4who.ownership_quota = who.ownership_quota - 1; 5else 6return E_PERM; 7endif
reimburse_quota
Referenced by
none
Source
1"Reimburse args[1] for the quota required to own args[2]"; 2{who, what} = args; 3if ((caller == this) || caller_perms().wizard) 4who.ownership_quota = who.ownership_quota + 1; 5else 6return E_PERM; 7endif
set_quota
Referenced by
none
Source
1"Set args[1]'s quota to args[2]"; 2{who, quota} = args; 3if (caller_perms().wizard || (caller == this)) 4return who.ownership_quota = quota; 5else 6return E_PERM; 7endif
preliminary_reimburse_quota
Referenced by
none
Source
1return 0;
can_peek
Referenced by
none
Source
1"Is args[1] permitted to examine args[2]'s quota information?"; 2return $perm_utils:controls(args[1], args[2]);
can_touch
Referenced by
none
Source
1"Is args[1] permitted to examine args[2]'s quota information?"; 2return args[1].wizard;