Source code for tuxemon.event.actions.clear_tuxepedia

# SPDX-License-Identifier: GPL-3.0
# Copyright (c) 2014-2023 William Edwards <>, Benjamin Bean <>
from __future__ import annotations

from dataclasses import dataclass
from typing import final

from tuxemon.event.eventaction import EventAction

[docs]@final @dataclass class ClearTuxepediaAction(EventAction): """ Clear the key and value in the Tuxepedia dictionary. Script usage: .. code-block:: clear_tuxepedia <monster_slug> Script parameters: monster_slug: Monster slug name (e.g. "rockitten"). """ name = "clear_tuxepedia" monster_key: str
[docs] def start(self) -> None: player = self.session.player if self.monster_key in player.tuxepedia: player.tuxepedia.pop(self.monster_key) else: return