Compare commits

...

13 commits

Author SHA1 Message Date
8a2091d01c
fix: typos & stuff, correct warning glyph 2024-05-12 01:16:44 +02:00
d4f0162b20
fix: reverted accidentally checking in .net 7 test files 2024-05-12 00:16:59 +02:00
5ef5b61c3c
feat: added RATSIGNAL warning support to plugin
Again, no profile support (yet)!
2024-05-11 23:50:15 +02:00
97df695b56
fix[RatAttack]: RATSIGNAL regex updated
Can now handle the Thargoid controlled warning sign. Does _not_ mean
that the RatAttack profile handles it in any way!

Thanks to Daecor for reporting and assisting in fixing.
2024-05-11 23:32:10 +02:00
e0aa95b888
fix[ci]: fixed forgejo release (hopefully) 2024-05-11 23:27:49 +02:00
26039d9648
chore: forgejo workflows 2024-02-18 23:46:12 +01:00
517773d3ec
CHANGELOG formatting :< 2023-07-29 18:49:06 +02:00
4938147557
bumped Ratattack version 2023-07-29 18:48:13 +02:00
alterNERDtive
5795ae8749
Merge pull request #167 from ro5490/RatAttack-Update 2023-07-29 17:43:05 +02:00
Ro5490
22ff4699d5 Update Ratsignal Regex 2023-05-23 20:58:25 +01:00
bd2b933bc9
docs: fixed RATSIGNAL IRC config
`??_SIGNAL` → `*_SIGNAL` to cover the new `ODY_SIGNAL`
2022-09-20 19:57:30 +02:00
d260199a58
base: removed explicit Newtonsoft.Json requirement
At compile time everything seems alright, but at runtime
Microsoft.AspNet.WebApi.Client decides that 13.0.1 is no longer ≥6.0.4
and errors out.

Great.
2022-09-20 19:56:11 +02:00
102718139c
fixed gh-pages workflow … 🤦 2022-09-19 18:28:48 +02:00
10 changed files with 174 additions and 145 deletions

View file

@ -0,0 +1,30 @@
name: Create release on tag push
on:
push:
tags:
- "releases/*.*"
- "releases/*.*.*"
jobs:
build:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ">=1.20.1"
- name: Draft release
uses: https://gitea.com/actions/release-action@main
with:
body_path: "./CHANGELOG.md"
draft: true
api_key: "${{ secrets.RELEASE_TOKEN }}"

View file

@ -1,20 +0,0 @@
name: Pull Request on Branch Push
on:
push:
branches-ignore:
- devel
- release
jobs:
auto-pull-request:
name: Open pull request
runs-on: ubuntu-latest
steps:
- name: pull-request-action
uses: vsoch/pull-request-action@1.0.19
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_BRANCH: "devel"
PULL_REQUEST_DRAFT: true
PASS_IF_EXISTS: true

View file

@ -13,7 +13,7 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Draft release
uses: ncipollo/release-action@v1

View file

@ -3,8 +3,8 @@
on:
push:
tags:
- 'release/*.*'
- 'release/*.*.*'
- 'releases/*.*'
- 'releases/*.*.*'
jobs:
build:

View file

@ -1,4 +1,22 @@
# 4.5 (2022-09-19)
# devel
## SpanshAttack 7.2.3
### Fixed
* Fixed `Newtonsoft.Json` version conflict that prevented getting approximate
coordinates for an unknown system from EDTS.
## RatAttack 6.4.1
### Fixed
* Fixed RATSIGNAL regex for the `LEG/HOR/ODY` distinction.
* Fixed RATSIGNAL regex for Thargoid controlled system warning sign.
-----
# 4.5 (2022-09-19)
This might very well be the last release of this. With how the “Horizons 4.0”
launch went, Frontiers communication around it, and just _how_ horrible 4.0 is,

View file

@ -1 +1 @@
4.5
4.5.1

View file

@ -1,108 +1,108 @@
# RatAttack
## Getting Case Data From IRC
You can setup your IRC client to pass incoming RATSIGNALS to VoiceAttack by
calling the `RatAttack-cli.exe` helper tool with the RATSIGNAL as first argument
and an optional boolean as second argument that triggers a TTS case
announcement. You can find it under your VoiceAttack “Apps” folder,
`\alterNERDtive\RatAttack-cli.exe`.
**Note**: If you are running VoiceAttack as admin, you need to run your IRC
client as admin, too! Otherwise they cannot communicate. In general you want to
run both with normal privileges.
This has two purposes:
1. Announcing a new incoming case (if passing `true` as second argument).
1. Storing case data and making it available to VoiceAttack, e.g. for copying
the clients system into the clipboard.
For my AdiIRC, it looks like this (obviously change the path, please):
```adiirc
on *:TEXT:*RATSIGNAL*(??_SIGNAL):#fuelrats:{
if ( $away ) {
/run -h "X:\path\to\VoiceAttack\Apps\alterNERDtive\RatAttack-cli.exe" " $+ $replace($1-,","") $+ " false
}
else {
/run -h "X:\path\to\VoiceAttack\Apps\alterNERDtive\RatAttack-cli.exe" " $+ $replace($1-,","") $+ " true
}
}
```
If I am away it will just add the new case to the list. If I am not away, it
will announce it using TTS.
The “replace” part handles the fact that announcements now put the system in
quotes. They have to be escaped as double quotes (`""`) to create a correct
command invocation.
You get the gist; if not and you dont know how to do the same thing for your
IRC client, either switch to AdiIRC or bribe me to make an example for yours.
mIRC is a straight forward copy & paste job from Adi to mIRC (“Tools” → “Script
Editor” → “Remote”). Make sure you do not strip colour codes from incoming
messages!
Note for Hexchat users: Hexchat doesnt seem to have a simple way of doing this.
If you figure it out, Ill gladly add instructions here.
Keep in mind that if you are not on duty (see below) you will _not_ get case
announcements.
## Announcing Your Nearest CMDR
In case you have more than one CMDR registered as a Fuel Rat you can have
VoiceAttack announce the nearest one to a case and the distance. You will have
to go through a couple steps to set that up:
1. Have all CMDRs on EDSM.
1. Have all profiles on EDSM set to _public_ including your flight log (which
includes the current location).
1. Set the CMDR names you want to use (“customize setting set fuel rat
commanders”).
1. Enable the nearest CMDR announcements (“customize setting enable nearest
commander to fuel rat case”).
You can use this for a single CMDR, too. A less convoluted setup for announcing
the distance to your location in that case is on the list™ but does not have an
ETA yet.
Currently there is no way to specify a platform for each CMDR separately.
## Sending Text to FuelRats IRC
The profile will attempt to send calls to “\#fuelrats”, and you can send
messages from ingame chat to “\#fuelrats” and “\#ratchat”.
That will send text to windows with “\#fuelrats” and “\#ratchat” in
their title, respectively. If your IRC client does not do that, you will have to
change the “target” window of the `RatAttack.sendToFuelrats` and
`RatAttack.sendToRatchat` commands to reflect the actual window titles on your
system. I will look into making this more elegant to change in the future.
## Settings
Toggles:
* `auto close fuel rat case`: Automatically close a rat case when sending
“fuel+” via voice command or ingame chat. Default: false.
* `auto copy rat case system` : Automatically copy the clients system to the
clipboard when you open a rat case. Default: true.
* `fuel rat call confirmation`: Only make calls in #fuelrats after vocal
confirmation to prevent mistakes. Default: true.
* `fuel rat duty`: On duty, receiving case announcements via TTS. Default: true.
* `nearest commander to fuel rat case`: Announce the nearest commander to
incoming rat cases. Default: false.
* `platform for fuel rat case`: Announce the platform for incoming rat cases.
Default: false.
* `system information for fuel rat case`: System information provided by Mecha.
Default: true.
Other Settings:
* `fuel rat commanders`: All your CMDRs that are ready to take rat cases. Use
; as separator, e.g. “Bud Spencer;Terrence Hill”. Default: "".
* `fuel rat platforms`: The platform(s) you want to get case announcements for
(PC, Xbox, Playstation). Use ; as separator, e.g. “PC;Xbox”. Default: "PC".
# RatAttack
## Getting Case Data From IRC
You can setup your IRC client to pass incoming RATSIGNALS to VoiceAttack by
calling the `RatAttack-cli.exe` helper tool with the RATSIGNAL as first argument
and an optional boolean as second argument that triggers a TTS case
announcement. You can find it under your VoiceAttack “Apps” folder,
`\alterNERDtive\RatAttack-cli.exe`.
**Note**: If you are running VoiceAttack as admin, you need to run your IRC
client as admin, too! Otherwise they cannot communicate. In general you want to
run both with normal privileges.
This has two purposes:
1. Announcing a new incoming case (if passing `true` as second argument).
1. Storing case data and making it available to VoiceAttack, e.g. for copying
the clients system into the clipboard.
For my AdiIRC, it looks like this (obviously change the path, please):
```adiirc
on *:TEXT:*RATSIGNAL*(*_SIGNAL):#fuelrats:{
if ( $away ) {
/run -h "X:\path\to\VoiceAttack\Apps\alterNERDtive\RatAttack-cli.exe" " $+ $replace($1-,","") $+ " false
}
else {
/run -h "X:\path\to\VoiceAttack\Apps\alterNERDtive\RatAttack-cli.exe" " $+ $replace($1-,","") $+ " true
}
}
```
If I am away it will just add the new case to the list. If I am not away, it
will announce it using TTS.
The “replace” part handles the fact that announcements now put the system in
quotes. They have to be escaped as double quotes (`""`) to create a correct
command invocation.
You get the gist; if not and you dont know how to do the same thing for your
IRC client, either switch to AdiIRC or bribe me to make an example for yours.
mIRC is a straight forward copy & paste job from Adi to mIRC (“Tools” → “Script
Editor” → “Remote”). Make sure you do not strip colour codes from incoming
messages!
Note for Hexchat users: Hexchat doesnt seem to have a simple way of doing this.
If you figure it out, Ill gladly add instructions here.
Keep in mind that if you are not on duty (see below) you will _not_ get case
announcements.
## Announcing Your Nearest CMDR
In case you have more than one CMDR registered as a Fuel Rat you can have
VoiceAttack announce the nearest one to a case and the distance. You will have
to go through a couple steps to set that up:
1. Have all CMDRs on EDSM.
1. Have all profiles on EDSM set to _public_ including your flight log (which
includes the current location).
1. Set the CMDR names you want to use (“customize setting set fuel rat
commanders”).
1. Enable the nearest CMDR announcements (“customize setting enable nearest
commander to fuel rat case”).
You can use this for a single CMDR, too. A less convoluted setup for announcing
the distance to your location in that case is on the list™ but does not have an
ETA yet.
Currently there is no way to specify a platform for each CMDR separately.
## Sending Text to FuelRats IRC
The profile will attempt to send calls to “\#fuelrats”, and you can send
messages from ingame chat to “\#fuelrats” and “\#ratchat”.
That will send text to windows with “\#fuelrats” and “\#ratchat” in
their title, respectively. If your IRC client does not do that, you will have to
change the “target” window of the `RatAttack.sendToFuelrats` and
`RatAttack.sendToRatchat` commands to reflect the actual window titles on your
system. I will look into making this more elegant to change in the future.
## Settings
Toggles:
* `auto close fuel rat case`: Automatically close a rat case when sending
“fuel+” via voice command or ingame chat. Default: false.
* `auto copy rat case system` : Automatically copy the clients system to the
clipboard when you open a rat case. Default: true.
* `fuel rat call confirmation`: Only make calls in #fuelrats after vocal
confirmation to prevent mistakes. Default: true.
* `fuel rat duty`: On duty, receiving case announcements via TTS. Default: true.
* `nearest commander to fuel rat case`: Announce the nearest commander to
incoming rat cases. Default: false.
* `platform for fuel rat case`: Announce the platform for incoming rat cases.
Default: false.
* `system information for fuel rat case`: System information provided by Mecha.
Default: true.
Other Settings:
* `fuel rat commanders`: All your CMDRs that are ready to take rat cases. Use
; as separator, e.g. “Bud Spencer;Terrence Hill”. Default: "".
* `fuel rat platforms`: The platform(s) you want to get case announcements for
(PC, Xbox, Playstation). Use ; as separator, e.g. “PC;Xbox”. Default: "PC".

View file

@ -1,5 +1,5 @@
// <copyright file="RatAttack.cs" company="alterNERDtive">
// Copyright 20192022 alterNERDtive.
// Copyright 20192024 alterNERDtive.
//
// This file is part of alterNERDtive VoiceAttack profiles for Elite Dangerous.
//
@ -33,10 +33,10 @@ namespace RatAttack
/// </summary>
public class RatAttack
{
private static readonly Version VERSION = new ("6.4");
private static readonly Version VERSION = new ("6.4.1");
private static readonly Regex RatsignalRegex = new (
@"^RATSIGNAL Case #(?<number>\d+) (?<platform>(PC|Xbox|Playstation))( )?(?<mode>H3.8|H4.0|ODY)?(?<oxygen> \(Code Red\))? CMDR (?<cmdr>.+) System: (None|u\u200bnknown system|""(?<system>.+)"" \((?<systemInfo>([a-zA-Z0-9\s\(\)\-/]*(~?[0-9,\.]+ LY (""[a-zA-Z\-]+"" of|from) [a-zA-Z0-9\s\*\-]+)?( \([a-zA-Z\s]+\))?|Not found in galaxy database|Invalid system name))\)(?<permit> \(((?<permitName>.*) )?Permit Required\))?) Language: (?<language>[a-zA-z0-9\x7f-\xff\-\(\)&,\s\.]+)( Nick: (?<nick>[a-zA-Z0-9_\[\]\-\^]+))? \((H3|H4|ODY|XB|PS)_SIGNAL\)\v*$");
@"^RATSIGNAL Case #(?<number>\d+) (?<platform>(PC|Xbox|Playstation))( )?(?<mode>LEG|HOR|ODY)?(?<oxygen> \(Code Red\))? CMDR (?<cmdr>.+) System: (None|u\u200bnknown system|""(?<system>.+)""(?<warning> \u26a0\ufe0f)? \((?<systemInfo>([a-zA-Z0-9\s\(\)\-/]*(~?[0-9,\.]+ LY (""[a-zA-Z\-]+"" of|from) [a-zA-Z0-9\s\*\-]+)?( \([a-zA-Z\s]+\))?|Not found in galaxy database|Invalid system name))\)(?<permit> \(((?<permitName>.*) )?Permit Required\))?) Language: (?<language>[a-zA-z0-9\x7f-\xff\-\(\)&,\s\.]+)( Nick: (?<nick>[a-zA-Z0-9_\[\]\-\^]+))? \((LEG|HOR|ODY|XB|PS)_SIGNAL\)\v*$");
private static PipeServer<Ratsignal>? ratsignalPipe;
private static VoiceAttackLog? log;
@ -183,6 +183,7 @@ namespace RatAttack
string cmdr = match.Groups["cmdr"].Value;
string? language = match.Groups["language"].Value;
string? system = match.Groups["system"].Value;
bool warning = match.Groups["system"].Success;
string? systemInfo = match.Groups["systemInfo"].Value;
bool permitLocked = match.Groups["permit"].Success;
string? permitName = match.Groups["permitName"].Value;
@ -197,9 +198,9 @@ namespace RatAttack
system = "None";
}
Log.Debug($"New rat case: CMDR “{cmdr}” in “{system}”{(!string.IsNullOrEmpty(systemInfo) ? $" ({systemInfo})" : string.Empty)} on {platform}{(!string.IsNullOrEmpty(mode) ? $" ({mode})" : string.Empty)}, permit locked: {permitLocked}{(permitLocked && !string.IsNullOrEmpty(permitName) ? $" (permit name: {permitName})" : string.Empty)}, code red: {codeRed} (#{number}).");
Log.Debug($"New rat case: CMDR “{cmdr}” in “{system}”{(warning ? " " : string.Empty)}{(!string.IsNullOrEmpty(systemInfo) ? $" ({systemInfo})" : string.Empty)} on {platform}{(!string.IsNullOrEmpty(mode) ? $" ({mode})" : string.Empty)}, permit locked: {permitLocked}{(permitLocked && !string.IsNullOrEmpty(permitName) ? $" (permit name: {permitName})" : string.Empty)}, code red: {codeRed} (#{number}).");
CaseList[number] = new RatCase(cmdr, language, system, systemInfo, permitLocked, permitName, platform, mode, codeRed, number);
CaseList[number] = new RatCase(cmdr, language, system, warning, systemInfo, permitLocked, permitName, platform, mode, codeRed, number);
return number;
}
@ -295,6 +296,7 @@ namespace RatAttack
vaProxy.SetInt("~~caseNumber", rc.Number);
vaProxy.SetText("~~cmdr", rc.Cmdr);
vaProxy.SetText("~~system", rc?.System?.ToLower());
vaProxy.SetBoolean("~~warning", rc?.Warning);
vaProxy.SetText("~~systemInfo", rc?.SystemInfo);
vaProxy.SetBoolean("~~permitLocked", rc?.PermitLocked);
vaProxy.SetText("~~permitName", rc?.PermitName);
@ -409,9 +411,9 @@ namespace RatAttack
private class RatCase
{
public RatCase(string cmdr, string? language, string? system, string? systemInfo, bool permitLocked, string? permitName, string platform, string mode, bool codeRed, int number)
=> (this.Cmdr, this.Language, this.System, this.SystemInfo, this.PermitLocked, this.PermitName, this.Platform, this.Mode, this.CodeRed, this.Number)
= (cmdr, language, system, systemInfo, permitLocked, permitName, platform, mode, codeRed, number);
public RatCase(string cmdr, string? language, string? system, bool warning, string? systemInfo, bool permitLocked, string? permitName, string platform, string mode, bool codeRed, int number)
=> (this.Cmdr, this.Language, this.System, this.Warning, this.SystemInfo, this.PermitLocked, this.PermitName, this.Platform, this.Mode, this.CodeRed, this.Number)
= (cmdr, language, system, warning, systemInfo, permitLocked, permitName, platform, mode, codeRed, number);
public string Cmdr { get; }
@ -419,6 +421,8 @@ namespace RatAttack
public string? System { get; }
public bool Warning { get; }
public string? SystemInfo { get; }
public bool PermitLocked { get; }

View file

@ -33,7 +33,7 @@ namespace SpanshAttack
/// </summary>
public class SpanshAttack
{
private static readonly Version VERSION = new ("7.2.2");
private static readonly Version VERSION = new ("7.2.3");
private static VoiceAttackLog? log;
private static VoiceAttackCommands? commands;

View file

@ -71,9 +71,6 @@
<PackageReference Include="Microsoft.AspNet.WebApi.Client">
<Version>5.2.9</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
<PackageReference Include="System.Net.Http">
<Version>4.3.4</Version>
</PackageReference>