diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 5d8d068d49..5e43231ed6 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -753,6 +753,9 @@ About the new airlock wires panel: update_icon() return 1 +/obj/machinery/door/airlock/proc/can_remove_electronics() + return src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) + /obj/machinery/door/airlock/attackby(C as obj, mob/user as mob) //world << text("airlock attackby src [] obj [] mob []", src, C, user) if(!istype(usr, /mob/living/silicon)) @@ -797,7 +800,7 @@ About the new airlock wires panel: var/obj/item/weapon/pai_cable/cable = C cable.plugin(src, user) else if(!repairing && istype(C, /obj/item/weapon/crowbar)) - if(src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) ) + if(can_remove_electronics()) playsound(src.loc, 'sound/items/Crowbar.ogg', 75, 1) user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.") if(do_after(user,40)) diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 890574d664..25b4915408 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -190,6 +190,7 @@ else user << "You need more welding fuel to complete this task." return + user.update_examine_panel(src) return // Basic dismantling. @@ -243,6 +244,7 @@ if (istype(W, /obj/item/weapon/wirecutters)) playsound(src, 'sound/items/Wirecutter.ogg', 100, 1) construction_stage = 5 + user.update_examine_panel(src) user << "You cut through the outer grille." update_icon() return @@ -253,11 +255,13 @@ if(!do_after(user,40) || !istype(src, /turf/simulated/wall) || construction_stage != 5) return construction_stage = 4 + user.update_examine_panel(src) update_icon() user << "You unscrew the support lines." return else if (istype(W, /obj/item/weapon/wirecutters)) construction_stage = 6 + user.update_examine_panel(src) user << "You mend the outer grille." update_icon() return @@ -280,6 +284,7 @@ if(!do_after(user, 60) || !istype(src, /turf/simulated/wall) || construction_stage != 4) return construction_stage = 3 + user.update_examine_panel(src) update_icon() user << "You press firmly on the cover, dislodging it." return @@ -289,6 +294,7 @@ if(!do_after(user,40) || !istype(src, /turf/simulated/wall) || construction_stage != 4) return construction_stage = 5 + user.update_examine_panel(src) update_icon() user << "You screw down the support lines." return @@ -299,6 +305,7 @@ if(!do_after(user,100) || !istype(src, /turf/simulated/wall) || construction_stage != 3) return construction_stage = 2 + user.update_examine_panel(src) update_icon() user << "You pry off the cover." return @@ -309,6 +316,7 @@ if(!do_after(user,40) || !istype(src, /turf/simulated/wall) || construction_stage != 2) return construction_stage = 1 + user.update_examine_panel(src) update_icon() user << "You remove the bolts anchoring the support rods." return @@ -329,6 +337,7 @@ if(!do_after(user,70) || !istype(src, /turf/simulated/wall) || construction_stage != 1) return construction_stage = 0 + user.update_examine_panel(src) update_icon() user << "The slice through the support rods." return diff --git a/code/modules/examine/descriptions/engineering.dm b/code/modules/examine/descriptions/engineering.dm index c3f9b9b21f..37e69f16f9 100644 --- a/code/modules/examine/descriptions/engineering.dm +++ b/code/modules/examine/descriptions/engineering.dm @@ -25,11 +25,54 @@ Wires can be pulsed remotely with a signaler attached to it. A powersink will also drain any APCs connected to the same wire the powersink is on." /obj/item/inflatable - description_info = "Inflate by using it in your hand. The inflatable barrier will inflate on your tile. To deflate it, use the 'deflate' verb." + description_info = "Inflate by using it in your hand. The inflatable barrier will inflate on your tile. To deflate it, use the 'deflate' verb. \ + You can also inflate this on an adjacent tile by clicking the tile." /obj/structure/inflatable - description_info = "To remove these safely, use the 'deflate' verb. Hitting these with any objects will probably puncture and break it forever." + description_info = "To remove these safely, use the 'deflate' verb, or alt-click on it. Hitting these with any objects will probably puncture and break it forever." /obj/structure/inflatable/door description_info = "Click the door to open or close it. It only stops air while closed.
\ To remove these safely, use the 'deflate' verb. Hitting these with any objects will probably puncture and break it forever." + +/obj/machinery/door/get_description_interaction() + var/list/results = list() + if(!repairing && (health < maxhealth) && !(stat & BROKEN)) + results += "[desc_panel_image("metal sheet")]to start repairing damage (May require different material type)." + if(repairing && density) + results += "[desc_panel_image("welder")]to finish repairs." + results += "[desc_panel_image("crowbar")]to undo adding sheets for repairs." + + return results + +/obj/machinery/door/airlock/get_description_interaction() + var/list/results = list() + + if(can_remove_electronics()) + results += "[desc_panel_image("crowbar")]to remove the airlock electronics." + else + results += "[desc_panel_image("crowbar")]to open or close if unpowered/broken, and unbolted." + + if(welded) + results += "[desc_panel_image("welder")]to unweld, allowing it to open again." + else + results += "[desc_panel_image("welder")]to weld, preventing it from opening." + + if(p_open) + results += "[desc_panel_image("screwdriver")]to close the wire panel." + results += "[desc_panel_image("wirecutters")]to cut an internal wire while hacking." + results += "[desc_panel_image("multitool")]to pulse an internal wire while hacking." + else + results += "[desc_panel_image("screwdriver")]to open the wire panel, enabling the ability to hack." + + results += ..() + + return results + +/obj/machinery/portable_atmospherics/canister/get_description_interaction() + var/list/results = list() + + results += "[desc_panel_image("wrench")]to connect or disconnect from a connector port below." + results += "[desc_panel_image("air tank")]to fill the air tank from this canister." + + return results \ No newline at end of file diff --git a/code/modules/examine/descriptions/turfs.dm b/code/modules/examine/descriptions/turfs.dm index cccc43e073..4319c23ffe 100644 --- a/code/modules/examine/descriptions/turfs.dm +++ b/code/modules/examine/descriptions/turfs.dm @@ -1,3 +1,33 @@ /turf/simulated/wall - description_info = "You can deconstruct this by welding it, and then wrenching the girder.
\ - You can build a wall by using metal sheets and making a girder, then adding more metal or plasteel." \ No newline at end of file + description_info = "You can build a wall by using metal sheets and making a girder, then adding more metal or plasteel." + +/turf/simulated/wall/get_description_interaction() + var/list/results = list() + if(damage) + results += "[desc_panel_image("welder")]to repair." + + if(isnull(construction_stage) || !reinf_material) + results += "[desc_panel_image("welder")]to deconstruct if undamaged." + else + switch(construction_stage) + if(6) + results += "[desc_panel_image("wirecutters")]to begin deconstruction." + if(5) + results += list( + "[desc_panel_image("screwdriver")]to continue deconstruction.", + "[desc_panel_image("wirecutters")]to reverse deconstruction." + ) + if(4) + results += list( + "[desc_panel_image("welder")]to continue deconstruction.", + "[desc_panel_image("screwdriver")]to reverse deconstruction." + ) + if(3) + results += "[desc_panel_image("crowbar")]to continue deconstruction." + if(2) + results += "[desc_panel_image("wrench")]to continue deconstruction." + if(1) + results += "[desc_panel_image("welder")]to continue deconstruction." + if(0) + results += "[desc_panel_image("crowbar")]to finish deconstruction." + return results \ No newline at end of file diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm index ec64ffbe41..6e2df0b1fa 100644 --- a/code/modules/examine/examine.dm +++ b/code/modules/examine/examine.dm @@ -5,6 +5,7 @@ This means that this file can be unchecked, along with the other examine files, and can be removed entirely with no effort. */ +#define EXAMINE_PANEL_PADDING " " /atom/ var/description_info = null //Helpful blue text. @@ -27,6 +28,14 @@ return description_antag return +// This one is slightly different, in that it must return a list. +/atom/proc/get_description_interaction() + return list() + +// Quickly adds the boilerplate code to add an image and padding for the image. +/proc/desc_panel_image(var/icon_state) + return "\icon[description_icons[icon_state]][EXAMINE_PANEL_PADDING]" + /mob/living/get_description_fluff() if(flavor_text) //Get flavor text for the green text. return flavor_text @@ -44,6 +53,7 @@ description_holders["info"] = A.get_description_info() description_holders["fluff"] = A.get_description_fluff() description_holders["antag"] = (update_antag_info)? A.get_description_antag() : "" + description_holders["interactions"] = A.get_description_interaction() description_holders["name"] = "[A.name]" description_holders["icon"] = "\icon[A]" @@ -57,6 +67,9 @@ stat(null,"[description_holders["desc"]]") //the default examine text. if(description_holders["info"]) stat(null,"[description_holders["info"]]") //Blue, informative text. + if(description_holders["interactions"]) + for(var/line in description_holders["interactions"]) + stat(null, "[line]") if(description_holders["fluff"]) stat(null,"[description_holders["fluff"]]") //Yellow, fluff-related text. if(description_holders["antag"]) @@ -67,6 +80,9 @@ if(..()) return 1 - var/is_antag = ((mind && mind.special_role) || isobserver(src)) //ghosts don't have minds + update_examine_panel(A) + +/mob/proc/update_examine_panel(var/atom/A) if(client) + var/is_antag = ((mind && mind.special_role) || isobserver(src)) //ghosts don't have minds client.update_description_holders(A, is_antag) diff --git a/code/modules/examine/stat_icons.dm b/code/modules/examine/stat_icons.dm index 77d97fe0a1..ba09157d1c 100644 --- a/code/modules/examine/stat_icons.dm +++ b/code/modules/examine/stat_icons.dm @@ -6,5 +6,19 @@ var/global/list/description_icons = list( "energy_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="energy_protection"), "bomb_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="bomb_protection"), "radiation_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="radiation_protection"), - "biohazard_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="biohazard_protection") - ) \ No newline at end of file + "biohazard_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="biohazard_protection"), + + "welder" = image(icon='icons/obj/items.dmi',icon_state="welder"), + "wirecutters" = image(icon='icons/obj/items.dmi',icon_state="cutters"), + "screwdriver" = image(icon='icons/obj/items.dmi',icon_state="screwdriver"), + "wrench" = image(icon='icons/obj/items.dmi',icon_state="wrench"), + "crowbar" = image(icon='icons/obj/items.dmi',icon_state="crowbar"), + "multitool" = image(icon='icons/obj/device.dmi',icon_state="multitool"), + + "metal sheet" = image(icon='icons/obj/items.dmi',icon_state="sheet-metal"), + "plasteel sheet" = image(icon='icons/obj/items.dmi',icon_state="sheet-plasteel"), + + "air tank" = image(icon='icons/obj/tank.dmi',icon_state="oxygen"), + + "connector" = image(icon='icons/obj/pipes.dmi',icon_state="connector") + )