Skip to content

Commit

Permalink
Reverted all the remaining April Fools event changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Damgam committed Apr 2, 2024
1 parent 2b17b6e commit 96b0e66
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
13 changes: 1 addition & 12 deletions luarules/gadgets/game_boombox_spawner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ if not gadgetHandler:IsSyncedCode() then
return
end

AprilFoolsPlayerIDs = {}

AprilFoolsCounter = 0
function gadget:RecvLuaMsg(msg, playerID)
if string.find(msg, "aprilfools 1") and not AprilFoolsPlayerIDs[playerID] then
AprilFoolsCounter = AprilFoolsCounter + 1
AprilFoolsPlayerIDs[playerID] = true
end
end

local AliveBoomboxes = {}
local SelfDQueue = {}
local positionCheckLibrary = VFS.Include("luarules/utilities/damgam_lib/position_checks.lua")
Expand Down Expand Up @@ -63,8 +53,7 @@ end
function gadget:GameFrame(frame)
if frame == 1 then
for i = 1,10*#Spring.GetTeamList() do
--if (AprilFoolsCounter >= #Spring.GetPlayerList()*0.4 and math.random(1,10) == 1) or math.random(1,10000) == 1 then -- date detection doesn't seem to work as expected
if math.random(1,10) == 1 then
if math.random(1,10000) == 1 then
for j = 1,1000 do
local posx = math.random(math.floor(Game.mapSizeX*0.02), math.ceil(Game.mapSizeX*0.98))
local posz = math.random(math.floor(Game.mapSizeZ*0.02), math.ceil(Game.mapSizeZ*0.98))
Expand Down
4 changes: 0 additions & 4 deletions luaui/Widgets/widget_selector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1057,8 +1057,4 @@ function widget:Shutdown()
end
gl.DeleteFont(font)
gl.DeleteFont(font2)
end

if Spring.GetGameFrame() <= 0 then
Spring.SendLuaRulesMsg('aprilfools ' .. ((os.date("%m") == "4" and os.date("%d") <= "2") and '1' or '0'))
end
9 changes: 5 additions & 4 deletions modoptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,8 @@ local options = {
name = "Hats (April Fools)",
desc = "Hats (April Fools)",
type = "bool",
def = true,
hidden = false,
def = false,
hidden = true,
section = "options_extra",
},

Expand All @@ -839,7 +839,7 @@ local options = {
desc = "Aggressive Critters (April Fools)",
type = "bool",
def = false,
hidden = false,
hidden = true,
section = "options_extra",
},

Expand All @@ -848,7 +848,8 @@ local options = {
name = "Easter Eggs Hunt",
desc = "Easter Eggs are spawned around the map! Time to go on an Easter Egg hunt! (5 metal 50 energy per)",
type = "bool",
def = true,
def = false,
hidden = true,
section = "options_extra",
},

Expand Down

0 comments on commit 96b0e66

Please sign in to comment.