summary refs log tree commit diff stats
path: root/src/script_system.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-03-09 11:51:34 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-03-09 11:51:34 -0500
commit89fc2da3f08fcd751ca069fde0987d193e59b007 (patch)
tree09d9f8c7fc44a72f3fa7677048a127286ac850a5 /src/script_system.cpp
parentdd052d68e95f5b2128da272127e165c4a70f3f94 (diff)
downloadtanetane-89fc2da3f08fcd751ca069fde0987d193e59b007.tar.gz
tanetane-89fc2da3f08fcd751ca069fde0987d193e59b007.tar.bz2
tanetane-89fc2da3f08fcd751ca069fde0987d193e59b007.zip
Added "let's switch places!" Claus sprite
He will wander randomly until you get close, and will then run at you. Talking to him or bumping into him does nothing currently. If you move out of his range of interest he will go back to wandering at a walking pace.

#10
Diffstat (limited to 'src/script_system.cpp')
-rw-r--r--src/script_system.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script_system.cpp b/src/script_system.cpp index 50ea60a..a50fa7a 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp
@@ -52,7 +52,8 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) {
52 "enclosureZone", &Sprite::enclosureZone, 52 "enclosureZone", &Sprite::enclosureZone,
53 "movementSpeed", &Sprite::movementSpeed, 53 "movementSpeed", &Sprite::movementSpeed,
54 "solid", &Sprite::solid, 54 "solid", &Sprite::solid,
55 "behaviourType", &Sprite::behaviourType); 55 "behaviourType", &Sprite::behaviourType,
56 "followSpriteId", &Sprite::followSpriteId);
56 57
57 engine_.new_usertype<MessageSystem>( 58 engine_.new_usertype<MessageSystem>(
58 "message", 59 "message",
@@ -242,6 +243,7 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) {
242 loadMapScripts(filename); 243 loadMapScripts(filename);
243 }); 244 });
244 245
246 engine_.set_function("directionFacingPoint", &directionFacingPoint);
245 engine_.set_function("cardinalDirectionFacingPoint", &cardinalDirectionFacingPoint); 247 engine_.set_function("cardinalDirectionFacingPoint", &cardinalDirectionFacingPoint);
246 248
247 engine_.script_file("../res/scripts/common.lua"); 249 engine_.script_file("../res/scripts/common.lua");