TheStarport / FLHook

A Server Improvement for Freelancer.
GNU General Public License v3.0
30 stars 15 forks source link

Add Callsign Randomisation & Faction Recognition #242

Closed Lazrius closed 1 year ago

Lazrius commented 1 year ago

When an NPC hails you normally, it will always call you Freelancer Alpha 1-1. This allows you to refer to the faction name of the player by affiliation and random numbers like 3-6 or 4-20. By default it will randomise your formation designation too and will reference all possible formations (alpha, beta, gold, yellow, yinagi, etc). This can be filtered through the config.

The selected numbers and formations are selected on character select.

Whoever reviews this, please test it yourself. This is memory heavy edits and I want to make sure that it works as intended.

Lazrius commented 1 year ago

I noticed a bug with multiple clients. The packet processing occurred too late and some of the calls would get done in the wrong order, resulting in incorrect callsigns. I've made changes to Detour the SendComm function instead to remedy this. As part of this PR, as a consequence, my detour rework code has been added - otherwise fairly severe merge conflicts.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication