mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
Merge pull request #2055 from CHOMPStationBot/upstream-merge-10446
[MIRROR] Improve hull corner color finding slightly
This commit is contained in:
@@ -326,13 +326,15 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
update_look()
|
update_look()
|
||||||
|
|
||||||
/obj/structure/hull_corner/proc/update_look()
|
/obj/structure/hull_corner/proc/get_dirs_to_test()
|
||||||
cut_overlays()
|
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))
|
if(!istype(T))
|
||||||
log_error("[src] at [x],[y] not placed facing a hull")
|
continue
|
||||||
return
|
|
||||||
|
|
||||||
name = T.name
|
name = T.name
|
||||||
desc = T.desc
|
desc = T.desc
|
||||||
@@ -346,11 +348,21 @@
|
|||||||
var/image/I = image(icon, icon_state+"_reinf", dir=dir)
|
var/image/I = image(icon, icon_state+"_reinf", dir=dir)
|
||||||
I.color = R.icon_colour
|
I.color = R.icon_colour
|
||||||
add_overlay(I)
|
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
|
/obj/structure/hull_corner/long_vert
|
||||||
icon = 'icons/turf/wall_masks32x64.dmi'
|
icon = 'icons/turf/wall_masks32x64.dmi'
|
||||||
bound_height = 64
|
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
|
/obj/structure/hull_corner/long_horiz
|
||||||
icon = 'icons/turf/wall_masks64x32.dmi'
|
icon = 'icons/turf/wall_masks64x32.dmi'
|
||||||
bound_width = 64
|
bound_width = 64
|
||||||
|
|
||||||
|
/obj/structure/hull_corner/long_horiz/get_dirs_to_test()
|
||||||
|
return list(dir, turn(dir,90), turn(dir,-90))
|
||||||
|
|||||||
Reference in New Issue
Block a user