-- Configuration
local unique_mod_id = "egon_body_jowi"
local body_section = "body"

Hooks:PostHook(MenuSceneManager, "spawn_outfit_done", unique_mod_id .. "_preview_cleanup", function(self, asset_id)
	self:add_one_frame_delayed_clbk(function()
		if self._infamy_item_spawned and self._infamy_item_spawned == asset_id then
			self._character_unit:spawn_manager():remove_unit("replaced_" .. body_section .. "_mesh")
		end
	end)
end)