← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/remove_deprecated into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/remove_deprecated into lp:widelands.

Commit message:
Removed unused option "setdescription" from worker program.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/remove_deprecated/+merge/284729

Some more code cleanup regarding old savegames.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/remove_deprecated into lp:widelands.
=== modified file 'src/logic/map_objects/tribes/worker.cc'
--- src/logic/map_objects/tribes/worker.cc	2016-01-28 05:24:34 +0000
+++ src/logic/map_objects/tribes/worker.cc	2016-02-02 13:04:05 +0000
@@ -308,23 +308,6 @@
 
 
 /**
- * OUTDATED - SHOULD NOT BE USED ANYMORE AND DOES NOT DO ANYTHING VALUEABLE
- *    just kept here for savegame compatibility for Build15 and earlier
- *
- * setdescription \<immovable name\> \<immovable name\> ...
- *
- * sparamv = possible bobs
- */
-bool Worker::run_setdescription
-	(Game & game, State & state, const Action &)
-{
-	++state.ivar1;
-	schedule_act(game, 10);
-	return true;
-}
-
-
-/**
  * setbobdescription \<bob name\> \<bob name\> ...
  *
  * Randomly select a bob name that can be used in subsequent commands
@@ -749,7 +732,7 @@
 
 /**
  * Plant an immovable on the current position. The immovable type must have
- * been selected by a previous command (i.e. setdescription)
+ * been selected by a previous command (i.e. plant)
  */
 bool Worker::run_plant(Game & game, State & state, const Action & action)
 {
@@ -1891,7 +1874,7 @@
 /**
  * Follow the steps of a configuration-defined program.
  * ivar1 is the next action to be performed.
- * ivar2 is used to store description indices selected by setdescription
+ * ivar2 is used to store description indices selected by plant/setbobdescription
  * objvar1 is used to store objects found by findobject
  * coords is used to store target coordinates found by findspace
  */

=== modified file 'src/logic/map_objects/tribes/worker.h'
--- src/logic/map_objects/tribes/worker.h	2015-11-28 22:29:26 +0000
+++ src/logic/map_objects/tribes/worker.h	2016-02-02 13:04:05 +0000
@@ -226,7 +226,6 @@
 	bool run_mine             (Game &, State &, const Action &);
 	bool run_breed            (Game &, State &, const Action &);
 	bool run_createware       (Game &, State &, const Action &);
-	bool run_setdescription   (Game &, State &, const Action &);
 	bool run_setbobdescription(Game &, State &, const Action &);
 	bool run_findobject       (Game &, State &, const Action &);
 	bool run_findspace        (Game &, State &, const Action &);

=== modified file 'src/logic/map_objects/tribes/worker_program.cc'
--- src/logic/map_objects/tribes/worker_program.cc	2016-01-28 05:24:34 +0000
+++ src/logic/map_objects/tribes/worker_program.cc	2016-02-02 13:04:05 +0000
@@ -35,7 +35,6 @@
 	{"mine",              &WorkerProgram::parse_mine},
 	{"breed",             &WorkerProgram::parse_breed},
 	{"createware",        &WorkerProgram::parse_createware},
-	{"setdescription",    &WorkerProgram::parse_plant},
 	{"setbobdescription", &WorkerProgram::parse_setbobdescription},
 	{"findobject",        &WorkerProgram::parse_findobject},
 	{"findspace",         &WorkerProgram::parse_findspace},

=== modified file 'src/logic/map_objects/tribes/worker_program.h'
--- src/logic/map_objects/tribes/worker_program.h	2015-11-28 22:29:26 +0000
+++ src/logic/map_objects/tribes/worker_program.h	2016-02-02 13:04:05 +0000
@@ -69,7 +69,6 @@
 	void parse_mine             (Worker::Action* act, const std::vector<std::string>& cmd);
 	void parse_breed            (Worker::Action* act, const std::vector<std::string>& cmd);
 	void parse_createware       (Worker::Action* act, const std::vector<std::string>& cmd);
-	void parse_setdescription   (Worker::Action* act, const std::vector<std::string>& cmd);
 	void parse_setbobdescription(Worker::Action* act, const std::vector<std::string>& cmd);
 	void parse_findobject       (Worker::Action* act, const std::vector<std::string>& cmd);
 	void parse_findspace        (Worker::Action* act, const std::vector<std::string>& cmd);

=== modified file 'src/logic/map_objects/world/critter.cc'
--- src/logic/map_objects/world/critter.cc	2015-11-28 22:29:26 +0000
+++ src/logic/map_objects/world/critter.cc	2016-02-02 13:04:05 +0000
@@ -182,7 +182,7 @@
 
 Follow the steps of a configuration-defined program.
 ivar1 is the next action to be performed.
-ivar2 is used to store description indices selected by setdescription
+ivar2 is used to store description indices selected by plant/setbobdescription
 objvar1 is used to store objects found by findobject
 coords is used to store target coordinates found by findspace
 


Follow ups