Skip to content

Commit 0a1bc7d

Browse files
committed
Merge branch 'master' into ThornEel-new-campaign-scenario
2 parents 1fcd377 + 34697bf commit 0a1bc7d

8 files changed

Lines changed: 60 additions & 14 deletions

File tree

LuaMenu/configs/gameConfig/zk/ModOptions.lua

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,14 @@ local options = {
415415
type = "string",
416416
def = "",
417417
},
418+
{
419+
key = "tweakdefs",
420+
name = "Tweak Defs",
421+
desc = "A base64 encoded snippet of code that modifies game definitions.",
422+
section = 'experimental',
423+
type = "string",
424+
def = "",
425+
},
418426
--[[
419427
{
420428
key = 'damagemult',
@@ -579,7 +587,6 @@ local options = {
579587
{ key = 'Chicken: Custom', name = "Chicken: Custom", desc = 'Customize your chicken.' },
580588
},
581589
},
582-
--[[ Broken, see gamseide ticket #3567
583590
{
584591
key = "playerchickens",
585592
name = "Players as chickens",
@@ -588,7 +595,6 @@ local options = {
588595
def = false,
589596
section = 'chicken',
590597
},
591-
]]
592598
{
593599
key = "eggs",
594600
name = "Chicken Eggs",
@@ -738,6 +744,30 @@ local options = {
738744
},
739745
}
740746

747+
for i = 1, 9 do
748+
options[#options + 1] = {
749+
key = "tweakunits" .. i,
750+
name = "Tweak Units " .. i,
751+
desc = "A base64 encoded lua table of unit parameters to change.",
752+
section = 'experimental',
753+
type = "string",
754+
def = "",
755+
noLobby = true,
756+
}
757+
end
758+
759+
for i = 1, 9 do
760+
options[#options + 1] = {
761+
key = "tweakdefs" .. i,
762+
name = "Tweak Defs " .. i,
763+
desc = "A base64 encoded snippet of code that modifies game definitions.",
764+
section = 'experimental',
765+
type = "string",
766+
def = "",
767+
noLobby = true,
768+
}
769+
end
770+
741771
--// add key-name to the description (so you can easier manage modoptions in springie)
742772
for i=1,#options do
743773
local opt = options[i]

LuaMenu/widgets/chobby/components/chat_windows.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,14 @@ function ChatWindows:RedactMessage(msg)
605605
msg = string.sub(msg, 0, UserIDPos) .. "REDACTED" .. string.sub(msg, endPos)
606606
end
607607
end
608+
local installIDPos = string.find(msg, [["InstallID":"]])
609+
if installIDPos then
610+
installIDPos = installIDPos + 12
611+
local endPos = string.find(msg, [["]], installIDPos + 1)
612+
if endPos then
613+
msg = string.sub(msg, 0, installIDPos) .. "REDACTED" .. string.sub(msg, endPos)
614+
end
615+
end
608616
return msg
609617
end
610618

LuaMenu/widgets/gui_campaign_saveload.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ local SAVE_DIR = "Saves/campaign"
2121
local SAVE_DIR_LENGTH = string.len(SAVE_DIR) + 2
2222
local AUTOSAVE_DIR = SAVE_DIR .. "/auto"
2323

24+
-- Never ask for commander name on first campaign start.
25+
local DEFAULT_COMMANDER_NAME = "Commander"
26+
2427
--------------------------------------------------------------------------------
2528
-- data
2629
--------------------------------------------------------------------------------
@@ -452,7 +455,7 @@ function CampaignSaveWindow.PromptInitialSaveName()
452455
local Configuration = WG.Chobby.Configuration
453456
if not Configuration.campaignSaveFile then
454457
local lobby = WG.LibLobby.lobby
455-
local commName = (lobby and lobby.myUserName) or Configuration.suggestedNameFromSteam
458+
local commName = (lobby and lobby.myUserName) or Configuration.suggestedNameFromSteam or DEFAULT_COMMANDER_NAME
456459
if commName then
457460
WG.CampaignData.StartNewGame()
458461
WG.CampaignData.SetupNewSave(commName, 2)

LuaMenu/widgets/gui_modoptions_panel.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ function ModoptionsPanel.LoadModotpions(gameName, newBattleLobby)
536536
-- Set modoptionDefaults
537537
for i = 1, #modoptions do
538538
local data = modoptions[i]
539-
if data.key and data.def ~= nil then
539+
if data.key and (not data.noLobby) and (data.def ~= nil) then
540540
if type(data.def) == "boolean" then
541541
modoptionDefaults[data.key] = tostring((data.def and 1) or 0)
542542
elseif type(data.def) == "number" then
@@ -553,7 +553,7 @@ function ModoptionsPanel.LoadModotpions(gameName, newBattleLobby)
553553
local data = modoptions[i]
554554
if data.type == "section" then
555555
modoptionStructure.sectionTitles[data.key] = data.name
556-
else
556+
elseif not data.noLobby then
557557
if data.section then
558558
modoptionStructure.sections[data.section] = modoptionStructure.sections[data.section] or {
559559
title = data.section,

LuaMenu/widgets/gui_steam_release_notifier.lua

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,15 @@ end
157157
--------------------------------------------------------------------------------
158158
-- Widget Interface
159159

160-
function widget:Initialize()
161-
CHOBBY_DIR = LUA_DIRNAME .. "widgets/chobby/"
162-
VFS.Include(LUA_DIRNAME .. "widgets/chobby/headers/exports.lua", nil, VFS.RAW_FIRST)
163-
end
160+
--function widget:Initialize()
161+
-- CHOBBY_DIR = LUA_DIRNAME .. "widgets/chobby/"
162+
-- VFS.Include(LUA_DIRNAME .. "widgets/chobby/headers/exports.lua", nil, VFS.RAW_FIRST)
163+
--end
164+
--
165+
--function widget:Update()
166+
-- WG.Delay(SteamCheckPopup, 2)
167+
-- widgetHandler:RemoveCallIn("Update")
168+
--end
164169

165-
function widget:Update()
166-
WG.Delay(SteamCheckPopup, 2)
167-
widgetHandler:RemoveCallIn("Update")
168-
end
169170
--------------------------------------------------------------------------------
170171
--------------------------------------------------------------------------------

LuaMenu/widgets/gui_tutorial_handler.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ local function StartTutorial()
2828
if tutorialPrompt then
2929
tutorialPrompt.Remove()
3030
end
31+
WG.CampaignSaveWindow.PromptInitialSaveName()
3132
WG.Chobby.interfaceRoot.OpenSingleplayerTabByName("campaign")
3233
WG.CampaignHandler.OpenPlanetScreen(TUTORIAL_PLANET)
3334
WG.CampaignHandler.StartPlanetMission(TUTORIAL_PLANET)

campaign/sample/planets/planet56.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ local function GetPlanet(planetUtilities, planetID)
2525
primaryType = "G4V",
2626
milRating = 1,
2727
feedbackLink = "http://zero-k.info/Forum/Thread/24510",
28-
text = "There is technology on this world, that is both much more ancient and more andvanced than it should be. There are the remains of several raiding parties sent by the Empire to try - without success - and capture it."
28+
text = "There is technology on this world, that is both much more ancient and more advanced than it should be. There are the remains of several raiding parties sent by the Empire to try - without success - and capture it."
2929
.. "\n "
3030
.. "\nAutomated defenses have suffered from the raids, but are still operational - and a Detriment roaming around. How can it be working after half an eternity exposed and without maintenance?"
3131
,

libs/liblobby/lobby/interface_zerok.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function Interface:Register(userName, password, email, useSteamLogin)
4444
PasswordHash = password,
4545
SteamAuthToken = steamToken,
4646
UserID = (config and config.UserID) or 0,
47+
InstallID = (config and config.InstallID) or 0,
4748
}
4849
self:_SendCommand("Register " .. json.encode(sendData))
4950
return self
@@ -65,6 +66,7 @@ function Interface:Login(user, password, cpu, localIP, lobbyVersion, useSteamLog
6566
if steamToken and (not password) and not REVERSE_COMPAT then
6667
sendData = {
6768
UserID = (config and config.UserID) or 0,
69+
InstallID = (config and config.InstallID) or 0,
6870
ClientType = 1,
6971
LobbyVersion = lobbyVersion,
7072
SteamAuthToken = steamToken,
@@ -75,6 +77,7 @@ function Interface:Login(user, password, cpu, localIP, lobbyVersion, useSteamLog
7577
Name = user,
7678
PasswordHash = password,
7779
UserID = (config and config.UserID) or 0,
80+
InstallID = (config and config.InstallID) or 0,
7881
ClientType = 1,
7982
LobbyVersion = lobbyVersion,
8083
SteamAuthToken = steamToken,

0 commit comments

Comments
 (0)