Commit graph

124 commits

Author SHA1 Message Date
KazWolfe
1c03242aa9
feat: New Condition APIs (#1842)
* feat: New Condition APIs

- New methods for `ICondition`:
  - `AnyExcept` ensures the listed conditions are *not* present.
  - `OnlyAny` ensures that *only* the listed conditions are met.
  - `EqualTo` ensures that the condition state matches the listed set.
- New `IsGameIdle` method in `IClientState` can be used to check if the player is not in any "active" game state.
2024-06-15 15:44:47 -07:00
goat
c4e31bc5f1 use kaz's api for conditions instead 2024-06-15 19:29:23 +02:00
goat
bc0bea03e0 add ICondition.Only() to check for a set of flags 2024-06-12 00:01:55 +02:00
goat
02022599e5 console: add public interface 2024-06-07 21:04:31 +02:00
MidoriKami
b5d52732e0
Add hooking overloads (#1820) 2024-06-01 15:04:06 -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
MidoriKami
e32fc00277
IContextMenu Tweaks and Cleanup (#1753)
* Tweaks and cleanup

* Fix backwards logic
2024-04-11 23:23:13 +02:00
KazWolfe
de6dcb8b53
Add some small map helpers (#1756)
* feat: Add new `.GetMapCoordinates` extension method

- Used to easily resolve player-friendly map coordinates for any GameObject.

* feat: Add MapID to ClientState

- Provides easy access to the player's current map ID
2024-04-10 00:49:37 +02:00
github-actions[bot]
fe80490d5e Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-19 15:04:46 +00:00
srkizer
be63276a85
Rename to Framework.Run (#1728) 2024-03-19 08:04:21 -07:00
github-actions[bot]
990f04715f Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-19 03:11:08 +00:00
srkizer
5d473919a1
Hide scheduler from RunOnFrameworkThread (#1725)
* Hide scheduler from RunOnFrameworkThread

Creating new tasks via Task.Run and alike would fetch the current
scheduler, which we do not want in case of running stuff from the
framework thread. Change is to prevent the standard library from seeing
the "current scheduler". If one wants to use `await` with an async
function to be run in the framework thread, one can use
`RunOnFrameworkThreadAwaitable` instead now.

* TaskSchedulerWidget: test better stuff

* TaskSchedulerWidget: add freeze tests

* More comments

* Make TaskFactory a getter method instead of property to avoid bad suggestions

* Why are there stuff still not pushed
2024-03-18 20:10:47 -07:00
github-actions[bot]
4abb3535fa Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-16 16:02:57 +00:00
srkizer
710fff118d
Remove unnecessary stuff from ObjectTable (#1713)
* Remove unnecessary stuff from ObjectTable

* Remove unused

* fix
2024-03-14 14:37:52 -07:00
Soreepeong
033a57d19d Merge remote-tracking branch 'upstream/master' into feature/inotificationmanager 2024-03-14 13:06:04 +09:00
srkizer
a26bb58fdb
Use custom TaskScheduler for Framework.RunOnTick (#1597)
* Use custom TaskScheduler for Framework.RunOnTick

* TaskSchedulerWidget: add example
2024-03-14 00:36:38 +01:00
Asriel Camora
5f62c703bf
Add IContextMenu service (#1682) 2024-02-29 15:15:02 -08:00
Soreepeong
a7d5380796 Cleanup 2024-02-28 17:11:30 +09:00
Soreepeong
42b6f8fd4b fix disposes and add TextureWrapIconSource 2024-02-28 17:11:30 +09:00
Soreepeong
3ba395bd70 Implement INotificationManager 2024-02-28 17:11:29 +09:00
Soreepeong
a3217bb86d Remove InitialiationTask from interface 2024-02-21 16:34:53 +09:00
Soreepeong
c27422384f IGameConfig: fix load-time race condition
As some public properties of `IGameConfig` are being set on the first
`Framework` tick, there was a short window that those properties were
null, which goes against the interface declaration.

This commit fixes that, by making those properties block for the full
initialization of the class.

A possible side effect is that a plugin that is set to block the game
from loading until it loads will now hang the game if it tries to access
the game configuration from its constructor, instead of throwing a
`NullReferenceException`. As it would mean that the plugin was buggy at
the first place and it would have sometimes failed to load anyway, it
might as well be a non-breaking change.
2024-02-20 15:37:54 +09:00
Soreepeong
e594d59986 Enable tracking only when there exists a subscriber 2023-12-02 12:58:55 +09:00
Soreepeong
35b0d53e80 Add typed event variants 2023-12-02 10:59:13 +09:00
Soreepeong
1039c1eb8a Cleanup 2023-12-02 10:22:07 +09:00
Soreepeong
6dd34ebda4 support merge/split events 2023-12-01 22:37:24 +09:00
Soreepeong
35f4ff5c94 wip 2023-12-01 21:51:09 +09:00
Soreepeong
34e3adb3f2 wip; needs testing and more thinking 2023-12-01 18:10:43 +09:00
MidoriKami
7c6f98dc9f Proposed API Surface 2023-11-30 22:18:33 -08:00
Soreepeong
5204bb723d Optimizations 2023-11-30 20:42:34 +09:00
MidoriKami
92f4df625f [GameInventory] Service Prototype 2023-11-30 20:22:08 +09:00
MidoriKami
e12ec0ceff
Add FrameworkPluginScoped (#1442)
Co-authored-by: KazWolfe <KazWolfe@users.noreply.github.com>
2023-10-21 18:06:02 -07:00
MidoriKami
0f349bb3dd
IChatGui Add Readonly RegisteredLinkHandlers (#1487) 2023-10-15 12:19:14 +02:00
KazWolfe
2083ccda00
Remove internal dependencies on opcodes (#1464)
- Removes the opcode lists from internal API entirely
- Move NetworkHandlers to use packet handler sigs
- Remove opcode data from NetworkMonitorWidget
2023-10-05 17:01:03 +00:00
KazWolfe
34c05adeb1
Remove IPluginLog#Logger for now (#1428)
- Causes issues with mocking.
2023-09-23 19:58:21 -07:00
goat
8527e035f1
chore: remove refcounting, keepalive logic from TextureManager, remove scoped service
Makes this whole thing a lot simpler to use and easier to understand.
2023-09-23 17:40:49 +02:00
goat
c767971a36
move around new Addon services a bit to match folder structure 2023-09-23 13:09:43 +02:00
goat
6fbcd0e0e4
chore: don't use ImGuiScene.TextureWrap for any external API, IDalamudTextureWrap does not inherit from ImGuiScene.TextureWrap any longer 2023-09-23 13:05:19 +02:00
goat
af52da06b0
merge master 2023-09-23 11:22:50 +02:00
goat
7a182b6ef7
Merge branch 'v9' into ihookprovider 2023-09-23 10:57:09 +02:00
goat
c3dd2364bb
Merge pull request #1415 from MidoriKami/AddonLifecycle_IAddonArgs 2023-09-23 10:50:15 +02:00
goat
1304c54eff
docs fixed 2023-09-23 10:39:29 +02:00
Kaz Wolfe
d29422bc50
Add IPluginLog#Info
- Shorthand for information log lines, because typing out `Information` is too much.
2023-09-22 23:22:59 -07:00
MidoriKami
c6c28c6e3f Change default name so auto generate stops complaining about improper casing. 2023-09-22 21:12:44 -07:00
MidoriKami
fd3bd6dc5b Use abstract class instead of interface 2023-09-22 12:17:54 -07:00
MidoriKami
43abb12710
Add GameConfigPluginScoped (#1383)
* Add GameConfigPluginScoped

* Proposed Resolution to sub-object events

* Nullify delegates to prevent memory leaks
2023-09-21 21:55:56 -07:00
MidoriKami
b742abe77f
Add ClientStatePluginScoped (#1384)
* Add ClientStatePluginScoped

* Restore InvokeSafely

* Add InvokeSafely for basic Action types.

* Set delegates to null to prevent leaking memory

* Resolve Merge
2023-09-21 21:55:16 -07:00
MidoriKami
26838d9f5c Auto generate paramkeys and return handles to events. 2023-09-21 20:47:49 -07:00
MidoriKami
0636a03e41 Include argument data in event information. 2023-09-21 15:26:08 -07:00