diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index dc28cdca6f5c..b7257ff4e7d3 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -550,13 +550,13 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( add_fingerprint(usr) update_icon() -/obj/structure/machinery/door/airlock/attackby(obj/item/C, mob/user) - if(SEND_SIGNAL(C, COMSIG_ITEM_ATTACK_AIRLOCK, src, user) & COMPONENT_CANCEL_AIRLOCK_ATTACK) +/obj/structure/machinery/door/airlock/attackby(obj/item/attacking_item, mob/user) + if(SEND_SIGNAL(attacking_item, COMSIG_ITEM_ATTACK_AIRLOCK, src, user) & COMPONENT_CANCEL_AIRLOCK_ATTACK) return - if(istype(C, /obj/item/clothing/mask/cigarette)) + if(istype(attacking_item, /obj/item/clothing/mask/cigarette)) if(isElectrified()) - var/obj/item/clothing/mask/cigarette/L = C + var/obj/item/clothing/mask/cigarette/L = attacking_item L.light(SPAN_NOTICE("[user] lights their [L] on an electrical arc from the [src]")) return @@ -567,7 +567,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( add_fingerprint(user) - if(istype(C, /obj/item/weapon/zombie_claws) && (welded || locked)) + if(istype(attacking_item, /obj/item/weapon/zombie_claws) && (welded || locked)) user.visible_message(SPAN_NOTICE("[user] starts tearing into the door on the [src]!"), \ SPAN_NOTICE("You start prying your hand into the gaps of the door with your fingers... This will take about 30 seconds."), \ SPAN_NOTICE("You hear tearing noises!")) @@ -584,8 +584,8 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( return - if((iswelder(C) && !operating && density)) - var/obj/item/tool/weldingtool/W = C + if((iswelder(attacking_item) && !operating && density)) + var/obj/item/tool/weldingtool/W = attacking_item var/weldtime = 50 if(!HAS_TRAIT(W, TRAIT_TOOL_BLOWTORCH)) weldtime = 70 @@ -609,7 +609,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( update_icon() return - else if(HAS_TRAIT(C, TRAIT_TOOL_SCREWDRIVER)) + else if(HAS_TRAIT(attacking_item, TRAIT_TOOL_SCREWDRIVER)) if(no_panel) to_chat(user, SPAN_WARNING("\The [src] has no panel to open!")) return @@ -619,17 +619,17 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( update_icon() return - else if(HAS_TRAIT(C, TRAIT_TOOL_WIRECUTTERS)) + else if(HAS_TRAIT(attacking_item, TRAIT_TOOL_WIRECUTTERS)) return attack_hand(user) - else if(HAS_TRAIT(C, TRAIT_TOOL_MULTITOOL)) + else if(HAS_TRAIT(attacking_item, TRAIT_TOOL_MULTITOOL)) return attack_hand(user) - else if(isgun(C)) - var/obj/item/weapon/gun/G = C - for(var/slot in G.attachments) - if(istype(G.attachments[slot], /obj/item/attachable/bayonet)) - var/obj/item/attachable/bayonet/a_bayonet = G.attachments[slot] + else if(isgun(attacking_item)) + var/obj/item/weapon/gun/gun_item = attacking_item + for(var/slot in gun_item.attachments) + if(istype(gun_item.attachments[slot], /obj/item/attachable/bayonet)) + var/obj/item/attachable/bayonet/a_bayonet = gun_item.attachments[slot] if(arePowerSystemsOn()) to_chat(user, SPAN_WARNING("The airlock's motors resist your efforts to force it.")) else if(locked) @@ -647,50 +647,48 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( if(do_after(user, a_bayonet.pry_delay, INTERRUPT_ALL, BUSY_ICON_FRIENDLY)) close(1) - else if(C.pry_capable) - if(C.pry_capable == IS_PRY_CAPABLE_CROWBAR && panel_open && welded) + else if(attacking_item.pry_capable) + if(attacking_item.pry_capable == IS_PRY_CAPABLE_CROWBAR && panel_open && welded) if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) to_chat(user, SPAN_WARNING("You don't seem to know how to deconstruct machines.")) return - if(width > 1) - to_chat(user, SPAN_WARNING("Large doors seem impossible to disassemble.")) - return playsound(loc, 'sound/items/Crowbar.ogg', 25, 1) user.visible_message("[user] starts removing the electronics from the airlock assembly.", "You start removing electronics from the airlock assembly.") if(do_after(user, 40, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) to_chat(user, SPAN_NOTICE(" You removed the airlock electronics!")) - var/obj/structure/airlock_assembly/da = new assembly_type(loc) - if(istype(da, /obj/structure/airlock_assembly/multi_tile)) - da.setDir(dir) + var/obj/structure/airlock_assembly/doors_assembly = new assembly_type(loc) + if(istype(doors_assembly, /obj/structure/airlock_assembly/multi_tile)) + doors_assembly.setDir(dir) + doors_assembly.update_collision_box() - da.anchored = TRUE + doors_assembly.anchored = TRUE if(mineral) - da.glass = mineral + doors_assembly.glass = mineral //else if(glass) - else if(glass && !da.glass) - da.glass = 1 - da.state = 0 - da.created_name = name - da.update_icon() + else if(glass && !doors_assembly.glass) + doors_assembly.glass = TRUE + doors_assembly.state = 0 + doors_assembly.created_name = name + doors_assembly.update_icon() - var/obj/item/circuitboard/airlock/ae + var/obj/item/circuitboard/airlock/airlock_electronics if(!electronics) - ae = new/obj/item/circuitboard/airlock( loc ) + airlock_electronics = new/obj/item/circuitboard/airlock(loc) if(!req_access || !req_one_access) check_access() if(req_access.len) - ae.conf_access = req_access + airlock_electronics.conf_access = req_access else if(req_one_access.len) - ae.conf_access = req_one_access - ae.one_access = 1 + airlock_electronics.conf_access = req_one_access + airlock_electronics.one_access = TRUE else - ae = electronics + airlock_electronics = electronics electronics = null - ae.forceMove(loc) + airlock_electronics.forceMove(loc) if(operating == -1) - ae.fried = TRUE - ae.update_icon() + airlock_electronics.fried = TRUE + airlock_electronics.update_icon() operating = 0 msg_admin_niche("[key_name(user)] deconstructed [src] in [get_area(user)] ([user.loc.x],[user.loc.y],[user.loc.z])") @@ -698,7 +696,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( deconstruct() return - else if(arePowerSystemsOn() && C.pry_capable != IS_PRY_CAPABLE_FORCE) + else if(arePowerSystemsOn() && attacking_item.pry_capable != IS_PRY_CAPABLE_FORCE) to_chat(user, SPAN_WARNING("The airlock's motors resist your efforts to force it.")) else if(locked) @@ -707,7 +705,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( else if(welded) to_chat(user, SPAN_WARNING("The airlock is welded shut.")) - else if(C.pry_capable == IS_PRY_CAPABLE_FORCE) + else if(attacking_item.pry_capable == IS_PRY_CAPABLE_FORCE) return FALSE //handled by the item's afterattack else if(!operating) @@ -719,7 +717,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( return TRUE //no afterattack call - if(istype(C, /obj/item/large_shrapnel)) + if(istype(attacking_item, /obj/item/large_shrapnel)) return FALSE //trigger afterattack call else return ..() diff --git a/code/game/machinery/doors/multi_tile.dm b/code/game/machinery/doors/multi_tile.dm index 6123d56b8f23..65ecd67a438e 100644 --- a/code/game/machinery/doors/multi_tile.dm +++ b/code/game/machinery/doors/multi_tile.dm @@ -2,19 +2,25 @@ /obj/structure/machinery/door/airlock/multi_tile width = 2 damage_cap = 650 // Bigger = more endurable + assembly_type = /obj/structure/airlock_assembly/multi_tile /obj/structure/machinery/door/airlock/multi_tile/close() //Nasty as hell O(n^2) code but unfortunately necessary - for(var/turf/T in locs) - for(var/obj/vehicle/multitile/M in T) - if(M) return 0 + for(var/turf/turf_tile in locs) + for(var/obj/vehicle/multitile/vehicle_tile in turf_tile) + if(vehicle_tile) return 0 return ..() +/obj/structure/machinery/door/airlock/multi_tile/Initialize() + . = ..() + handle_multidoor() + update_icon() + /obj/structure/machinery/door/airlock/multi_tile/glass name = "Glass Airlock" icon = 'icons/obj/structures/doors/Door2x1glass.dmi' opacity = FALSE - glass = 1 + glass = TRUE assembly_type = /obj/structure/airlock_assembly/multi_tile /obj/structure/machinery/door/airlock/multi_tile/glass/colony @@ -25,7 +31,7 @@ name = "Security Airlock" icon = 'icons/obj/structures/doors/Door2x1security.dmi' opacity = FALSE - glass = 1 + glass = TRUE /obj/structure/machinery/door/airlock/multi_tile/security/colony req_access = null @@ -35,7 +41,7 @@ name = "Command Airlock" icon = 'icons/obj/structures/doors/Door2x1command.dmi' opacity = FALSE - glass = 1 + glass = TRUE /obj/structure/machinery/door/airlock/multi_tile/command/colony req_access = null @@ -45,7 +51,7 @@ name = "Medical Airlock" icon = 'icons/obj/structures/doors/Door2x1medbay.dmi' opacity = FALSE - glass = 1 + glass = TRUE /obj/structure/machinery/door/airlock/multi_tile/medical/colony req_access = null @@ -55,7 +61,7 @@ name = "Engineering Airlock" icon = 'icons/obj/structures/doors/Door2x1engine.dmi' opacity = FALSE - glass = 1 + glass = TRUE /obj/structure/machinery/door/airlock/multi_tile/engineering/colony req_access = null @@ -65,7 +71,7 @@ name = "Research Airlock" icon = 'icons/obj/structures/doors/Door2x1research.dmi' opacity = FALSE - glass = 1 + glass = TRUE req_one_access = list(ACCESS_MARINE_RESEARCH, ACCESS_WY_RESEARCH, ACCESS_WY_EXEC) /obj/structure/machinery/door/airlock/multi_tile/research/colony @@ -103,7 +109,7 @@ name = "Secure Airlock" icon = 'icons/obj/structures/doors/Door2x1_secure2_glass.dmi' opacity = FALSE - glass = 1 + glass = TRUE openspeed = 31 req_access = null @@ -141,10 +147,10 @@ . = ..() relativewall_neighbours() -/obj/structure/machinery/door/airlock/multi_tile/almayer/take_damage(dam, mob/M) - var/damage_check = max(0, damage + dam) - if(damage_check >= damage_cap && M && is_mainship_level(z)) - SSclues.create_print(get_turf(M), M, "The fingerprint contains bits of wire and metal specks.") +/obj/structure/machinery/door/airlock/multi_tile/almayer/take_damage(taken_damage, mob/damaging_mob) + var/damage_check = max(0, damage + taken_damage) + if(damage_check >= damage_cap && damaging_mob && is_mainship_level(z)) + SSclues.create_print(get_turf(damaging_mob), damaging_mob, "The fingerprint contains bits of wire and metal specks.") ..() /obj/structure/machinery/door/airlock/multi_tile/almayer/generic @@ -156,6 +162,11 @@ /obj/structure/machinery/door/airlock/multi_tile/almayer/generic/autoname autoname = TRUE +/obj/structure/machinery/door/airlock/multi_tile/almayer/generic/solid + icon = 'icons/obj/structures/doors/2x1generic_solid.dmi' + opacity = TRUE + glass = FALSE + /obj/structure/machinery/door/airlock/multi_tile/almayer/medidoor name = "\improper Medical Airlock" icon = 'icons/obj/structures/doors/2x1medidoor.dmi' @@ -223,15 +234,10 @@ req_one_access = list(ACCESS_CIVILIAN_BRIG, ACCESS_CIVILIAN_COMMAND, ACCESS_WY_COLONIAL) /obj/structure/machinery/door/airlock/multi_tile/almayer/handle_multidoor() + . = ..() if(!(width > 1)) return //Bubblewrap update_filler_turfs() - if(dir in list(NORTH, SOUTH)) - bound_height = world.icon_size * width - bound_width = world.icon_size - else if(dir in list(EAST, WEST)) - bound_width = world.icon_size * width - bound_height = world.icon_size //We have to find these again since these doors are used on shuttles a lot so the turfs changes /obj/structure/machinery/door/airlock/multi_tile/almayer/proc/update_filler_turfs() @@ -427,7 +433,7 @@ /obj/structure/machinery/door/airlock/multi_tile/elevator/access icon = 'icons/obj/structures/doors/4x1_elevator_access.dmi' opacity = FALSE - glass = 1 + glass = TRUE /obj/structure/machinery/door/airlock/multi_tile/elevator/access/research name = "\improper Research Elevator Hatch" @@ -547,7 +553,7 @@ icon = 'icons/obj/structures/doors/prepdoor.dmi' req_one_access = list(ACCESS_MARINE_PREP, ACCESS_MARINE_DATABASE, ACCESS_MARINE_CARGO, ACCESS_MARINE_ALPHA, ACCESS_MARINE_BRAVO, ACCESS_MARINE_CHARLIE, ACCESS_MARINE_DELTA) opacity = FALSE - glass = 1 + glass = TRUE /obj/structure/machinery/door/airlock/multi_tile/almayer/marine/shared/alpha_bravo name = "\improper Alpha-Bravo Squads Preparations" diff --git a/code/game/objects/structures/airlock_assembly.dm b/code/game/objects/structures/airlock_assembly.dm index 0679e1287ff7..d9e55e868016 100644 --- a/code/game/objects/structures/airlock_assembly.dm +++ b/code/game/objects/structures/airlock_assembly.dm @@ -22,9 +22,11 @@ var/airlock_type = "generic" //the type path of the airlock once completed var/glass = AIRLOCK_NOGLASS // see defines var/created_name = null + /// Used for multitile assemblies + var/width = 1 + /obj/structure/airlock_assembly/Initialize(mapload, ...) . = ..() - update_icon() /obj/structure/airlock_assembly/get_examine_text(mob/user) @@ -35,23 +37,26 @@ switch(state) if(STATE_STANDARD) if(anchored) - helpmessage += "It looks like a [SPAN_HELPFUL("wrench")] will unsecure it. Insert a [SPAN_HELPFUL("airlock circuit")]." + var/temp = "" + if(width == 1) + temp += "It looks like a [SPAN_HELPFUL("wrench")] will unsecure it. " + helpmessage += "[temp]You can insert an [SPAN_HELPFUL("airlock circuit")]. " if(!glass) - helpmessage += "Insert some [SPAN_HELPFUL("glass sheets")] to add windows to it." + helpmessage += "Insert some [SPAN_HELPFUL("glass sheets")] to add windows to it. " else if(glass == AIRLOCK_GLASSIN) - helpmessage += "You can take out the windows with a [SPAN_HELPFUL("screwdriver")]." + helpmessage += "You can take out the windows with a [SPAN_HELPFUL("screwdriver")]. " else - helpmessage += "It looks like a [SPAN_HELPFUL("wrench")] will secure it." + helpmessage += "It looks like a [SPAN_HELPFUL("wrench")] will secure it. " if(STATE_CIRCUIT) - helpmessage += "Add [SPAN_HELPFUL("cable coil")] to the circuit." + helpmessage += "Add [SPAN_HELPFUL("cable coil")] to the circuit. " if(STATE_WIRES) - helpmessage += "Secure the circuit with a [SPAN_HELPFUL("screwdriver")]." + helpmessage += "Secure the circuit with a [SPAN_HELPFUL("screwdriver")]. " if(STATE_SCREWDRIVER) - helpmessage += "[SPAN_HELPFUL("Weld")] it all in place." + helpmessage += "[SPAN_HELPFUL("Weld")] it all in place. " helpmessage += "You can name it with a [SPAN_HELPFUL("pen")]." . += SPAN_NOTICE(helpmessage) -/obj/structure/airlock_assembly/attackby(obj/item/W as obj, mob/user as mob) +/obj/structure/airlock_assembly/attackby(obj/item/attacking_item as obj, mob/user as mob) if(user.action_busy) return TRUE //no afterattack @@ -59,16 +64,16 @@ to_chat(user, SPAN_WARNING("You are not trained to configure \the [src]...")) return - if(HAS_TRAIT(W, TRAIT_TOOL_PEN)) - var/t = copytext(stripped_input(user, "Enter the name for the airlock.", name, created_name), 1, MAX_NAME_LEN) - if(!t || !in_range(src, usr) && loc != usr) + if(HAS_TRAIT(attacking_item, TRAIT_TOOL_PEN)) + var/input_text = copytext(stripped_input(user, "Enter the name for the airlock.", name, created_name), 1, MAX_NAME_LEN) + if(!input_text || !in_range(src, usr) && loc != usr) return - created_name = t + created_name = input_text playsound(src, "paper_writing", 15, TRUE) return - if(istype(W, /obj/item/stack/sheet/glass)) - var/obj/item/stack/sheet/glass/G = W + if(istype(attacking_item, /obj/item/stack/sheet/glass)) + var/obj/item/stack/sheet/glass/glass_sheet = attacking_item if(!anchored) to_chat(user, SPAN_NOTICE("The airlock is not secured!")) return @@ -83,7 +88,7 @@ return if(!do_after(user, 20 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) return - if(G.use(5)) + if(glass_sheet.use(5)) playsound(loc, 'sound/items/Deconstruct.ogg', 25, 1) glass = AIRLOCK_GLASSIN to_chat(user, SPAN_NOTICE("You insert some glass into \the [src], adding windows to it.")) @@ -93,7 +98,7 @@ to_chat(user, SPAN_WARNING("You need five sheets of glass to add windows to \the [src]!")) return - if(HAS_TRAIT(W, TRAIT_TOOL_CROWBAR)) + if(HAS_TRAIT(attacking_item, TRAIT_TOOL_CROWBAR)) to_chat(user, SPAN_NOTICE("You start pulling \the [src] apart.")) playsound(loc, 'sound/items/Crowbar.ogg', 25, 1) if(!do_after(user, 20 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) @@ -108,10 +113,14 @@ switch(state) if(STATE_STANDARD) - if(HAS_TRAIT(W, TRAIT_TOOL_WRENCH)) + if(HAS_TRAIT(attacking_item, TRAIT_TOOL_WRENCH)) + //Moving wide doors is wonky and doesn't work properly, if it's fixed we could make it unwrenchable again + if(width > 1 && anchored) + to_chat(user, SPAN_WARNING("[src] cannot be unwrenched.")) + return if(!anchored) - var/turf/open/T = loc - if(!(istype(T) && T.allow_construction)) + var/turf/open/checked_turf = loc + if(!(istype(checked_turf) && checked_turf.allow_construction)) to_chat(user, SPAN_WARNING("\The [src] cannot be secured here!")) return playsound(loc, 'sound/items/Ratchet.ogg', 25, 1) @@ -127,10 +136,10 @@ to_chat(user, SPAN_NOTICE("The airlock is not secured!")) return ..() - if(istype(W, /obj/item/circuitboard/airlock)) - var/obj/item/circuitboard/airlock/C = W - if(C.fried) // guess what this used to check? ICON STATE!! - to_chat(user, SPAN_WARNING("\The [C] are totally broken!")) + if(istype(attacking_item, /obj/item/circuitboard/airlock)) + var/obj/item/circuitboard/airlock/airlock_circuit = attacking_item + if(airlock_circuit.fried) // guess what this used to check? ICON STATE!! + to_chat(user, SPAN_WARNING("\The [airlock_circuit] are totally broken!")) return playsound(loc, 'sound/items/Screwdriver.ogg', 25, 1) to_chat(user, SPAN_NOTICE("You start installing the airlock electronics.")) @@ -138,14 +147,14 @@ return playsound(loc, 'sound/items/Screwdriver.ogg', 25, 1) user.drop_held_item() - W.forceMove(src) + attacking_item.forceMove(src) to_chat(user, SPAN_NOTICE("You installed the airlock electronics!")) state = STATE_CIRCUIT - electronics = W + electronics = attacking_item update_icon() return - if(HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER)) + if(HAS_TRAIT(attacking_item, TRAIT_TOOL_SCREWDRIVER)) if(!anchored) to_chat(user, SPAN_NOTICE("The airlock is not secured!")) return @@ -163,22 +172,22 @@ if(STATE_CIRCUIT) - if(istype(W, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/C = W - if (C.get_amount() < 1) + if(istype(attacking_item, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/airlock_circuit = attacking_item + if (airlock_circuit.get_amount() < 1) to_chat(user, SPAN_WARNING("You need one length of coil to wire the airlock assembly.")) return to_chat(user, SPAN_NOTICE("You start to wire the circuit.")) if(!do_after(user, 40 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) return - if(C.use(1)) + if(airlock_circuit.use(1)) state = STATE_WIRES to_chat(user, SPAN_NOTICE("You wire the circuit.")) update_icon() return if(STATE_WIRES) - if(HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER)) + if(HAS_TRAIT(attacking_item, TRAIT_TOOL_SCREWDRIVER)) playsound(loc, 'sound/items/Screwdriver.ogg', 25, 1) to_chat(user, SPAN_NOTICE("You start securing the circuit")) if(!do_after(user, 40 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) @@ -190,27 +199,23 @@ return if(STATE_SCREWDRIVER) - if(iswelder(W)) - if(!HAS_TRAIT(W, TRAIT_TOOL_BLOWTORCH)) + if(iswelder(attacking_item)) + if(!HAS_TRAIT(attacking_item, TRAIT_TOOL_BLOWTORCH)) to_chat(user, SPAN_WARNING("You need a stronger blowtorch!")) return - var/obj/item/tool/weldingtool/WT = W - if(!WT.remove_fuel(5, user)) + var/obj/item/tool/weldingtool/welder = attacking_item + if(!welder.remove_fuel(5, user)) return playsound(loc, 'sound/items/Welder2.ogg', 25, 1) to_chat(user, SPAN_NOTICE("Now finishing the airlock.")) if(!do_after(user, 40 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) - WT.remove_fuel(-5) + welder.remove_fuel(-5) return playsound(loc, 'sound/items/Welder2.ogg', 25, 1) to_chat(user, SPAN_NOTICE("You finish the airlock!")) - var/path - if (glass == AIRLOCK_GLASSIN) - path = text2path("/obj/structure/machinery/door/airlock/almayer/[airlock_type]/glass") - else - path = text2path("/obj/structure/machinery/door/airlock/almayer/[airlock_type]") + var/path = get_airlock_path() var/obj/structure/machinery/door/airlock/door = new path(loc) door.assembly_type = type door.electronics = electronics @@ -225,7 +230,7 @@ door.name = created_name else door.name = base_name - + door.handle_multidoor() electronics.forceMove(door) qdel(src) return @@ -238,107 +243,107 @@ else icon_state = "door_as_[base_icon_state][state]" +/obj/structure/airlock_assembly/proc/get_airlock_path() + //For some reason multi_tile doors have different paths... can't say it isn't annoying + if (width > 1) + return "/obj/structure/machinery/door/airlock/multi_tile/almayer/[airlock_type][glass ? "" : "/solid"]" + return "/obj/structure/machinery/door/airlock/almayer/[airlock_type][glass ? "/glass" : ""]" + +/// Used for overloading proc in multi_tile +/obj/structure/airlock_assembly/proc/update_collision_box() + return + /obj/structure/airlock_assembly/airlock_assembly_com base_icon_state = "com" base_name = "Command Airlock" - airlock_type = "/command" + airlock_type = "command" /obj/structure/airlock_assembly/airlock_assembly_sec base_icon_state = "sec" base_name = "Security Airlock" - airlock_type = "/security" + airlock_type = "security" /obj/structure/airlock_assembly/airlock_assembly_eng base_icon_state = "eng" base_name = "Engineering Airlock" - airlock_type = "/engineering" + airlock_type = "engineering" /obj/structure/airlock_assembly/airlock_assembly_min base_icon_state = "min" base_name = "Mining Airlock" - airlock_type = "/mining" + airlock_type = "mining" /obj/structure/airlock_assembly/airlock_assembly_atmo base_icon_state = "atmo" base_name = "Atmospherics Airlock" - airlock_type = "/atmos" + airlock_type = "atmos" /obj/structure/airlock_assembly/airlock_assembly_research base_icon_state = "res" base_name = "Research Airlock" - airlock_type = "/research" + airlock_type = "research" /obj/structure/airlock_assembly/airlock_assembly_science base_icon_state = "sci" base_name = "Science Airlock" - airlock_type = "/science" + airlock_type = "science" /obj/structure/airlock_assembly/airlock_assembly_med base_icon_state = "med" base_name = "Medical Airlock" - airlock_type = "/medical" + airlock_type = "medical" /obj/structure/airlock_assembly/airlock_assembly_mai base_icon_state = "mai" base_name = "Maintenance Airlock" - airlock_type = "/maintenance" + airlock_type = "maintenance" glass = AIRLOCK_CANTGLASS /obj/structure/airlock_assembly/airlock_assembly_ext base_icon_state = "ext" base_name = "External Airlock" - airlock_type = "/external" + airlock_type = "external" glass = AIRLOCK_CANTGLASS /obj/structure/airlock_assembly/airlock_assembly_fre base_icon_state = "fre" base_name = "Freezer Airlock" - airlock_type = "/freezer" + airlock_type = "freezer" glass = AIRLOCK_CANTGLASS /obj/structure/airlock_assembly/airlock_assembly_hatch base_icon_state = "hatch" base_name = "Airtight Hatch" - airlock_type = "/hatch" + airlock_type = "hatch" glass = AIRLOCK_CANTGLASS /obj/structure/airlock_assembly/airlock_assembly_mhatch base_icon_state = "mhatch" base_name = "Maintenance Hatch" - airlock_type = "/maintenance_hatch" + airlock_type = "maintenance_hatch" glass = AIRLOCK_CANTGLASS /obj/structure/airlock_assembly/airlock_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly base_icon_state = "highsec" base_name = "High Security Airlock" - airlock_type = "/highsecurity" + airlock_type = "highsecurity" glass = AIRLOCK_CANTGLASS /obj/structure/airlock_assembly/multi_tile icon = 'icons/obj/structures/doors/airlock_assembly2x1.dmi' - icon_state = "door_as_g0" - dir = EAST - var/width = 1 - -/*Temporary until we get sprites. - airlock_type = "/multi_tile/maint" - glass = 1*/ - base_icon_state = "g" //Remember to delete this line when reverting "glass" var to 1. - airlock_type = "/multi_tile/glass" - glass = AIRLOCK_CANTGLASS //To prevent bugs in deconstruction process. + icon_state = "door_as_0" + width = 2 /obj/structure/airlock_assembly/multi_tile/Initialize(mapload, ...) . = ..() - 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_collision_box() update_icon() /obj/structure/airlock_assembly/multi_tile/Move() . = ..() + update_collision_box() + +/obj/structure/airlock_assembly/multi_tile/update_collision_box() if(dir in list(EAST, WEST)) bound_width = width * world.icon_size bound_height = world.icon_size diff --git a/icons/obj/structures/doors/2x1generic_solid.dmi b/icons/obj/structures/doors/2x1generic_solid.dmi new file mode 100644 index 000000000000..9c00b7b3277d Binary files /dev/null and b/icons/obj/structures/doors/2x1generic_solid.dmi differ diff --git a/icons/obj/structures/doors/airlock_assembly2x1.dmi b/icons/obj/structures/doors/airlock_assembly2x1.dmi index a8d69b6f6a2d..cafd5c415b89 100644 Binary files a/icons/obj/structures/doors/airlock_assembly2x1.dmi and b/icons/obj/structures/doors/airlock_assembly2x1.dmi differ