[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth data/scenario-test.cfg data/scenarios/E...
From: |
Philippe Plantier |
Subject: |
[Wesnoth-cvs-commits] wesnoth data/scenario-test.cfg data/scenarios/E... |
Date: |
Mon, 28 Mar 2005 10:00:13 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Philippe Plantier <address@hidden> 05/03/28 15:00:13
Modified files:
data : scenario-test.cfg
data/scenarios/Eastern_Invasion: Throne_Room.cfg
data/scenarios/Heir_To_The_Throne: Crossroads.cfg
Ford_of_Abez.cfg
Hasty_Alliance.cfg
Plunging_Into_the_Darkness.cfg
Valley_of_Statues.cfg
src : game_events.cpp unit.cpp unit.hpp
Log message:
Added the "generate_description" variable in the [unit] tag. If set to
yes,
this tag automatically generates a user_description for a unit.
Fixed scenarios so they do not include translatable user_descriptions
corresponding to the unit descriptions, but instead use a generated
description.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/scenario-test.cfg.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/scenarios/Eastern_Invasion/Throne_Room.cfg.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/scenarios/Heir_To_The_Throne/Crossroads.cfg.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/scenarios/Heir_To_The_Throne/Ford_of_Abez.cfg.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/scenarios/Heir_To_The_Throne/Hasty_Alliance.cfg.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/scenarios/Heir_To_The_Throne/Plunging_Into_the_Darkness.cfg.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/data/scenarios/Heir_To_The_Throne/Valley_of_Statues.cfg.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game_events.cpp.diff?tr1=1.139&tr2=1.140&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.cpp.diff?tr1=1.135&tr2=1.136&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit.hpp.diff?tr1=1.65&tr2=1.66&r1=text&r2=text
Patches:
Index: wesnoth/data/scenario-test.cfg
diff -u wesnoth/data/scenario-test.cfg:1.40 wesnoth/data/scenario-test.cfg:1.41
--- wesnoth/data/scenario-test.cfg:1.40 Sun Mar 27 23:06:15 2005
+++ wesnoth/data/scenario-test.cfg Mon Mar 28 15:00:13 2005
@@ -112,6 +112,11 @@
gold=40
income=10
enemy=1
+ [unit]
+ x,y=12,13
+ type=Orcish Archer
+ generate_description=yes
+ [/unit]
[/side]
[item]
@@ -123,6 +128,7 @@
id=northerners_unleashed
text="Northerners unleashed!"
[/label]
+
[event]
name=moveto
first_time_only=no
@@ -140,8 +146,13 @@
{VARIABLE_OP xx1 random 10..20}
{VARIABLE_OP yy1 random 10..17}
- #{UNIT (Orcish Warlord) (Bozo) ( "Orcish bozo" ) 2 $xx1 $yy1}
- {UNIT (Orcish Warlord) (Bozo) ( "Orcish bozo" ) 2 10 10}
+ [unit]
+ side=1
+ x,y=$xx1,$yy1
+ type=Orcish Warlord
+ description=Bozo
+ generate_description=yes
+ [/unit]
[message]
speaker=Bozo
Index: wesnoth/data/scenarios/Eastern_Invasion/Throne_Room.cfg
diff -u wesnoth/data/scenarios/Eastern_Invasion/Throne_Room.cfg:1.13
wesnoth/data/scenarios/Eastern_Invasion/Throne_Room.cfg:1.14
--- wesnoth/data/scenarios/Eastern_Invasion/Throne_Room.cfg:1.13 Sun Mar
27 23:06:16 2005
+++ wesnoth/data/scenarios/Eastern_Invasion/Throne_Room.cfg Mon Mar 28
15:00:13 2005
@@ -155,7 +155,7 @@
[/message]
[unit]
description=Royal Guard
- user_description= _ "Royal Guard"
+ generate_description=yes
type=Royal Guard
x=10
y=18
Index: wesnoth/data/scenarios/Heir_To_The_Throne/Crossroads.cfg
diff -u wesnoth/data/scenarios/Heir_To_The_Throne/Crossroads.cfg:1.32
wesnoth/data/scenarios/Heir_To_The_Throne/Crossroads.cfg:1.33
--- wesnoth/data/scenarios/Heir_To_The_Throne/Crossroads.cfg:1.32 Sun Mar
27 23:06:16 2005
+++ wesnoth/data/scenarios/Heir_To_The_Throne/Crossroads.cfg Mon Mar 28
15:00:13 2005
@@ -225,7 +225,7 @@
[/filter]
[unit]
description=Orcish Archer
- user_description= _ "Orcish Archer"
+ generate_description=yes
side=2
x=$trapx{NUM}
y=$trapy{NUM}
@@ -236,7 +236,7 @@
[/unit]
[unit]
description=Orcish Grunt
- user_description= _ "Orcish Grunt"
+ generate_description=yes
side=2
x=$trapx{NUM}
y=$trapy{NUM}
@@ -248,7 +248,7 @@
#ifdef HARD
[unit]
description=Orcish Archer
- user_description= _ "Orcish Archer"
+ generate_description=yes
side=2
x=$trapx{NUM}
y=$trapy{NUM}
@@ -285,7 +285,7 @@
[/filter]
[unit]
description=Wolf Rider
- user_description= _ "Wolf Rider"
+ generate_description=yes
side=3
x=$trapx{NUM}
y=$trapy{NUM}
@@ -296,7 +296,7 @@
[/unit]
[unit]
description=Troll Whelp
- user_description= _ "Troll Whelp"
+ generate_description=yes
side=3
x=$trapx{NUM}
y=$trapy{NUM}
@@ -307,7 +307,7 @@
[/unit]
[unit]
description=Orcish Archer
- user_description= _ "Orcish Archer"
+ generate_description=yes
side=3
x=$trapx{NUM}
y=$trapy{NUM}
@@ -319,7 +319,7 @@
#ifdef HARD
[unit]
description=Troll Whelp
- user_description= _ "Troll Whelp"
+ generate_description=yes
side=3
x=$trapx{NUM}
y=$trapy{NUM}
Index: wesnoth/data/scenarios/Heir_To_The_Throne/Ford_of_Abez.cfg
diff -u wesnoth/data/scenarios/Heir_To_The_Throne/Ford_of_Abez.cfg:1.24
wesnoth/data/scenarios/Heir_To_The_Throne/Ford_of_Abez.cfg:1.25
--- wesnoth/data/scenarios/Heir_To_The_Throne/Ford_of_Abez.cfg:1.24 Sun Mar
27 23:06:16 2005
+++ wesnoth/data/scenarios/Heir_To_The_Throne/Ford_of_Abez.cfg Mon Mar 28
15:00:13 2005
@@ -140,7 +140,7 @@
[unit]
type=Royal Guard
description=Royal Guard
- user_description= _ "Royal Guard"
+ generate_description=yes
ai_special=guardian
x={X}
y={Y}
Index: wesnoth/data/scenarios/Heir_To_The_Throne/Hasty_Alliance.cfg
diff -u wesnoth/data/scenarios/Heir_To_The_Throne/Hasty_Alliance.cfg:1.23
wesnoth/data/scenarios/Heir_To_The_Throne/Hasty_Alliance.cfg:1.24
--- wesnoth/data/scenarios/Heir_To_The_Throne/Hasty_Alliance.cfg:1.23 Sun Mar
27 23:06:16 2005
+++ wesnoth/data/scenarios/Heir_To_The_Throne/Hasty_Alliance.cfg Mon Mar
28 15:00:13 2005
@@ -131,7 +131,7 @@
[unit]
type=Royal Guard
description=Royal Guard
- user_description= _ "Royal Guard"
+ generate_description=yes
side=2
x=11
y=18
@@ -150,7 +150,7 @@
[unit]
type=Royal Guard
description=Royal Guard
- user_description= _ "Royal Guard"
+ generate_description=yes
side=2
x=11
y=19
Index: wesnoth/data/scenarios/Heir_To_The_Throne/Plunging_Into_the_Darkness.cfg
diff -u
wesnoth/data/scenarios/Heir_To_The_Throne/Plunging_Into_the_Darkness.cfg:1.20
wesnoth/data/scenarios/Heir_To_The_Throne/Plunging_Into_the_Darkness.cfg:1.21
---
wesnoth/data/scenarios/Heir_To_The_Throne/Plunging_Into_the_Darkness.cfg:1.20
Sun Mar 27 23:06:16 2005
+++ wesnoth/data/scenarios/Heir_To_The_Throne/Plunging_Into_the_Darkness.cfg
Mon Mar 28 15:00:13 2005
@@ -119,7 +119,7 @@
[unit]
description=Dwarvish Guardsman
- user_description= _ "Dwarvish Guardsman"
+ generate_description=yes
type=Dwarvish Guardsman
x=15
y=22
@@ -131,7 +131,7 @@
[/unit]
[unit]
description=Dwarvish Fighter
- user_description= _ "Dwarvish Fighter"
+ generate_description=yes
type=Dwarvish Fighter
x=10
y=22
@@ -143,7 +143,7 @@
[/unit]
[unit]
description=Dwarvish Guardsman
- user_description= _ "Dwarvish Guardsman"
+ generate_description=yes
type=Dwarvish Guardsman
x=13
y=20
@@ -155,7 +155,7 @@
[/unit]
[unit]
description=Dwarvish Fighter
- user_description= _ "Dwarvish Fighter"
+ generate_description=yes
type=Dwarvish Fighter
x=11
y=20
@@ -167,7 +167,7 @@
[/unit]
[unit]
description=Dwarvish Guardsman
- user_description= _ "Dwarvish Guardsman"
+ generate_description=yes
type=Dwarvish Guardsman
x=13
y=19
@@ -179,7 +179,7 @@
[/unit]
[unit]
description=Dwarvish Fighter
- user_description= _ "Dwarvish Fighter"
+ generate_description=yes
type=Dwarvish Fighter
x=11
y=19
@@ -191,7 +191,7 @@
[/unit]
[unit]
description=Dwarvish Guardsman
- user_description= _ "Dwarvish Guardsman"
+ generate_description=yes
type=Dwarvish Guardsman
x=8
y=20
@@ -203,7 +203,7 @@
[/unit]
[unit]
description=Dwarvish Fighter
- user_description= _ "Dwarvish Fighter"
+ generate_description=yes
type=Dwarvish Fighter
x=17
y=19
@@ -215,7 +215,7 @@
[/unit]
[unit]
description=Dwarvish Guardsman
- user_description= _ "Dwarvish Guardsman"
+ generate_description=yes
type=Dwarvish Guardsman
x=15
y=16
@@ -227,7 +227,7 @@
[/unit]
[unit]
description=Dwarvish Fighter
- user_description= _ "Dwarvish Fighter"
+ generate_description=yes
type=Dwarvish Fighter
x=9
y=16
Index: wesnoth/data/scenarios/Heir_To_The_Throne/Valley_of_Statues.cfg
diff -u wesnoth/data/scenarios/Heir_To_The_Throne/Valley_of_Statues.cfg:1.18
wesnoth/data/scenarios/Heir_To_The_Throne/Valley_of_Statues.cfg:1.19
--- wesnoth/data/scenarios/Heir_To_The_Throne/Valley_of_Statues.cfg:1.18
Sun Mar 27 23:06:16 2005
+++ wesnoth/data/scenarios/Heir_To_The_Throne/Valley_of_Statues.cfg Mon Mar
28 15:00:13 2005
@@ -212,7 +212,7 @@
#define STONE_GRUNT X Y
[unit]
description=Orcish Grunt
- user_description= _ "Orcish Grunt"
+ generate_description=yes
side=4
type=Orcish Grunt
x={X}
@@ -229,7 +229,7 @@
#define STONE_GOBLIN_KNIGHT X Y
[unit]
description=Goblin Knight
- user_description= _ "Goblin Knight"
+ generate_description=yes
side=4
type=Goblin Knight
x={X}
@@ -246,7 +246,7 @@
#define STONE_TROLL X Y
[unit]
description=Troll
- user_description= _ "Troll"
+ generate_description=yes
side=4
type=Troll
x={X}
Index: wesnoth/src/game_events.cpp
diff -u wesnoth/src/game_events.cpp:1.139 wesnoth/src/game_events.cpp:1.140
--- wesnoth/src/game_events.cpp:1.139 Mon Mar 28 14:07:30 2005
+++ wesnoth/src/game_events.cpp Mon Mar 28 15:00:13 2005
@@ -1,4 +1,4 @@
-/* $Id: game_events.cpp,v 1.139 2005/03/28 14:07:30 gruikya Exp $ */
+/* $Id: game_events.cpp,v 1.140 2005/03/28 15:00:13 gruikya Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -926,7 +926,7 @@
//if we should spawn a new unit on the map somewhere
else if(cmd == "unit") {
- unit new_unit(*game_data_ptr, cfg.get_parsed_config(), true);
+ unit new_unit(*game_data_ptr, cfg.get_parsed_config());
preferences::encountered_units().insert(new_unit.type().id());
gamemap::location loc = cfg_to_loc(cfg);
Index: wesnoth/src/unit.cpp
diff -u wesnoth/src/unit.cpp:1.135 wesnoth/src/unit.cpp:1.136
--- wesnoth/src/unit.cpp:1.135 Mon Mar 28 14:07:31 2005
+++ wesnoth/src/unit.cpp Mon Mar 28 15:00:13 2005
@@ -1,4 +1,4 @@
-/* $Id: unit.cpp,v 1.135 2005/03/28 14:07:31 gruikya Exp $ */
+/* $Id: unit.cpp,v 1.136 2005/03/28 15:00:13 gruikya Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -55,14 +55,14 @@
}
//constructor for reading a unit
-unit::unit(const game_data& data, const config& cfg, bool
generate_description) :
+unit::unit(const game_data& data, const config& cfg) :
state_(STATE_NORMAL),
moves_(0), user_end_turn_(false), facingLeft_(true),
resting_(false),
recruit_(false),
guardian_(false), upkeep_(UPKEEP_FREE)
{
- read(data,cfg, generate_description);
+ read(data,cfg);
}
unit_race::GENDER unit::generate_gender(const unit_type& type, bool gen)
@@ -596,7 +596,7 @@
return overlays_;
}
-void unit::read(const game_data& data, const config& cfg, bool
generate_description)
+void unit::read(const game_data& data, const config& cfg)
{
std::map<std::string,unit_type>::const_iterator i =
data.unit_types.find(cfg["type"]);
if(i != data.unit_types.end())
@@ -635,7 +635,7 @@
validate_side(side_);
description_ = cfg["user_description"];
- if(description_.empty() && generate_description)
+ if(cfg["generate_description"] == "yes")
description_ = type_->generate_description();
underlying_description_ = cfg["description"];
Index: wesnoth/src/unit.hpp
diff -u wesnoth/src/unit.hpp:1.65 wesnoth/src/unit.hpp:1.66
--- wesnoth/src/unit.hpp:1.65 Mon Mar 28 14:07:31 2005
+++ wesnoth/src/unit.hpp Mon Mar 28 15:00:13 2005
@@ -1,4 +1,4 @@
-/* $Id: unit.hpp,v 1.65 2005/03/28 14:07:31 gruikya Exp $ */
+/* $Id: unit.hpp,v 1.66 2005/03/28 15:00:13 gruikya Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -32,7 +32,7 @@
public:
friend struct unit_movement_resetter;
- unit(const game_data& data, const config& cfg, bool
generate_description=false);
+ unit(const game_data& data, const config& cfg);
unit(const unit_type* t, int side, bool use_traits=false, bool
dummy_unit=false, unit_race::GENDER gender=unit_race::MALE);
//a constructor used when advancing a unit
@@ -105,11 +105,8 @@
*
* \param data The global game_data object
* \param cfg Configuration object from which to read the unit
- * \param generate_description If set to true, will try to generate a
- * name from the unit if the cfg object does not specify
- * one.
*/
- void read(const game_data& data, const config& cfg, bool
generate_description=false);
+ void read(const game_data& data, const config& cfg);
void write(config& cfg) const;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth data/scenario-test.cfg data/scenarios/E...,
Philippe Plantier <=