diff --git a/baystation12.dme b/baystation12.dme index 5846ac2f2b8..e351b5b9c0d 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -388,6 +388,7 @@ #include "code\game\machinery\doors\checkForMultipleDoors.dm" #include "code\game\machinery\doors\door.dm" #include "code\game\machinery\doors\firedoor.dm" +#include "code\game\machinery\doors\multi_tile.dm" #include "code\game\machinery\doors\poddoor.dm" #include "code\game\machinery\doors\shutters.dm" #include "code\game\machinery\doors\unpowered.dm" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index d4ec1e588f7..e3f9eb213db 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -141,30 +141,6 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }. opacity = 1 assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites. -/obj/machinery/door/airlock/glass_large - name = "Glass Airlock" - icon = 'icons/obj/doors/Door2x1glassfull.dmi' - opacity = 0 - bound_width = 64 - glass = 1 - - update_nearby_tiles(need_rebuild) - . = ..() - - if(!.) - return - - var/turf/simulated/second_turf = get_step(src, EAST) - var/turf/simulated/north = get_step(second_turf, NORTH) - var/turf/simulated/east = get_step(second_turf, EAST) - var/turf/simulated/south = get_step(second_turf, SOUTH) - - update_heat_protection(second_turf) - - if(istype(north)) air_master.tiles_to_update |= north - if(istype(south)) air_master.tiles_to_update |= south - if(istype(east)) air_master.tiles_to_update |= east - /obj/machinery/door/airlock/freezer name = "Freezer Airlock" icon = 'icons/obj/doors/Doorfreezer.dmi' @@ -1316,7 +1292,7 @@ About the new airlock wires panel: var/obj/effect/stop/S S = new /obj/effect/stop S.victim = M - S.loc = src.loc + S.loc = M.loc spawn(20) del(S) M.emote("scream") diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 9ac8ad6c7f4..6aec44f7f17 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -20,8 +20,12 @@ var/heat_proof = 0 // For glass airlocks/opacity firedoors var/air_properties_vary_with_direction = 0 + //Multi-tile doors + dir = EAST + var/width = 1 + /obj/machinery/door/New() - ..() + . = ..() if(density) layer = 3.1 //Above most items if closed explosion_resistance = initial(explosion_resistance) @@ -29,6 +33,16 @@ else layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6 explosion_resistance = 0 + + + if(width > 1) + if(dir in list(EAST, WEST)) + bound_width = width * world.icon_size + bound_height = world.icon_size + else + bound_width = world.icon_size + bound_height = width * world.icon_size + update_nearby_tiles(need_rebuild=1) return @@ -258,6 +272,22 @@ if(istype(south)) air_master.tiles_to_update += south if(istype(east)) air_master.tiles_to_update += east if(istype(west)) air_master.tiles_to_update += west + + if(width > 1) + var/turf/simulated/next_turf = src + var/step_dir = turn(dir, 180) + for(var/current_step = 2, current_step <= width, current_step++) + next_turf = get_step(src, step_dir) + north = get_step(next_turf, step_dir) + east = get_step(next_turf, turn(step_dir, 90)) + south = get_step(next_turf, turn(step_dir, -90)) + + update_heat_protection(next_turf) + + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + return 1 /obj/machinery/door/proc/update_heat_protection(var/turf/simulated/source) @@ -273,5 +303,18 @@ close() return +/obj/machinery/door/Move(new_loc, new_dir) + update_nearby_tiles() + . = ..() + if(width > 1) + if(dir in list(EAST, WEST)) + bound_width = width * world.icon_size + bound_height = world.icon_size + else + bound_width = world.icon_size + bound_height = width * world.icon_size + + update_nearby_tiles() + /obj/machinery/door/morgue icon = 'icons/obj/doors/doormorgue.dmi' \ No newline at end of file diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 93f0abb4d09..e05d9511e4e 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -276,21 +276,4 @@ /obj/machinery/door/firedoor/multi_tile icon = 'DoorHazard2x1.dmi' - bound_width = 64 - - - update_nearby_tiles(need_rebuild) - if(!.) - return - - . = ..() - var/turf/simulated/second_turf = get_step(src, EAST) - var/turf/simulated/north = get_step(second_turf, NORTH) - var/turf/simulated/east = get_step(second_turf, EAST) - var/turf/simulated/south = get_step(second_turf, SOUTH) - - update_heat_protection(second_turf) - - if(istype(north)) air_master.tiles_to_update |= north - if(istype(south)) air_master.tiles_to_update |= south - if(istype(east)) air_master.tiles_to_update |= east \ No newline at end of file + width = 2 \ No newline at end of file diff --git a/code/game/machinery/doors/multi_tile.dm b/code/game/machinery/doors/multi_tile.dm new file mode 100644 index 00000000000..6fc0e0f7c95 --- /dev/null +++ b/code/game/machinery/doors/multi_tile.dm @@ -0,0 +1,9 @@ +//Terribly sorry for the code doubling, but things go derpy otherwise. +/obj/machinery/door/airlock/multi_tile + width = 2 + +/obj/machinery/door/airlock/multi_tile/glass + name = "Glass Airlock" + icon = 'icons/obj/doors/Door2x1glass.dmi' + opacity = 0 + glass = 1 \ No newline at end of file diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index e9ce0e9c5ba..e35bae22499 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -57,6 +57,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ new/datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1), \ ), 4), \ null, \ new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \ diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 8052fe52806..84fddc07066 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -101,6 +101,35 @@ obj/structure/door_assembly airlock_type = "/highsecurity" glass = -1 + multi_tile + icon = 'icons/obj/doors/door_assembly2x1.dmi' + dir = EAST + var/width = 1 + +//Temporary until we get sprites. +// airlock_type = "/multi_tile/maint" + glass = 1 + glass_type = "/multi_tile/glass" + + New() + if(dir in list(EAST, WEST)) + bound_width = width * world.icon_size + bound_height = world.icon_size + else + bound_width = world.icon_size + bound_height = width * world.icon_size + + Move() + . = ..() + if(dir in list(EAST, WEST)) + bound_width = width * world.icon_size + bound_height = world.icon_size + else + bound_width = world.icon_size + bound_height = width * world.icon_size + + + /obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/pen)) var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN) diff --git a/icons/obj/doors/Door2x1glass.dmi b/icons/obj/doors/Door2x1glass.dmi new file mode 100644 index 00000000000..fe4a9723539 Binary files /dev/null and b/icons/obj/doors/Door2x1glass.dmi differ diff --git a/icons/obj/doors/Door2x1glassfull.dmi b/icons/obj/doors/Door2x1glassfull.dmi deleted file mode 100644 index 96653338e11..00000000000 Binary files a/icons/obj/doors/Door2x1glassfull.dmi and /dev/null differ diff --git a/icons/obj/doors/door_assembly2x1.dmi b/icons/obj/doors/door_assembly2x1.dmi new file mode 100644 index 00000000000..a8d69b6f6a2 Binary files /dev/null and b/icons/obj/doors/door_assembly2x1.dmi differ