Skip to content

Commit

Permalink
Woah lets go wild
Browse files Browse the repository at this point in the history
fixes space edge transitions
  • Loading branch information
Very-Soft committed May 20, 2024
1 parent 53ac979 commit 0803a4a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
2 changes: 1 addition & 1 deletion code/controllers/subsystems/skybox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ SUBSYSTEM_DEF(skybox)
base.color = "#7c3131"
//VOREStation Add End
//RS ADD
else if(!(istype(O.loc,/turf/unsimulated/map) || istype(O.loc,/turf/space)))
else if(!(istype(O.loc,/turf/unsimulated/map) || istype(O.loc,/turf/space) || istype(O,/obj/effect/overmap/visitable/sector/temporary))) //RS EDIT
if(istype(O,/obj/effect/overmap/visitable/ship/snowglobe))
base.icon = 'icons/skybox/skybox_rs.dmi'
base.icon_state = "snowglobe"
Expand Down
6 changes: 5 additions & 1 deletion code/modules/overmap/sectors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
var/list/map_z = list()
var/list/extra_z_levels //if you need to manually insist that these z-levels are part of this sector, for things like edge-of-map step trigger transitions rather than multi-z complexes

var/list/space_zs = list() //RS ADD - Z levels that are in space

var/list/initial_generic_waypoints //store landmark_tag of landmarks that should be added to the actual lists below on init.
var/list/initial_restricted_waypoints //For use with non-automatic landmarks (automatic ones add themselves).

Expand Down Expand Up @@ -164,7 +166,9 @@
return ..()

/obj/effect/overmap/visitable/proc/get_space_zlevels()
if(in_space)
if(space_zs.len) //RS EDIT START
return space_zs
else if(in_space) //RS EDIT END
return map_z
else
return list()
Expand Down
18 changes: 12 additions & 6 deletions code/modules/overmap/spacetravel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,21 @@

var/turf/map = locate(M.x,M.y,global.using_map.overmap_z)
var/obj/effect/overmap/visitable/TM
for(var/obj/effect/overmap/visitable/O in map)
if(O != M && O.in_space && prob(50))
TM = O
break
if(!istype(TM))
var/list/our_options = list() //RS EDIT START
if(!prob(25))
for(var/obj/effect/overmap/visitable/O in map)
if(O != M)
our_options |= O.get_space_zlevels()

if(!our_options.len)
TM = get_deepspace(M.x,M.y)
nz = pick(TM.get_space_zlevels())
else
nz = pick(our_options)
TM = get_overmap_sector(nz)
//RS EDIT END
if(!istype(TM))
return
nz = pick(TM.get_space_zlevels())

testing("spacetravel chose [nz],[ny],[nz] in sector [TM] @ ([TM.x],[TM.y],[TM.z])")

Expand Down
11 changes: 9 additions & 2 deletions maps/groundbase/groundbase_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,9 @@
icon = 'icons/obj/overmap.dmi'
icon_state = "lush"

skybox_icon = null
skybox_icon_state = null
skybox_icon = 'icons/skybox/virgo4.dmi'
skybox_icon_state = "v4"

skybox_pixel_x = 0
skybox_pixel_y = 0

Expand All @@ -358,6 +359,12 @@
Z_LEVEL_GB_WILD_W
)

space_zs = list(Z_LEVEL_GB_ENGINESAT)

/obj/effect/overmap/visitable/sector/virgo3c/generate_skybox(zlevel)
var/static/image/smallone = image(icon = 'icons/skybox/virgo4.dmi', icon_state = "v4")
return smallone

// For making the 6-in-1 holomap, we calculate some offsets
#define SHIP_MAP_SIZE 140 // Width and height of compiled in tether z levels.
#define SHIP_HOLOMAP_CENTER_GUTTER 40 // 40px central gutter between columns
Expand Down

0 comments on commit 0803a4a

Please sign in to comment.