Commit graph

866 commits

Author SHA1 Message Date
goat
b79c646b9b only turn ImGui asserts on if we are actually loading a devplugin 2024-12-25 23:48:07 +01:00
goat
a1ae33bfee don't set plugin to fail state if we threw InvalidPluginOperationException
These are supposed to indicate to the user that they called a function at the wrong point in time. We don't want to actually mutate the state in that case.
2024-12-23 21:03:31 +01:00
goat
8276c19c6f add plugin enable/disable/toggle commands 2024-12-23 21:00:02 +01:00
goat
8572ed8b1e ProfileCommandHandler -> PluginManagementCommandHandler 2024-12-23 17:05:35 +01:00
Infi
2e6cb6ef00
- Add chat notification back to AutoUpdate (#2146)
- ImRaii UI elements in AutoUpdate tab
- Fix scoping in IconButton
2024-12-19 22:19:50 +01:00
srkizer
db4b6cea2c
Avoid re-creating title version string every frame (#2117)
* Avoid re-creating title version string every frame

* Marked title version string that it has been changed by Dalamud by
  appending a newline payload with a string expression embedded within,
  which the game will ignore (effectively `<br(!Dalamud!)>`.)
* Added `PluginManager.LoadedPluginCount` which will count the number of
  loaded plugin without making a copy of the plugin list.
* Made TitleScreenMenuWindow.OnVersionStringDraw` update the title
  version text addon only if number of loaded plugin changes or the text
  is missing the custom suffix from the first point.

* Use OriginalTextPointer to determine if SetText(ROS) has been called
2024-11-25 17:09:43 -08:00
Infi
3a3d6b6e6a
Implement Print methods that work with Lumina SeString/ReadOnlySeString (#2106)
* Implement Print methods that work with Lumina SeString/ReadOnlySeString

* null terminate before passing to Utf8String

* Rename XivChatEntryReadOnly to XivChatEntryRaw

* Fix error from wrong conversion method

* Follow Rider suggestion

* Switch from AppendMacroString to BeginMacro for optimization

* More optimization suggested by kizer

* More kizer suggested optimizations

* Fix small mistake

* Use XivChatEntry and read/write to Byte fields accordingly
2024-11-19 02:05:28 +00:00
Julian
57cc2f36f9
feat: Encourage developers to use DLLs for devPlugins (#1958)
* Add file dialog to add a dev plugin
* Require dev plugins to be paths to the DLL
* Only allow .dlls in the dev plugin setting entry
* Update dev plugin location hint
* update wording

---------

Co-authored-by: KazWolfe <KazWolfe@users.noreply.github.com>
2024-11-12 08:27:23 -08:00
Haselnussbomber
c0f05614c6
[api11] Some code cleanup and signature replacements (#2066)
* Remove unused code from ChatHandlers

* Replace sigs in DalamudAtkTweaks

* Resolve LocalContentId by using PlayerState.ContentId

* Resolve BuddyList address via UIState.Buddy

* Resolve ObjectTable address via GameObjectManager

* Resolve FateTable address via FateManager

* Resolve GroupManager address via GroupManager

* Resolve JobGauges address via JobGaugeManager.CurrentGauge

* Simplify ItemHover/Out event

* Resolve ToggleUiHide address via RaptureAtkModule.SetUiVisibility

* Resolve PopulateItemLinkObject via InventoryItem.Copy

* Add byte[].AsPointer extension

* Resolve addresses used by ToastGui via UIModule functions

* Use Length from Span as ObjectTableLength

* Replace OpenMapWithMapLink with CS call

* Resolve FrameworkAddressResolver with CS vtable

* Drop unnecessary ToArray in HandlePrintMessage

* Clean up event calls in HandlePrintMessageDetour

* Simplify LocalContentId further

This pointer can't be null, because it's part of the .data section.

* Compare SeStrings in FlyTextGui with SequenceEqual

* Use CS types in FlyTextGuis internal code

* Simplify reading SeStrings internally

* Remove AsPointer again

* Resolve Number/StringArray by type in NamePlateGui

* Fix crashes in HandlePrintMessageDetour

* Resolve InteractableLinkClicked with LogViewer.HandleLinkClick
2024-11-12 08:20:29 -08:00
Kaz Wolfe
720b1676e5
Merge branch 'master' into api11
# Conflicts:
#	Dalamud/Game/ClientState/Fates/Fate.cs
#	Dalamud/Game/Gui/NamePlate/NamePlateUpdateContext.cs
#	Dalamud/Interface/Internal/DalamudInterface.cs
#	Dalamud/Interface/Windowing/Window.cs
#	Dalamud/Utility/StringExtensions.cs
#	lib/FFXIVClientStructs
2024-11-11 08:38:20 -08:00
Haselnussbomber
c7facaf072
Rewrite parts of ClientState (#2065)
- Completely relies on hooks now, instead of the Framework.Update loop
- Support for Logout codes
2024-11-11 08:28:40 -08:00
Haselnussbomber
fea5b3b563
Safely call events in DalamudPluginInterface (#2063) 2024-11-05 21:15:09 +01:00
Haselnussbomber
2a9ee760c6
Add IGameInventory.GetInventoryItems (#2008) 2024-11-04 16:28:06 +01:00
srkizer
74ab9191d3
Add ITextureProvider.ConvertToKernelTexture (#2003)
* Add ITextureProvider.ConvertToKernelTexture

Lets you obtain an instance of Kernel::Texture from IDalamudTextureWrap.

* Docs wip
2024-11-04 16:06:42 +01:00
nebel
9a0bc50e23
Use hooks instead of lifecycle for NamePlateGui (#2060) 2024-11-04 14:21:07 +00:00
Aireil
f3bd83fbe9
repos: warn on missing testing API (#2056)
* repos: warn on missing testing API

* repos: reword missing testing API warning
2024-11-04 15:20:54 +01:00
goat
8956bd54a9 fix some warnings 2024-11-04 15:01:09 +01:00
Asriel Camora
0b9af0e3f4
Update to Lumina 5 (new Excel parsing) (#2022)
* Refactor and upgrade to new excel design

* Obsolete ExcelResolver<T> and use only RowRef<T>

* Better benchmarking for Lumina

* Add custom game-supported RSV provider

* Refactor and move Lazy<T> and nullable/cached row objects to RowRefs

* Convert IRSVProvider to delegate, resolve strings by default

* Split IExcelRow into IExcelSubrow

* Extra lumina documentation

* Minor RSV CS fixes

* Fix UIGlowPayload warning

* Fix rebase

* Update to Lumina 5
2024-10-20 19:59:03 -07:00
Kaz Wolfe
8d535af4ad
remove excess declarations from IPC 2024-09-29 10:47:26 -07:00
Kaz Wolfe
621fd17e1d
Expose Serilog API to plugins 2024-09-29 10:46:12 -07:00
KazWolfe
437e443931
fix: Re-muck the API surface to not break existing plugins (#2046) 2024-09-25 19:56:35 +00:00
KazWolfe
73ec12145d
feat: Add new IPC methods, and docs (#2042)
- New methods `HasAction`, `HasFunction`, and `SubscriptionCount` to allow making better decisions about IPC logic.
- Some better documentation for the call gates.
2024-09-25 18:54:50 +02:00
SlashNephy
98f58b3f89
Respect Dalamud chat type setting in changelogs message (#2041) 2024-09-15 18:20:42 +00:00
Soreepeong
6db7acca20 Do not throw already unloaded exception on exit 2024-08-18 08:18:30 +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
cddad72066
Add error handlings for UldWidget (#2011)
* Add error handlings for UldWidget

* fixes
2024-08-13 08:45:00 -07:00
wolfcomp
ae4c561e09
Add an ULD display to data window (#1938)
* prelim uld data display
* change uld list to a string array
* fix some uld parts not having their texture id set.
* update uld browser to use themes and get locations from sig scanning
* undo ClientStructs change during rebase
* fix capitalization during rebase
2024-08-12 13:36:31 -07:00
Haselnussbomber
9bb9b3acf4
Add events for ClassJob and Level change (#1985)
* Add events for ClassJob and Level change
* Correctly handle uiModuleHandlePacketHook
* Update Dalamud/Plugin/Services/IClientState.cs


Co-authored-by: KazWolfe <KazWolfe@users.noreply.github.com>
2024-07-29 17:17:07 -07:00
srkizer
844b04faad
Implement SeString renderer (#1977)
Does not have contextual evaluation. Only styling payloads are handled for (relative) simplicity.
2024-07-28 15:36:04 +02: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
KazWolfe
79971fc8d6
fix: Use AssemblyVersion for UserAgent header (#1974)
- Fixes a bug with local builds not being able to make HTTP requests
2024-07-25 21:30:36 +02:00
goat
8c593bc31d
Merge pull request #1966 from Soreepeong/fix/servicescope
ServiceScope fixes
2024-07-25 21:30:14 +02:00
goat
bd170ee74a
Merge pull request #1945 from KazWolfe/fixed-versioning
feat: Use new versioning strategy
2024-07-25 01:01:50 +02:00
RyouBakura
def28b37c7
GetFromFile without FileInfo (#1913)
* GetFromFile without FileInfo

* Implement missing interface member
2024-07-24 20:07:23 +02:00
Soreepeong
a725bbf8e0 cleanup 2024-07-24 19:27:13 +09:00
Soreepeong
db3e9a4171 Add IDalamudPluginInterface.InjectAsync 2024-07-24 19:17:31 +09:00
Soreepeong
4b98f4e60a Remove nullability from IServiceScope.CreateAsync 2024-07-24 18:57:44 +09:00
goat
849f84e859 ExposedPlugin: correctly indicate whether a plugin has a config UI 2024-07-22 20:50:05 +02:00
goat
8ca473839a
Merge pull request #1915 from nebel/array-nameplate-api
Add NamePlateGui
2024-07-20 18:29:55 +02:00
nebel
21a9cf215a
Add doc remark to RequestRedraw 2024-07-21 00:59:16 +09:00
goat
21063217a5 pi: add "hidden" tab if there are any hidden plugins 2024-07-20 02:17:27 +02:00
Kaz Wolfe
2bdd0dbe7b
Use new version format in a few other places 2024-07-18 21:00:41 -07:00
goat
604d1b2e85 ipc: add custom serializer for IGameObject
fixes #1924
2024-07-18 23:08:37 +02:00
nebel
15034298a5
Small improvements to NamePlateGui doc comments 2024-07-18 16:22:13 +09:00
nebel
b2e30f7cc1
Add NamePlateGui 2024-07-18 16:22:13 +09:00
MidoriKami
d966e5338a
Add SearchByEntityId (#1935) 2024-07-16 20:31:03 +02:00
goat
baa875f516 autoupdate: add missing space after comma 2024-07-08 20:50:00 +02:00
goat
77abd0455d autoupdate: print updated plugins in chat 2024-07-08 19:35:45 +02:00
goat
34a51d0119 pm: make sure that we don't stay on framework thread when loading and unloading
Without ConfigureAwait(false), all of the continuations below the await will be blocking the main thread
2024-07-08 19:21:44 +02:00
KazWolfe
82e6476ab6
fix: Fix auto-updates every 30 seconds (#1899)
- If no updates are found, properly defer.
2024-07-07 20:39:10 +02:00