Commit Graph

32 Commits

Author SHA1 Message Date
gsemaj
d32827b692
The great re-#include
Was getting frustrated by the inconsistency in our include statements,
which were causing me problems. As a result, I went through and manually
re-organized every include statement in non-core files.

I'm just gonna copy my rant from Discord:
FOR HEADER FILES (.hpp):
- everything you use IN THE HEADER must be EXPLICITLY INCLUDED with the exception of things that fall under Core.hpp
- you may NOT include ANYTHING ELSE

FOR SOURCE FILES (.cpp):
- you can #include whatever you want as long as the partner header is included first
- anything that gets included by another include is fair game
- redundant includes are ok because they'll be harmless AS LONG AS our header files stay lean.

the point of this is NOT to optimize the number of includes used all around or make things more efficient necessarily. it's to improve readability & coherence and make it easier to avoid cyclical issues
2023-10-08 16:34:18 -04:00
5c1bb0acc9 Add enabledpatches config option
The server administrator must now specify which patches they want the
server to load (if deviating from the defaults). There are multiple
reasons for this:

* It's useful to be able to pick and choose which patches you want to
boot the server with; without having to move the directories in and out
of the patch directory
* This way, we can have different default patches for different builds
of the game (104 vs 1013)
* ...ergo, it's easier to rapidly switch builds without having to
rearrange your workspace to properly run them
* This also allows us to remove the std::filesystem stuff, which has
spotty compatibility with slightly older (but still current) versions of
the compilers
2021-05-07 21:29:18 +02:00
gsemaj
c7e2e66a51 Add /path command 2021-05-06 12:17:34 -04:00
gsemaj
26894c8a69 Implement automatic tdata patching 2021-05-06 12:17:34 -04:00
gsemaj
0c05fc4add Offset NPC IDs by 1 to avoid ID 0 2021-05-06 12:17:34 -04:00
gsemaj
e546d3948c [refac] Stop using WarpLocation for coordinates and introduce a Vec3 2021-05-06 12:17:34 -04:00
gsemaj
4bcf3af90f Use static JSON key as NPC ID for NPCs and mobs 2021-05-06 12:17:34 -04:00
gsemaj
14562f889e [refac] Create typedef for nlohmann::json 2021-05-06 12:17:34 -04:00
65462d01e3 Generalize NPC AI stepping logic
The MobAI::Mobs map still needs to be removed.
2021-03-31 22:28:27 +02:00
cee09f6344 [refactor] Mark all internal functions static
All packet handlers and helper functions that are only used in the
source file they're declared in have been taken out of the namespaces in
the corresponding header files, have been marked static, and have been
reordered to avoid the need for declarations at the top of each source
file.

Each source file now contains a "using namespace" directive so that the
static functions don't need to prefix the source file's symbols with
their namespace. All redundant namespace prefixes found have been
removed.

An unused nano power resetting function in NanoManager has been removed.
2021-03-16 22:54:41 +01:00
4cd3a3dabd [refactor] src/contrib, src/mingw -> vendor 2021-03-13 02:58:57 +01:00
Gent S
d3e5b9c485 Potentially fix slider collisions
- Lerp circuit once instead of on a per-slider basis to avoid FPE differences
- Spawn sliders every k points instead of once per stop
2020-12-16 20:37:12 -05:00
Gent S
b04c377d7c Properly implement item types. 2020-12-04 16:42:58 -05:00
Gent S
6ff762ba57 Save gruntwork group mobs hierarchically 2020-11-25 10:41:10 -05:00
Kamil
9087baae3c Polished reading egg json data 2020-11-11 23:19:07 -05:00
Kamil
d102fabc2f set up gruntwork 2020-11-11 23:19:07 -05:00
Kamil
674d5112f3 implemented basic eggs functionality 2020-11-11 23:19:07 -05:00
kamilprzyb
dd54668697 functional crates (no more plungers) (#133)
* FM, Taros and Boosts awards from killing mobs should be pretty
accurate now. A temporary formula for adjusting player/mob level gap is
implemented, but it will probably need to be adjusted in the future

* Mobs now drop correct crates

* Crates can be opened and give you correct items This includes
regular mob crates, world boss crates, mission crates, IZ race crates,
E.G.G.E.R.s, golden Eggs, and Event Crates.  Keep in mind that neither
IZ races or golden Eggs are implemented, but if you spawn such a crate
it can be opened.

* All data is read from a json file, for which I'm going to release a
tool soon so it's easily adjustable

* There is a new setting for enabling events, which enables dropping
extra event crates These are Knishmas, Halloween and Easter
2020-10-18 01:30:37 +02:00
Gent
c1fd51b721 Expand gruntwork to instances
Add NPC instance gruntwork data

Add instance-related commands
- /instance (instance ID)
- /npci [instance ID]
2020-10-15 11:44:15 -04:00
599bbedd8c Implemented static paths for mobs (like Don Doom and Bad Max).
* Mobs now retreat to where they were when they were roaming; not their
spawn point
* /toggleai still sends them back to their spawn point however
* Fixed a bug where mobs would respawn where they were killed instead of
their proper spawn point
* Fixed mobs roaming despite simulatemobs being set to false
* Updated tdata submodule
2020-10-13 21:44:43 +02:00
606384445c Added /summonW and /unsummonW gruntwork commands.
Also:
* Filled in the battery fileds in the REWARD_ITEM packets in
MissionManager.
* Removed redundant NPC_ENTER in npcSummonHandler()
2020-10-07 19:29:59 +02:00
Gent
5009fe1994 Implement temporary NPC rotations 2020-10-06 17:59:12 -04:00
d4d0f388c4 Implemented saving gruntwork results to file.
* Monkey Skyway paths are now saved in a format compatible with
paths.json
* flush() is called on every periodic DB save in addition to the /flush
and /mss N export commands
* Monkeys now accept WIP routes
2020-10-06 21:53:21 +02:00
Gent
a9837d6c1b Finish MSS commands + convert stack to vector 2020-10-03 11:24:45 -04:00
Gent
47da895544 Add basic MSS gruntwork commands 2020-10-03 11:20:51 -04:00
Gent
0ea5712f8c Load sliders from paths.json 2020-09-26 19:24:07 -04:00
Gent
72c16587e0 Load NPC paths from JSON 2020-09-24 10:32:46 -04:00
Gent
2c8243e136 General MSS fixes + tweaks
Add alert message for unpathed skyway routes
Fix overflow during lerp + add Future routes
Add documentation for MSS
Fix potential MSS registration bug
Minor tweaks + styling
Update packet broadcast
2020-09-21 21:43:39 -04:00
Gent
a5ffe26c44 Move lerp to td init, add variable gap size 2020-09-20 15:24:17 -04:00
Gent
d1c5e272a8 Fix vehicle type override 2020-09-19 15:26:16 -04:00
5b49e71de7 Implemented mission rewards.
Might need to refactor item drops, especially after implementing
task-result quest item drops.
2020-09-11 00:08:26 +02:00
eb1ad6bb37 switched to dumped XDT & moved to a submodule 2020-09-09 12:06:22 -05:00