feat: Moves gumps out of the core (#1916)

> [!Important]
> **Developer Note**
> This code change will **completely move gumps out of the core**


### Summary

- Adds `GetGumps()` convenience which exposes methods to Find/Close/Send multiple gumps. This helper is a performance improvement by eliminating the Dictionary<Player, List> lookup for gumps.
This commit is contained in:
Kamron Batman 2024-08-09 19:07:32 -07:00 • committed by GitHub
parent 40d99f6d1c
commit 8282b00ca2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
246 changed files with 1722 additions and 1383 deletions

View file

@ -104,7 +104,6 @@ public partial class MistletoeAddon : Item, IDyable, IAddon
if (from.InRange(GetWorldLocation(), 3))
{
from.CloseGump<MistletoeAddonGump>();
from.SendGump(new MistletoeAddonGump(from, this));
}
else
@ -118,6 +117,8 @@ public partial class MistletoeAddon : Item, IDyable, IAddon
private readonly MistletoeAddon _addon;
private readonly Mobile _from;
public override bool Singleton => true;
public MistletoeAddonGump(Mobile from, MistletoeAddon addon) : base(150, 50)
{
_from = from;

View file

@ -46,7 +46,6 @@ public partial class Fireflies : Item, IAddon
if (house?.IsOwner(from) == true)
{
from.CloseGump<RewardDemolitionGump>();
// Do you wish to re-deed this decoration?
from.SendGump(new RewardDemolitionGump(this, 1049783));
}
@ -86,7 +85,6 @@ public partial class FirefliesDeed : Item
return;
}
from.CloseGump<FacingGump>();
from.SendGump(new FacingGump(this, from));
}
@ -95,6 +93,8 @@ public partial class FirefliesDeed : Item
private readonly FirefliesDeed _deed;
private readonly Mobile _placer;
public override bool Singleton => true;
public FacingGump(FirefliesDeed deed, Mobile player) : base(150, 50)
{
_deed = deed;