Commit graph

74 commits

Author SHA1 Message Date
MidoriKami
5c7a5295d1
Misc Fixes (#2584)
* Disable default logging, remove log message

* Add IDtrBarEntry.MinimumWidth

* Fix Addon/Agent Lifecycle Register/Unregister

* Rename Agent.ReceiveEvent2

* Add to IReadOnlyDtrBarEntry

* Fix autoformat being terrible

* More style fixes

* Add focused changed lifecycle event

* Fix for obsolete renames
2026-01-27 13:49:35 -08:00
Haselnussbomber
c93f04f0e4
Code cleanup (#2439)
* Use new Lock objects

* Fix CA1513: Use ObjectDisposedException.ThrowIf

* Fix CA1860: Avoid using 'Enumerable.Any()' extension method

* Fix IDE0028: Use collection initializers or expressions

* Fix CA2263: Prefer generic overload when type is known

* Fix CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons

* Fix IDE0270: Null check can be simplified

* Fix IDE0280: Use 'nameof'

* Fix IDE0009: Add '.this'

* Fix IDE0007: Use 'var' instead of explicit type

* Fix IDE0062: Make local function static

* Fix CA1859: Use concrete types when possible for improved performance

* Fix IDE0066: Use switch expression

Only applied to where it doesn't look horrendous.

* Use is over switch

* Fix CA1847: Use String.Contains(char) instead of String.Contains(string) with single characters

* Fix SYSLIB1045: Use 'GeneratedRegexAttribute' to generate the regular expression implementation at compile-time.

* Fix CA1866: Use 'string.EndsWith(char)' instead of 'string.EndsWith(string)' when you have a string with a single char

* Fix IDE0057: Substring can be simplified

* Fix IDE0059: Remove unnecessary value assignment

* Fix CA1510: Use ArgumentNullException throw helper

* Fix IDE0300: Use collection expression for array

* Fix IDE0250: Struct can be made 'readonly'

* Fix IDE0018: Inline variable declaration

* Fix CA1850: Prefer static HashData method over ComputeHash

* Fi CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'

* Update ModuleLog instantiations

* Organize usings
2026-01-06 08:36:55 -08:00
Haselnussbomber
45bd30fcca
Use inherited fields 2025-11-12 00:27:51 +01:00
Haselnussbomber
f635c149a2
Set TextNode to null after destroying it 2025-11-12 00:26:06 +01:00
Haselnussbomber
e1fde804ec
Add warning if RemoveNode can't find the node 2025-11-12 00:21:47 +01:00
Haselnussbomber
2a65d1e045
Fix KeyNotFoundException in DtrBar.RemoveNode 2025-11-07 16:04:13 +01:00
KazWolfe
3d300a7811
feat: Add DtrInteractionEvent to allow plugins to make their own DTR events. (#2353) 2025-08-07 23:37:42 +02:00
Kaz Wolfe
69b4ed941f
fix: cs bump breaks 2025-08-05 23:32:58 -07:00
MidoriKami
6369982b48
IDtrBar Add Additional Click Events (#2325)
* Add additional dtr click events

* Let's just break things and make them really nice

* Add additional dtr click events

* Let's just break things and make them really nice

* Add additional dtr click events

* Let's just break things and make them really nice

* git is stupid

* Documentation fixing
2025-08-03 18:15:05 -07:00
Haselnussbomber
57c6089fc1
[Api13] Add native wrapper structs (#2330) 2025-08-03 17:43:52 -07:00
Haselnussbomber
564c220ed2
[Api13] Remove obsoletes (#2323)
* Remove IFate.HasExpBonus

* Remove IAddonEventManager.AddonEventHandler

* Remove obsolete filesystem functions from Util

* Remove more obsoletes
2025-07-26 12:50:42 -07:00
goaaats
731d7e0f6e Un-whether-or-not the codebase 2025-04-25 22:49:05 +02:00
Kaz Wolfe
2176b32219
chore: Bump ClientStructs and make it build again 2025-03-24 13:25:13 -07:00
Soreepeong
9e95ab8ff7 fix log 2024-08-18 08:12:00 +09:00
Soreepeong
0a8f9b73fb Make ServiceScope IAsyncDisposable
ServiceScope.Dispose was not waiting for scoped services to complete
disposing. This had an effect of letting a new plugin instance register
a DtrBar entry before previous plugin instance's entry got unregistered.

This change also cleans up unloading procedure in LocalPlugin.
2024-08-18 07:58:45 +09:00
srkizer
c25f13261d
Make DtrBar more threadsafe (#1978)
* Changed DtrBar to use ReaderWriterLockSlim so that there exists only one storage of entries, preventing possible desync.
* DtrBarEntry will now hold a reference to the LocalPlugin that created the entry, so that DtrBarPluginScoped can defer plugin related handling to the main service.
* Marked DtrBarEntry class itself to be turned internal in API 11.
* Made IDtrBar.Entries return an immutable copy of underlying list of DtrBar entries, that will be freshly created whenever the list changes.
2024-07-28 14:14:37 +02:00
Haselnussbomber
5650bf3ae0
Properly remove DtrEntries from DtrBarPluginScoped (#1969)
fixes #1862
2024-07-25 00:59:34 +02:00
nebel
426eaec0f2
Mark DtrBar entries as dirty when added (#1967) 2024-07-24 20:06:45 +02:00
nebel
d44baa1f49
Small efficiency improvements for DtrBar (#1954) 2024-07-21 16:00:15 -07:00
goat
4df124440e dtr: null-check storage when removing 2024-07-18 00:34:57 +02:00
goat
1b92155c39 deps: update FFXIVClientStructs 2024-07-17 20:34:53 +02:00
Blair
7947b896ea
Add interfaces to non public/sealed classes referenced in public interfaces (#1808)
* Add interfaces to non public/sealed classes referenced in public interfaces

* Fixed inheritdocs + made most classes internal

* Add missing properties to IFate and Fate, fix documentation

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-06-28 23:05:34 +02:00
Kaz Wolfe
8d0b3b1e28
cs bump 2024-06-28 08:00:02 -07:00
KazWolfe
0c8c4bfdbf
chore: Remove the [InterfaceVersion] attribute (#1844) 2024-06-16 13:01:17 +02:00
Haselnussbomber
7ddc5d82ca
Update ClientStructs (#1827) 2024-06-15 16:57:44 -07:00
aers
479049b78d
[apiX] dalamud fixes for CS updates (#1821)
* update CS & fix compilation issues

* update CS to latest commit

* update CS & change battlechara

* more CS updates and compilation fixes

* one last cs update
2024-06-03 12:49:44 -07:00
aers
d823db7930
[apiX] first pass update for new clientstructs (#1818)
* first pass update for new clientstructs

* track latest clientstructs & fix compilation errors

* fix GameInventory hook bug
rename Appartment
2024-05-31 09:09:28 -07:00
goat
448b0d16ea
Add "loading dialog" for service init, unify blocking logic (#1779)
* wip

* hacky fix for overlapping event text in profiler

* move IsResumeGameAfterPluginLoad logic to PluginManager

* fix some warnings

* handle exceptions properly

* remove ability to cancel, rename button to "hide" instead

* undo Dalamud.Service refactor for now

* warnings

* add explainer, show which plugins are still loading

* add some text if loading takes more than 3 minutes

* undo wrong CS merge
2024-04-21 17:28:37 +02:00
goat
808f66edc6
Expose DTR entries in public interface (#1778)
* expose DTR entries in public interface

* add IReadOnlyDtrBarEntry.UserHidden
2024-04-20 14:46:04 +02:00
Soreepeong
7f5ef03917 Use EarlyLoadedService for anything that is not mandatory for kicking off plugin loader 2024-04-07 21:53:23 +09:00
srkizer
87b9edb448
Add IInternal/PublicDisposableService (#1696)
* Add IInternal/PublicDisposableService

Plugins are exposed interfaces that are not inherited from
`IDisposable`, but services implementing plugin interfaces often
implement `IDisposable`. Some plugins may try to call
`IDisposable.Dispose` on everything provided, and it also is possible to
use `using` clause too eagerly while working on Dalamud itself, such as
writing `using var smth = await Service<SomeService>.GetAsync();`. Such
behaviors often lead to a difficult-to-debug errors, and making those
services either not an `IDisposable` or making `IDisposable.Dispose` do
nothing if the object has been loaded would prevent such errors. As
`ServiceManager` must be the only class dealing with construction and
disposal of services, `IInternalDisposableService` has been added to
limit who can dispose the object. `IPublicDisposableService` also has
been added to classes that can be constructed and accessed directly by
plugins; for those, `Dispose` will be ignored if the instance is a
service instance, and only `DisposeService` will respond.

In addition, `DalamudPluginInterface` and `UiBuilder` also have been
changed so that their `IDisposable.Dispose` no longer respond, and
instead, internal functions have been added to only allow disposal from
Dalamud.

* Cleanup

* Postmerge fixes

* More explanation on RunOnFrameworkThread(ClearHooks)

* Mark ReliableFileStorage public ctor obsolete

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-16 15:58:05 +00:00
KazWolfe
403e94f9d0
chore: Bump CS to 9f22a2a2 (#1517)
- Revert of AtkResNode DrawFlags
2023-11-01 03:06:57 +00:00
KazWolfe
e538763f20
chore: Fix most 6.51 warnings (#1514) 2023-10-31 21:21:55 +01:00
nebel
6ba31d2752
Resize collision node instead of root node in DtrBar (#1494) 2023-10-20 20:19:37 +02:00
MidoriKami
eb835548d3
Restore Create<AtkTextNode> (#1449) 2023-10-03 13:35:35 -07:00
Cara
b2b366032b
Fix dtr (#1446)
* Fix DtrBar

* Zero some things

* Update FFXIVClientStructs
2023-10-03 09:48:37 -07:00
goat
c767971a36
move around new Addon services a bit to match folder structure 2023-09-23 13:09:43 +02:00
goat
af52da06b0
merge master 2023-09-23 11:22:50 +02:00
MidoriKami
26838d9f5c Auto generate paramkeys and return handles to events. 2023-09-21 20:47:49 -07:00
MidoriKami
3b5995e6ab Fix DTR Null Reference on first login 2023-09-21 20:46:44 -07:00
MidoriKami
dae105d157 Account for UiScale when moving nodes 2023-09-20 13:19:06 -07:00
MidoriKami
48e60a7a5d Fix hidden nodes preventing native tooltips from propogating 2023-09-20 11:22:58 -07:00
MidoriKami
b26550eea9 Fix not applying spacing when set to grow from the right 2023-09-20 10:56:07 -07:00
MidoriKami
5f86496360 Add missing renames 2023-09-20 10:55:45 -07:00
MidoriKami
6f40449ab3 Adjust Namespaces 2023-09-20 09:46:16 -07:00
MidoriKami
674f02136b [AddonEventManager] Properly track and cleanup events.
Also replaced DTR hooks with AddonLifecycle events.
2023-09-19 17:16:55 -07:00
MidoriKami
7a0f58a106
Remove PluginInterface from base Dtr service (#1399) 2023-09-18 00:19:31 -07:00
goat
9d4a2fad3b
fix dtr errors after merge 2023-09-17 23:39:09 +02:00
github-actions[bot]
e07be476f8 Merge remote-tracking branch 'origin/master' into v9-rollup 2023-09-17 21:30:16 +00:00
goat
5809cf5d7c
chore: make all services with interfaces internal 2023-09-17 21:09:00 +02:00