Shuttle stuffs and gateway refactor port https://github.com/tgstation/tgstation/pull/49868/
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
icon_state = "infrared"
|
||||
custom_materials = list(/datum/material/iron=1000, /datum/material/glass=500)
|
||||
is_position_sensitive = TRUE
|
||||
drop_sound = 'sound/items/handling/component_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
var/ui_x = 225
|
||||
var/ui_y = 110
|
||||
var/on = FALSE
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
icon_state = "prox"
|
||||
custom_materials = list(/datum/material/iron=800, /datum/material/glass=200)
|
||||
attachable = TRUE
|
||||
drop_sound = 'sound/items/handling/component_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
var/ui_x = 250
|
||||
var/ui_y = 185
|
||||
var/scanning = FALSE
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
custom_materials = list(/datum/material/iron=400, /datum/material/glass=120)
|
||||
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
|
||||
attachable = TRUE
|
||||
drop_sound = 'sound/items/handling/component_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
var/ui_x = 280
|
||||
var/ui_y = 132
|
||||
var/code = DEFAULT_SIGNALER_CODE
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
icon_state = "timer"
|
||||
custom_materials = list(/datum/material/iron=500, /datum/material/glass=50)
|
||||
attachable = TRUE
|
||||
drop_sound = 'sound/items/handling/component_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
var/ui_x = 275
|
||||
var/ui_y = 115
|
||||
var/timing = FALSE
|
||||
|
||||
@@ -2,33 +2,34 @@
|
||||
GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "[global.config.directory]/awaymissionconfig.txt"))
|
||||
|
||||
/proc/createRandomZlevel()
|
||||
if(GLOB.awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
if(GLOB.potentialRandomZlevels && GLOB.potentialRandomZlevels.len)
|
||||
to_chat(world, "<span class='boldannounce'>Loading away mission...</span>")
|
||||
var/map = pick(GLOB.potentialRandomZlevels)
|
||||
load_new_z_level(map, "Away Mission")
|
||||
to_chat(world, "<span class='boldannounce'>Away mission loaded.</span>")
|
||||
|
||||
/proc/reset_gateway_spawns(reset = FALSE)
|
||||
for(var/obj/machinery/gateway/G in world)
|
||||
if(reset)
|
||||
G.randomspawns = GLOB.awaydestinations
|
||||
else
|
||||
G.randomspawns.Add(GLOB.awaydestinations)
|
||||
|
||||
/obj/effect/landmark/awaystart
|
||||
name = "away mission spawn"
|
||||
desc = "Randomly picked away mission spawn points."
|
||||
var/id
|
||||
var/delay = TRUE // If the generated destination should be delayed by configured gateway delay
|
||||
|
||||
/obj/effect/landmark/awaystart/New()
|
||||
GLOB.awaydestinations += src
|
||||
..()
|
||||
/obj/effect/landmark/awaystart/Initialize()
|
||||
. = ..()
|
||||
var/datum/gateway_destination/point/current
|
||||
for(var/datum/gateway_destination/point/D in GLOB.gateway_destinations)
|
||||
if(D.id == id)
|
||||
current = D
|
||||
if(!current)
|
||||
current = new
|
||||
current.id = id
|
||||
if(delay)
|
||||
current.wait = CONFIG_GET(number/gateway_delay)
|
||||
GLOB.gateway_destinations += current
|
||||
current.target_turfs += get_turf(src)
|
||||
|
||||
/obj/effect/landmark/awaystart/Destroy()
|
||||
GLOB.awaydestinations -= src
|
||||
return ..()
|
||||
/obj/effect/landmark/awaystart/nodelay
|
||||
delay = FALSE
|
||||
|
||||
/proc/generateMapList(filename)
|
||||
. = list()
|
||||
|
||||
@@ -92,6 +92,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
say("<span class='danger'>Launch sequence activated! Prepare for drop!!</span>")
|
||||
playsound(loc, 'sound/machines/warning-buzzer.ogg', 70, 0)
|
||||
launch_warning = FALSE
|
||||
log_shuttle("[key_name(usr)] has launched the auxillary base.")
|
||||
else if(!shuttle_error)
|
||||
say("Shuttle request uploaded. Please stand away from the doors.")
|
||||
else
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1))
|
||||
if(0)
|
||||
say("Shuttle departing. Please stand away from the doors.")
|
||||
log_shuttle("[key_name(usr)] has sent shuttle \"[M]\" towards \"[href_list["move"]]\", using [src].")
|
||||
if(1)
|
||||
to_chat(usr, "<span class='warning'>Invalid shuttle requested.</span>")
|
||||
else
|
||||
@@ -73,4 +74,4 @@
|
||||
|
||||
/obj/machinery/computer/shuttle/proc/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
|
||||
if(port && (shuttleId == initial(shuttleId) || override))
|
||||
shuttleId = port.id
|
||||
shuttleId = port.id
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
authorized += ID
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has authorized early shuttle launch")
|
||||
log_game("[key_name(user)] has authorized early shuttle launch in [COORD(src)]")
|
||||
log_shuttle("[key_name(user)] has authorized early shuttle launch in [COORD(src)]")
|
||||
// Now check if we're on our way
|
||||
. = TRUE
|
||||
process()
|
||||
@@ -250,7 +250,7 @@
|
||||
|
||||
var/time = TIME_LEFT
|
||||
message_admins("[ADMIN_LOOKUPFLW(user.client)] has emagged the emergency shuttle [time] seconds before launch.")
|
||||
log_game("[key_name(user)] has emagged the emergency shuttle in [COORD(src)] [time] seconds before launch.")
|
||||
log_shuttle("[key_name(user)] has emagged the emergency shuttle in [COORD(src)] [time] seconds before launch.")
|
||||
obj_flags |= EMAGGED
|
||||
SSshuttle.emergency.movement_force = list("KNOCKDOWN" = 60, "THROW" = 20)//YOUR PUNY SEATBELTS can SAVE YOU NOW, MORTAL
|
||||
var/datum/species/S = new
|
||||
|
||||
Reference in New Issue
Block a user