Skip to content

Commit

Permalink
Merge pull request #3784 from MistakeNot4892/rework/shuttle_turf
Browse files Browse the repository at this point in the history
Removes /turf/simulated/shuttle.
  • Loading branch information
out-of-phaze authored Mar 11, 2024
2 parents 3dd587b + 6be5bcd commit 2b1bc09
Show file tree
Hide file tree
Showing 24 changed files with 155 additions and 214 deletions.
8 changes: 4 additions & 4 deletions code/game/machinery/doors/_door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@

/obj/machinery/door/get_blend_objects()
var/static/list/blend_objects = list(
/obj/structure/wall_frame,
/obj/structure/window,
/obj/structure/grille,
/obj/structure/wall_frame,
/obj/structure/window,
/obj/structure/grille,
/obj/machinery/door
) // Objects which to blend with
return blend_objects
Expand Down Expand Up @@ -540,7 +540,7 @@
W.other_connections = null
W.queue_icon_update()

else if( istype(T, /turf/simulated/shuttle/wall) || istype(T, /turf/unsimulated/wall))
else if(istype(T, /turf/unsimulated/wall))
success = 1
else
for(var/obj/O in T)
Expand Down
2 changes: 0 additions & 2 deletions code/game/machinery/doors/double.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
W.wall_connections = null
W.other_connections = null
W.queue_icon_update()
else if( istype(T, /turf/simulated/shuttle/wall))
success = 1
else
for(var/obj/O in T)
for(var/blend_type in get_blend_objects())
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/flooring/flooring.dm
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@

/decl/flooring/reinforced/shuttle
name = "floor"
icon = 'icons/turf/shuttle.dmi'
icon = 'icons/turf/flooring/shuttle.dmi'
build_type = null
flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_CROWBAR
can_paint = 1
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/flooring/flooring_shuttle.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/turf/simulated/floor/shuttle
name = "floor"
icon = 'icons/turf/shuttle.dmi'
icon = 'icons/turf/flooring/shuttle.dmi'
abstract_type = /turf/simulated/floor/shuttle

/turf/simulated/floor/shuttle/plating
Expand Down
2 changes: 2 additions & 0 deletions code/game/turfs/simulated/_wall.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ var/global/list/wall_fullblend_objects = list(
)
zone_membership_candidate = TRUE

/// If set, will prevent merges between walls with different IDs.
var/unique_merge_identifier
var/damage = 0
var/can_open = 0
var/decl/material/material
Expand Down
6 changes: 5 additions & 1 deletion code/game/turfs/simulated/wall_icon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@
add_overlay(SSmaterials.wall_damage_overlays[clamp(round(damage / integrity * DAMAGE_OVERLAY_COUNT) + 1, 1, DAMAGE_OVERLAY_COUNT)])

/turf/simulated/wall/proc/can_join_with(var/turf/simulated/wall/W)
if(material && istype(W.material))
if(unique_merge_identifier != W.unique_merge_identifier)
return 0
else if(unique_merge_identifier)
return 1
else if(material && istype(W.material))
var/other_wall_icon = W.get_wall_icon()
if(material.wall_blend_icons[other_wall_icon])
return 2
Expand Down
87 changes: 0 additions & 87 deletions code/game/turfs/simulated/wall_shuttle.dm

This file was deleted.

14 changes: 13 additions & 1 deletion code/game/turfs/simulated/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,16 @@
return 1
else if(istype(W, /turf/simulated/wall))
return 1
return 0
return 0

/turf/simulated/wall/shuttle
material = /decl/material/solid/metal/titanium
paint_color = COLOR_BEIGE
stripe_color = COLOR_SKY_BLUE

/turf/simulated/wall/shuttle/get_wall_icon()
return 'icons/turf/walls/solid.dmi'

/turf/simulated/wall/shuttle/dark
paint_color = COLOR_GUNMETAL
stripe_color = COLOR_MAROON
5 changes: 0 additions & 5 deletions code/game/turfs/turf_changing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,3 @@

update_material()
return TRUE

//No idea why resetting the base appearance from New() isn't enough, but without this it doesn't work
/turf/simulated/shuttle/wall/corner/transport_properties_from(turf/other)
. = ..()
reset_base_appearance()
10 changes: 9 additions & 1 deletion code/modules/shuttles/shuttle_engines.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/structure/shuttle
name = "shuttle"
icon = 'icons/turf/shuttle.dmi'
abstract_type = /obj/structure/shuttle

/obj/structure/shuttle/window
name = "shuttle window"
Expand All @@ -15,6 +15,8 @@
name = "engine"
density = TRUE
anchored = TRUE
icon = 'icons/obj/structures/shuttle_engine.dmi'
abstract_type = /obj/structure/shuttle/engine

/obj/structure/shuttle/engine/heater
name = "heater"
Expand All @@ -30,6 +32,12 @@
icon_state = "propulsion"
opacity = TRUE

/obj/structure/shuttle/engine/propulsion/left
icon_state = "propulsion_l"

/obj/structure/shuttle/engine/propulsion/right
icon_state = "propulsion_r"

/obj/structure/shuttle/engine/propulsion/burst
name = "burst"

Expand Down
3 changes: 0 additions & 3 deletions code/modules/spells/aoe_turf/conjure/conjure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ How they spawn stuff is decided by behaviour vars, which are explained below

var/atom/summoned_object
if(ispath(summoned_object_type,/turf))
if(istype(get_turf(user),/turf/simulated/shuttle) || istype(spawn_place, /turf/simulated/shuttle))
to_chat(user, "<span class='warning'>You can't build things on shuttles!</span>")
continue
spawn_place.ChangeTurf(summoned_object_type)
summoned_object = spawn_place
else
Expand Down
9 changes: 8 additions & 1 deletion code/modules/turbolift/turbolift_map.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@
var/floor_departure_sound
var/floor_arrival_sound

var/turf_id

INITIALIZE_IMMEDIATE(/obj/abstract/turbolift_spawner)
/obj/abstract/turbolift_spawner/Initialize()
. = ..()
if(!turf_id)
turf_id = sequential_id(type)
if(SSmapping.initialized)
build_turbolift()
else
Expand Down Expand Up @@ -165,7 +169,10 @@ INITIALIZE_IMMEDIATE(/obj/abstract/turbolift_spawner)
swap_to = floor_type

if(checking.type != swap_to)
checking.ChangeTurf(swap_to)
var/turf/simulated/wall/wall = checking.ChangeTurf(swap_to)
if(istype(wall) && turf_id)
wall.unique_merge_identifier = turf_id
wall.queue_icon_update()
// Let's make absolutely sure that we have the right turf.
checking = locate(tx,ty,cz)

Expand Down
Binary file added icons/obj/structures/shuttle_engine.dmi
Binary file not shown.
Binary file added icons/turf/flooring/shuttle.dmi
Binary file not shown.
Binary file removed icons/turf/shuttle.dmi
Binary file not shown.
51 changes: 31 additions & 20 deletions maps/away/casino/casino.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@
/area/space)
"al" = (
/turf/space,
/turf/simulated/shuttle/wall/corner/dark/nw,
/turf/simulated/wall/shuttle/dark{
unique_merge_identifier = "casino_bridge"
},
/area/casino/casino_bridge)
"am" = (
/turf/simulated/wall/r_wall,
Expand All @@ -115,7 +117,9 @@
/area/casino/casino_bridge)
"ao" = (
/turf/space,
/turf/simulated/shuttle/wall/corner/dark/ne,
/turf/simulated/wall/shuttle/dark{
unique_merge_identifier = "casino_bridge"
},
/area/casino/casino_bridge)
"ap" = (
/turf/simulated/floor/tiled,
Expand Down Expand Up @@ -446,7 +450,9 @@
/area/casino/casino_hangar)
"bs" = (
/turf/space,
/turf/simulated/shuttle/wall/corner/dark/ne,
/turf/simulated/wall/shuttle/dark{
unique_merge_identifier = "casino_bridge"
},
/area/casino/casino_hangar)
"bt" = (
/obj/effect/shuttle_landmark/nav_casino/nav3,
Expand Down Expand Up @@ -1136,19 +1142,19 @@
/turf/simulated/floor/tiled,
/area/casino/casino_hangar)
"do" = (
/turf/simulated/shuttle/wall,
/turf/simulated/wall/shuttle{
unique_merge_identifier = "casino_cutter"
},
/area/casino/casino_cutter)
"dp" = (
/turf/simulated/shuttle/wall{
dir = 4;
icon_state = "swall_straight"
/turf/simulated/wall/shuttle{
unique_merge_identifier = "casino_cutter"
},
/area/casino/casino_cutter)
"dq" = (
/obj/structure/fuel_port/hydrogen,
/turf/simulated/shuttle/wall{
dir = 8;
icon_state = "swall"
/turf/simulated/wall/shuttle{
unique_merge_identifier = "casino_cutter"
},
/area/casino/casino_cutter)
"dr" = (
Expand Down Expand Up @@ -1468,9 +1474,8 @@
/turf/simulated/floor/shuttle/blue,
/area/casino/casino_cutter)
"ep" = (
/turf/simulated/shuttle/wall{
dir = 8;
icon_state = "swall"
/turf/simulated/wall/shuttle{
unique_merge_identifier = "casino_cutter"
},
/area/casino/casino_cutter)
"eq" = (
Expand Down Expand Up @@ -4476,7 +4481,9 @@
/area/casino/casino_mainfloor)
"mM" = (
/turf/space,
/turf/simulated/shuttle/wall/corner/dark/sw,
/turf/simulated/wall/shuttle/dark{
unique_merge_identifier = "casino_bridge"
},
/area/casino/casino_bow)
"mN" = (
/obj/machinery/portable_atmospherics/canister/nitrogen,
Expand Down Expand Up @@ -4517,7 +4524,9 @@
/area/casino/casino_bow)
"mT" = (
/turf/space,
/turf/simulated/shuttle/wall/corner/dark/se,
/turf/simulated/wall/shuttle/dark{
unique_merge_identifier = "casino_bridge"
},
/area/casino/casino_bow)
"mU" = (
/obj/machinery/atmospherics/portables_connector{
Expand Down Expand Up @@ -4591,8 +4600,8 @@
/turf/simulated/floor/plating,
/area/casino/casino_bow)
"nf" = (
/turf/simulated/shuttle/wall{
icon_state = "wall3"
/turf/simulated/wall/shuttle{
unique_merge_identifier = "casino_bridge"
},
/area/casino/casino_bow)
"ng" = (
Expand Down Expand Up @@ -4673,7 +4682,9 @@
/turf/simulated/floor/plating,
/area/casino/casino_bow)
"np" = (
/turf/simulated/shuttle/wall/corner/dark,
/turf/simulated/wall/shuttle/dark{
unique_merge_identifier = "casino_bridge"
},
/area/casino/casino_bow)
"nq" = (
/obj/structure/grille,
Expand All @@ -4691,8 +4702,8 @@
/turf/simulated/floor/plating,
/area/casino/casino_bow)
"nr" = (
/turf/simulated/shuttle/wall/corner/dark{
dir = 6
/turf/simulated/wall/shuttle/dark{
unique_merge_identifier = "casino_bridge"
},
/area/casino/casino_bow)
"ns" = (
Expand Down
Loading

0 comments on commit 2b1bc09

Please sign in to comment.