From 8b910fb72b53ccf2e6841b80242de9892dbaeb8d Mon Sep 17 00:00:00 2001 From: unid15 Date: Sun, 9 Aug 2015 01:08:36 +0200 Subject: [PATCH] ROTATING SHUTTLES 0.1 --- code/datums/shuttle.dm | 179 +++++++++++++++++-- code/game/atoms.dm | 12 ++ code/game/objects/structures/docking_port.dm | 4 - code/game/shuttle_engines.dm | 3 + code/game/shuttles/emergency.dm | 2 +- code/game/shuttles/mining.dm | 2 +- code/game/shuttles/misc.dm | 2 +- code/game/shuttles/salvage.dm | 2 +- code/game/shuttles/syndicate.dm | 2 +- code/game/shuttles/taxi.dm | 4 +- code/game/shuttles/vox.dm | 14 +- code/game/turfs/simulated/floor_types.dm | 29 +-- code/modules/admin/admin.dm | 65 +++---- code/modules/admin/topic.dm | 67 ++----- code/modules/awaymissions/gateway.dm | 2 + 15 files changed, 230 insertions(+), 159 deletions(-) diff --git a/code/datums/shuttle.dm b/code/datums/shuttle.dm index ad1c764a95b..1e3018a6f1f 100644 --- a/code/datums/shuttle.dm +++ b/code/datums/shuttle.dm @@ -48,7 +48,7 @@ var/dir = NORTH //Whether the shuttle can rotate. This feature is B R O K E N - var/can_rotate = 0 + var/can_rotate = 1 //This is the time it takes for the shuttle to depart (if there's a transit area) or to travel (if there are no transit areas) var/pre_flight_delay = 50 @@ -239,9 +239,6 @@ user << "The shuttle can't move ([D.areaname] is used by another shuttle)" return 0 - //if( D.must_rotate(linked_port) && !can_rotate ) - // return 0 - //Handle the message var/time = "as soon as possible" switch(pre_flight_delay) @@ -335,17 +332,33 @@ docked_shuttles |= S.linked_shuttle docked_shuttles[S.linked_shuttle]=dock + //******Handle rotation********* + var/rotate = 0 + if(src.can_rotate) + + if(linked_port.dir != turn(D.dir,180)) + + rotate = (dir2angle(D.dir) - dir2angle(linked_port.dir)) + if(rotate < 0) + rotate += 360 + + //******Get the turf to move to** var/turf/target_turf = D.get_docking_turf() - if(!ignore_innacuracy && innacuracy) + + if(!ignore_innacuracy && innacuracy) //Handle innacuracy var/list/turf_list = list() + for(var/turf/T in orange(innacuracy,D.get_docking_turf())) turf_list|=T + target_turf = pick(turf_list) + //****Finally, move the area*** move_area_to(get_turf(linked_port),\ - target_turf,rotate=0) + target_turf,rotate) linked_port.dock(D) + //****Move shuttles docked to us** if(docked_shuttles.len) for(var/datum/shuttle/S in docked_shuttles) if(S in moved_shuttles) continue @@ -444,8 +457,6 @@ /datum/shuttle/proc/move_area_to(var/turf/our_center, var/turf/new_center, var/rotate = 0) if(!our_center) return if(!new_center) return - //if(!rotate % 90) rotate = 0 //if not divisible by 90, make it 0 - if(rotate) return //not yet var/datum/coords/our_center_coords = new(our_center.x,our_center.y) var/datum/coords/new_center_coords = new(new_center.x,new_center.y) @@ -476,8 +487,8 @@ coordinates += "[T.x];[T.y];[T.z]" - //Remove all stuff from the area - //linked_area.contents = list() + var/cosine = cos(rotate) + var/sine = sin(rotate) //Calculate new coordinates var/list/new_turfs = list() //Coordinates of turfs that WILL be created @@ -494,12 +505,14 @@ new_turfs[new_coords] = C //Associate the old coordinates with the new ones for an easier time if(rotate != 0) - var/datum/coords/relative_coords = new_coords.subtract(new_center_coords) - var/x_after_rotation = relative_coords.x_pos * cos(rotate) - var/y_after_rotation = relative_coords.y_pos * sin(rotate) + //Oh god this works + + var/newX = (cosine * (new_coords.x_pos - new_center.x)) - (sine * (new_coords.y_pos - new_center.y)) + new_center.x + var/newY = (sine * (new_coords.x_pos - new_center.x)) - (cosine * (new_coords.y_pos - new_center.y)) + new_center.y + + new_coords.x_pos = newX + new_coords.y_pos = newY - new_coords.x_pos = x_after_rotation - new_coords.y_pos = y_after_rotation if(new_coords.y_pos < throwy) throwy = new_coords.y_pos @@ -600,6 +613,9 @@ new_turf.dir = old_turf.dir new_turf.icon_state = old_turf.icon_state new_turf.icon = old_turf.icon + if(rotate) + spawn + new_turf.shuttle_rotate(rotate) //*****Move air***** @@ -620,6 +636,9 @@ continue AM.forceMove(new_turf) + if(rotate) + spawn + AM.shuttle_rotate(rotate) //Move landmarks - for moving the arrivals shuttle for(var/list/L in moved_landmarks) //moved_landmarks: code/game/area/areas.dm, 527 (above the move_contents_to proc) @@ -653,6 +672,9 @@ for(var/obj/machinery/door/D2 in T1) D2.update_nearby_tiles() + //Update shuttle's direction + src.dir = turn(linked_port.dir,180) + /proc/setup_shuttles() world.log << "Setting up all shuttles..." @@ -693,6 +715,133 @@ /datum/shuttle/custom name = "custom shuttle" +/datum/shuttle/proc/show_outline(var/mob/user, var/turf/centered_at) + if(!user) + return + + if(!centered_at) + var/turf/user_turf = get_turf(user) + if(!user_turf) + user << "You must be standing on a turf!" + return + + centered_at = get_step(user_turf,usr.dir) + + var/turf/original_center = get_turf(linked_port) + + if(!centered_at) + user << "ERROR: Unable to find center turf!" + return + + var/offsetX = centered_at.x - original_center.x + var/offsetY = centered_at.y - original_center.y + var/datum/coords/offset = new(offsetX,offsetY) + + var/list/original_coords = list() + for(var/turf/T in linked_area.get_turfs()) + var/datum/coords/C = new(T.x,T.y) + original_coords += C + + var/list/new_coords = list() + for(var/datum/coords/C in original_coords) + var/datum/coords/NC = C.add(offset) + new_coords += NC + + var/list/images = list() + for(var/datum/coords/C in new_coords) + var/turf/T = locate(C.x_pos,C.y_pos,centered_at.z) + if(!T) continue + + var/image/I = image('icons/turf/areas.dmi', icon_state="bluenew") + I.loc = T + images += I + user << I + + var/image/center_img = image('icons/turf/areas.dmi', icon_state="blue") //This is actually RED, honk + center_img.loc = centered_at + images += center_img + user << center_img + + alert(usr,"Press \"Ok\" to remove the images","Magic","Ok") + + if(usr.client) + for(var/image/I in images) + usr.client.images -= I + return + +/datum/shuttle/proc/show_movable_outline(var/mob/user) + if(!user) + return + + var/turf/user_turf = get_turf(user) + if(!user_turf) + user << "You must be standing on a turf!" + return + + var/turf/original_center = get_turf(linked_port) + var/turf/new_center = get_step(user_turf,usr.dir) + + if(!new_center) + user << "The turf in front of you isn't a turf." + return + else if(!original_center) + user << "Unable to find the shuttle docking port's turf." + + var/list/images = list() + for(var/turf/T in linked_area.get_turfs()) + var/image/I = image(T.icon, T.icon_state) + + I.alpha = 200 + I.loc = user + I.pixel_x = 32 * (T.x - original_center.x) + I.pixel_y = 32 * (T.y - original_center.y) + images += I + user << I + + var/image/center_img = image('icons/turf/areas.dmi', icon_state="blue") //This is actually RED, honk + center_img.loc = user + images += center_img + user << center_img + + var/moving_with_user = 1 + while(1) + switch(alert(usr,"Select one of the options below.","Magic","[moving_with_user ? "Stop moving the overlay" : "Center the overlay on user"]","Cancel")) + if("Cancel") + break + if("Stop moving the overlay") + if(moving_with_user) + user_turf = get_turf(user) + if(!user_turf) + user << "You must be standing on a turf!" + else + for(var/image/I in images) + var/turf/new_loc = locate ( user_turf.x + (round(I.pixel_x / 32)), user_turf.y + (round(I.pixel_y / 32)), user_turf.z ) + I.pixel_x = 0 + I.pixel_y = 0 + I.loc = new_loc + moving_with_user = 0 + user << "The overlay will now be centered at [user_turf.x];[user_turf.y];[user_turf.z]" + if("Center the overlay on user") + if(!moving_with_user) + var/turf/old_center_loc = center_img.loc + + for(var/image/I in (images - center_img)) + var/turf/old_loc = I.loc + if(!old_loc) continue + + I.pixel_x = 32 * (old_loc.x - old_center_loc.x) + I.pixel_y = 32 * (old_loc.y - old_center_loc.y) + + I.loc = user + + moving_with_user = 1 + user << "The overlay will now be moving with you" + + if(usr.client) + for(var/image/I in images) + usr.client.images -= I + return + #undef INIT_SUCCESS #undef INIT_NO_AREA #undef INIT_NO_PORT diff --git a/code/game/atoms.dm b/code/game/atoms.dm index b4ce4e553f4..dab06c0be2d 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -540,6 +540,18 @@ its easier to just keep the beam vertical. /atom/proc/shuttle_act(var/datum/shuttle/S) return +//Called when a shuttle rotates +/atom/proc/shuttle_rotate(var/angle) + src.dir = turn(src.dir, angle) + + if(canSmoothWith) //Smooth the smoothable + relativewall() + relativewall_neighbours() + + if(pixel_x || pixel_y) + pixel_x = pixel_x * cos(angle) + pixel_y = pixel_y * sin(angle) + /atom/proc/singularity_pull() //writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/singularity_pull() called tick#: [world.time]") return diff --git a/code/game/objects/structures/docking_port.dm b/code/game/objects/structures/docking_port.dm index 53a72334de0..9bc97bad3ec 100644 --- a/code/game/objects/structures/docking_port.dm +++ b/code/game/objects/structures/docking_port.dm @@ -64,10 +64,6 @@ var/global/list/all_docking_ports = list() /obj/structure/docking_port/proc/get_docking_turf() return get_step(get_turf(src),src.dir) -/obj/structure/docking_port/proc/must_rotate(var/obj/structure/docking_port/D) //Returns the angle by which src must rotate to face D - if(!D) return 0 - return ( (dir2angle(turn(src.dir, 180)) - dir2angle(D.dir)) % 360) - //SHUTTLE PORTS /obj/structure/docking_port/shuttle //this guy is installed on shuttles and connects to obj/structure/docking_port/destination diff --git a/code/game/shuttle_engines.dm b/code/game/shuttle_engines.dm index fc7fa5779ca..c1db8a56655 100644 --- a/code/game/shuttle_engines.dm +++ b/code/game/shuttle_engines.dm @@ -21,6 +21,9 @@ density = 1 anchored = 1.0 +/obj/structure/shuttle/engine/shuttle_rotate(angle) + ..(angle + 180) //because a propulsion engine/heater with dir=NORTH is facing south + /obj/structure/shuttle/engine/heater name = "heater" icon_state = "heater" diff --git a/code/game/shuttles/emergency.dm b/code/game/shuttles/emergency.dm index e26d5bcc7a0..462ad00c105 100644 --- a/code/game/shuttles/emergency.dm +++ b/code/game/shuttles/emergency.dm @@ -33,7 +33,7 @@ var/global/datum/shuttle/escape/escape_shuttle = new(starting_area=/area/shuttle areaname = "central command" /obj/structure/docking_port/destination/escape/shuttle/transit - areaname = "hyperspace" + areaname = "hyperspace (emergency shuttle)" //pods later /* diff --git a/code/game/shuttles/mining.dm b/code/game/shuttles/mining.dm index ac8e88acf0c..83f4ccbf554 100644 --- a/code/game/shuttles/mining.dm +++ b/code/game/shuttles/mining.dm @@ -17,7 +17,7 @@ var/global/datum/shuttle/mining/mining_shuttle = new(starting_area = /area/shutt //code/game/objects/structures/docking_port.dm /obj/structure/docking_port/destination/mining/station - areaname = "cargo bay" + areaname = "mining dock" /obj/structure/docking_port/destination/mining/outpost areaname = "mining outpost" diff --git a/code/game/shuttles/misc.dm b/code/game/shuttles/misc.dm index e069f351f05..14218cbb2db 100644 --- a/code/game/shuttles/misc.dm +++ b/code/game/shuttles/misc.dm @@ -56,7 +56,7 @@ var/global/datum/shuttle/transport/transport_shuttle = new(starting_area = /area //code/game/objects/structures/docking_port.dm /obj/structure/docking_port/destination/transport/station - areaname = "station arrivals" + areaname = "station arrivals (docking port 1)" /obj/structure/docking_port/destination/transport/centcom areaname = "central command" \ No newline at end of file diff --git a/code/game/shuttles/salvage.dm b/code/game/shuttles/salvage.dm index 74768580e6a..1e60db09790 100644 --- a/code/game/shuttles/salvage.dm +++ b/code/game/shuttles/salvage.dm @@ -86,7 +86,7 @@ var/global/datum/shuttle/salvage/salvage_shuttle = new(starting_area=/area/shutt areaname = "abandoned ship" /obj/structure/docking_port/destination/salvage/transit - areaname = "hyperspace" + areaname = "hyperspace (salvage shuttle)" #undef SALVAGE_SHIP_MOVE_TIME #undef SALVAGE_SHIP_COOLDOWN \ No newline at end of file diff --git a/code/game/shuttles/syndicate.dm b/code/game/shuttles/syndicate.dm index 7bbde67be9b..27416f0e53d 100644 --- a/code/game/shuttles/syndicate.dm +++ b/code/game/shuttles/syndicate.dm @@ -72,4 +72,4 @@ var/global/datum/shuttle/syndicate/syndicate_shuttle = new(starting_area = /area areaname = "north east of the mining asteroid" /obj/structure/docking_port/destination/syndicate/transit - areaname = "hyperspace" + areaname = "hyperspace (syndicate shuttle)" diff --git a/code/game/shuttles/taxi.dm b/code/game/shuttles/taxi.dm index 53dfebfe657..ba84204bed0 100644 --- a/code/game/shuttles/taxi.dm +++ b/code/game/shuttles/taxi.dm @@ -81,7 +81,7 @@ var/global/datum/shuttle/taxi/b/taxi_b = new(starting_area = TAXI_B_STARTING_ARE areaname = "Abandoned Station" /obj/structure/docking_port/destination/taxi/a/transit - areaname = "Hyperspace" + areaname = "Hyperspace (taxi A)" /obj/structure/docking_port/destination/taxi/b/medbay_silicon areaname = "Medical and Silicon Station" @@ -96,7 +96,7 @@ var/global/datum/shuttle/taxi/b/taxi_b = new(starting_area = TAXI_B_STARTING_ARE areaname = "Abandoned Station" /obj/structure/docking_port/destination/taxi/b/transit - areaname = "Hyperspace" + areaname = "Hyperspace (taxi B)" #undef TAXI_A_NAME #undef TAXI_B_NAME diff --git a/code/game/shuttles/vox.dm b/code/game/shuttles/vox.dm index 3e945cfaafa..2c00419bf5d 100644 --- a/code/game/shuttles/vox.dm +++ b/code/game/shuttles/vox.dm @@ -34,7 +34,7 @@ var/global/datum/shuttle/vox/vox_shuttle = new(starting_area=/area/shuttle/vox/s /datum/shuttle/vox/travel_to(var/obj/structure/docking_port/D, var/obj/machinery/computer/shuttle_control/broadcast = null, var/mob/user) if(D == dock_home) if(ticker && istype(ticker.mode, /datum/game_mode/heist)) - switch(alert(usr,"Returning to dark space will end your raid and report your success or failure. Are you sure?","Vox Skipjack","Yes","No")) + switch(alert(usr,"Returning to the deep space will end your raid and report your success or failure. Are you sure?","Vox Skipjack","Yes","No")) if("Yes") var/location = get_turf(user) message_admins("[key_name_admin(user)] attempts to end the raid - [formatJumpTo(location)]") @@ -67,19 +67,19 @@ var/global/datum/shuttle/vox/vox_shuttle = new(starting_area=/area/shuttle/vox/s areaname = "deep space" /obj/structure/docking_port/destination/vox/northeast_solars - areaname = "north east of the station" + areaname = "north east solars" /obj/structure/docking_port/destination/vox/northwest_solars - areaname = "north west of the station" + areaname = "north west solars" /obj/structure/docking_port/destination/vox/southeast_solars - areaname = "south east of the station" + areaname = "south east solars" /obj/structure/docking_port/destination/vox/southwest_solars - areaname = "south west of the station" + areaname = "south west solars" /obj/structure/docking_port/destination/vox/mining - areaname = "mining asteroid" + areaname = "vox trading outpost" /obj/structure/docking_port/destination/vox/transit - areaname = "hyperspace" + areaname = "hyperspace (vox skipjack)" diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index decc66c136e..2a3aada2be3 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -223,31 +223,10 @@ blocks_air = 1 explosion_block = 2 -/* -/turf/simulated/shuttle/wall/lighting_build_overlays() - //writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/lighting_build_overlays() called tick#: [world.time]") - var/atom/movable/lighting_overlay/O = ..() - - if(O) - if(icon_state in transparent_icons) - O.icon_state = "light1_corner" - O.dir = src.dir - else - switch(icon_state) //For incorrectly mapped corners - if("swall_s5") - O.icon_state = "light1_corner" - O.dir = SOUTH - if("swall_s6") - O.icon_state = "light1_corner" - O.dir = WEST - if("swall_s9") - O.icon_state = "light1_corner" - O.dir = EAST - if("swall_s10") - O.icon_state = "light1_corner" - O.dir = NORTH - - return O*/ +/turf/simulated/shuttle/wall/shuttle_rotate(angle) //delete this when autosmooth is added + var/matrix/M = matrix() + M.Turn(angle) + src.transform = M /turf/simulated/shuttle/wall/cultify() ChangeTurf(/turf/simulated/wall/cult) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index b82009e291f..0ee2fc308e1 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -840,56 +840,33 @@ var/global/floorIsLava = 0 return /datum/admins/proc/shuttle_magic() - var/dat = "WARNING: abuse will result in hilarity and removal of your flags.

GENERAL COMMANDS:


" - dat +={" Create a destination docking port
- This will create a destination docking port at your location, facing the direction you are currently facing.
+ var/dat = {"WARNING: server may explode!

- Add a destination docking port to a shuttle
- This will allow the shuttle to move to it.
+ Shuttle construction & improvement:
+ Create a destination docking port | + Create a shuttle docking port | + Modify a shuttle's linked docking ports | + Modify a shuttle's transit area | + Get a shuttle's control console | + Modify a shuttle's parameters

- Set a destination docking port to be a shuttle's transit area
- Use the \"Edit a shuttle's parameters\" option below to change how the transit area is used
+ Moving shuttles:
+ Send a shuttle | + Teleport a shuttle

- Create a shuttle docking port
- This will create a shuttle docking port at your location, facing the direction you are currently facing.
- Please read: Shuttle docking ports are most optimally spawned on a border turf of a shuttle, facing AWAY from it.
+ Other stuff:
+ Draw a shuttle's outline | + Teleport to a destination docking port | + Teleport to a shuttle |

- Teleport to shuttle's control console
- If the shuttle has no control consoles linked to it, you'll have the option to create one at your location.
+ In case of emergency:
+ Toggle lockdown on a shuttle | + Delete a shuttle | + Reset a shuttle | + LOCKDOWN ALL SHUTTLES

- Send a shuttle
- This command allows you to send any existing shuttle to any destination docking port in the world. Cooldown, lockdown and other factors are respected.
- Teleport to a shuttle

- - Teleport to a destination docking port

- - Edit a shuttle's parameters

- - Show a shuttle's outline
- This command will create a transparent overlay in the shape of a selected shuttle next to you. Its position is calculated as if it were docked at a docking port at your location. The overlay is only visible to you.
- -

FUN BUTTONS:


- - Turn current area into a shuttle
- - Teleport a shuttle
- This command allows you to instantly move a shuttle to any destination docking port in the world OR to your location, with no regard for cooldowns and delays.
- - SUPERCHARGE a shuttle
- Once you select a shuttle, its cooldown and movement delay will become 0, but it will sometimes miss its destination.
- -

EMERGENCY BUTTONS:


- Toggle lockdown on a shuttle
- - Delete a shuttle
- You'll have the option of deleting all of its objects and turfs.
- - Reset a shuttle
- Reset a shuttle to its initial state. Changes to turfs, objects and the shuttle's location won't be reverted.
- - LOCKDOWN ALL SHUTTLES
- IT'S LOOSE
"} + "} usr << browse(dat, "window=shuttlemagic") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 1f0ef0f7156..8c95e1f062e 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -3304,12 +3304,6 @@ var/datum/shuttle/shuttle_to_link = select_shuttle_from_all(usr,"Select a shuttle to link to [port_to_link] ([port_to_link.areaname])","Admin abuse") if(!shuttle_to_link) return - if(shuttle_to_link.linked_port.must_rotate(port_to_link)) - if(alert(usr,"[port_to_link] ([port_to_link.areaname]) will be rotated to match [shuttle_to_link.name]'s direction. Continue?","Admin abuse","Yes","No") == "No") - return - - port_to_link.dir = turn(shuttle_to_link.linked_port.dir, 180) - shuttle_to_link.add_dock(port_to_link) message_admins("[key_name_admin(usr)] has added a destination docking port ([port_to_link.areaname]) at [port_to_link.x];[port_to_link.y];[port_to_link.z] to [shuttle_to_link.name] ([shuttle_to_link.type]) [formatJumpTo(get_turf(port_to_link))]", 1) @@ -3345,7 +3339,7 @@ feedback_inc("admin_shuttle_magic_used",1) feedback_add_details("admin_shuttle_magic_used","SC") - var/obj/structure/docking_port/shuttle/D = new(usr.loc) + var/obj/structure/docking_port/shuttle/D = new(get_turf(usr.loc)) D.dir = usr.dir message_admins("[key_name_admin(usr)] has created a new shuttle docking port in [get_area(D)] [formatJumpTo(get_turf(D))]", 1) @@ -3618,10 +3612,14 @@ usr << "Please create a shuttle docking port (/obj/structure/docking_port/shuttle) in this area!" return - var/name = input(usr, "Please name the new shuttle", "Shuttlify", A.name) as text + var/name = input(usr, "Please name the new shuttle", "Shuttlify", A.name) as text|null + + if(!name) + usr << "Shuttlifying cancelled." + return var/datum/shuttle/custom/S = new(starting_area = A) - + S.initialize() S.name = name usr << "Shuttle created!" @@ -3633,7 +3631,7 @@ feedback_inc("admin_shuttle_magic_used",1) feedback_add_details("admin_shuttle_magic_used","FM") - var/list/L = list("!!YOUR CURRENT LOCATION!!") + var/list/L = list("YOUR CURRENT LOCATION") var/datum/shuttle/S = select_shuttle_from_all(usr, "Select a shuttle to teleport", "Shuttle teleporting") if(!S) return @@ -3652,7 +3650,7 @@ var/choice = input(usr, "Select a location to teleport [S.name] to!", "Shuttle teleporting") in L - if(choice == "!!YOUR CURRENT LOCATION!!") + if(choice == "YOUR CURRENT LOCATION") var/area/A = get_area(usr) var/turf/T = get_turf(usr) if(!A) return @@ -3741,52 +3739,7 @@ if(usr.dir != S.dir) usr << "WARNING: You're not facing [dir2text(S.dir)]! The result may be slightly innacurate." - var/turf/user_turf = get_turf(usr) - if(!user_turf) - usr << "You must be standing on a turf!" - return + S.show_movable_outline(usr) - var/turf/original_center = get_turf(S.linked_port) - var/turf/new_center = get_step(user_turf,usr.dir) - - if(!new_center) - usr << "The turf in front of you isn't a turf." - return - - var/offsetX = new_center.x - original_center.x - var/offsetY = new_center.y - original_center.y - var/datum/coords/offset = new(offsetX,offsetY) - - var/list/original_coords = list() - for(var/turf/T in S.linked_area.get_turfs()) - var/datum/coords/C = new(T.x,T.y) - original_coords += C - - var/list/new_coords = list() - for(var/datum/coords/C in original_coords) - var/datum/coords/NC = C.add(offset) - new_coords += NC - - var/list/images = list() - for(var/datum/coords/C in new_coords) - var/turf/T = locate(C.x_pos,C.y_pos,new_center.z) - if(!T) continue - - var/image/I = image('icons/turf/areas.dmi', icon_state="bluenew") - I.loc = T - images += I - usr << I - - var/image/center_img = image('icons/turf/areas.dmi', icon_state="blue") //This is actually RED, honk - center_img.loc = new_center - images += center_img - usr << center_img - - alert(usr,"Press \"Ok\" to remove the images","Magic","Ok") - - if(usr.client) - for(var/image/I in images) - usr.client.images -= I - return //------------------------------------------------------------------Shuttle stuff end--------------------------------- diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 6921f2ae539..2699e37372a 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -20,6 +20,8 @@ return icon_state = "off" +/obj/machinery/gateway/shuttle_rotate() + return //this is da important part wot makes things go