Fixes a runtime in windowdoor.dm (#9117)

src.allowed() assumes the argument is mob. The way the if-chain worked is that ANYTHING that's NOT small would get a valid pass in the eager-evaluation and then be fed into allowed. This results in no difference in behaviour, but runtimes.
This commit is contained in:
Erki
2020-06-13 11:59:30 +03:00
committed by GitHub
parent 2c88598fde
commit dbc3e46b1b

View File

@@ -76,7 +76,7 @@
return
if (src.operating)
return
if (src.density && (!issmall(AM) || ishuman(AM) || isrobot(AM)) && src.allowed(AM))
if (src.density && (ishuman(AM) || isrobot(AM)) && src.allowed(AM))
open()
//secure doors close faster
var/time = check_access(null) ? 50 : 20
@@ -312,4 +312,4 @@
/obj/machinery/door/window/brigdoor/southright
dir = SOUTH
icon_state = "rightsecure"
base_state = "rightsecure"
base_state = "rightsecure"