From ca718d4b40895d2b889d1a0d387ff7d9ae92255b Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Sat, 28 May 2011 13:06:21 +0000 Subject: [PATCH] Door access fixed. Anyone who puts the following segment of code anywhere OTHER than the initial object definition should be stabbed with a rusty knife! /obj/machinery/door/ New() //code Del() //code Please, if it's not right by the definition then PLEASE include the whole path, otherwise searching for these procs becomes a nightmare: /obj/machinery/door/New() //code /obj/machinery/door/Del() //code Thanks to TLE for finding the actual New() code, I had no idea it even existed. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1623 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/obj/door.dm | 6 +----- code/game/machinery/doors/door.dm | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/code/defines/obj/door.dm b/code/defines/obj/door.dm index cb3eb021304..dcc6d431179 100644 --- a/code/defines/obj/door.dm +++ b/code/defines/obj/door.dm @@ -12,11 +12,7 @@ anchored = 1 var/autoclose = 0 - New() - if(density) - layer = 3.1 //Above most items if closed - else - layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6 + /obj/machinery/door/firedoor name = "Firelock" diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 5594a2ed000..4c356242c96 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -97,16 +97,18 @@ return 1 -/obj/machinery/door - New() - ..() +/obj/machinery/door/New() + ..() + if(density) + layer = 3.1 //Above most items if closed + else + layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6 + update_nearby_tiles(need_rebuild=1) - update_nearby_tiles(need_rebuild=1) +/obj/machinery/door/Del() + update_nearby_tiles() - Del() - update_nearby_tiles() - - ..() + ..() /obj/machinery/door/meteorhit(obj/M as obj)