| 1200 | } |
| 1201 | |
| 1202 | bool CScriptGameObject::MoveToSlot(CScriptGameObject* obj, bool bNotActivate) |
| 1203 | { |
| 1204 | CInventoryItem* inventory_item = smart_cast<CInventoryItem*>(&(obj->object())); |
| 1205 | if (!inventory_item) |
| 1206 | { |
| 1207 | ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError, "CInventoryItem : cannot access class member move_to_slot!"); |
| 1208 | return false; |
| 1209 | } |
| 1210 | |
| 1211 | CInventoryOwner* inventory_owner = smart_cast<CInventoryOwner*>(&object()); |
| 1212 | if (!inventory_owner) |
| 1213 | { |
| 1214 | ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError, "CInventoryOwner : cannot access class member move_to_slot!"); |
| 1215 | return false; |
| 1216 | } |
| 1217 | |
| 1218 | return inventory_owner->inventory().Slot(inventory_item, bNotActivate); |
| 1219 | } |
| 1220 | |
| 1221 | bool CScriptGameObject::MoveToBelt(CScriptGameObject* obj) |
| 1222 | { |
nothing calls this directly
no test coverage detected