fix for the worlds shittiest exploit (#25130)

This commit is contained in:
GDN
2024-04-14 20:21:44 +00:00
committed by GitHub
parent cb03f174a0
commit 95efc8fbda
5 changed files with 23 additions and 11 deletions
@@ -82,14 +82,16 @@
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly...")
if(do_after(user, 40 * W.toolspeed, target = src))
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
var/obj/item/airlock_electronics/new_electronics = W
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS || new_electronics.is_installed)
return
user.drop_item()
W.forceMove(src)
new_electronics.forceMove(src)
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
state = AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER
name = "near finished airlock assembly"
electronics = W
electronics = new_electronics
electronics.is_installed = TRUE
else if(istype(W, /obj/item/stack/sheet) && (!glass || !mineral))
var/obj/item/stack/sheet/S = W
@@ -137,6 +139,7 @@
ae = electronics
electronics = null
ae.forceMove(loc)
ae.is_installed = FALSE
update_appearance(UPDATE_NAME | UPDATE_OVERLAYS)
/obj/structure/door_assembly/screwdriver_act(mob/user, obj/item/I)