here's the troublesome 'put' verb. coupla things with it: it does have the oddity that, if you have 5 or more "apple" resources and want to "put 5 apples on table", you cannot do that unless there are already apples on the table. you can, however "put 5 apple on table" and that will work. no idea how to fix that. also you cannot put more apples into an existing heap of identical apples, even though you ought to be able to do that. also provided here is the 'set' verb, which is in addition an action to configure an object, is a synonym for 'put'.
/lib/put.c
/* /lib/put.c
* from the Dead Souls Mud Library
* handles things which may be put into other objects
* created by Descartes of Borg 960114
* 2012-Feb-26 T. Cook corrected inability to use 'put' with multiple objects if target container not in inventory
*/
#include <lib.h>
private mixed PreventPut;
// abstract methods
string GetShort();
mixed CanDrop( object who );
mixed eventMove( mixed dest );
// end abstract methods
mixed SetPreventPut( mixed val ){
return ( PreventPut = val );
}
mixed GetPreventPut(){
return PreventPut;
}
varargs mixed CanPut( object who, object what ){
mixed tmp;
object env;
if( what ){ env = environment( what ); }
write( DebugFun( "CanPut", 0, who, what ) );
if( !env ){
return sprintf( "The %s doesn't seem to be anywhere. Please file a bugreport.", remove_article( GetShort() ) );
}
if( ( tmp = CanDrop( who ) ) != 1 ){ return tmp; }
if( !environment() ){ destruct( this_object() ); return 1; }
if( environment() != this_player() && environment() != environment( this_player() ) ){ return 0; }
if( !PreventPut ){ return 1; }
if( stringp( PreventPut ) && PreventPut == "PERMIT" ){ return 1; }
if( intp( PreventPut ) ){ return 0; }
if( stringp( PreventPut ) ){ return PreventPut; }
if( objectp( PreventPut ) ){
if( PreventPut == who ){
return "You cannot put " + GetShort() + " anywhere.";
}else{
return 1;
}
}else if( functionp( PreventPut ) ){
return evaluate( PreventPut, who );
}else{
return "It seems you're unable to do that right now.";
}
}
varargs mixed eventPut( object who, object storage, string prep ){
int depth;
write( DebugFun( "eventPut", 1, who, storage, prep ) );
if( !prep || prep == "" ){ prep = " into "; }
if( prep == " onto " && !inherits( LIB_SURFACE, previous_object() ) ){
who->eventPrint( "That isn't a load-bearing surface." );
return 0;
}
if( prep == " into " && inherits( LIB_SURFACE, previous_object() ) ){
who->eventPrint( sprintf(
"That's a surface. Try '%sput %s on %s%s'.",
"%^BLACK%^%^B_WHITE%^", this_object()->GetCanonicalId()[0], storage->GetCanonicalId()[0], "%^RESET%^"
) );
return 0;
}
if(
( inherits( LIB_SIT, storage ) && sizeof( storage->GetSitters() ) ) ||
( inherits( LIB_LIE, storage ) && sizeof( storage->GetLiers() ) )
){
write( "There appears to be someone blocking your access." );
return 0;
}
if( !eventMove( storage ) ){
who->eventPrint( "The " + remove_article( this_object()->GetShort() ) + " stays where it is." );
return 0;
}
who->eventPrint( "You put " + GetShort() + prep + storage->GetShort() + "." );
environment( who )->eventPrint( who->GetName() + " puts " + GetShort() + prep + storage->GetShort() + ".", who );
if( inherits( LIB_STORAGE, this_object() ) ){
depth = this_object()->GetRecurseDepth();
if( depth && inherits( LIB_STORAGE, storage ) ){ storage->AddRecurseDepth( depth ); }
}
return 1;
}
static void create(){
PreventPut = 0;
}
mixed direct_put_obj_word_obj(){
write( DebugFun( "direct_put_obj_word_obj", 0, 0 ) );
return CanPut( this_player(), this_object() );
}
mixed direct_put_wrd_wrd_word_obj(){
write( DebugFun( "direct_wrd_wrd_word_obj", 0, 0 ) );
return CanPut( this_player(), this_object() );
}
mixed direct_put_obj_obj(){
write( DebugFun( "direct_put_obj_obj", 0, 0 ) );
return direct_put_obj_word_obj();
}
/* EOF */
/verbs/items/put.c
/* /verbs/items/put.c
* from the Dead Souls Mud Library
* put OBJ in OBJ
* put OBJ into OBJ
* created by Descartes of Borg 950114
* Version: @(#) put.c 1.2@(#)
* Last modified: 96/12/31
* 2012-Jan-29 T. Cook added 'set' synonym
* 2012-Feb-24 T. Cook added CheckContainer() and ProcessVirtItems() in process to fix bugs
*/
#include <lib.h>
#include <daemons.h>
#include "include/put.h"
int CheckContainer( string s_amt1, string s_what1, string s_prep, object o_storage, string s_storage );
mapping ProcessVirtItems( string s_what );
inherit LIB_VERB;
string *eligible;
static void create(){
verb::create();
SetVerb( "put" );
SetSynonyms( "place", "stick", "set" );
SetRules(
// these rules are to allow use of set (calibrate) verb as well
"OBJ", "OBJ to STR", "STR on OBJ to STR",
//----
"OBS in OBJ", "OBS into OBJ", "OBS on OBJ", "OBS onto OBJ", "OBS OBJ",
"WRD WRD in OBJ", "WRD WRD into OBJ", "WRD WRD on OBJ", "WRD WRD onto OBJ"
);
SetErrorMessage( "Put what where?" );
SetHelp( HelpInfo( ([
"syntax": ({ "put <ITEM> in <CONTAINER>", "put <ITEM> into <CONTAINER>",
"put <ITEM> on <SURFACE>", "put <ITEM> onto <SURFACE>" }),
"body": "This allows you to place objects into or onto other objects.",
"synonyms": ({ "place", "stick", "set" }),
"see also": ({ "get", "give", "drop" })
]) ) );
}
// these are to allow set (calibrate) to work
mixed can_put_obj( mixed foo, mixed bar ){
return 0;
}
mixed can_put_obj_to_str( mixed *args... ){
write( DebugFun( "can_put_obj_to_str", this_player()->CanManipulate(), args ) );
return this_player()->CanManipulate();
}
mixed can_put_str_on_obj_to_str( string what1, mixed foo, string value1, string what2, string where, string value2 ){
object o_where, o_what, o_env = environment( this_player() );
if( !o_env ){ return "There's a problem...you don't have an environment! Notify an admin promptly!"; }
o_where = present( where, o_env );
if( query_verb() == "set" ){
if( !o_where ){
return "You aren't able to find the " + where + "...";
}else{
if( present( what1, o_where ) ){
return present( what1, o_where )->eventSet( value1 );
}else{
return "You can't find the " + what1 + " on the " + where + "...";
}
}
}
return this_player()->CanManipulate();
}
//-----
mixed can_put_obs_word_obj( object *oa_what, string s_prep, object o_storage ){
write( DebugFun( "can_put_obs_word_obj", 0, oa_what, s_prep, o_storage ) );
if( check_light() ){
return this_player()->CanManipulate();
}else{
return 0;
}
}
mixed can_put_obj_word_obj( mixed m_foo, string s_prep, mixed m_bar, object o_what, object o_storage ){
object *oa_what;
write( DebugFun( "can_put_obj_word_obj", 0, m_foo, s_prep, m_bar, o_what, o_storage ) );
if( o_what ){ oa_what = ({ o_what }); }
return can_put_obs_word_obj( oa_what, s_prep, o_storage );
}
mixed can_put_obj_obj( object o_what, string s_prep, object o_storage ){
write( DebugFun( "can_put_obj_obj", 0, o_what, s_prep, o_storage ) );
return can_put_obj_word_obj( 0, s_prep, 0, o_what, o_storage );
}
mixed can_put_wrd_wrd_word_obj(
string s_amt1, string s_what1, string s_prep, object o_storage, string s_amt2, string s_what2, string s_storage
){
int i_amt;
mapping M_virt = ProcessVirtItems( s_what1 );
write( DebugFun( "can_put_wrd_wrd_word_obj", 1, s_amt1, s_what1, s_prep, o_storage, s_amt2, s_what2, s_storage ) );
if( !s_amt1 || !s_what1 ){ return 0; }
if( ( i_amt = numeralize( s_amt1 ) ) < 1 ){ return "You cannot do that!"; }
switch( M_virt["type"] ){
case "currency":
if( this_player()->GetCurrency( M_virt["name"] ) < i_amt ){
return "You don't have that much money on hand.";
}
break;
case "resource":
if( this_player()->GetResource( M_virt["name"] ) < i_amt ){
return "You don't have that many " + M_virt["plural"] + ".";
}
break;
default:
if( sizeof( filter( all_inventory( this_player() ), (: $1->id( $(M_virt["singular"]) ) :) ) ) < i_amt ){
return "You don't have that many " + M_virt["plural"] + ".";
}
break;
}
if( newbiep( this_player() ) ){ return "Newbies can't drop money."; }
if( o_storage && CheckContainer( s_amt1, s_what1, s_prep, o_storage, s_storage ) == -1 ){ return 1; }
if( intp( check_light() ) ){
return this_player()->CanManipulate();
}else{
return check_light();
}
}
//=====
mixed do_put_obj_word_obj( object what, string wrd, object storage ){
write( DebugFun( "do_put_obj_word_obj", 1, what, wrd, storage ) );
if( storage && storage->GetClosed() ){
write( capitalize( storage->GetShort() ) + " is closed." );
return 1;
}
if(wrd == "in" || wrd == "into"){
if( wrd == "in" && present( what, storage ) && !present( what ) ){
return storage->eventSet( this_player(), what );
}
return storage->eventPutInto(this_player(), what);
}
if(wrd == "on" || wrd == "onto"){
if( wrd == "on" && present( what, storage ) && !present( what ) ){
return storage->eventSet( this_player(), what );
}
return storage->eventPutOnto(this_player(), what);
}
}
mixed do_put_obj_obj( object what, object storage ){
string prepo;
write( DebugFun( "do_put_obj_obj", 0, what, storage ) );
if( storage && inherits( LIB_SURFACE, storage ) ){
prepo = "onto";
}else{
prepo = "into";
}
return do_put_obj_word_obj( what, prepo, storage );
}
mixed do_put_obs_word_obj( mixed *res, string wrd, object storage ){
// this object spams each item being put onto obj separately, instead of concatenating, fix that
object *obs;
obs = filter( res, (: objectp :) );
write( DebugFun( "do_put_obs_word_obj", 0, res, wrd, storage ) );
if( !sizeof( obs ) ){
mixed *ua;
ua = unique_array( res, (: $1 :) );
foreach( string *lines in ua ){
if( storage && storage->GetClosed() ){
write( capitalize( storage->GetShort() ) + " is closed." );
}else{
write( "That doesn't seem possible at the moment." );
}
return 1;
}
if( storage && storage->GetClosed() ){
write( capitalize( storage->GetShort() ) + " is closed." );
}else{
write( "That doesn't seem possible at the moment." );
}
return 1;
}
if( !sizeof( filter( obs, (: environment( $1 ) == this_player() :) ) ) ){
write( "You don't seem to be in possession of that." );
eligible = ({});
return 1;
}
eligible = filter( obs, (: ( !( $1->GetWorn() ) && environment( $1 ) == this_player() ) :) );
if( !sizeof( eligible ) ){
write( "Remove or unwield items before trying to put them somewhere." );
eligible = ({});
return 1;
}
if( wrd == "in" || wrd == "into" ){
foreach( object ob in eligible ){
storage->eventPutInto( this_player(), ob );
}
}
if( wrd == "on" || wrd == "onto" ){
foreach( object ob in eligible ){
storage->eventPutOnto( this_player(), ob );
}
}
eligible = ({});
return 1;
}
mixed do_put_obs_obj( mixed *res, object storage ){
string prepo;
write( DebugFun( "do_put_obs_obj", 0, res, storage ) );
if( storage && inherits( LIB_SURFACE, storage ) ){
prepo = "onto";
}else{
prepo = "into";
}
return do_put_obs_word_obj( res, prepo, storage );
}
mixed do_put_wrd_wrd_word_obj(
string s_amt1, string s_what1, string s_prep, object o_storage, string s_amt2, string s_what2, string s_storage
){
object pile, env;
int i_amt;
mapping M_virt = ProcessVirtItems( s_what1 );
object *oa_obs;
write( DebugFun( "do_put_wrd_word_obj", 1, s_amt1, s_what1, s_prep, o_storage, s_amt2, s_what2, s_storage ) );
if( CheckContainer( s_amt1, s_what1, s_prep, o_storage, s_storage ) == -1 ){ return 1; }
if(
( inherits( LIB_SIT, o_storage ) && sizeof( o_storage->GetSitters() ) ) ||
( inherits( LIB_LIE, o_storage ) && sizeof( o_storage->GetLiers() ) )
){
write( "There appears to be someone blocking your access." );
return 0;
}
i_amt = numeralize( s_amt1 );
env = environment( this_player() );
switch( M_virt["type"] ){
case "currency":
pile = new( LIB_PILE );
pile->SetPile( M_virt["name"], i_amt );
if( !( pile->eventMove( o_storage ) ) || this_player()->AddCurrency( M_virt["name"], -i_amt ) == -1 ){
this_player()->eventPrint( "Something prevents your action." );
pile->eventDestruct();
return 1;
}
this_player()->eventPrint( sprintf(
"You put %s %s %s %s.",
i_amt == 1 ? GetArticle( M_virt["name"] ) : cardinal( i_amt ), M_virt["name"], s_prep, o_storage->GetShort()
) );
environment( this_player() )->eventPrint(
sprintf( "%s puts some money %s %s.", this_player()->GetName(), s_prep, o_storage->GetShort() ),
this_player()
);
break;
case "resource":
pile = new( LIB_HEAP );
pile->SetHeap( M_virt["name"], i_amt );
if( !( pile->eventMove( o_storage ) ) || this_player()->AddResource( M_virt["name"], -i_amt ) == -1 ){
this_player()->eventPrint( "Something prevents your action." );
pile->eventDestruct();
return 1;
}
this_player()->eventPrint( sprintf(
"You put %s %s %s %s.",
i_amt == 1 ? GetArticle( M_virt["name"] ) : cardinal( i_amt ),
i_amt == 1 ? M_virt["singular"] : M_virt["plural"], s_prep, o_storage->GetShort()
) );
environment( this_player() )->eventPrint( sprintf(
"%s puts %s %s %s %s.",
this_player()->GetName(), i_amt == 1 ? GetArticle( M_virt["name"] ) : "some",
i_amt == 1 ? M_virt["singular"] : M_virt["plural"],
s_prep, o_storage->GetShort() ), this_player()
);
break;
default:
oa_obs = filter( all_inventory( this_player() ), (: $1->id( $(M_virt["singular"]) ) :) );
do_put_obs_word_obj( oa_obs[0..i_amt - 1], s_prep, o_storage );
break;
}
return 1;
}
mixed eventCheckLight( object who ){
return check_light( who );
}
mapping ProcessVirtItems( string s_what ){
string s_item, s_newwhat = "", s_singwhat = "", s_multwhat = "", s_type = "other";
foreach( s_item in ECONOMY_D->__QueryCurrencies() ){
if(
strip_punctuation( singularize( lower_case( s_what ) ) ) ==
strip_punctuation( singularize( lower_case( s_item ) ) )
){
s_singwhat = singularize( s_item );
s_multwhat = pluralize( singularize( s_item ) );
s_newwhat = s_item;
s_type = "currency";
}
}
foreach( s_item in RESOURCES_D->QueryResources() ){
if(
strip_punctuation( singularize( lower_case( s_what ) ) ) ==
strip_punctuation( singularize( lower_case( s_item ) ) )
){
s_singwhat = singularize( s_item );
s_multwhat = pluralize( singularize( s_item ) );
s_newwhat = s_item;
s_type = "resource";
}
}
if( s_type == "other" ){
s_singwhat = singularize( s_what );
s_multwhat = pluralize( singularize( s_what ) );
s_newwhat = s_what;
}
return ([
"name": s_newwhat,
"singular": s_singwhat,
"plural": s_multwhat,
"type": s_type
]);
}
int CheckContainer( string s_amt1, string s_what1, string s_prep, object o_storage, string s_storage ){
switch( s_prep ){
case "on": case "onto":
if( !inherits( LIB_SURFACE, o_storage ) ){
if( inherits( LIB_STORAGE, o_storage ) ){
if( !s_amt1 ){
write( sprintf(
"The %s doesn't have a surface that can be used for that, but it is a container. Try " +
"'%sput %s %s in %s%s'.",
s_storage, "%^B_WHITE%^%^BLACK%^", s_amt1, s_what1, s_storage, "%^RESET%^"
) );
}else{
write( sprintf(
"The %s doesn't have a surface that can be used for that, but it is a container. Try " +
"'%sput %s in %s%s'.",
s_storage, "%^B_WHITE%^%^BLACK%^", s_what1, s_storage, "%^RESET%^"
) );
}
}else{
if( inherits( LIB_FLASK, o_storage ) ){
write( "The %s can only be used to hold liquids.", s_storage );
}else{
write( sprintf( "The %s isn't a container.", s_storage ) );
}
}
return -1;
}
break;
case "in": case "into":
if( inherits( LIB_SURFACE, o_storage ) ){
if( !s_amt1 ){
write( sprintf(
"That's a surface. Try '%sput %s on %s%s'.",
"%^B_WHITE%^%^BLACK%^", s_what1, s_storage, "%^RESET%^"
) );
}else{
write( sprintf(
"That's a surface. Try '%sput %s %s on %s%s'.",
"%^B_WHITE%^%^BLACK%^", s_amt1, s_what1, s_storage, "%^RESET%^"
) );
}
return -1;
}else{
if( !inherits( LIB_STORAGE, o_storage ) ){
if( inherits( LIB_FLASK, o_storage ) ){
write( "The %s can only be used to hold liquids.", s_storage );
}else{
write( sprintf( "The %s isn't a container.", s_storage ) );
}
return -1;
}else{
if( o_storage->GetClosed() ){
write( sprintf(
"The %s is closed. It must be opened before you can put the %s in it.",
s_storage, s_what1
) );
return -1;
}
}
}
break;
default:
break;
}
return 1;
}
/* EOF */
/verbs/items/set.c (from all the mass of commenting-out in here, I suspect something went horribly wrong with something I was trying to do)
/* /verbs/items/set.c
* 2012-Jan-29 T. Cook
* 2012-Feb-13 T. Cook removed ...on/in obj
*/
#include <lib.h>
#include <daemons.h>
inherit LIB_VERB;
static void create(){
verb::create();
SetVerb( "set" );
SetRules(
"OBJ", "off OBJ", "OBJ to STR", "STR on OBJ to STR"
//"OBJ on OBJ", "off OBJ on OBJ", "OBJ on OBJ to STR", "STR on OBJ on OBJ to STR",
//"OBJ in OBJ", "off OBJ in OBJ", "OBJ in OBJ to STR", "STR on OBJ in OBJ to STR"
// note: these rules don't get checked because they're pre-empted; do my own parsing in the do_ function!
);
SetSynonyms( ({ "adjust", "align", "calibrate" }) );
SetErrorMessage( "Set something, perhaps to a particular mode, or a part on something to a particular mode?" );
SetHelp( HelpInfo( ([
"syntax": ({
"set <THING>", "set off <THING>", "set <THING> to <WHAT>", "set <PART> on <THING> to <WHAT>"
//"set <THING> on <WHERE>", "set off <THING> on <WHERE>", "set <THING> on <WHERE> to <WHAT>",
//"set <PART> on <THING> on <WHERE> to <WHAT>",
//"set <THING> in <WHERE>", "set off <THING> in <WHERE>", "set <THING> in <WHERE> to <WHAT>",
//"set <PART> on <THING> in <WHERE> to <WHAT>"
}),
"body": "Sets an item to a particular mode, such as a clock to 4:35 or the volume on a speaker to 6. " +
"Also works for deliberately setting off alarms, bombs, traps, and the like, or for initially setting " +
"traps, et cetera. Can refer to objects that are in or on other objects, as well.\n\n" +
"Synonyms: adjust, align, calibrate"
]) ) );
}
//=====
mixed can_set(){ // ok
return this_player()->CanManipulate();
}
mixed can_set_obj( mixed m_foo, string s_what ){ // ok
return this_player()->CanManipulate();
}
mixed can_set_off_obj( mixed m_foo, string s_what ){ // ok
if( query_verb() == "set" ){
return this_player()->CanManipulate();
}else{
return sprintf(
"You can't %O the %O off. If you feel you should be able to do that, please file a bug report.",
query_verb(), s_what
);
}
}
mixed can_set_obj_to_str( mixed *args... ){
//write( DebugFun( "can_set_obj_on_obj", this_player()->CanManipulate(), args ) );
return this_player()->CanManipulate();
}
mixed can_set_str_on_obj_to_str( string prop1, mixed foo, string value1, string prop2, string what, string value2 ){ // ok
return this_player()->CanManipulate();
}
//-----
/*mixed can_set_obj_on_obj( mixed *args... ){
//write( DebugFun( "can_set_obj_on_obj", this_player()->CanManipulate(), args ) );
return this_player()->CanManipulate();
}
mixed can_set_off_obj_on_obj( mixed *args... ){
if( query_verb() == "set" ){
return this_player()->GanManipulate();
}else{
return "\"" + capitalize( query_verb() ) + " off\"...what? I don't understand that. Please try to " +
"rephrase what you want to do.";
}
}
mixed can_set_obj_on_obj_to_str( mixed foo, mixed bar, string value1, string prop, string what, string value2 ){ // ok
//write( DebugFun( "can_set_obj_on_obj_to_str", this_player()->CanManipulate(), foo, bar, value1, prop, what, value2 ) );
return this_player()->CanManipulate();
}
mixed can_set_str_on_obj_on_obj_to_str( mixed *args... ){
return this_player()->CanManipulate();
}
//-----
mixed can_set_obj_in_obj( mixed *args... ){
//write( DebugFun( "can_set_obj_in_obj", this_player()->CanManipulate(), args ) );
return this_player()->CanManipulate();
}
mixed can_set_off_obj_in_obj( mixed *args... ){
//write( DebugFun( "can_set_off_obj_in_obj", 1, args ) );
if( query_verb() == "set" ){
return this_player()->GanManipulate();
}else{
return "\"" + capitalize( query_verb() ) + " off\"...what? I don't understand that. Please try to " +
"rephrase what you want to do.";
}
}
mixed can_set_obj_in_obj_to_str( mixed *args... ){
//write( DebugFun( "can_set_obj_in_obj_to_str", this_player()->CanManipulate(), args ) );
return this_player()->CanManipulate();
}
mixed can_set_str_on_obj_in_obj_to_str( mixed *args... ){
//write( DebugFun( "can_set_str_on_obj_in_obj_to_str", this_player()->CanManipulate(), args ) );
return this_player()->CanManipulate();
}*/
//=====
mixed do_set(){
return "Set something, something to what, or a part on something to what?";
}
varargs mixed do_set_obj( mixed item ){
return item->eventSet();
}
varargs mixed do_set_off_obj( mixed item ){
return item->eventTurnOn();
}
varargs mixed do_set_obj_to_str( mixed item, mixed setting ){
return item->eventSet( setting );
}
varargs mixed do_set_str_on_obj_to_str( mixed part, mixed item, mixed setting ){
return item->eventSet( setting, part );
}
//-----
/*varargs mixed do_set_obj_on_obj( mixed item ){
return item->eventSet();
}
varargs mixed do_set_off_obj_on_obj( mixed item ){
return item->eventTurnOn();
}
varargs mixed do_set_obj_on_obj_to_str( mixed *args... ){//mixed item, mixed setting ){
//write( DebugFun( "do_set_obj_on_obj_to_str", 1, args ) );
//return item->eventSet( setting );
return args[0]->eventSet( args[1] );
}
varargs mixed do_set_str_on_obj_on_obj_to_str( mixed part, mixed item, mixed setting ){
return item->eventSet( setting, part );
}
//-----
varargs mixed do_set_obj_in_obj( mixed item ){
return item->eventSet();
}
varargs mixed do_set_off_obj_in_obj( mixed item ){
return item->eventTurnOn();
}
varargs mixed do_set_obj_in_obj_to_str( mixed item, mixed setting ){
return item->eventSet( setting );
}
varargs mixed do_set_str_on_obj_in_obj_to_str( mixed part, mixed item, mixed setting ){
return item->eventSet( setting, part );
}*/
/* EOF */
/lib/events/set.c (ditto)
/* /lib/events/set.c
* allows items to access the 'set' verb
* 2012-Feb-11 T. Cook added forms of use
*/
// need to do checking in here, too, derp derp
// pull *args things off into actual vars
#include <lib.h>
inherit LIB_TURN;
varargs mixed CanSet( object who, object what ){
return 1;
}
//=====
int direct_set_obj( object target ){
return CanSet( this_player() );
}
int direct_set_off_obj( object target ){
return turn::CanTurnOn( this_player() );
}
int direct_set_obj_to_str( object target, string what ){
return CanSet( this_player(), target );
}
int direct_set_str_on_obj_to_str( string target, object where, string what ){
return CanSet( this_player(), where );
}
//-----
/*int direct_set_obj_on_obj( object target, object where ){
return CanSet( this_player() );
}
int direct_set_off_obj_on_obj( object target, object where ){
return turn::CanTurnOn( this_player() );
}
int direct_set_obj_on_obj_to_str( object what1, mixed foo, string value1, string what2, string where, string value2 ){
//write( DebugFun(
//"direct_set_obj_on_obj_to_str", CanSet( this_player(), what1 ),
//what1, foo, value1, what2, where, value2
//) );
//if( !present( what2, present( where, environment( this_player() ) ) ) ){
//write( sprintf(
//"There isn't %O %O on the %O to set.",
//GetArticle( remove_article( what2 ) ), remove_article( what2 ), remove_article( where )
//) );
//return 0;
//}
return CanSet( this_player(), what1 );
}
int direct_set_str_on_obj_on_obj_to_str( string target, object where, string what, object wherewhere ){
return CanSet( this_player(), where );
}*/
/* EOF */