mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-18 11:05:15 +02:00
Launcher: mod profiles, sharing them by code or file, and Thunderstore dependencies
The Mods page has a third tab, PROFILES. A profile is a saved list of which mods are on, in what order and at what version; every mod stays installed once, in the one Mods folder. Loading a profile rewrites mods.json, switches off what it does not name, and downloads from Thunderstore what it names that is missing. Profiles live in Mods/profiles.json. A profile travels the way r2modman's do, so the two managers read each other's: export.r2x inside a .r2z file, and a code on Thunderstore's profile service. Config files in an r2modman profile are ignored. Installing or updating a Thunderstore package now brings the packages it depends on, needed ones first, leaving out any already installed at a new enough version. A mod pack is a package that is nothing else. A kick, by an admin or by a passed vote, used to keep the player out until the server restarted. "kick_minutes" in the players section of the config (1-1440; 0, the default, is still until the restart) and the console command "kick-time <minutes>|restart" now set how long it lasts. The player is told how long when they are kicked, and how many minutes are left if they try to join early. A kick keeps the time it was given, so changing the setting is for later kicks. Bans are unchanged.
This commit is contained in:
1 parent
242ac11814
commit
2e186b9839
24 files changed
+1488
-38
No files matched your search
+10
-3
@@ -1742,9 +1742,16 @@ void Host::tick(std::uint64_t now) {
|
||||
drop(id, "Disconnected.", how);
|
||||
}
|
||||
for (const auto &link : links) {
|
||||
if (kicked_.contains(link.id)) {
|
||||
transport_.disconnect(link.id, "You were kicked from this server.");
|
||||
continue;
|
||||
if (const auto kicked = kicked_.find(link.id); kicked != kicked_.end()) {
|
||||
if (!kicked->second || now_ < kicked->second) {
|
||||
const auto reason = kicked->second
|
||||
? "You were kicked from this server. You can join again in " +
|
||||
std::to_string((kicked->second - now_) / 60000000 + 1) + " min."
|
||||
: std::string("You were kicked from this server.");
|
||||
transport_.disconnect(link.id, reason.c_str());
|
||||
continue;
|
||||
}
|
||||
kicked_.erase(kicked); // their time is up
|
||||
}
|
||||
if (is_banned(link.id)) {
|
||||
transport_.disconnect(link.id, "You are banned from this server.");
|
||||
|
||||
Reference in new issue
Block a user