Merge pull request #2055 from CHOMPStationBot/upstream-merge-10446

[MIRROR] Improve hull corner color finding slightly
This commit is contained in:
Nadyr
2021-05-27 21:14:26 -04:00
committed by GitHub

View File

@@ -326,13 +326,15 @@
. = ..()
update_look()
/obj/structure/hull_corner/proc/update_look()
cut_overlays()
/obj/structure/hull_corner/proc/get_dirs_to_test()
return list(dir, turn(dir,90))
var/turf/simulated/wall/T = get_step(src, dir)
/obj/structure/hull_corner/proc/update_look()
var/turf/simulated/wall/T
for(var/direction in get_dirs_to_test())
T = get_step(src, direction)
if(!istype(T))
log_error("[src] at [x],[y] not placed facing a hull")
return
continue
name = T.name
desc = T.desc
@@ -346,11 +348,21 @@
var/image/I = image(icon, icon_state+"_reinf", dir=dir)
I.color = R.icon_colour
add_overlay(I)
break
if(!T)
warning("Hull corner at [x],[y] not placed adjacent to a hull it can find.")
/obj/structure/hull_corner/long_vert
icon = 'icons/turf/wall_masks32x64.dmi'
bound_height = 64
/obj/structure/hull_corner/long_vert/get_dirs_to_test()
return list(dir, turn(dir,90), turn(dir,-90))
/obj/structure/hull_corner/long_horiz
icon = 'icons/turf/wall_masks64x32.dmi'
bound_width = 64
/obj/structure/hull_corner/long_horiz/get_dirs_to_test()
return list(dir, turn(dir,90), turn(dir,-90))