2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-04-05 17:39:39 -04:00

41 Commits

Author SHA1 Message Date
Xjph
b8f5f6a73e ready for testing 2024-01-21 13:35:03 -03:30
Xjph
86cd7fe3e4 WIP: observatory UI overhaul 2023-07-07 08:36:27 -02:30
Xjph
f73227f02f Update to avalonia 11 preview 2023-05-05 09:38:00 -02:30
Xjph
565aaf0838 Apply same test for string length for both ordinal operations 2023-01-19 19:20:58 -03:30
Xjph
cacaa98033 Fix barycentre naming logic 2023-01-17 19:06:30 -03:30
Jonathan Miller
f9341c8cd3
Allow omit of explicit true in complex criteria (#101) 2022-12-21 10:02:06 -03:30
Xjph
eeae99dc2a Migrate to .NET 6 2022-12-04 15:01:56 -03:30
Xjph
95db12de72 Additional custom criteria convenience functions. 2022-09-04 19:20:49 -02:30
F K
11a2dcb819
Adds ring/belt helper functions, improved criteria debuggability (#96)
Adds new functions to the Lua environment available to custom criteria for handling rings and belts:
- the existing `rings(scan.Rings)` function behavior is unchanged
- NEW: `ringsOnly(scan.Rings)` and `beltsOnly(scan.Rings)` functions return ONLY rings or belts, respectively, and shortcuts the `scan.Rings` check
- NEW: `hasRings(scan.Rings)` and `hasBelts(scan.Rings)` functions return true if there are one or more proper rings or belts, respectively, in scan.Rings and shortcuts the check, too

Furthermore, this adds a debugging aid that identifies what custom criteria caused an error/crash. For simple criteria, ie:
`::Hot Landable::`
... the description "Hot Landable" is used. For complex criteria, you can now annotate the `::Criteria::` line with a description used for debugging like so:
`::Criteria=Hot Landable::`. Criteria errors are logged like this:

```
Error encountered in Elite Observatory from plugin Explorer while processing custom criteria 'Criteria14=I just crash' on scan:
```

Duplicates are avoided by prepending the user-provided description with a generated name (ie. `Criteria14`, in the example above).

Finally, the Detail expression for simple criteria can now safely reference values checked as part of the criteria condition. In particular, the Detail expression is now conditionally evaluated if the result is true. So the following will now work (previously it failed for non-star bodies when StarType was nil):

```
::Ringed Star::
scan.StarType and hasRings(scan.Rings)
::Detail::
'Star type: ' .. scan.StarType
```
2022-08-29 09:45:51 -02:30
Xjph
ef31102d11 Handle barycentres without ordinals 2022-06-26 13:27:21 -02:30
Xjph
48284c574d Make Lua GC call nullsafe 2022-06-26 13:14:02 -02:30
Xjph
d03d75aa24 Add descriptive error for multi-line criteria overruns. 2022-06-05 23:14:04 -02:30
Xjph
2200b94a6c Manually trigger Lua GC periodically. 2022-05-29 21:57:57 -02:30
Xjph
bb9185ef8a Guard against empty rings array. 2022-05-29 21:52:44 -02:30
F K
fc4d038645
Workaround journal bug: Already mapped bodies are not undiscovered (#85)
Just checking something is not already discovered is not enough. Many valuable bodies in the bubble mis-fire this criteria because the journal reports them as not discovered (because they have no first discoverer because they're well known systems). Checking that they're also not mapped ensures this doesn't happen.

Also simplified rendering of the string info.
2022-05-28 18:56:47 -02:30
F K
8106fbd0df
Explorer: Show data for the current system only (#86)
Resolves #63

This behavior is suppressed during batch reads.
2022-05-28 10:33:36 -02:30
Jonathan Miller
8de34a141c
Export version fixes (#83)
* Add file association for .eop, prompt for install dir

* Handle .eop or .aip file passed as arg.

* VS2022 version bump

* Filter neutron stars and black holes from fast spinning criteria.

* Adjustments for new "high value" check

* Refactor herald cache

* Fix element order and namespaces for voice moods.

* Add explicit .Stop() between audio player calls.

* Use nullsafe member access instead of skipping

* Don't queue up a title that's already queued.

* Improve body ordinal handling for explorer speech titles.

* Escape strings being inserted into xml

* Handle flip-flopping JSON type

* Converter for flip-flopping property type

* Use the converter

* Escape characters *before* we wrap it in xml.

* Give Eahlstan his clear button. :D

* Exclude all stars from fast rotation check.

* Close outstanding popup notifications on exit.

* TO DONE

* [Herald] Suppress duplicate notification titles for spoken notifications

If you have notifications from multiple plugins producing notifications with the same title in quick succession (ie. "Body A 1 e" from both Explorer and BioInsights), the title on successive notifications will not be spoken again to save the breath of our friendly Azure speakers.

* Doc update

* Remove unintended member hiding

* Fix export errors when exporting BioInsights data, cleanup

Discovered a couple issues with exporting BioInsights data resulting from using two different types of objects in the data grid; improved error handling as well.

Also cleaned up some old-style read all code.

* Add read-all on launch setting

* Updated framework xml

* Improve high-value body description text

Co-authored-by: Fred Kuipers <mr.fredk@gmail.com>
2022-05-21 13:00:47 -02:30
Phil Chuang
9708a5fbc7
added HighValueMappable checks (#81)
* added HighValueMappable checks

* added high value mappable details
2022-05-09 11:12:17 -02:30
F K
ab365cd322
Expose core error logger to plugins and report custom criteria errors (#78)
* Expose core error logger to plugins and report custom criteria errors

Fixes #77

This adds an error logging method on the IObservatoryCore interface that writes the exception details to ObservatoryCore's central error log (found in `${Documents}/ObservatoryErrorLog.txt`). In addition, added a timestamp to each error log.

Also updates the Explorer to report Custom Criteria file load errors and execution errors to the log. Also updates HeraldNotifier to report CacheIndex.json parse failures to the error log as well.

* Expand debugging/error logging in Herald; cleanup empty mp3 files

Herald crashes if attempting to play 0-byte mp3s so if detected, delete, re-request (empty files can occur in some azure failure cases (ie. out of quota). Trap and log errors in other places in HeraldQueue to avoid hard crashes due to weird and wonderful unexpected stuff.
2022-05-03 19:02:31 -02:30
Xjph
3fe3ef9901 Updated versioning 2022-04-04 12:29:59 -02:30
F K
fcf6f71abf
Distinguish Close Belt proximity and Close Ring proximity criteria (#70)
If it's a belt, report it as a belt instead of a ring.

See 7c209efb9f1e4eeb248b36d65463aa10e6f2f70e for context.
2022-03-23 08:14:42 -02:30
F K
4f4ba88878
Add event-based LogMonitor state changes to better handle batch reads (#59)
* Add event-based LogMonitor state changes to better handle batch reads

Pre-reading hackily used read-all to suppress notifications. But that broke some assumptions about what read-all meant. Furthermore, the Core UI told plugins about read-all rather than the log monitor telling them -- which is really what should be telling them.

To address these concerns, LogMonitor now provides an event that both the PluginCore and PluginEventHandler listens to or tracking logging state allowing more granular information about the activities of LogMonitor, including distinguishing between ReadAll and Pre-read batches. Plugins no longer need to track if LogMonitor is in batch-read mode or not -- PluginCore now provides it. 

I've also converted all built-in plugins to use the new event-based system. The old system is marked deprecated and will go away once other known contributed plugins have converted to the new system.

* Change LogMonitorState enum to [Flags], drop 'None' state

As requested, and did associated simplifications and cleanup that followed.
2022-03-03 16:39:49 -03:30
Xjph
7c209efb9f
Revert "Close Ring Proximity criteria: Prevent it from triggering on a belt (#56)" (#58)
This reverts commit d9fbdd5269c53cc196b3a7fc0c18077d6060f06d.
2022-02-26 20:10:29 -03:30
F K
d9fbdd5269
Close Ring Proximity criteria: Prevent it from triggering on a belt (#56)
I actually had this recently, which is how I found it.
2022-02-26 17:18:49 -03:30
Xjph
b2d0637146 handle nil values in lua iterators 2021-12-18 13:23:05 -03:30
Xjph
76dada8651 Removing "multiple criteria" setting 2021-11-22 11:20:14 -03:30
Xjph
45b3dbf115 Suppress body ordinal in results for system-wide checks 2021-11-22 11:18:33 -03:30
Xjph
27a6b8c39d Fix green and gold material checks #36 2021-11-22 11:09:49 -03:30
Xjph
5485d5b955 add check for uncommon secondary #38 2021-11-22 10:48:08 -03:30
Xjph
cffaec92ec Place custom criteria call inside try block 2021-11-22 10:14:27 -03:30
Xjph
b4ce5b641c Error clarity
Make more clear that the error is happening during the criteria file read, not while processing scans.
2021-11-18 08:29:12 -03:30
Xjph
cd246c76e8 Implement close binary check 2021-11-15 11:19:57 -03:30
Xjph
554948534e
observatory herald (#30)
* WIP: initial commit for observatory herald

* Plugin error handling refactor

* make error window non-modal

* tidy up plugin error handling

* first pass for basic herald functionality

* corrections for linux env

* Use FNV hash directly instead of managing through dictionary/index file

* resolve audio queuing issue, switch to personal NetCoreAudio fork

* merge cleanup

* add enable setting, populate defaults

* framework xml doc update

* Adjust settings, add style selection, replace locale with demonym in dropdown list.

* Test is position is on screen before saving/loading.

* use a default that's actually in the list
2021-11-15 10:57:46 -03:30
F K
deee600a65
Adding protection against a null parent reference. (#26)
Found this via ReadAll on my history. I can now process all my history without error.
2021-10-29 08:36:18 -02:30
xjph
5d1489c7c5 more streamlining of linux build process 2021-10-27 22:37:37 -02:30
Xjph
2806c1f081 quote paths in post-build commands 2021-10-27 18:59:04 -02:30
Xjph
42c27a5f81 remove extraneous slashes from postbuild paths 2021-10-26 22:13:23 -02:30
xjph
5cd4e41470 create directly if necessary 2021-10-26 20:11:54 -02:30
Xjph
a21fe442ad updated pre/post-build actions 2021-10-26 19:46:00 -02:30
xjph
f6fe653274 more tweaks for linux building 2021-10-24 19:24:17 -02:30
Xjph
4c1031b8f9
Reorganize all observatory core projects into monorepo (#25)
* chore: move all observatory repos to core

* only save journal folder on change, don't constantly re-check during monitoring

* chore: monorepo project changes

* chore: monorepo migration
2021-10-21 19:31:32 -02:30