- Timestamp:
- Apr 6, 2007, 6:54:15 PM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 2 deleted
- 5 edited
- 9 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/script_engine/script.cc
r10381 r10622 106 106 filedest += "scripts/" + directory + file; 107 107 108 this->add ThisScript();108 this->addStandartObjects(); 109 109 this->registerStandartClasses(); 110 110 … … 406 406 bool success = false; 407 407 408 //this->registerClass(std::string("Vector")); 409 this->registerClass("ScriptTrigger"); 410 // this->registerClass("AttractorMine"); 408 this->registerClass("SpaceTrigger"); 409 this->registerClass("TickTrigger"); 410 this->registerClass("TimeTrigger"); 411 412 return success; 413 } 414 415 bool Script::addStandartObjects() 416 { 417 bool success = true; 418 419 this->addThisScript(); 411 420 412 421 return success; -
trunk/src/lib/script_engine/script.h
r10381 r10622 68 68 int reportError(int error); //!< Get errormessage from the lua stack and print it. 69 69 bool registerStandartClasses(); //!< Register all the classes that the script might need 70 bool addStandartObjects(); //!< Add all the objects that the script might need 70 71 bool classIsRegistered(const std::string& type); //!< Checks wheter the class "type" has already been registered with the script 71 72 bool objectIsAdded(const std::string& name); //!< Checks wheter the object "name" has already been added to the script -
trunk/src/lib/script_engine/script_manager.cc
r10618 r10622 25 25 26 26 #include "script.h" 27 #include " tools/script_trigger.h"27 #include "script_triggers/script_trigger.h" 28 28 #include "luaincl.h" 29 29 #include "loading/load_param_xml.h" 30 #include "util/loading/factory.h" 30 31 31 32 … … 50 51 { 51 52 BaseObject::loadParams(root); 52 {53 LoadParamXML(root, "Scripts", this, ScriptManager, createScripts);54 53 55 LoadParamXML(root, "ScriptTriggers", this, ScriptManager, createTriggers); 56 } // make shure that the loading process is finished 54 LoadParamXML(root, "Scripts", this, ScriptManager, createScripts); 57 55 58 // fill the scripts and triggers (doing that on runtime is very slow!) 56 LoadParamXML(root, "ScriptTriggers", this, ScriptManager, createTriggers); 57 59 58 } 60 59 … … 85 84 void ScriptManager::createTriggers(const TiXmlElement* triggers) 86 85 { 86 87 87 LOAD_PARAM_START_CYCLE(triggers, object); 88 88 { 89 new ScriptTrigger(object);89 Factory::fabricate(object); 90 90 } 91 91 LOAD_PARAM_END_CYCLE(object); -
trunk/src/world_entities/Makefile.am
r10618 r10622 27 27 effects/trail.cc\ 28 28 elements/glgui_energywidget.cc\ 29 elements/glgui_energywidgetvertical.cc 29 elements/glgui_energywidgetvertical.cc\ 30 script_triggers/script_trigger.cc 30 31 31 32 … … 51 52 effects/wobblegrid.h\ 52 53 elements/glgui_energywidget.h\ 53 elements/glgui_energywidgetvertical.h 54 elements/glgui_energywidgetvertical.h\ 55 script_triggers/script_trigger.h 54 56 55 57 -
trunk/src/world_entities/WorldEntities.am
r10618 r10622 106 106 world_entities/tools/sound_entity.cc \ 107 107 world_entities/tools/camera.cc \ 108 world_entities/tools/script_trigger.cc \ 108 \ 109 world_entities/script_triggers/script_trigger.cc \ 110 world_entities/script_triggers/space_trigger.cc \ 111 world_entities/script_triggers/tick_trigger.cc \ 112 world_entities/script_triggers/time_trigger.cc \ 109 113 \ 110 114 \ … … 227 231 effects/blink.h \ 228 232 \ 229 script_trigger.h \ 233 script_triggers/space_trigger.h \ 234 script_triggers/tick_trigger.h \ 235 script_triggers/time_trigger.h \ 230 236 \ 231 237 \
Note: See TracChangeset
for help on using the changeset viewer.