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

Mission scripting #521

Merged
merged 48 commits into from
Mar 31, 2014
Merged

Mission scripting #521

merged 48 commits into from
Mar 31, 2014

Conversation

mrzzzrm
Copy link

@mrzzzrm mrzzzrm commented Mar 23, 2014

Adds the feature the title suggest. Per default you will play a sequence of 2 missions.

ExternalMissionBindings:

  • Start mission
  • Callback for mission failure/success

InternalMissionBindings:

  • Set mission progress (fail, succeed)
  • communicate with player (currently only hud messages, later dialogs, gameover,...)

@psieg
Copy link
Contributor

psieg commented Mar 23, 2014

the game dies after I kill the first wave of enemies -.-

@@ -1,11 +1,13 @@
#include "script.h"

#include "scripting/bindings/bindings.h"
#include "scripting/elematelua/luawrapper.h"


Script::Script():
m_lua(new LuaWrapper()),
m_started(false),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a state enum is probably better than multiple bools

@mrzzzrm
Copy link
Author

mrzzzrm commented Mar 29, 2014

So there seem to be 2 real issues left for now:

  • Game::instance() to make the resolution available to everyone could be solved otherwise
  • ScriptEngine::removeScriptable shouldn't care about EventPolls, but currently needs to.

I'd create followups for these. The first I'd solve by adding #542 and a virtual onViewportResize method those who care can implement. The second would be solved via #541.

What do you think?

@xchrdw
Copy link
Member

xchrdw commented Mar 31, 2014

I fixed the issues for now. :shipit:

@xchrdw
Copy link
Member

xchrdw commented Mar 31, 2014

I also replaced these remove_if calls on some lists with unordered_maps<T*, shared_ptr<T>>


/*
Base class for Animations of Hudgets
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/** for doxygen

@psieg
Copy link
Contributor

psieg commented Mar 31, 2014

I'd rather have the polls not polling but objects firing events but that's another thing. :shipit:

mrzzzrm pushed a commit that referenced this pull request Mar 31, 2014
@mrzzzrm mrzzzrm merged commit b6b0a2b into master Mar 31, 2014
@mrzzzrm mrzzzrm deleted the mission_script branch March 31, 2014 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants