diff --git a/code/tests/_game_test.dm b/code/tests/_game_test.dm index a7853c1d277b..24a5d2a32e9c 100644 --- a/code/tests/_game_test.dm +++ b/code/tests/_game_test.dm @@ -19,6 +19,8 @@ GLOBAL_LIST_EMPTY(game_test_chats) #define TEST_ASSERT_ANY_CHATLOG(puppet, text) if(!puppet.any_chatlog_has_text(text)) { return Fail("Expected `[text]` in any chatlog but got [jointext(puppet.get_chatlogs(), "\n")]", __FILE__, __LINE__) } +#define TEST_ASSERT_NOT_CHATLOG(puppet, text) if(puppet.any_chatlog_has_text(text)) { return Fail("Didn't expect `[text]` in any chatlog but got [jointext(puppet.get_chatlogs(), "\n")]", __FILE__, __LINE__) } + /// Asserts that the two parameters passed are equal, fails otherwise /// Optionally allows an additional message in the case of a failure #define TEST_ASSERT_EQUAL(a, b, message) do { \ diff --git a/code/tests/_game_test_puppeteer.dm b/code/tests/_game_test_puppeteer.dm index 525b3c7991dd..9074310ee69f 100644 --- a/code/tests/_game_test_puppeteer.dm +++ b/code/tests/_game_test_puppeteer.dm @@ -48,6 +48,16 @@ origin_test.Fail("could not spawn obj [obj_type] near [src]") +/datum/test_puppeteer/proc/use_item_in_hand() + var/obj/item/item = puppet.get_active_hand() + if(!item) + return + + item.activate_self(puppet) + puppet.next_click = world.time + puppet.next_move = world.time + return TRUE + /datum/test_puppeteer/proc/click_on(target, params) var/datum/test_puppeteer/puppet_target = target if(istype(puppet_target))