Skip to content

Commit

Permalink
maintenance jack now will pry open unpowered doors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nomoresolvalou committed May 17, 2024
1 parent 5da327a commit 8015f1a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions code/game/objects/items/tools/maintenance_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,17 @@
if(requires_superstrength_pry)
if(!HAS_TRAIT(user, TRAIT_SUPER_STRONG)) //basically IS_PRY_CAPABLE_CROWBAR
return
if(!attacked_door.density) //If its open
return
if(attacked_door.heavy) //Unopenable
to_chat(usr, SPAN_DANGER("You cannot force [attacked_door] open."))
return
if(user.action_busy)
return
if(!attacked_door.density && !attacked_door.arePowerSystemsOn()) //If its open and unpowered
attacked_door.close(TRUE)
return
if(attacked_door.density && !attacked_door.arePowerSystemsOn()) // if its closed and unpowered
attacked_door.open(TRUE)
return

user.visible_message(SPAN_DANGER("[user] jams [src] into [attacked_door] and starts to pry it open."),
SPAN_DANGER("You jam [src] into [attacked_door] and start to pry it open."))
Expand Down

0 comments on commit 8015f1a

Please sign in to comment.