X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=octopi%2Flibrary%2Foctopus%2Ftentacle.cpp;fp=octopi%2Flibrary%2Foctopus%2Ftentacle.cpp;h=cda8f3d2d90a03f15ff40813bce11436278638b3;hb=fc8ec007bcbe990fc374f1a3019547e13554c496;hp=7c618033de97b43d6e062c855a7255857634f144;hpb=f0948278c299055f3add07f3f245d087a54e4aaa;p=feisty_meow.git diff --git a/octopi/library/octopus/tentacle.cpp b/octopi/library/octopus/tentacle.cpp index 7c618033..cda8f3d2 100644 --- a/octopi/library/octopus/tentacle.cpp +++ b/octopi/library/octopus/tentacle.cpp @@ -19,10 +19,12 @@ #include #include +#include #include #include using namespace basis; +using namespace loggers; using namespace processes; using namespace structures; @@ -99,6 +101,8 @@ const char *tentacle::outcome_name(const outcome &to_name) int tentacle::motivational_rate() const { if (_action) return _action->sleep_time(); else return 0; } +entity_data_bin *tentacle::get_storage() { return _products; } + void tentacle::attach_storage(entity_data_bin &storage) { _products = &storage; @@ -114,13 +118,11 @@ void tentacle::detach_storage() bool tentacle::store_product(infoton *product, const octopus_request_id &original_id) { -#ifdef DEBUG_TENTACLE FUNCDEF("store_product"); -#endif if (!_products) { -#ifdef DEBUG_TENTACLE +//#ifdef DEBUG_TENTACLE LOG("storage bunker has not been established!"); -#endif +//#endif return false; } return _products->add_item(product, original_id); @@ -167,9 +169,7 @@ infoton *tentacle::next_request(octopus_request_id &item_id) void tentacle::propel_arm() { -#ifdef DEBUG_TENTACLE FUNCDEF("propel_arm"); -#endif infoton *next_item = NIL; do { octopus_request_id id;