Mountable frame bugfixes and minor refactor (#13076)

* initial

* bit of code cleanup / refactoring

* review changes

* CRLF to LF

* GLOB stuff

* travis did not like that

Co-authored-by: SteelSlayer <SteelSlayer@users.noreply.github.com>
This commit is contained in:
SteelSlayer
2020-06-26 01:19:27 -06:00
committed by GitHub
co-authored by SteelSlayer
parent 74d0e6523b
commit 9ea748b130
9 changed files with 57 additions and 35 deletions
+5 -6
View File
@@ -17,11 +17,11 @@
var/opened = 0
var/material_drop = /obj/item/stack/sheet/metal
/obj/structure/extinguisher_cabinet/New(turf/loc, ndir = null)
/obj/structure/extinguisher_cabinet/New(turf/loc, direction = null)
..()
if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
pixel_y = (ndir & NORTH|SOUTH)? (ndir == WEST ? 28 : -28) : 0
if(direction)
setDir(direction)
set_pixel_offsets_from_dir(28, -28, 30, -30)
switch(extinguishertype)
if(NO_EXTINGUISHER)
return
@@ -165,9 +165,8 @@
else
icon_state = "extinguisher_empty"
/obj/structure/extinguisher_cabinet/empty/New(turf/loc, ndir = null)
/obj/structure/extinguisher_cabinet/empty
extinguishertype = NO_EXTINGUISHER
..()
#undef NO_EXTINGUISHER
#undef NORMAL_EXTINGUISHER