RPG Option FO #69060
Aliases: RPG Option FO, RPG-Option FO, RPG Option Feature Object, rpg_option_fo, rpgofo, rpgfo
4 verbs · 7 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
help_msg | this none this | | #69060 | 1 |
@rpg-o*ptions @rpgo*ptions @lrpg-o*ptions @lrpgo*ptions | any any any | rxd | #69060 | 25 |
set_rpg_option | this none this | | #69060 | 18 |
feature_ok | none none none | rxd | #69060 | 2 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
option_pkg | #69060 | r | — | #34302 |
feature_verbs | #69060 | | — | {"@rpg-o*ptions @rpgo*ptions @lrpg-o*ptions @lrpgo*ptions"} |
guest_ok | #69060 | | — | 1 |
key | #69060 | | — | not 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
Referenced by
none
Source
1return this.option_pkg:(verb)(@args);
@rpg-o*ptions @rpgo*ptions @lrpg-o*ptions @lrpgo*ptions
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
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
Referenced by
none
Source
1{who} = args; 2return (who in {@$local.rpg.pcs, @$local.rpg.gms}) || $wiz_utils:is_wizard(who);