Skip to content

Commit

Permalink
ditch the unused Vegetation module
Browse files Browse the repository at this point in the history
  • Loading branch information
jjyg committed Dec 6, 2012
1 parent 885059c commit ebc2625
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 120 deletions.
2 changes: 0 additions & 2 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ include/modules/Materials.h
include/modules/Notes.h
include/modules/Screen.h
include/modules/Translation.h
include/modules/Vegetation.h
include/modules/Vermin.h
include/modules/World.h
include/modules/Graphic.h
Expand All @@ -142,7 +141,6 @@ modules/Materials.cpp
modules/Notes.cpp
modules/Screen.cpp
modules/Translation.cpp
modules/Vegetation.cpp
modules/Vermin.cpp
modules/World.cpp
modules/Graphic.cpp
Expand Down
1 change: 0 additions & 1 deletion library/include/DFHack.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ distribution.
#include "modules/Translation.h"
#include "modules/World.h"
#include "modules/Items.h"
#include "modules/Vegetation.h"
#include "modules/Maps.h"
#include "modules/Gui.h"

Expand Down
1 change: 0 additions & 1 deletion library/include/ModuleFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ namespace DFHack
Module* createGui();
Module* createWorld();
Module* createMaterials();
Module* createVegetation();
Module* createNotes();
Module* createGraphic();
}
Expand Down
1 change: 0 additions & 1 deletion library/include/modules/Maps.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ distribution.

#include "Export.h"
#include "Module.h"
#include "modules/Vegetation.h"
#include <vector>
#include "BitArray.h"
#include "modules/Materials.h"
Expand Down
48 changes: 0 additions & 48 deletions library/include/modules/Vegetation.h

This file was deleted.

1 change: 1 addition & 0 deletions library/modules/Maps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ using namespace std;
#include "df/z_level_flags.h"
#include "df/region_map_entry.h"
#include "df/flow_info.h"
#include "df/plant.h"

using namespace DFHack;
using namespace df::enums;
Expand Down
60 changes: 0 additions & 60 deletions library/modules/Vegetation.cpp

This file was deleted.

1 change: 1 addition & 0 deletions plugins/cleaners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "df/global_objects.h"
#include "df/builtin_mats.h"
#include "df/contaminant.h"
#include "df/plant.h"

using std::vector;
using std::string;
Expand Down
1 change: 0 additions & 1 deletion plugins/devel/tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ using std::string;
#include <Console.h>
#include <Export.h>
#include <PluginManager.h>
#include <modules/Vegetation.h>
#include <modules/Maps.h>
#include <modules/Gui.h>
#include <TileTypes.h>
Expand Down
2 changes: 1 addition & 1 deletion plugins/getplants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "df/map_block.h"
#include "df/tile_dig_designation.h"
#include "df/plant_raw.h"
#include "df/plant.h"

#include "modules/Vegetation.h"
#include <set>

using std::string;
Expand Down
1 change: 0 additions & 1 deletion plugins/liquids.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ using std::set;
#include "Console.h"
#include "Export.h"
#include "PluginManager.h"
#include "modules/Vegetation.h"
#include "modules/Maps.h"
#include "modules/Gui.h"
#include "TileTypes.h"
Expand Down
1 change: 1 addition & 0 deletions plugins/mapexport/mapexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ using namespace google::protobuf::io;

#include "DataDefs.h"
#include "df/world.h"
#include "df/plant.h"
#include "modules/Constructions.h"

#include "proto/Map.pb.h"
Expand Down
8 changes: 5 additions & 3 deletions plugins/plants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@
#include "Console.h"
#include "Export.h"
#include "PluginManager.h"
#include "modules/Vegetation.h"
#include "modules/Maps.h"
#include "modules/Gui.h"
#include "TileTypes.h"
#include "modules/MapCache.h"
#include "df/plant.h"

using std::vector;
using std::string;
using namespace DFHack;
using df::global::world;

const uint32_t sapling_to_tree_threshold = 120 * 28 * 12 * 3; // 3 years

command_result df_grow (color_ostream &out, vector <string> & parameters);
command_result df_immolate (color_ostream &out, vector <string> & parameters);
command_result df_extirpate (color_ostream &out, vector <string> & parameters);
Expand Down Expand Up @@ -219,7 +221,7 @@ command_result df_grow (color_ostream &out, vector <string> & parameters)
if(tileShape(map.tiletypeAt(DFCoord(x,y,z))) == tiletype_shape::SAPLING &&
tileSpecial(map.tiletypeAt(DFCoord(x,y,z))) != tiletype_special::DEAD)
{
tree->grow_counter = Vegetation::sapling_to_tree_threshold;
tree->grow_counter = sapling_to_tree_threshold;
}
break;
}
Expand All @@ -235,7 +237,7 @@ command_result df_grow (color_ostream &out, vector <string> & parameters)
df::tiletype ttype = map.tiletypeAt(df::coord(p->pos.x,p->pos.y,p->pos.z));
if(!p->flags.bits.is_shrub && tileShape(ttype) == tiletype_shape::SAPLING && tileSpecial(ttype) != tiletype_special::DEAD)
{
p->grow_counter = Vegetation::sapling_to_tree_threshold;
p->grow_counter = sapling_to_tree_threshold;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions plugins/prospector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ using namespace std;
#include "df/region_map_entry.h"
#include "df/inclusion_type.h"
#include "df/viewscreen_choose_start_sitest.h"
#include "df/plant.h"

using namespace DFHack;
using namespace df::enums;
Expand Down
1 change: 0 additions & 1 deletion plugins/tiletypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ using std::set;
#include "Console.h"
#include "Export.h"
#include "PluginManager.h"
#include "modules/Vegetation.h"
#include "modules/Maps.h"
#include "modules/Gui.h"
#include "TileTypes.h"
Expand Down

0 comments on commit ebc2625

Please sign in to comment.