Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
allow working without ribi_arrow pak
  • Loading branch information
teamhimeh committed May 6, 2018
1 parent 294d02b commit fc6c03c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions simskin.cc
Expand Up @@ -78,12 +78,12 @@ slist_tpl<const skin_desc_t *>skinverwaltung_t::extra_obj;


static spezial_obj_tpl<skin_desc_t> const misc_objekte[] = {
{ &skinverwaltung_t::ribi_arrow, "RibiArrow" },
{ &skinverwaltung_t::senke, "PowerDest" },
{ &skinverwaltung_t::pumpe, "PowerSource" },
{ &skinverwaltung_t::construction_site, "Construction" },
{ &skinverwaltung_t::fussweg, "Sidewalk" },
{ &skinverwaltung_t::tunnel_texture, "TunnelTexture"},
{ &skinverwaltung_t::ribi_arrow, "RibiArrow" },
{ NULL, NULL }
};

Expand Down Expand Up @@ -164,7 +164,7 @@ bool skinverwaltung_t::successfully_loaded(skintyp_t type)
case cursor: sb = cursor_objekte; break;
case symbol: sb = symbol_objekte; break;
case misc:
sb = misc_objekte+2;
sb = misc_objekte+3;
// for compatibility: use sidewalk as tunneltexture
if (tunnel_texture==NULL) {
tunnel_texture = fussweg;
Expand Down
9 changes: 7 additions & 2 deletions simtool.h
Expand Up @@ -1030,8 +1030,13 @@ class tool_show_ribi_t : public tool_t {
char const* get_tooltip(player_t const*) const OVERRIDE { return translator::translate("view masked ribi"); }
bool is_selected() const OVERRIDE { return weg_t::show_masked_ribi; }
bool init( player_t * ) {
weg_t::show_masked_ribi ^= 1;
welt->set_dirty();
if( skinverwaltung_t::ribi_arrow ) {
weg_t::show_masked_ribi ^= 1;
welt->set_dirty();
} else {
// no ribi_arrow pak.
dbg->warning("tool_show_ribi_t::init()", "the ribi_arrow pak is not installed!");
}
return false;
}
bool is_init_network_save() const OVERRIDE { return true; }
Expand Down

0 comments on commit fc6c03c

Please sign in to comment.