本文整理汇总了C++中object::CanCarry方法的典型用法代码示例。如果您正苦于以下问题:C++ object::CanCarry方法的具体用法?C++ object::CanCarry怎么用?C++ object::CanCarry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类object
的用法示例。
在下文中一共展示了object::CanCarry方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: direct_give_obj_to_liv
mixed direct_give_obj_to_liv(object what, object target){
mixed tmp;
if( environment() != this_player() ){
return "#You cannot give what is not yours.";
}
tmp = CanDrop(this_player());
if( tmp != 1 ){
return (tmp || "#You can't drop " + GetDefiniteShort() + ".");
}
if(target && objectp(target)){
tmp = target->CanCarry(GetMass());
if( tmp != 1 ){
return capitalize(this_object()->GetDefiniteShort()) + " is too heavy.";
}
}
return 1;
}
示例2: indirect_give_liv_obj
mixed indirect_give_liv_obj(object target){
mixed tmp;
if(!target){
return "#That doesn't seem to be here.";
}
if( environment() != this_player() ){
return "#You cannot give what is not yours.";
}
tmp = CanDrop(this_player());
if( tmp != 1 ){
return (tmp || "You can't drop " + GetDefiniteShort() + ".");
}
tmp = target->CanCarry(GetMass());
if( tmp != 1 ){
return (tmp || capitalize(GetDefiniteShort()) + " is too heavy.");
}
return 1;
}