Skip to content

Refactor: Merge scr_event_log and scr_alert functions #693

@coderabbitai

Description

@coderabbitai

Description

Currently, the codebase has two separate functions for notifications:

  • scr_event_log: Adds entries to the event log
  • scr_alert: Creates alerts/popups for the player

These functions are often called consecutively with similar parameters, as they serve complementary purposes. For example, in scr_battle_count:

scr_alert(c_blue, "reward", $"{_text_choice.alert}");
scr_event_log(c_blue, $"{_text_choice.log}");

Proposed Solution

Merge these functions into a single function that handles both logging and alerts. This would:

  1. Reduce code duplication
  2. Ensure consistency between alerts and log entries
  3. Simplify the API for developers

Related Links

Requested by: @EttyKitty

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions