mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 13:09:11 +01:00
Add spaceship hull corners
This commit is contained in:
@@ -113,6 +113,18 @@
|
||||
if(can_join_with(W))
|
||||
dirs += get_dir(src, W)
|
||||
|
||||
if(material.icon_base == "hull") // Could be improved...
|
||||
var/additional_dirs = 0
|
||||
for(var/direction in alldirs)
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(T && (locate(/obj/structure/hull_corner) in T))
|
||||
dirs += direction
|
||||
additional_dirs |= direction
|
||||
if(additional_dirs)
|
||||
for(var/diag_dir in cornerdirs)
|
||||
if ((additional_dirs & diag_dir) == diag_dir)
|
||||
dirs += diag_dir
|
||||
|
||||
wall_connections = dirs_to_corner_states(dirs)
|
||||
|
||||
/turf/simulated/wall/proc/can_join_with(var/turf/simulated/wall/W)
|
||||
|
||||
@@ -262,3 +262,50 @@
|
||||
var/image/I = image(icon = src.icon, icon_state = "o_[icon_state]")
|
||||
I.color = stripe_color
|
||||
add_overlay(I)
|
||||
|
||||
// Fake corners for making hulls look pretty
|
||||
/obj/structure/hull_corner
|
||||
name = "hull corner"
|
||||
|
||||
icon = 'icons/turf/wall_masks.dmi'
|
||||
icon_state = "hull_corner"
|
||||
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
breakable = TRUE
|
||||
|
||||
/obj/structure/hull_corner/Initialize()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/hull_corner/LateInitialize()
|
||||
. = ..()
|
||||
update_look()
|
||||
|
||||
/obj/structure/hull_corner/proc/update_look()
|
||||
cut_overlays()
|
||||
|
||||
var/turf/simulated/wall/T = get_step(src, dir)
|
||||
if(!istype(T))
|
||||
log_error("[src] at [x],[y] not placed facing a hull")
|
||||
return
|
||||
|
||||
name = T.name
|
||||
desc = T.desc
|
||||
|
||||
var/datum/material/B = T.material
|
||||
var/datum/material/R = T.reinf_material
|
||||
|
||||
if(B?.icon_colour)
|
||||
color = B.icon_colour
|
||||
if(R?.icon_colour)
|
||||
var/image/I = image(icon, icon_state+"_reinf", dir=dir)
|
||||
I.color = R.icon_colour
|
||||
add_overlay(I)
|
||||
|
||||
/obj/structure/hull_corner/long_vert
|
||||
icon = 'icons/turf/wall_masks32x64.dmi'
|
||||
bound_height = 64
|
||||
|
||||
/obj/structure/hull_corner/long_horiz
|
||||
icon = 'icons/turf/wall_masks64x32.dmi'
|
||||
bound_width = 64
|
||||
|
||||
Reference in New Issue
Block a user