Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gets new game's start time from FlightLog to be compared with minTime #5263

Merged
merged 1 commit into from
May 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/modules/NewsEventCommodity/NewsEventCommodity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ local Equipment = require 'Equipment'
local l = Lang.GetResource("module-newseventcommodity")

local maxDist = 50 -- for spawning news (ly)
local minTime = 15768000 -- no news the first 5 months of a new game (sec)
local minTime = 15768000 -- no news the first 6 months of a new game (sec)

-- to spawn a new event per hyperjump, provided no other news.
local eventProbability = 1/20
Expand Down Expand Up @@ -319,7 +319,7 @@ local onEnterSystem = function (player)

-- create a news event with low probability
if Engine.rand:Number(0,1) < eventProbability and
#news <= maxNumberNews and Game.time > minTime then
#news <= maxNumberNews and Game.GetStartTime() > minTime then
createNewsEvent(timeInHyperspace)
end

Expand Down