mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
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:
co-authored by
SteelSlayer
parent
74d0e6523b
commit
9ea748b130
@@ -147,7 +147,7 @@
|
||||
if(terminal)
|
||||
terminal.connect_to_network()
|
||||
|
||||
/obj/machinery/power/apc/New(turf/loc, ndir, building = 0)
|
||||
/obj/machinery/power/apc/New(turf/loc, direction, building = 0)
|
||||
if(!armor)
|
||||
armor = list("melee" = 20, "bullet" = 20, "laser" = 10, "energy" = 100, "bomb" = 30, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50)
|
||||
..()
|
||||
@@ -158,12 +158,11 @@
|
||||
// offset 24 pixels in direction of dir
|
||||
// this allows the APC to be embedded in a wall, yet still inside an area
|
||||
if(building)
|
||||
setDir(ndir)
|
||||
tdir = dir // to fix Vars bug
|
||||
setDir(SOUTH)
|
||||
setDir(direction) // We set this to direction only for pixel location determination.
|
||||
|
||||
set_pixel_offsets_from_dir(24, -24, 24, -24) // Set pixel offsets based on `dir`
|
||||
setDir(SOUTH) // APC's should always appear to *face* south.
|
||||
|
||||
pixel_x = (src.tdir & 3)? 0 : (src.tdir == 4 ? 24 : -24)
|
||||
pixel_y = (src.tdir & 3)? (src.tdir ==1 ? 24 : -24) : 0
|
||||
if(building)
|
||||
area = get_area(src)
|
||||
area.apc |= src
|
||||
|
||||
Reference in New Issue
Block a user