use on_mod(Loaded) for a few more things

This commit is contained in:
Cvolton 2024-06-23 23:45:02 +02:00
parent 736a61e291
commit a654f343a8
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions
loader
include/Geode/modify
src/server

View file

@ -62,7 +62,7 @@ namespace geode {
struct GEODE_CONCAT(ProvideIDsFor, Layer_) : public Layer_ {\
void provide();\
};\
$execute {\
$on_mod(Loaded) {\
NodeIDs::get()->registerProvider(\
&geodeInternalProvideIDsFor<GEODE_CONCAT(ProvideIDsFor, Layer_)>\
);\

View file

@ -842,7 +842,7 @@ void server::clearServerCaches(bool clearGlobalCaches) {
}
}
$execute {
$on_mod(Loaded) {
listenForSettingChanges<int64_t>("server-cache-size-limit", +[](int64_t size) {
getCache<&server::getMods>().limit(size);
getCache<&server::getMod>().limit(size);