Object Quota Utilities #82

Parent #79Owner #36Flags readSource RPG Core/rpgcore-patched.db

Aliases: Object Quota Utilities

14 verbs · 7 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
initialize_quotathis none thisrxd#825
init_for_corethis none thisrxd#825
adjust_quota_for_programmerthis none thisrxd#8212
bi_createthis none thisrxd#823
creation_permittedthis none thisrxd#822
verb_addition_permitted property_addition_permittedthis none thisrxd#821
display_quotathis none thisrxd#8216
get_quota quota_remainingthis none thisrxd#825
charge_quotathis none thisrxd#827
reimburse_quotathis none thisrxd#827
set_quotathis none thisrxd#827
preliminary_reimburse_quotathis none thisrxd#821
can_peekthis none thisrxd#822
can_touchthis none thisrxd#822

Properties

PropertyDefinerFlagsOwnerValue
byte_based#82rc#360
help_msg#79rc#36"This is the default package that interfaces to the $player/$prog quota manipulation verbs."
key#1c#360
aliases#1rc#36{"Object Quota Utilities"}
description#1rc#36{"This is the Object Quota Utilities utility package. See `help $object_quota_utils' for more details."}
object_size#1r#36{6945, -1090650497}
html#1rc#36<clear>

Ancestry

Ancestors (nearest first): #79 Generic Utilities Package#1 Root Class

Children: none

Call graph

calls n82_1 #82:init_for_core n1_28 #1:init_for_core n82_1->n1_28 n82_2 #82:adjust_quota_for_programmer n52_0 #52:has_property n82_2->n52_0 n82_4 #82:creation_permitted n63_14 #63:check_quota_scam n82_4->n63_14 n82_6 #82:display_quota n6_18 #6:tell n82_6->n6_18 n42_0 #42:controls n82_6->n42_0 n82_7 #82:get_quota n82_7->n42_0 n82_12 #82:can_peek n82_12->n42_0

Source

initialize_quota

Spec this none thisFlags rxdOwner #36Definer #82

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

Spec this none thisFlags rxdOwner #2Definer #82

Referenced by

none

Source

1if (!caller_perms().wizard)
2return E_PERM;
3else
4pass(@args);
5endif

adjust_quota_for_programmer

Spec this none thisFlags rxdOwner #36Definer #82

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

Spec this none thisFlags rxdOwner #2Definer #82

Referenced by

none

Source

1"Calls built-in create.";
2set_task_perms(caller_perms());
3return `create(@args) ! ANY';

creation_permitted

Spec this none thisFlags rxdOwner #36Definer #82

Referenced by

none

Source

1$recycler:check_quota_scam(args[1]);
2return args[1].ownership_quota > 0;

verb_addition_permitted property_addition_permitted

Spec this none thisFlags rxdOwner #36Definer #82

Referenced by

none

Source

1return 1;

display_quota

Spec this none thisFlags rxdOwner #36Definer #82

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

Spec this none thisFlags rxdOwner #36Definer #82

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

Spec this none thisFlags rxdOwner #36Definer #82

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

Spec this none thisFlags rxdOwner #36Definer #82

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

Spec this none thisFlags rxdOwner #36Definer #82

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

Spec this none thisFlags rxdOwner #36Definer #82

Referenced by

none

Source

1return 0;

can_peek

Spec this none thisFlags rxdOwner #36Definer #82

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

Spec this none thisFlags rxdOwner #36Definer #82

Referenced by

none

Source

1"Is args[1] permitted to examine args[2]'s quota information?";
2return args[1].wizard;