Commit Graph

150 Commits

Author SHA1 Message Date
dongresource 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 974b67d4b6 Move constructPathNPC to Transport 2021-05-06 12:17:34 -04:00
gsemaj 6ae4ab2cbf Move findApplicablePaths to Transport, add taskID argument 2021-05-06 12:17:34 -04:00
gsemaj 9fb41342b3 Fix server crash if patch folder doesn't exist 2021-05-06 12:17:34 -04:00
gsemaj ebd3b7b75a Fix path matching breaking prematurely 2021-05-06 12:17:34 -04:00
gsemaj d41122157f Fix gruntwork paths not saving targeted types 2021-05-06 12:17:34 -04:00
gsemaj c393bf7af2 Prioritize ID match over type match when finding a path for an NPC 2021-05-06 12:17:34 -04:00
gsemaj 72b62cd5a4 Don't load NPCs with types not found in the XDT 2021-05-06 12:17:34 -04:00
gsemaj f71d2581bd Read completed NPC paths from gruntwork 2021-05-06 12:17:34 -04:00
gsemaj 89a32ac9a4 Write completed NPC paths to gruntwork 2021-05-06 12:17:34 -04:00
gsemaj c7e2e66a51 Add /path command 2021-05-06 12:17:34 -04:00
gsemaj 37b1d11948 Fix JSON type ambiguity in loadPaths 2021-05-06 12:17:34 -04:00
gsemaj c960b06227 Apply matching paths to NPCs and mobs on spawn 2021-05-06 12:17:34 -04:00
gsemaj 2721f21427 Fix gruntwork file being flushed to root 2021-05-06 12:17:34 -04:00
gsemaj d5e65fda3c Update to new path schema + add NPCPath struct 2021-05-06 12:17:34 -04:00
gsemaj 5f29ea93d8 Undo pathing check bypass + update to patched academy tdata 2021-05-06 12:17:34 -04:00
gsemaj 36cb32454d Add force property override feature to patcher
This has a variety of applications, but is particularly useful when we want to replace arrays instead of add onto them
2021-05-06 12:17:34 -04:00
gsemaj af8dd61967 Clean up tabledata init 2021-05-06 12:17:34 -04:00
gsemaj 26894c8a69 Implement automatic tdata patching 2021-05-06 12:17:34 -04:00
gsemaj bf12ed4c47 Fix patcher refusing to patch between unsigned and signed integers 2021-05-06 12:17:34 -04:00
gsemaj 59303ba30d Update tdata to patch format, change config constants accordingly 2021-05-06 12:17:34 -04:00
gsemaj b2a8b86e4c Temporarily disable spawn check for mob pathing 2021-05-06 12:17:34 -04:00
gsemaj c415db3fd3 Implement recursive JSON patching functionality 2021-05-06 12:17:34 -04:00
gsemaj 183586afe4 [refac] Clean up new tdata init routine 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 f58c6b72b3 [refac] Stylistic changes 2021-05-06 12:17:34 -04:00
gsemaj 805fd93b3c Remove academy-specific tdata settings, add patch path 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 e761c700dc [refac] Compartmentalize TableData.cpp 2021-05-06 12:17:34 -04:00
gsemaj 14562f889e [refac] Create typedef for nlohmann::json 2021-05-06 12:17:34 -04:00
gsemaj dd3066849b Make dynamic IDs count down from max instead of up from 0 2021-05-06 12:17:34 -04:00
FinnHornhoover 4eaf3b2f08 altered event drop logic, fixed taro/fm logic 2021-04-26 11:26:00 -04:00
FinnHornhoover 20b05a72a0 added mob drop id lookup from mob id 2021-04-26 11:26:00 -04:00
FinnHornhoover 8a871f7045 merged itemset types and chances, added bypasses 2021-04-26 11:26:00 -04:00
FinnHornhoover 1779d69078 drop format revision 2021-04-26 11:26:00 -04:00
FinnHornhoover 78b17aea72 added better drop handling, parsing, rng 2021-04-26 11:26:00 -04:00
gsemaj 80d965944c Fix naming scheme in NPCs.json 2021-04-24 11:36:33 -04:00
gsemaj fa7c88e214 Rename Vendor.Xpp -> Vendors.Xpp 2021-04-16 13:37:18 -04:00
CPunch 9b84d9dc4d [refactor] BaseNPC now uses Entity XYZ fields for handling positions
- fixed many references to Entity.appearanceData.i[XYZ] to use the base Entity XYZ values
- BaseNPC::enterIntoViewOf grabs the position from the base Entity XYZ values
- NPCManager::updateNPCPosition updates the base Entity XYZ values
- MobAI.c/deadStep() also sends it's packet based on the Entity XYZ values
2021-04-13 20:03:51 -05:00
gsemaj fd965fbf03 Remove redundant Mob map 2021-04-07 03:03:43 +02:00
dongresource 3325397d17 Remove Eggs::Eggs and rearrange Entity members a bit 2021-03-31 22:28:27 +02:00
dongresource 0c8e209360 [WIP] Convert all chunk-related logic to the new system's semantics
Replaced all references to chunk->players and chunk->NPCs with
chunk->entities and all instances of the old NPCClass enum with
EntityType.

The server compiles but will not yet run properly.
2021-03-31 22:28:27 +02:00
dongresource 610a683804 [refactor] E g g s 2021-03-17 22:28:24 +01:00
dongresource e9bc2fe561 [refactor] Remove the word 'Manager' from most source files/namespaces
ChatManager -> Chat
MissionManager -> Missions
NanoManager -> Nanos
TransportManager -> Transport
ChunkManager -> Chunking
BuddyManager -> Buddies
GroupManager -> Groups
RacingManager -> Racing
ItemManager -> Items

NPCManager and PlayerManager remain.

Note: You can use git log --follow src/file.cpp to trace the history of
a file from before it was renamed.
2021-03-17 20:16:43 +01:00
dongresource 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
dongresource 2017b38e23 [refactor] Move mob drop logic from Combat to ItemManager 2021-03-16 19:50:33 +01:00
dongresource 2024fb4969 [refactor] Split MobManager.cpp into MobAI.cpp and Combat.cpp
This is terrible. It was a mistake to do this before cleaning up the
actual code. It might be better not to use this commit and to do this
refactor in a different order or something.
2021-03-13 23:55:16 +01:00
dongresource ae279100d7 [refactor] Extract Abilities.cpp from {Nano,Mob}Manager.cpp
I've kept all the functions in their original namespaces for now, since
putting them all into the same one will cause collissions, and this is
all getting rewritten soon anyway.
2021-03-13 21:22:29 +01:00
CPunch e92a5a2f8b [refactor] Split ItemManager.cpp into Vendor.cpp & Trading.cpp
- added sources to Makefile
- Added Trading::init() to main.cpp
2021-03-12 20:09:45 -06:00
dongresource 4cd3a3dabd [refactor] src/contrib, src/mingw -> vendor 2021-03-13 02:58:57 +01:00