Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#12706) Events framework
Home

[Freeciv-Dev] (PR#12706) Events framework

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12706) Events framework
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Fri, 6 May 2005 08:54:00 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12706 >

This patch renames events.lua to script.lua. I think we should call the
new "events" mechanism scripts, and "events" signals. Otherwise it is
too easy to mix them up with message notify events.

Patch attached, to commit ASAP.

diff -Nurd -X freeciv/diff_ignore freeciv-HEAD/data/default/Makefile.am 
freeciv/data/default/Makefile.am
--- freeciv-HEAD/data/default/Makefile.am       2005-05-01 14:08:03.000000000 
+0100
+++ freeciv/data/default/Makefile.am    2005-05-06 14:21:04.000000000 +0100
@@ -7,7 +7,7 @@
        buildings.ruleset \
        cities.ruleset  \
        effects.ruleset \
-       events.lua      \
+       script.lua      \
        game.ruleset    \
        governments.ruleset \
        nations.ruleset \
diff -Nurd -X freeciv/diff_ignore freeciv-HEAD/data/default/script.lua 
freeciv/data/default/script.lua
--- freeciv-HEAD/data/default/script.lua        1970-01-01 01:00:00.000000000 
+0100
+++ freeciv/data/default/script.lua     2005-05-06 14:07:26.000000000 +0100
@@ -0,0 +1,8 @@
+-- Callbacks
+function hut_enter_callback(unit)
+  -- to be implemented
+end
+
+-- Main code
+signal.connect("hut_enter", "hut_enter_callback")
+
diff -Nurd -X freeciv/diff_ignore freeciv-HEAD/po/POTFILES.in 
freeciv/po/POTFILES.in
--- freeciv-HEAD/po/POTFILES.in 2005-05-01 21:41:46.000000000 +0100
+++ freeciv/po/POTFILES.in      2005-05-06 14:21:40.000000000 +0100
@@ -177,11 +177,11 @@
 data/civ1/buildings.ruleset
 data/history/buildings.ruleset
 data/default/cities.ruleset
-data/default/events.lua
 data/default/governments.ruleset
 data/civ2/governments.ruleset
 data/civ1/governments.ruleset
 data/history/governments.ruleset
+data/default/script.lua
 data/default/techs.ruleset
 data/civ2/techs.ruleset
 data/civ1/techs.ruleset
diff -Nurd -X freeciv/diff_ignore freeciv-HEAD/server/ruleset.c 
freeciv/server/ruleset.c
--- freeciv-HEAD/server/ruleset.c       2005-05-06 14:24:53.000000000 +0100
+++ freeciv/server/ruleset.c    2005-05-06 14:23:46.000000000 +0100
@@ -3058,7 +3058,7 @@
   script_free();
 
   script_init();
-  openload_script_file("events");
+  openload_script_file("script");
 
   if (game.all_connections) {
     /* Now that the rulesets are loaded we immediately send updates to any

[Prev in Thread] Current Thread [Next in Thread]