static FString show_entity(dumb_ptr<block_list> entity) { switch (entity->bl_type) { case BL::PC: return entity->is_player()->status.name.to__actual(); case BL::NPC: return entity->is_npc()->name; case BL::MOB: return entity->is_mob()->name; case BL::ITEM: assert (0 && "There is no way this code did what it was supposed to do!"); /* Sorry about this one... */ // WTF? item_data is a struct item, not a struct item_data // return ((struct item_data *) (&entity->is_item()->item_data))->name; abort(); case BL::SPELL: return {"%invocation(ERROR:this-should-not-be-an-entity)"}; default: return {"%unknown-entity"}; } }