Ports Shuttle Sounds + Fixes Southern Cross Shuttles

Southern Cross shuttles one and two can now launch.
Adds missing areas for shuttles 1 and 2.
Shuttles warming up, moving, or stopping now make a nice sound, ported from /tg/.
Rearranges shuttle datum/computer definitions to make it easier to read.
Removes cloaking abilities for most multi-shuttles.
Lowers transit time for multi-shuttles.  Can be raised later if desired.
This commit is contained in:
Neerti
2017-08-01 21:40:51 -04:00
parent aa4729478b
commit 178dc07dfc
11 changed files with 1711 additions and 1654 deletions
+5
View File
@@ -88,6 +88,11 @@
#define SHUTTLE_WARMUP 1
#define SHUTTLE_INTRANSIT 2
// Sound defines for shuttles.
#define HYPERSPACE_WARMUP 0
#define HYPERSPACE_PROGRESS 1
#define HYPERSPACE_END 2
// Ferry shuttle processing status.
#define IDLE_STATE 0
#define WAIT_LAUNCH 1
+34 -5
View File
@@ -43,38 +43,55 @@
world << "<span class='danger'>warning: shuttle with docking tag [docking_controller_tag] could not find it's controller!</span>"
/datum/shuttle/proc/short_jump(var/area/origin,var/area/destination)
if(moving_status != SHUTTLE_IDLE) return
if(moving_status != SHUTTLE_IDLE)
return
//it would be cool to play a sound here
moving_status = SHUTTLE_WARMUP
spawn(warmup_time*10)
make_sounds(origin, HYPERSPACE_WARMUP)
sleep(5 SECONDS) // so the sound finishes.
if (moving_status == SHUTTLE_IDLE)
make_sounds(origin, HYPERSPACE_END)
return //someone cancelled the launch
moving_status = SHUTTLE_INTRANSIT //shouldn't matter but just to be safe
move(origin, destination)
moving_status = SHUTTLE_IDLE
make_sounds(destination, HYPERSPACE_END)
/datum/shuttle/proc/long_jump(var/area/departing, var/area/destination, var/area/interim, var/travel_time, var/direction)
//world << "shuttle/long_jump: departing=[departing], destination=[destination], interim=[interim], travel_time=[travel_time]"
if(moving_status != SHUTTLE_IDLE) return
if(moving_status != SHUTTLE_IDLE)
return
//it would be cool to play a sound here
moving_status = SHUTTLE_WARMUP
spawn(warmup_time*10)
make_sounds(departing, HYPERSPACE_WARMUP)
sleep(5 SECONDS) // so the sound finishes.
if (moving_status == SHUTTLE_IDLE)
make_sounds(departing, HYPERSPACE_END)
return //someone cancelled the launch
arrive_time = world.time + travel_time*10
moving_status = SHUTTLE_INTRANSIT
move(departing, interim, direction)
var/last_progress_sound = 0
while (world.time < arrive_time)
// Make the shuttle make sounds every four seconds, since the sound file is five seconds.
if(last_progress_sound + 4 SECONDS < world.time)
make_sounds(interim, HYPERSPACE_PROGRESS)
last_progress_sound = world.time
sleep(5)
move(interim, destination, direction)
moving_status = SHUTTLE_IDLE
make_sounds(destination, HYPERSPACE_END)
/datum/shuttle/proc/dock()
if (!docking_controller)
@@ -104,7 +121,7 @@
//If you want to conditionally cancel shuttle launches, that logic must go in short_jump() or long_jump()
/datum/shuttle/proc/move(var/area/origin, var/area/destination, var/direction=null)
//world << "move_shuttle() called for [shuttle_tag] leaving [origin] en route to [destination]."
//world << "move_shuttle() called for [name] leaving [origin] en route to [destination]."
//world << "area_coming_from: [origin]"
//world << "destination: [destination]"
@@ -167,3 +184,15 @@
//returns 1 if the shuttle has a valid arrive time
/datum/shuttle/proc/has_arrive_time()
return (moving_status == SHUTTLE_INTRANSIT)
/datum/shuttle/proc/make_sounds(var/area/A, var/sound_type)
var/sound_to_play = null
switch(sound_type)
if(HYPERSPACE_WARMUP)
sound_to_play = 'sound/effects/shuttles/hyperspace_begin.ogg'
if(HYPERSPACE_PROGRESS)
sound_to_play = 'sound/effects/shuttles/hyperspace_progress.ogg'
if(HYPERSPACE_END)
sound_to_play = 'sound/effects/shuttles/hyperspace_end.ogg'
for(var/obj/machinery/door/E in A) //dumb, I know, but playing it on the engines doesn't do it justice
playsound(E, sound_to_play, 50, FALSE)
+7
View File
@@ -19,12 +19,18 @@
//it would be cool to play a sound here
moving_status = SHUTTLE_WARMUP
spawn(warmup_time*10)
make_sounds(origin, HYPERSPACE_WARMUP)
sleep(5 SECONDS) // so the sound finishes.
if (moving_status == SHUTTLE_IDLE)
make_sounds(origin, HYPERSPACE_END)
return //someone cancelled the launch
if (at_station() && forbidden_atoms_check())
//cancel the launch because of forbidden atoms. announce over supply channel?
moving_status = SHUTTLE_IDLE
make_sounds(origin, HYPERSPACE_END)
return
if (!at_station()) //at centcom
@@ -51,6 +57,7 @@
move(away_area, destination)
moving_status = SHUTTLE_IDLE
make_sounds(destination, HYPERSPACE_END)
if (!at_station()) //at centcom
supply_controller.sell()
+15 -10
View File
@@ -2,10 +2,12 @@
/datum/shuttle/multi_shuttle
flags = SHUTTLE_FLAGS_NONE
var/cloaked = 1
var/cloaked = FALSE
var/can_cloak = FALSE
var/at_origin = 1
var/returned_home = 0
var/move_time = 240
// var/move_time = 240
var/move_time = 60
var/cooldown = 20
var/last_move = 0 //the time at which we last moved
@@ -103,7 +105,8 @@
else
dat += "<font color='green'>Engines ready.</font><br>"
dat += "<br><b><A href='?src=\ref[src];toggle_cloak=[1]'>Toggle cloaking field</A></b><br>"
if(MS.can_cloak)
dat += "<br><b><A href='?src=\ref[src];toggle_cloak=[1]'>Toggle cloaking field</A></b><br>"
dat += "<b><A href='?src=\ref[src];move_multi=[1]'>Move ship</A></b><br>"
dat += "<b><A href='?src=\ref[src];start=[1]'>Return to base</A></b></center>"
@@ -195,19 +198,21 @@
updateUsrDialog()
return
if(!MS.return_warning)
usr << "<font color='red'>Returning to your home base will end your mission. If you are sure, press the button again.</font>"
//TODO: Actually end the mission.
MS.return_warning = 1
return
// No point giving a warning if it does literally nothing.
// if(!MS.return_warning)
// usr << "<font color='red'>Returning to your home base will end your mission. If you are sure, press the button again.</font>"
// //TODO: Actually end the mission.
// MS.return_warning = 1
// return
MS.long_jump(MS.last_departed,MS.origin,MS.interim,MS.move_time)
MS.long_jump(MS.last_departed, MS.origin, MS.interim, MS.move_time)
MS.last_departed = MS.origin
MS.last_location = MS.start_location
MS.at_origin = 1
if(href_list["toggle_cloak"])
if(!MS.can_cloak)
return
MS.cloaked = !MS.cloaked
usr << "<font color='red'>Ship stealth systems have been [(MS.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival.</font>"
File diff suppressed because it is too large Load Diff
+1
View File
@@ -3,6 +3,7 @@
#if !defined(USING_MAP_DATUM)
#include "southern_cross_areas.dm"
#include "southern_cross_defines.dm"
#include "southern_cross_elevator.dm"
#include "southern_cross_presets.dm"
#include "southern_cross_shuttles.dm"
+1 -1
View File
@@ -939,7 +939,7 @@ area/crew_quarters/heads/sc/hop/quarters
//Shuttle One
/area/shuttle/shuttle1
name = "\improper SEV Torch Hangar Deck"
name = "\improper Hangar Deck"
icon_state = "yellow"
requires_power = 0
dynamic_lighting = 0
+66 -58
View File
@@ -1,54 +1,11 @@
//Shuttle Consoles
//ERT Response Shuttle
/obj/machinery/computer/shuttle_control/multi/response
name = "response shuttle console"
shuttle_tag = "Response Operations"
req_access = list(access_cent_specops)
/obj/machinery/computer/shuttle_control/multi/shuttle1
name = "shuttle control console"
shuttle_tag = "shuttle1"
icon_screen = "shuttle"
/obj/machinery/computer/shuttle_control/multi/shuttle2
name = "shuttle control console"
shuttle_tag = "shuttle2"
icon_screen = "shuttle"
/obj/machinery/computer/shuttle_control/centcom
name = "shuttle control console"
req_access = list(access_cent_general)
shuttle_tag = "centcom"
/obj/machinery/computer/shuttle_control/administration
name = "shuttle control console"
req_access = list(access_cent_general)
shuttle_tag = "administration"
/obj/machinery/computer/shuttle_control/multi/skipjack
name = "skipjack control console"
req_access = list(access_syndicate)
shuttle_tag = "Skipjack"
/obj/machinery/computer/shuttle_control/multi/syndicate
name = "mercenary shuttle control console"
req_access = list(access_syndicate)
shuttle_tag = "Mercenary"
/obj/machinery/computer/shuttle_control/multi/ninja
name = "stealth shuttle control console"
req_access = list(access_syndicate)
shuttle_tag = "Ninja"
/obj/machinery/computer/shuttle_control/merchant
name = "merchant shuttle control console"
icon_keyboard = "power_key"
icon_screen = "shuttle"
shuttle_tag = "Merchant"
//ERT Response Shuttle
datum/shuttle/multi_shuttle/response
/datum/shuttle/multi_shuttle/response
name = "Response Operations"
warmup_time = 5
origin = /area/shuttle/response_ship/start
@@ -68,9 +25,15 @@ datum/shuttle/multi_shuttle/response
)
//Shuttle 1
/obj/machinery/computer/shuttle_control/multi/shuttle1
name = "shuttle control console"
shuttle_tag = "Shuttle 1"
icon_screen = "shuttle"
/datum/shuttle/multi_shuttle/shuttle1
name = "Shuttle1"
warmup_time = 10
name = "Shuttle 1"
warmup_time = 0
origin = /area/shuttle/shuttle1/start
interim = /area/shuttle/shuttle1/transit
start_location = "Southern Cross Hangar One"
@@ -85,13 +48,20 @@ datum/shuttle/multi_shuttle/response
"Southern Cross Docking Port" = "shuttle1_dock_airlocksc",
)
announcer = "Southern Cross Docking Computer"
arrival_message = "Attention, shuttle one returning. Clear Hangar Deck One."
departure_message = "Attention, shuttle one departing. Clear Hangar Deck One."
// This look backwards because the code expects an outsider shuttle to be coming in, so we reverse it since the 'home' base is the station.
arrival_message = "Attention, shuttle one departing. Clear Hangar Deck One."
departure_message = "Attention, shuttle one returning. Clear Hangar Deck One."
//Shuttle 2
/obj/machinery/computer/shuttle_control/multi/shuttle2
name = "shuttle control console"
shuttle_tag = "Shuttle 2"
icon_screen = "shuttle"
/datum/shuttle/multi_shuttle/shuttle2
name = "Shuttle2"
warmup_time = 10
name = "Shuttle 2"
warmup_time = 0
origin = /area/shuttle/shuttle2/start
interim = /area/shuttle/shuttle2/transit
start_location = "Southern Cross Hangar One"
@@ -106,15 +76,21 @@ datum/shuttle/multi_shuttle/response
"Southern Cross Docking Port" = "shuttle2_dock_airlocksc",
)
announcer = "Southern Cross Docking Computer"
arrival_message = "Attention, shuttle one returning. Clear Hangar Deck Two."
departure_message = "Attention, shuttle one departing. Clear Hangar Deck Two."
// This look backwards because the code expects an outsider shuttle to be coming in, so we reverse it since the 'home' base is the station.
arrival_message = "Attention, shuttle one departing. Clear Hangar Deck Two."
departure_message = "Attention, shuttle one returning. Clear Hangar Deck Two."
//Admin
/obj/machinery/computer/shuttle_control/administration
name = "shuttle control console"
req_access = list(access_cent_general)
shuttle_tag = "Administration"
/datum/shuttle/ferry/administration
name = "Administration"
location = 1
warmup_time = 10 //want some warmup time so people can cancel.
warmup_time = 0
area_offsite = /area/shuttle/administration/centcom
area_station = /area/shuttle/administration/station
docking_controller_tag = "admin_shuttle"
@@ -123,10 +99,15 @@ datum/shuttle/multi_shuttle/response
//Transport
/obj/machinery/computer/shuttle_control/centcom
name = "shuttle control console"
req_access = list(access_cent_general)
shuttle_tag = "Centcom"
/datum/shuttle/ferry/centcom
name = "Centcom"
location = 1
warmup_time = 10
warmup_time = 0
area_offsite = /area/shuttle/transport1/centcom
area_station = /area/shuttle/transport1/station
docking_controller_tag = "centcom_shuttle"
@@ -135,9 +116,16 @@ datum/shuttle/multi_shuttle/response
//Merc
/obj/machinery/computer/shuttle_control/multi/syndicate
name = "mercenary shuttle control console"
req_access = list(access_syndicate)
shuttle_tag = "Mercenary"
/datum/shuttle/multi_shuttle/mercenary
name = "Mercenary"
warmup_time = 0
can_cloak = TRUE
cloaked = TRUE
origin = /area/syndicate_station/start
interim = /area/syndicate_station/transit
start_location = "Mercenary Ship"
@@ -162,9 +150,16 @@ datum/shuttle/multi_shuttle/response
//Skipjack
/obj/machinery/computer/shuttle_control/multi/skipjack
name = "skipjack control console"
req_access = list(access_syndicate)
shuttle_tag = "Skipjack"
/datum/shuttle/multi_shuttle/skipjack
name = "Skipjack"
warmup_time = 0
can_cloak = TRUE
cloaked = TRUE
origin = /area/skipjack_station/start
interim = /area/skipjack_station/transit
destinations = list(
@@ -187,6 +182,13 @@ datum/shuttle/multi_shuttle/response
..()
//Ninja Shuttle.
/obj/machinery/computer/shuttle_control/multi/ninja
name = "stealth shuttle control console"
req_access = list(access_syndicate)
shuttle_tag = "Ninja"
/datum/shuttle/multi_shuttle/ninja
name = "Ninja"
warmup_time = 0
@@ -211,9 +213,15 @@ datum/shuttle/multi_shuttle/response
//Trade Ship
/obj/machinery/computer/shuttle_control/merchant
name = "merchant shuttle control console"
icon_keyboard = "power_key"
icon_screen = "shuttle"
shuttle_tag = "Merchant"
/datum/shuttle/ferry/merchant
name = "Merchant"
warmup_time = 10
warmup_time = 0
docking_controller_tag = "trade_shuttle"
dock_target_station = "trade_shuttle_bay"
dock_target_offsite = "trade_shuttle_dock_airlock"
@@ -316,7 +324,7 @@ datum/shuttle/multi_shuttle/response
/datum/shuttle/ferry/escape_pod/escape_pod_seven
name = "Escape Pod 7"
location = 0
warmup_time = 10
warmup_time = 0
area_station = /area/shuttle/escape_pod7/station
area_offsite = /area/shuttle/escape_pod7/centcom
area_transition = /area/shuttle/escape_pod7/transit
@@ -328,7 +336,7 @@ datum/shuttle/multi_shuttle/response
/datum/shuttle/ferry/escape_pod/escape_pod_eight
name = "Escape Pod 8"
location = 0
warmup_time = 10
warmup_time = 0
area_station = /area/shuttle/escape_pod8/station
area_offsite = /area/shuttle/escape_pod8/centcom
area_transition = /area/shuttle/escape_pod8/transit
Binary file not shown.
Binary file not shown.
Binary file not shown.