Fixed create_item_by_type function to actually only consider items of the desired type because I'm pretty sure it didn't work as intended before
null check curent_actor. not that it did anything.