Buildings complete

develop
Chris Dombroski 2015-01-12 11:52:46 -05:00
parent ea313b6bf5
commit 3489c2f39a
1 changed files with 10 additions and 7 deletions

@ -5,6 +5,10 @@
#include <Console.h> #include <Console.h>
#include <PluginManager.h> #include <PluginManager.h>
#include "modules/Buildings.h"
#include "modules/Gui.h"
#include "modules/MapCache.h"
#include "df/building_axle_horizontalst.h" #include "df/building_axle_horizontalst.h"
#include "df/building_bridgest.h" #include "df/building_bridgest.h"
#include "df/building_constructionst.h" #include "df/building_constructionst.h"
@ -16,10 +20,6 @@
#include "df/building_water_wheelst.h" #include "df/building_water_wheelst.h"
#include "df/building_workshopst.h" #include "df/building_workshopst.h"
#include "modules/Gui.h"
#include "modules/MapCache.h"
#include "modules/Buildings.h"
using std::string; using std::string;
using std::endl; using std::endl;
using std::vector; using std::vector;
@ -95,6 +95,9 @@ char get_tile_dig(MapExtras::MapCache mc, int32_t x, int32_t y, int32_t z)
string get_tile_build(df::building* b) string get_tile_build(df::building* b)
{ {
if (! b)
return " ";
string ret;
switch(b->getType()) switch(b->getType())
{ {
case building_type::Armorstand: case building_type::Armorstand:
@ -141,7 +144,7 @@ string get_tile_build(df::building* b)
case building_type::Well: case building_type::Well:
return "l"; return "l";
case building_type::SiegeEngine: case building_type::SiegeEngine:
return "i" + ((df::building_siegeenginest*) b)->type == df::siegeengine_type::Ballista ? "b" : "c"; return ((df::building_siegeenginest*) b)->type == df::siegeengine_type::Ballista ? "ib" : "ic";
case building_type::Workshop: case building_type::Workshop:
switch (((df::building_workshopst*) b)->type) switch (((df::building_workshopst*) b)->type)
{ {
@ -321,7 +324,7 @@ string get_tile_build(df::building* b)
return "Tc"; return "Tc";
case trap_type::TrackStop: case trap_type::TrackStop:
df::building_trapst* ts = (df::building_trapst*) b; df::building_trapst* ts = (df::building_trapst*) b;
string ret = "CS"; ret = "CS";
if (ts->use_dump) if (ts->use_dump)
{ {
if (ts->dump_x_shift == 0) if (ts->dump_x_shift == 0)
@ -377,7 +380,7 @@ string get_tile_build(df::building* b)
case building_type::AxleVertical: case building_type::AxleVertical:
return "Mv"; return "Mv";
case building_type::Rollers: case building_type::Rollers:
string ret = "Mr"; ret = "Mr";
switch (((df::building_rollersst*) b)->direction) switch (((df::building_rollersst*) b)->direction)
{ {
case screw_pump_direction::FromNorth: case screw_pump_direction::FromNorth: