RPG Option FO #69060

Parent Owner Flags Source rpg_march_2006/Features/RPG Option FO.txt

Aliases: RPG Option FO, RPG-Option FO, RPG Option Feature Object, rpg_option_fo, rpgofo, rpgfo

4 verbs · 7 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
help_msgthis none this#690601
@rpg-o*ptions @rpgo*ptions @lrpg-o*ptions @lrpgo*ptionsany any anyrxd#6906025
set_rpg_optionthis none this#6906018
feature_oknone none nonerxd#690602

Properties

PropertyDefinerFlagsOwnerValue
option_pkg#69060r#34302
feature_verbs#69060{"@rpg-o*ptions @rpgo*ptions @lrpg-o*ptions @lrpgo*ptions"}
guest_ok#690601
key#69060not readable (E_PERM)
aliases#69060{"RPG Option FO", "RPG-Option FO", "RPG Option Feature Object", "rpg_option_fo", "rpgofo", "rpgfo"}
description#69060"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#69060{2932, 1141286561}

Ancestry

Ancestors (nearest first): none

Children: none

Source

help_msg

Spec this none thisDefiner #69060

Referenced by

none

Source

1return this.option_pkg:(verb)(@args);

@rpg-o*ptions @rpgo*ptions @lrpg-o*ptions @lrpgo*ptions

Spec any any anyFlags rxdDefiner #69060

Referenced by

none

Source

1what = "rpg";
2options = what + "_options";
3option_pkg = (rpg = $local.rpg).(options);
4set_option = ("set_" + what) + "_option";
5doll = rpg:get_doll(player);
6if (!valid(doll))
7  return player:tell("You don't have an RPG doll; ergo you don't have any rpg options.");
8elseif (!args)
9  player:tell_lines({("Current " + what) + " options:", "", @option_pkg:show(doll.(options), option_pkg.names)});
10  return;
11elseif (typeof(presult = option_pkg:parse(args)) == STR)
12  player:tell(presult);
13  return;
14else
15  if (length(presult) > 1)
16    if (typeof(sresult = this:(set_option)(doll, @presult)) == STR)
17      player:tell(sresult);
18      return;
19    elseif (!sresult)
20      player:tell("No change.");
21      return;
22    endif
23  endif
24  player:tell_lines(option_pkg:show(doll.(options), presult[1]));
25endif

set_rpg_option

Spec this none thisDefiner #69060

Referenced by

none

Source

1":set_rpg_option(oname,value)";
2"Changes the value of the named option.";
3"Returns a string error if something goes wrong.";
4if (!((caller == this) || $perm_utils:controls(caller_perms(), this)))
5  return tostr(E_PERM);
6endif
7doll = args[1];
8verb[1..4] = "";
9foo_options = verb + "s";
10"...";
11if (typeof(s = $local.rpg.(foo_options):set(doll.(foo_options), @listdelete(args, 1))) == STR)
12  return s;
13elseif (s == doll.(foo_options))
14  return 0;
15else
16  doll.(foo_options) = s;
17  return 1;
18endif

feature_ok

Spec none none noneFlags rxdDefiner #69060

Referenced by

none

Source

1{who} = args;
2return (who in {@$local.rpg.pcs, @$local.rpg.gms}) || $wiz_utils:is_wizard(who);