-
Notifications
You must be signed in to change notification settings - Fork 56
add goal
field to scenarios
#450
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
Conversation
If there is a goal, immediately pop up a dialog with the goal, then allow showing it any time afterwards with ^G. See #356.
Note this suffers from a bug where popping up the scenario goal dialog autopauses the game but then it is not unpaused when closing the dialog. I think that bug already existed before, and is also being addressed in #441 . Not quite sure what the best way forward is. |
I've proposed the modal fix separately in #452 |
Also, note that I intentionally did not update any of the scenarios in |
@xsebek , thanks for the feedback, I think this is now ready again. |
-- first loading entities and recipies from disk. | ||
initGameState :: Maybe Seed -> Maybe String -> Maybe String -> ExceptT Text IO GameState | ||
initGameState cmdlineSeed scenarioToLoad toRun = do | ||
maxMessageQueueSize :: Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change anything from here down to Initialization
, I just moved it to try to organize the code a bit better.
scenario <- loadScenario (fromMaybe "00-classic" scenarioName) (gs ^. entityMap) | ||
liftIO $ scenarioToAppState scenario userSeed toRun $ AppState gs ui | ||
|
||
-- XXX do we need to keep an old entity map around??? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think so, we can always reload it if we wanted to say compare it before saving the game (or just save the whole map). Do you have some use cases in mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried that when we load a scenario with custom entities, they get permanently added to the entity map...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that's unrelated to this PR though, and it would have already been an issue before. I'll think about it later.
If there is a goal, immediately pop up a dialog with the goal, then
allow showing it any time afterwards with ^G.
See #356.