Skip to content

Commit

Permalink
revert server_only_mod
Browse files Browse the repository at this point in the history
  • Loading branch information
fesily committed Feb 14, 2025
1 parent b10b2de commit 7f0300b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
with:
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DCMAKE_OSX_ARCHITECTURES=x86_64']"
buildPreset: 'ninja-vcpkg-release'
buildPreset: 'ninja-vcpkg-release-dbg'

- name: CMake install
run: |
cmake --build ./builds/ninja-multi-vcpkg --config Release --target install
cmake --build ./builds/ninja-multi-vcpkg --config RelWithDebInfo --target install
- name: Clean Up linux
if: ${{ matrix.target == 'linux' }}
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ else ()
message(FATAL_ERROR "Not supported platform")
endif ()

project(DontStarveLuaJIT VERSION 0.7.1)
project(DontStarveLuaJIT VERSION 0.7.2)

set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/Mod)
set(TARGET_MOD_DIR ${CMAKE_INSTALL_PREFIX})
Expand Down
2 changes: 1 addition & 1 deletion Mod/modinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ description = translate(

author = "fesil"

version = "0.7.1"
version = "0.7.2"

forumthread = "https://github.com/fesily/DontStarveLuaJit2"

Expand Down
22 changes: 1 addition & 21 deletions Mod/modmain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,19 @@ local function main()

KnownModIndex.GetServerModNames = function(self, ...)
local names = old_GetServerModNames(self, ...)
for modname, _ in pairs(self.savedata.known_mods) do
if self:GetModInfo(modname).server_only_mod then
table.insert(names, modname)
end
end
return names
end

KnownModIndex.GetServerModNamesTable = function(self, ...)
local names = old_GetServerModNamesTable(self, ...)
for known_modname, _ in pairs(self.savedata.known_mods) do
if self:GetModInfo(known_modname).server_only_mod then
table.insert(names, { modname = known_modname })
end
end
table.insert(names, {modname = modname})
return names
end
ModManager.GetEnabledServerModNames = function(self, ...)
local server_mods = old_GetEnabledServerModNames(self, ...)
if IsNotConsole() then
local mod_names = KnownModIndex:GetServerModNames()
for _, modname in pairs(mod_names) do
if KnownModIndex:IsModEnabled(modname) or KnownModIndex:IsModForceEnabled(modname) then
local modinfo = KnownModIndex:GetModInfo(modname)
if modinfo ~= nil then
if modinfo.server_only_mod then
table.insert(server_mods, modname)
end
else
table.insert(server_mods, modname)
end
end
end
end
return server_mods
end
Expand Down

0 comments on commit 7f0300b

Please sign in to comment.