Skip to content

[Code] ZoneStore Global to Singleton Cleanup#4934

Merged
Kinglykrab merged 1 commit intomasterfrom
kinglykrab/zonestore-global-to-singleton
Jun 23, 2025
Merged

[Code] ZoneStore Global to Singleton Cleanup#4934
Kinglykrab merged 1 commit intomasterfrom
kinglykrab/zonestore-global-to-singleton

Conversation

@Kinglykrab
Copy link
Copy Markdown
Contributor

@Kinglykrab Kinglykrab commented Jun 21, 2025

Description

This is part of a larger effort to remove global variables from the codebase. Eventually singletons can be cleaned up to be passed explicitly through dependency injection.

For now this encapsulates dependencies far better.

Type of change

  • Code Cleanup

Testing

image

sub EVENT_SAY {
	if ($text=~/#a/i) {
		my $zone_id = 189;
		my $zone_long_name = quest::GetZoneLongNameByID($zone_id);
		my $zone_short_name = quest::GetZoneShortName($zone_id);
		quest::message(315, "Zone ID [$zone_id] Long [$zone_long_name] Short [$zone_short_name]");
	}
}

Checklist

  • I have tested my changes
  • I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
  • I own the changes of my code and take responsibility for the potential issues that occur

@Kinglykrab Kinglykrab force-pushed the kinglykrab/zonestore-global-to-singleton branch from 1447b11 to ba7e448 Compare June 22, 2025 18:21
@Kinglykrab Kinglykrab merged commit 2e760d6 into master Jun 23, 2025
2 checks passed
@Kinglykrab Kinglykrab deleted the kinglykrab/zonestore-global-to-singleton branch June 23, 2025 10:45
@Akkadius Akkadius mentioned this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants