Features Feature Object (#111)

(an instance of Generic Feature Object made by Dredful)

     This feature is meant to be the holder of all features. It has verbs for keeping track of what features exist and which of those are ready to be used. When a feature is finished, it should be registered with this feature. See `help features' to see what features are.

Features Feature Object contains Login Watcher, Player Information Feature, Carrot's Rosette Feature Object, Thinking Feature, Second Character Registry, Social Shortcuts Feature, Improved redirected say and whisper, Size-Prospectus FO, Lag Feature, Stage Talk FO, Pasting Feature, Repetitive Stress Injuries feature, Liquor FO and Info Feature.

Go to location of this object, paper bag.


HELP MANUAL:
     This feature is to be used as a repository for all existing ready to be used features. 
Type `@add-feature #111' to have access to these verbs:



VERB SOURCE CODE:

accept:
what = args[1];
result = this:acceptable(what);
if (!result)
    player:tell("Either ", what.name, " is not a feature, or it does not have its 
.feature_ok set to 1. ", this.name, " only accepts usable children of $feature.");
endif
return result;
.


@whatfea*tures @what-fea*tures @wf:
"Usage: @whatfeatures";
"";
"This verb compares all the valid features found in its contents with those that 
you have already added. Those that you don't have, it will list. It also lists what 
features are not in its contents. These are usually incomplete features. If you have 
any of these incomplete features added, this verb will say so.";
list1 = player.features;
unadded = $set_utils:diff(this.contents, list1);
if (unadded)
    player:tell("These are valid features that you haven't added yet:");
    player:tell_lines($string_utils:nanl(unadded));
else
    player:tell("You have already added all the valid features contained in this 
feature.");
endif
player:tell("----------");
all = setremove($object_utils:descendants($feature), this);
differ = $set_utils:diff(all, this.contents);
if (differ)
    player:tell("These are children of $feature, but aren't in ", this.name, ". Most 
likely because they aren't finished:");
    player:tell_lines($string_utils:nanl(differ));
    has = $set_utils:intersection(differ, player.features);
    if (has)
        player:tell("----------");
        player:tell("Note: of the features just listed as 'not ready' you have added: 
");
        player:tell_lines($string_utils:nanl(has));
    endif
else
    player:tell("All existing features are valid and contained in ", this.name, ".");
endif
player:tell("-- Finished");
.


@fregister:
"Usage: @register ";
"";
"This verb is used to put a feature into the Features Feature Object. It will then 
be ready to be accounted for when people look for usable features.";
target = player:my_match_object(dobjstr);
if (!$command_utils:object_match_failed(target, dobjstr))
    if ($perm_utils:controls(player, target) && $object_utils:isa(target, $feature))
        target:moveto(this);
        if (target.location == this)
            player:tell(target.name, " is now registered and ready for use by ", 
this.name, " and the general populace.");
        endif
    else
        player:tell("Either that object isn't yours or isn't a feature.");
    endif
endif
.


acceptable:
what = args[1];
return $object_utils:isa(what, $feature) && what.feature_ok;
.


moveto:
return 0;
.


@unfregister:
"Usage: @unfregister ";
"";
"Removes the  from this object back to the player, only if the feature is 
owned by the player or the player is a wizard. This removes it from public circulation 
according to the @wf verb.";
target = this:match_object(dobjstr);
if (valid(target) && (target.location == this))
    if ($perm_utils:controls(player, target))
        target:moveto(player);
        player:tell($string_utils:nn(target), " has been removed from the Features 
Feature Object registry. It is now in your inventory.");
    else
        player:tell(E_PERM);
    endif
else
    player:tell("Either ", dobjstr, " isn't registered in the FFO, or it doesn't 
exist.");
endif
.



PROPERTY DATA: