Commit graph

539 commits

Author SHA1 Message Date
Jack
6e32a58480
Refactor debugoverlay.cpp (fix smart pistol lines) (#538)
Refactors `debugoverlay.cpp` based on primedev and fixes smart pistol lines in the process.

Co-authored-by: F1F7Y <64418963+F1F7Y@users.noreply.github.com>
2023-10-30 20:29:15 +01:00
Jack
cfc32a6bd6
Run add-to-project on new PRs (#584)
Fix the add to project workflow so that it works on PRs from forks, securely
2023-10-23 22:41:52 +02:00
Jan
db5eac19f6
Replace field preprocessors with less hacky solutions (#492)
This behavior is a lot simpler and less dependent on how constants are represented during the preprocessing step.
2023-10-23 15:53:16 +02:00
Jack
d463a43474
Use 4th digit in version number for CI build number (#541)
Sets the 4th digit of the version number to the current CI run number.
This is done to more easily link a binary back to the PR or commit it came from.
2023-10-16 14:51:24 +02:00
Jan
f763e66a1f
Fix proton detection output (#534)
Fixes Proton detection logic printing incorrect basename
2023-10-15 22:18:19 +02:00
H0L0
f24089e2d7
Add check for r2/maps folder (#575)
Adds a fix to check if `r2/maps` folder exists before trying to iterate through it.
2023-10-15 22:12:02 +02:00
Jack
98af0dcbb4
Move plugin communication handler init out of plugin manager init (#581)
Plugin state requires this to be initialised even if `-noplugins` is passed, but if `-noplugins` is passed, it doesn't get initialised.

Moving this to `dllmain` guarantees that it is initialised properly and prevents #580
2023-10-15 21:57:41 +02:00
Jan
fb7b538c2f
Revert "Update libcurl to 8.4.0" (#574)
Newer releases of libcurl break the docker container

This reverts commit 99c5c86e18.
2023-10-15 11:22:03 +02:00
GeckoEidechse
db5ef8d6b0
Only run add-to-project action on issues (#577)
Only run on issues
PRs from forks are triggered from that fork which means that they don't have access to the necessary token
2023-10-15 02:05:58 +02:00
Jack
2dd19ab51f
Add workflow for adding PRs and Issues to the project board (#572)
Automatically adds all opened issues and pull requests to the project board.
2023-10-14 22:55:56 +02:00
Jan
99c5c86e18
Update libcurl to 8.4.0 (#568)
Addresses:
- https://curl.se/docs/CVE-2023-38545.html
- https://curl.se/docs/CVE-2023-38546.html
2023-10-12 03:01:47 +02:00
Jan
9adf88f46d
Correct submodule detection (#569)
The contents of the submodules were incorrectly counted resulting in a git submodule update on every cmake invocation
2023-10-11 22:55:25 +02:00
GeckoEidechse
16f85420b3
Make link to BUILD.md relative to README.md (#571)
Make link to BUILD.md relative to README.md instead of a hardcoded link to relevant GitHub page
2023-10-11 17:43:06 +02:00
GeckoEidechse
14c01e829c Trim trailing whitespace 2023-10-11 15:44:55 +02:00
GeckoEidechse
a9a1e0822c
Fixed mixed indentation in utils.cmake (#570)
The file had mixed indentation (spaces and tabs) when really it
should've been spaces only from the beginning
2023-10-11 15:41:34 +02:00
GeckoEidechse
57201649e7
Fix incorrect help string text (#567)
Help strings for `ns_server_name` and `ns_server_desc` were swapped.

Co-authored-by: BobTheBob <32057864+BobTheBob9@users.noreply.github.com>
2023-10-10 14:29:24 +02:00
F1F7Y
c1745b29ad
Add mileslog_enable convar (#515)
Adds a convar to toggle whether we should log from the miles log func

Most of these warnings are warnings about events being starved, in some cases slowing down the game due to the number of log calls.
2023-10-10 02:28:32 +02:00
Rémy Raes
a040bff98c
Create mod entry in enabledmods.json if it doesn't exist (#410)
Currently, when you add a new mod to your `mods/` directory, when there's no associated entry in the `enabledmods.json` file, it is considered enabled by default; mod entries are only written in `enabledmods.json` when toggling them via the mods interface.

In this pull request, I propose to create mod entries in `enabledmods.json` on startup when detecting they don't exist.
2023-10-09 01:34:47 +02:00
F1F7Y
70a0114caa
Rewrite crash handler (#477)
The goal of this commit is to make the crash handler code more readable and fix some issues.

- Format registers
- Format Modules
- Format stacktrace
- Format mods
- Create minidump
2023-10-08 22:11:55 +02:00
Jack
024605399a
Reduce warnings due to calling conventions (#555)
Fix instances of "anachronism used: modifiers on data are ignored"
2023-10-07 14:28:43 +02:00
Jack
c093ee10f0
Expose origin auth state and errors to squirrel (#468)
Also moves `NSIsMasterServerAuthenticated` out of `scriptserverbrowser.cpp` because it didn't really fit there

This will be used for showing failed origin auth errors in the game's UI
2023-10-07 12:25:09 +02:00
H0L0
9d8bedf580
Write date to logs (#565)
Next to time also write date to log files.
2023-10-06 00:50:53 +02:00
GeckoEidechse
b269c4df61
Define indent size in editorconfig (#550)
Setting indent size in `.editorconfig` means that things like GitHub web
preview will default to showing tab indent size as 4 spaces.
2023-10-04 13:57:34 +02:00
Jan
5798c6369c
Give g_pMemAllocSingleton a default value (#563)
Give default value as standard does not define value if uninitialised.
2023-10-04 13:56:48 +02:00
Jack
1d30b2d5ee
Always allow the local player through the banlist (#540)
Adds a check to always allow local player through banlist to aid with players accidentally banning themselves.
2023-10-04 01:04:32 +02:00
GeckoEidechse
2a3be90915
Revert "Add a safeguard to map command" (#561)
Revert "Add a safeguard to map command (#529)"

This reverts commit cde626b041.
2023-10-03 19:32:14 +02:00
Jack
d6f0cd508d
Fix crash when running disconnect %%s (#554)
Co-authored-by: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>
2023-10-02 23:44:27 +02:00
cat_or_not
cde626b041
Add a safeguard to map command (#529)
Adds safeguard to the `map` command that prevents it from executing if the requested map is invalid or no map argument is given.
2023-10-02 23:17:22 +02:00
F1F7Y
0cbdd56728
Set spewlog_enable default value to 0 (#516) 2023-09-17 02:40:00 +02:00
Jack
af1df846a3
Export Northstar version number in DLL (#542)
Export version number in `Northstar.dll`
2023-09-15 01:42:21 +02:00
F1F7Y
1979247175
Fix CSquirrelVM::Init hook in server.dll (#544)
Fix typo in offset
2023-09-15 00:36:25 +02:00
Rémy Raes
e51d345a20
feat: Enforce Thunderstore format for remote mods (#535)
* feat: enforce Thunderstore format for remote mods

* refactor: remove remote mods directory from "classic" mod loading

---------

Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
2023-09-15 00:31:37 +02:00
Cyn
a27368df36
Linux build instructions in BUILD.md (#531)
Adds Linux build instructions and corresponding Docker file.
2023-09-14 21:11:59 +02:00
Jan
07e76e3a8e
Support DLLs in Profile from wsock32 proxy (#527)
* Copy LoadNorthstar from NorthstarLauncher to wsock proxy
* add missing bits
2023-08-05 18:56:33 +02:00
Jan
300521638f
Turn VPKData into a opaque struct (#510) 2023-07-29 23:02:38 +02:00
Jan
0af8c500ae
Validate package pattern before checking for plugins (#525)
Adds missing validation check to ensure that the package folder the plugin is included in matches the `AUTHOR-MOD-VERSION` pattern.
2023-07-29 22:48:24 +02:00
Jan
e3f2c4c662
Warn about the package dir, not the mod dir (#526) 2023-07-29 22:17:18 +02:00
F1F7Y
82bff57d16
Remove pch.cpp and all #include "pch.h" occurrences (#519)
With the move to cmake there is no need for the `pch.cpp` files as it generates them automatically.
Also removes leftover `#include "pch.h"` occurrences
2023-07-28 23:26:13 +02:00
F1F7Y
24400184f3
Make sure packages dir exists when loading plugins (#523)
Create packages directory in `PluginManager::LoadPlugins()` to avoid crashing when trying to read non-existent directory
2023-07-28 22:28:59 +02:00
F1F7Y
e742eb35cc
Fix plugins not loading (#522)
Fixes a regression introduced in #513
2023-07-28 16:12:31 +02:00
Jan
a65cbeacfb
Add support for loading plugins from Thunderstore packages (#513)
Adds support for loading plugins from `packages` directory which was missing from the original PR that introduced the `packages` directory.
2023-07-27 22:55:42 +02:00
Jan
2e6c1cffab
Replace forward slashes with windows path separators (#514)
Replace forward slashes with backward slashes in some string constants to make things more consistent.
2023-07-25 16:33:05 +02:00
Jan
ddb4670354
Remove Vector3 Constructor (#494)
- Packing was enabled because the compiler may add padding which we don't want.
- Constructors were removed because they were either rather primitive or broken (the `pRawFloats` one).
- Use of constructor was replaced with a simple cast, which works just as well.
2023-07-25 16:31:02 +02:00
EladNLG
cf8b267d31
Safe I/O 2 - Electric Boogaloo! (#404)
* Safe I/O initial commit

* Formatting

* Formatting 2

* God help us all.

* fix diffs part 1

* fix diffs 2

* Fix invalid filter file

* Update NorthstarLauncher.vcxproj

* Remove newline at EOF

* fix the damn thing

* God help the diffs

* diff hate

* diff hate the 2nd

* Add comments since this code is unreadable

Now, this code may look readable, but I barely understand what I did here myself.

* Remove char limit and file definitions

* Fix build

* organization stuff

* Fix build

* More funcs, more stuff

* format fix

* oops, this is wrong.

* fix a thing

* Add max folder size (250MB) and add getallfiles

* Fix build also size cap

* reduce max folder size to 50MB

* he forgor

* i give up

* aync edition?????

* Fix max size bypass

* fix it

* Remove logs

* Add max folder size launch arg

* boop

* FUCK SHIT

* FUCKKKKKKKKKKK

* Fix build

* Fix crash

* Fix error FINAL!!!

* fix scriptjson.h not being found

* fix scriptjson.h not appearing correctly

* shit diffself

* format fix

* Fix indentation (thank you vscode)

* Fix indentation again

* adadasa

* shit diffself

adadasa

Fix indentation (thank you vscode)

Fix indentation again

* format fix

* Revert "shit diffself"

This reverts commit b49a62b5b3.

* Revert "Merge branch 'safe-io-rewrite' of https://github.com/EladNLG/NorthstarLauncher into safe-io-rewrite"

This reverts commit 761eb8a1cb, reversing
changes made to 65549b2f79.

* Fix the diff finally

* more diff fixes

* Fix more diffs

* Allow non-ascii characters that aren't NUL

* format fix :(

* this is untested and I don't wanna update the safe i/o test thing

* fix build :(

* fix mayhaps?

* fix build

* Fix lotsa stuff :D

* FIxed :D

* Rewrite error messages, rename CheckFileName to IsPathSafe

* Shout out to clang-format!

* oops, wrong error message :3

* SHOUT OUT TO CLANG-FORMAT!!!

* Revert "SHOUT OUT TO CLANG-FORMAT!!!"

This reverts commit c536384073.

* :(

* oop

* Add failure callback (launcher)

* unnecessary comment

* holy shit format fix
boooooo. BOOOOOO!

* restrict path to ASCII

* Fix ascii check I hate you all

* reformat

* Clang-format my beloved :)

* Move the thing

* Apply suggestions from code review

Co-authored-by: Rémy Raes <contact@remyraes.com>

* clang-format no like code suggestions :(

* name change

* doc'd

* - Replace the mutex map with a single mutex for all file actions
- Fix Load calls sometimes failing and not calling NSHandleLoadResult
- Add NSGetTotalSpaceRemaining which checks how much space a mod has, in KB
- Add contstant MAX_FOLDER_SIZE which holds the maximum save folder size, in KB

* add safe-io stuff to cmake

* surrounds IsPathSafe with a try/catch

---------

Co-authored-by: Rémy Raes <contact@remyraes.com>
Co-authored-by: uniboi <kami.0.katze@gmail.com>
2023-07-22 21:02:22 +01:00
Jan
d3fb76f889
Replace vendored libcurl and minhook with submodules (#500)
* Replace vendored libcurl and minhook with submodules
* Add cmake utility for checking submodules and initializing them
* Update build instructions to use Git
2023-07-22 02:22:26 +02:00
F1F7Y
9841d698f8
Search for Northstar.dll in profile directory (#451)
Looks for `Northstar.dll` in the specified profile directory using `-profile=<dir>`. If it doesn't exist it defaults to the `Northstar.dll` in the root directory.

This allows for having a separate DLL for each profile.
2023-07-17 20:26:59 +02:00
Jan
06825e3096
Add OS, Wine and Proton logging (#502)
Adds logging for OS, Wine, and Proton versions.
2023-07-16 22:05:37 +02:00
Jan
24248c7419
CMAKE: set build type if not previously set, turn bin dir message into status (#497) 2023-07-16 21:43:26 +02:00
GeckoEidechse
0309af134e
Add support for loading Thunderstore mods natively (#503)
Allows for loading Thunderstore mods directly from a separate directory called `packages`.
2023-07-16 21:23:50 +02:00
Jack
9f9e3a906f
Improve logging for mods (#445)
- Removes the log spam of "changing mod search path"
- Logs mods as they are loaded, alongside their ConVars, Scripts, ConCommands, etc.
- Warns in the console about errors in the mod.json instead of silently skipping things
2023-07-07 17:11:43 +02:00