diff --git a/code/game/machinery/doors/_door.dm b/code/game/machinery/doors/_door.dm index f5ffc4c538e..9b634c03dfa 100644 --- a/code/game/machinery/doors/_door.dm +++ b/code/game/machinery/doors/_door.dm @@ -318,6 +318,10 @@ else if(src.health < src.maxhealth * 3/4) to_chat(user, "\The [src] shows signs of damage!") + var/mob/living/carbon/human/H = user + if (emagged && istype(H) && H.skill_check(SKILL_COMPUTER, SKILL_ADEPT)) + to_chat(user, SPAN_WARNING("\The [src]'s control panel looks fried.")) + /obj/machinery/door/set_broken(new_state, cause) . = ..() if(. && new_state && (cause & MACHINE_BROKEN_GENERIC)) @@ -553,4 +557,4 @@ /decl/public_access/public_method/close_door name = "close door" desc = "Closes the door if possible." - call_proc = /obj/machinery/door/proc/close \ No newline at end of file + call_proc = /obj/machinery/door/proc/close diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 1975bacac92..5073ee31aea 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -9,6 +9,7 @@ health = 150 visible = 0.0 use_power = POWER_USE_OFF + stat_immune = NOSCREEN | NOINPUT | NOPOWER uncreated_component_parts = null atom_flags = ATOM_FLAG_NO_TEMP_CHANGE | ATOM_FLAG_CHECKS_BORDER opacity = 0 @@ -57,19 +58,19 @@ if(istype(bot)) if(density && src.check_access(bot.botcard)) open() - sleep(50) - close() + addtimer(CALLBACK(src, .proc/close), 50, TIMER_UNIQUE | TIMER_OVERRIDE) return var/mob/M = AM // we've returned by here if M is not a mob if (src.operating) return if (src.density && (!issmall(M) || ishuman(M) || issilicon(M)) && src.allowed(AM)) open() + var/open_timer if(src.check_access(null)) - sleep(50) + open_timer = 50 else //secure doors close faster - sleep(20) - close() + open_timer = 20 + addtimer(CALLBACK(src, .proc/close), open_timer, TIMER_UNIQUE | TIMER_OVERRIDE) return /obj/machinery/door/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) @@ -98,16 +99,18 @@ icon_state = "[src.base_state]open" flick("[src.base_state]opening", src) playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1) - sleep(10) + addtimer(CALLBACK(src, .proc/open_final), 10, TIMER_UNIQUE | TIMER_OVERRIDE) + return 1 + +/obj/machinery/door/window/proc/open_final() explosion_resistance = 0 - set_density(0) + set_density(FALSE) update_icon() update_nearby_tiles() if(operating == 1) //emag again - src.operating = 0 - return 1 + operating = 0 /obj/machinery/door/window/close() if (src.operating) @@ -120,10 +123,12 @@ explosion_resistance = initial(explosion_resistance) update_nearby_tiles() - sleep(10) - src.operating = 0 + addtimer(CALLBACK(src, .proc/close_final), 10, TIMER_UNIQUE | TIMER_OVERRIDE) return 1 +/obj/machinery/door/window/proc/close_final() + operating = 0 + /obj/machinery/door/window/take_damage(var/damage) src.health = max(0, src.health - damage) if (src.health <= 0) @@ -141,12 +146,20 @@ return ..() /obj/machinery/door/window/emag_act(var/remaining_charges, var/mob/user) - if (density && operable()) - operating = -1 - flick("[src.base_state]spark", src) - sleep(6) - open() - return 1 + if (emagged) + to_chat(user, SPAN_WARNING("\The [src] has already been locked open.")) + return FALSE + if (!operable()) + to_chat(user, SPAN_WARNING("\The [src] is not functioning and doesn't respond to your attempts to short the circuitry.")) + return FALSE + + operating = -1 + emagged = TRUE + to_chat(user, SPAN_NOTICE("You short out \the [src]'s internal circuitry, locking it open!")) + if (density) + flick("[base_state]spark", src) + addtimer(CALLBACK(src, .proc/open), 6, TIMER_UNIQUE | TIMER_OVERRIDE) + return TRUE /obj/machinery/door/emp_act(severity) if(prob(20/severity)) @@ -170,6 +183,9 @@ if (src.density) open() else + if (emagged) + to_chat(user, SPAN_WARNING("\The [src] seems to be stuck and refuses to close!")) + return close() else if (src.density) diff --git a/html/changelogs/sierrakomodo-emag-windoors.yml b/html/changelogs/sierrakomodo-emag-windoors.yml new file mode 100644 index 00000000000..8f6763b9dc1 --- /dev/null +++ b/html/changelogs/sierrakomodo-emag-windoors.yml @@ -0,0 +1,39 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# admin +################################# + +# Your name. +author: SierraKomodo + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Windoors are now properly emag-able." + - tweak: "Emagged windoors will now provide feedback that they are broken when you try to close them." + - tweak: "You can now tell if a door's control board has been fried by examining the door with an IT skill of trained or higher."