diff --git a/crafting.cpp b/crafting.cpp old mode 100755 new mode 100644 diff --git a/crafting.h b/crafting.h old mode 100755 new mode 100644 diff --git a/player.cpp b/player.cpp index bab33f887e1ce..baadcdcca91e0 100644 --- a/player.cpp +++ b/player.cpp @@ -4538,7 +4538,8 @@ void player::try_to_sleep(game *g) vehicle *veh = g->m.veh_at (posx, posy, vpart); if (g->m.ter(posx, posy) == t_bed || g->m.ter(posx, posy) == t_makeshift_bed || g->m.tr_at(posx, posy) == tr_cot || g->m.tr_at(posx, posy) == tr_rollmat || - veh && veh->part_with_feature (vpart, vpf_seat) >= 0) + veh && veh->part_with_feature (vpart, vpf_seat) >= 0 || + veh && veh->part_with_feature (vpart, vpf_bed) >= 0) g->add_msg("This is a comfortable place to sleep."); else if (g->m.ter(posx, posy) != t_floor) g->add_msg("It's %shard to get to sleep on this %s.", diff --git a/veh_type.h b/veh_type.h index d7869c88e5976..299ace8b3785b 100644 --- a/veh_type.h +++ b/veh_type.h @@ -14,6 +14,7 @@ enum vpart_id // external parts vp_seat, + vp_bed, vp_frame_h, vp_frame_v, vp_frame_c, @@ -34,6 +35,7 @@ enum vpart_id vp_roof, vp_door, vp_door_o, + vp_door_i, vp_window, vp_blade_h, vp_blade_v, @@ -97,6 +99,7 @@ enum vpart_flags vpf_roof, // is a roof (cover) vpf_wheel, // this part touches ground (trigger traps) vpf_seat, // is seat + vpf_bed, // is bed (like seat, but can't be boarded) vpf_engine, // is engine vpf_fuel_tank, // is fuel tank vpf_cargo, // is cargo @@ -148,6 +151,8 @@ const vpart_info vpart_list[num_vparts] = 0 }, { "seat", '#', c_red, '*', c_red, 60, 300, 0, 0, itm_seat, 1, mfb(vpf_over) | mfb(vpf_seat) | mfb(vpf_no_reinforce) }, + { "bed", '#', c_magenta, '*', c_magenta, 60, 300, 0, 0, itm_seat, 1, + mfb(vpf_over) | mfb(vpf_bed) | mfb(vpf_no_reinforce) }, { "frame", 'h', c_ltgray, '#', c_ltgray, 100, 400, 0, 0, itm_frame, 1, mfb(vpf_external) | mfb(vpf_mount_point) | mfb (vpf_mount_inner) }, { "frame", 'j', c_ltgray, '#', c_ltgray, 100, 400, 0, 0, itm_frame, 1, @@ -187,7 +192,9 @@ const vpart_info vpart_list[num_vparts] = { "door", '+', c_cyan, '&', c_cyan, 80, 200, 0, 0, itm_frame, 2, mfb(vpf_external) | mfb(vpf_obstacle) | mfb(vpf_openable) }, { "opaque door",'+', c_cyan, '&', c_cyan, 80, 200, 0, 0, itm_frame, 2, - mfb(vpf_external) | mfb(vpf_obstacle) | mfb(vpf_openable) }, + mfb(vpf_external) | mfb(vpf_obstacle) | mfb(vpf_opaque) | mfb(vpf_openable) }, + { "internal door", '+', c_cyan, '&', c_cyan, 75, 75, 0, 0, itm_frame, 2, + mfb(vpf_external) | mfb(vpf_obstacle) | mfb(vpf_opaque) | mfb(vpf_openable) | mfb(vpf_roof) | mfb(vpf_no_reinforce) }, { "windshield", '"', c_ltcyan, '0', c_ltgray, 70, 50, 0, 0, itm_glass_sheet, 1, mfb(vpf_over) | mfb(vpf_obstacle) | mfb(vpf_no_reinforce) }, { "blade", '-', c_white, 'x', c_white, 250, 100, 0, 0, itm_carblade, 2, diff --git a/veh_typedef.cpp b/veh_typedef.cpp index 1ebf38ac9b4ce..958c689728240 100644 --- a/veh_typedef.cpp +++ b/veh_typedef.cpp @@ -247,7 +247,7 @@ void game::init_vehicles() PART (0, 0, vp_cargo_box); PART (0, 0, vp_roof); PART (0, 1, vp_frame_v2); - PART (0, 1, vp_seat); + PART (0, 1, vp_bed); PART (0, 1, vp_roof); PART (0, -1, vp_frame_v2); PART (0, -1, vp_cargo_box); @@ -255,12 +255,12 @@ void game::init_vehicles() PART (0, 2, vp_board_v); PART (0, 2, vp_fuel_tank_gas); PART (0, -2, vp_frame_v2); - PART (0, -2, vp_seat); + PART (0, -2, vp_bed); PART (0, -2, vp_roof); PART (0, -3, vp_board_v); PART (0, -3, vp_fuel_tank_gas); - PART (1, 0, vp_door_o); + PART (1, 0, vp_door_i); PART (1, -1, vp_board_h); PART (1, 1, vp_board_h); PART (1, -2, vp_board_h); @@ -273,7 +273,7 @@ void game::init_vehicles() PART (-1, 1, vp_board_h); PART (-1, -1, vp_board_h); PART (-1, -2, vp_board_h); - PART (-1, 2, vp_board_b); + PART (-1, 2, vp_board_n); PART (-1, -3, vp_board_b); PART (2, -1, vp_frame_h); diff --git a/vehicle.cpp b/vehicle.cpp index c65fb4acfa436..e88a3b872955e 100644 --- a/vehicle.cpp +++ b/vehicle.cpp @@ -1575,7 +1575,7 @@ void vehicle::refresh_insides () else if (part_flag(pn, vpf_obstacle)) { // found an obstacle, like board or windshield or door - if (part_flag(pn, vpf_openable) && parts[pn].open) + if (parts[pn].inside || part_flag(pn, vpf_openable) && parts[pn].open) continue; // door and it's open -- can't cover cover = true; break;