mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 17:11:52 +00:00
* Added a simple bar-theme escape shuttle Features include a very tough Bardrone, with laws to be a good bartender, bathroom, a quality lounge for the heads, and a small gambling table. * Changed drone's health to 3000 Bardrone is now strong, to cope from stray gunfire. * Replaces banned variables with alternates Step_[xy] is bad, mkay? * Added STV5, the cramped transport shuttle Well, looks like Centcom only had this ship ready for evacuation. I hope you're friendly with your coworkers! * Removed shuttle area from empty space on STV5 * Added cult shuttle Looks like this automated shuttle may have wandered into the darkness between the stars on route to the station. Let's not think too hard about where all the bodies came from. * Include the Narnar Shuttle * Meat ferry added Very basic, could probably use some love from a map wizard. * Moved shuttle files to shuttles/ directory * MAPS MOVED AND RENAMED * Hyperfractal Gigashuttle "I dunno, this seems kinda needlessly complicated." "This shuttle has very a very high safety record, according to Centcom Officer Cadet Yins." "Are you sure?" "Yes, it has a safety record of N-A-N, which is apparently larger than 100%." * I REGRET ADDING THESE * Into templates you go * Changed floors * Hugbox supermatter, for map making * Shuttles KINDA delete themselves * Hats in hats in hats in hats in hats * Use the hugbox supermatter in the shuttle * Include the new verbs * Include our new verbs * Fixed runtime when deleting emergency shuttle * Added to verb list * Fixes more runtimes with deleting the shuttle * Shuttle Destroy verb now functions * Moved them out of the shuttles/ folder * We'll need these docks later * shuttle_import landmark datum made * Changes z2 to TGM format and adds shuttle_import landmark * SHUTTLE IMPORT VERB Is this it? Are we there? * Some compile fixes * Emergency bar map updated * Updated cramped shuttle * Updated narnar shuttle * Supermatter shuttle updated * Meat ferry updated * Debugging information included * Debug code, QDEL hints * Minor updates to collection of maps * May as well use the snowflake drone code PICK YOUR OWN BARKEEPING HAT. * The Lighthouse *static*... part of a much larger vessel, possibly military in origin. The weapon markings aren't anything we've seen ... *static* ... by almost never the same person twice, possible use of unknown storage ... *static* ... seeing ERT officers onboard, but no missions are on file for ... *static* ... *static* ... *annoying jingle* ... only at The LIGHTHOUSE! Fulfilling needs you didn't even know you had. We've got EVERYTHING, and something else! * Made supermatter hallucination too powerful * Added force argument for docking testing * Added emergency backup shuttle Hopefully it will never be seen or used. But means that provided it's there and untouched, even with the accidental deletion of a shuttle, round will still be able to end as normal. * Added templates for existing shuttles * Backup shuttle used if emergency shuttle deleted * Added backup shuttle transit space Don't know why transit spaces aren't dynamically generated, to be honest. * Hyperfractal Gigashuttle improved More radiation lockers, chairs which makes it "safer". * Added Shuttle Under Construction The documentation hasn't been finished yet for this shuttle. Break glass in case of emergency. * Added warnings for shuttle interaction ARE YOU SURE YOU WANT TO DELETE THE EMERGENCY SHUTTLE? I mean, I really don't know what will happen, and it's probably nothing good. * Snappop(tm)! Hey kids and grownups! Are you bored of DULL and TEDIOUS shuttle journeys after you're evacuating for probably BORING reasons. Well then order the Snappop today! We've got fun activities for everyone, an all access cockpit, and no boring security brig! Boo! Play dress up with your friends! Collect all the bedsheets before your neighbour does so! Check if the AI is watching you with our patent pending "Peeping Tom AI Multitool Detector" or PEEEEEETUR for short. Have a fun ride! * Fixed horrific experiment icon, added gambling spawner * Candle changes Infinite candles start fires but don't run out. Infinite candles don't make messages when created. * Shuttle can dock if already docked * Fixing bugs with shuttle import Also, some minor bugs with hugbox supermatter still consuming gas moles and slowly depressurising the area. * Admin notice, unload bad template * Fixes problems with some shuttles * Warning message if roundstart dock failed * Compiles. * Inform admins of shuttle problems * Names for shuttles, minor tweaks * Moved shuttle templates to shuttles/ * Version numbers are lame * Shuttle datums * Shuttle manipulator barebones It doesn't do anything at the moment. * Added shuttle manipulator to Z2 It still doesn't do anything yet, but it looks pretty. * Use GetAllContents(), don't delete ghosts * Fixes bug where nothing would actually load * Cancel button on Destroy Shuttle * Fixed birdboat shuttle overwriting bar shuttle
354 lines
12 KiB
Plaintext
354 lines
12 KiB
Plaintext
/obj/machinery/computer/emergency_shuttle
|
|
name = "emergency shuttle console"
|
|
desc = "For shuttle control."
|
|
icon_screen = "shuttle"
|
|
icon_keyboard = "tech_key"
|
|
var/auth_need = 3
|
|
var/list/authorized = list()
|
|
|
|
|
|
/obj/machinery/computer/emergency_shuttle/attackby(obj/item/I, mob/user, params)
|
|
var/obj/item/weapon/card/id/ID = I.GetID()
|
|
if(ID)
|
|
if(stat & (BROKEN|NOPOWER))
|
|
return
|
|
if(SSshuttle.emergency.mode != SHUTTLE_DOCKED)
|
|
return
|
|
if(SSshuttle.emergency.timeLeft() < 11)
|
|
return
|
|
if(!(access_heads in ID.access)) //doesn't have this access
|
|
user << "The access level of [ID.registered_name]\'s card is not high enough. "
|
|
return
|
|
|
|
var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
|
|
if(SSshuttle.emergency.mode != SHUTTLE_DOCKED || user.get_active_hand() != ID)
|
|
return
|
|
|
|
var/seconds = SSshuttle.emergency.timeLeft()
|
|
if(seconds <= 10)
|
|
return
|
|
|
|
switch(choice)
|
|
if("Authorize")
|
|
if(!authorized.Find(ID.registered_name))
|
|
authorized += ID.registered_name
|
|
if(auth_need - authorized.len > 0)
|
|
message_admins("[key_name_admin(user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has authorized early shuttle launch ",0,1)
|
|
log_game("[key_name(user)] has authorized early shuttle launch in ([x],[y],[z])")
|
|
minor_announce("[auth_need - authorized.len] more authorization(s) needed until shuttle is launched early",null,1)
|
|
else
|
|
message_admins("[key_name_admin(user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has launched the emergency shuttle [seconds] seconds before launch.",0,1)
|
|
log_game("[key_name(user)] has launched the emergency shuttle in ([x],[y],[z]) [seconds] seconds before launch.")
|
|
minor_announce("The emergency shuttle will launch in 10 seconds",null,1)
|
|
SSshuttle.emergency.setTimer(100)
|
|
|
|
if("Repeal")
|
|
if(authorized.Remove(ID.registered_name))
|
|
minor_announce("[auth_need - authorized.len] authorizations needed until shuttle is launched early")
|
|
|
|
if("Abort")
|
|
if(authorized.len)
|
|
minor_announce("All authorizations to launch the shuttle early have been revoked.")
|
|
authorized.Cut()
|
|
else
|
|
return ..()
|
|
|
|
/obj/machinery/computer/emergency_shuttle/emag_act(mob/user)
|
|
if(!emagged && SSshuttle.emergency.mode == SHUTTLE_DOCKED)
|
|
var/time = SSshuttle.emergency.timeLeft()
|
|
message_admins("[key_name_admin(user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has emagged the emergency shuttle [time] seconds before launch.",0,1)
|
|
log_game("[key_name(user)] has emagged the emergency shuttle in ([x],[y],[z]) [time] seconds before launch.")
|
|
minor_announce("The emergency shuttle will launch in 10 seconds", "SYSTEM ERROR:",null,1)
|
|
SSshuttle.emergency.setTimer(100)
|
|
emagged = 1
|
|
|
|
/obj/docking_port/mobile/emergency
|
|
name = "emergency shuttle"
|
|
id = "emergency"
|
|
|
|
dwidth = 9
|
|
width = 22
|
|
height = 11
|
|
dir = 4
|
|
travelDir = -90
|
|
roundstart_move = "emergency_away"
|
|
var/sound_played = 0 //If the launch sound has been sent to all players on the shuttle itself
|
|
|
|
/obj/docking_port/mobile/emergency/New()
|
|
..()
|
|
// The last created emergency shuttle will always be the one
|
|
// that we use.
|
|
SSshuttle.emergency = src
|
|
|
|
/obj/docking_port/mobile/emergency/Destroy()
|
|
if(src.i_know_what_im_doing)
|
|
// This'll make the shuttle subsystem use the backup shuttle.
|
|
SSshuttle.emergencyDeregister()
|
|
|
|
. = ..()
|
|
|
|
/obj/docking_port/mobile/emergency/timeLeft(divisor)
|
|
if(divisor <= 0)
|
|
divisor = 10
|
|
if(!timer)
|
|
return round(SSshuttle.emergencyCallTime/divisor, 1)
|
|
|
|
var/dtime = world.time - timer
|
|
switch(mode)
|
|
if(SHUTTLE_ESCAPE)
|
|
dtime = max(SSshuttle.emergencyEscapeTime - dtime, 0)
|
|
if(SHUTTLE_DOCKED)
|
|
dtime = max(SSshuttle.emergencyDockTime - dtime, 0)
|
|
else
|
|
dtime = max(SSshuttle.emergencyCallTime - dtime, 0)
|
|
return round(dtime/divisor, 1)
|
|
|
|
/obj/docking_port/mobile/emergency/request(obj/docking_port/stationary/S, coefficient=1, area/signalOrigin, reason, redAlert)
|
|
SSshuttle.emergencyCallTime = initial(SSshuttle.emergencyCallTime) * coefficient
|
|
switch(mode)
|
|
if(SHUTTLE_RECALL)
|
|
mode = SHUTTLE_CALL
|
|
timer = world.time - timeLeft(1)
|
|
if(SHUTTLE_IDLE)
|
|
mode = SHUTTLE_CALL
|
|
timer = world.time
|
|
if(SHUTTLE_CALL)
|
|
if(world.time < timer) //this is just failsafe
|
|
timer = world.time
|
|
else
|
|
return
|
|
|
|
if(prob(70))
|
|
SSshuttle.emergencyLastCallLoc = signalOrigin
|
|
else
|
|
SSshuttle.emergencyLastCallLoc = null
|
|
|
|
priority_announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/AI/shuttlecalled.ogg', "Priority")
|
|
|
|
/obj/docking_port/mobile/emergency/cancel(area/signalOrigin)
|
|
if(mode != SHUTTLE_CALL)
|
|
return
|
|
|
|
timer = world.time - timeLeft(1)
|
|
mode = SHUTTLE_RECALL
|
|
|
|
if(prob(70))
|
|
SSshuttle.emergencyLastCallLoc = signalOrigin
|
|
else
|
|
SSshuttle.emergencyLastCallLoc = null
|
|
priority_announce("The emergency shuttle has been recalled.[SSshuttle.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
|
|
|
|
/*
|
|
/obj/docking_port/mobile/emergency/findTransitDock()
|
|
. = SSshuttle.getDock("emergency_transit")
|
|
if(.)
|
|
return .
|
|
return ..()
|
|
*/
|
|
|
|
|
|
/obj/docking_port/mobile/emergency/check()
|
|
if(!timer)
|
|
return
|
|
|
|
var/time_left = timeLeft(1)
|
|
switch(mode)
|
|
if(SHUTTLE_RECALL)
|
|
if(time_left <= 0)
|
|
mode = SHUTTLE_IDLE
|
|
timer = 0
|
|
if(SHUTTLE_CALL)
|
|
if(time_left <= 0)
|
|
//move emergency shuttle to station
|
|
if(dock(SSshuttle.getDock("emergency_home")))
|
|
setTimer(20)
|
|
return
|
|
mode = SHUTTLE_DOCKED
|
|
timer = world.time
|
|
send2irc("Server", "The Emergency Shuttle has docked with the station.")
|
|
priority_announce("The Emergency Shuttle has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
|
|
|
|
//Gangs only have one attempt left if the shuttle has docked with the station to prevent suffering from dominator delays
|
|
for(var/datum/gang/G in ticker.mode.gangs)
|
|
if(isnum(G.dom_timer))
|
|
G.dom_attempts = 0
|
|
else
|
|
G.dom_attempts = min(1,G.dom_attempts)
|
|
|
|
if(SHUTTLE_DOCKED)
|
|
|
|
if(time_left <= 50 && !sound_played) //4 seconds left:REV UP THOSE ENGINES BOYS. - should sync up with the launch
|
|
sound_played = 1 //Only rev them up once.
|
|
for(var/area/shuttle/escape/E in world)
|
|
E << 'sound/effects/hyperspace_begin.ogg'
|
|
|
|
if(time_left <= 0 && SSshuttle.emergencyNoEscape)
|
|
priority_announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.", null, 'sound/misc/notice1.ogg', "Priority")
|
|
sound_played = 0 //Since we didn't launch, we will need to rev up the engines again next pass.
|
|
mode = SHUTTLE_STRANDED
|
|
|
|
if(time_left <= 0 && !SSshuttle.emergencyNoEscape)
|
|
//move each escape pod (or applicable spaceship) to its corresponding transit dock
|
|
for(var/A in SSshuttle.mobile)
|
|
var/obj/docking_port/mobile/M = A
|
|
if(M.launch_status == UNLAUNCHED) //Pods will not launch from the mine/planet, and other ships won't launch unless we tell them to.
|
|
M.launch_status = ENDGAME_LAUNCHED
|
|
M.enterTransit()
|
|
|
|
//now move the actual emergency shuttle to its transit dock
|
|
for(var/area/shuttle/escape/E in world)
|
|
E << 'sound/effects/hyperspace_progress.ogg'
|
|
enterTransit()
|
|
mode = SHUTTLE_ESCAPE
|
|
launch_status = ENDGAME_LAUNCHED
|
|
timer = world.time
|
|
priority_announce("The Emergency Shuttle has left the station. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", null, null, "Priority")
|
|
if(SHUTTLE_ESCAPE)
|
|
if(time_left <= 0)
|
|
//move each escape pod to its corresponding escape dock
|
|
for(var/A in SSshuttle.mobile)
|
|
var/obj/docking_port/mobile/M = A
|
|
if(M.launch_status == ENDGAME_LAUNCHED)
|
|
if(istype(M, /obj/docking_port/mobile/pod))
|
|
M.dock(SSshuttle.getDock("[M.id]_away")) //Escape pods dock at centcomm
|
|
else
|
|
continue //Mapping a new docking point for each ship mappers could potentially want docking with centcomm would take up lots of space, just let them keep flying off into the sunset for their greentext
|
|
|
|
//now move the actual emergency shuttle to centcomm
|
|
for(var/area/shuttle/escape/E in world)
|
|
E << 'sound/effects/hyperspace_end.ogg'
|
|
dock(SSshuttle.getDock("emergency_away"))
|
|
mode = SHUTTLE_ENDGAME
|
|
timer = 0
|
|
open_dock()
|
|
|
|
/obj/docking_port/mobile/emergency/proc/open_dock()
|
|
for(var/obj/machinery/door/poddoor/shuttledock/D in airlocks)
|
|
var/turf/T = get_step(D, D.checkdir)
|
|
if(!istype(T,/turf/open/space))
|
|
spawn(0)
|
|
D.open()
|
|
|
|
/obj/docking_port/mobile/pod
|
|
name = "escape pod"
|
|
id = "pod"
|
|
dwidth = 1
|
|
width = 3
|
|
height = 4
|
|
launch_status = UNLAUNCHED
|
|
|
|
/obj/docking_port/mobile/pod/request()
|
|
if((security_level == SEC_LEVEL_RED || security_level == SEC_LEVEL_DELTA) && launch_status == UNLAUNCHED)
|
|
launch_status = EARLY_LAUNCHED
|
|
return ..()
|
|
|
|
/obj/docking_port/mobile/pod/New()
|
|
if(id == "pod")
|
|
WARNING("[type] id has not been changed from the default. Use the id convention \"pod1\" \"pod2\" etc.")
|
|
..()
|
|
|
|
/obj/docking_port/mobile/pod/cancel()
|
|
return
|
|
|
|
/obj/machinery/computer/shuttle/pod
|
|
name = "pod control computer"
|
|
admin_controlled = 1
|
|
shuttleId = "pod"
|
|
possible_destinations = "pod_asteroid"
|
|
icon = 'icons/obj/terminals.dmi'
|
|
icon_state = "dorm_available"
|
|
density = 0
|
|
|
|
/obj/machinery/computer/shuttle/pod/update_icon()
|
|
return
|
|
|
|
/obj/docking_port/stationary/random
|
|
name = "escape pod"
|
|
id = "pod"
|
|
dwidth = 1
|
|
width = 3
|
|
height = 4
|
|
var/target_area = /area/lavaland/surface/outdoors
|
|
|
|
/obj/docking_port/stationary/random/initialize()
|
|
..()
|
|
var/list/turfs = get_area_turfs(target_area)
|
|
var/turf/T = pick(turfs)
|
|
src.loc = T
|
|
|
|
//Pod suits/pickaxes
|
|
|
|
|
|
/obj/item/clothing/head/helmet/space/orange
|
|
name = "emergency space helmet"
|
|
icon_state = "syndicate-helm-orange"
|
|
item_state = "syndicate-helm-orange"
|
|
|
|
/obj/item/clothing/suit/space/orange
|
|
name = "emergency space suit"
|
|
icon_state = "syndicate-orange"
|
|
item_state = "syndicate-orange"
|
|
slowdown = 3
|
|
|
|
/obj/item/weapon/pickaxe/emergency
|
|
name = "emergency disembarkation tool"
|
|
desc = "For extracting yourself from rough landings."
|
|
|
|
/obj/item/weapon/storage/pod
|
|
name = "emergency space suits"
|
|
desc = "A wall mounted safe containing space suits. Will only open in emergencies."
|
|
anchored = 1
|
|
density = 0
|
|
icon = 'icons/obj/storage.dmi'
|
|
icon_state = "safe"
|
|
|
|
/obj/item/weapon/storage/pod/New()
|
|
..()
|
|
new /obj/item/clothing/head/helmet/space/orange(src)
|
|
new /obj/item/clothing/head/helmet/space/orange(src)
|
|
new /obj/item/clothing/suit/space/orange(src)
|
|
new /obj/item/clothing/suit/space/orange(src)
|
|
new /obj/item/clothing/mask/gas(src)
|
|
new /obj/item/clothing/mask/gas(src)
|
|
new /obj/item/weapon/tank/internals/oxygen/red(src)
|
|
new /obj/item/weapon/tank/internals/oxygen/red(src)
|
|
new /obj/item/weapon/pickaxe/emergency(src)
|
|
new /obj/item/weapon/pickaxe/emergency(src)
|
|
new /obj/item/weapon/survivalcapsule(src)
|
|
|
|
/obj/item/weapon/storage/pod/attackby(obj/item/weapon/W, mob/user, params)
|
|
return
|
|
|
|
/obj/item/weapon/storage/pod/MouseDrop(over_object, src_location, over_location)
|
|
if(security_level == SEC_LEVEL_RED || security_level == SEC_LEVEL_DELTA)
|
|
return ..()
|
|
else
|
|
usr << "The storage unit will only unlock during a Red or Delta security alert."
|
|
|
|
/obj/item/weapon/storage/pod/attack_hand(mob/user)
|
|
return
|
|
|
|
/obj/docking_port/mobile/emergency/backup
|
|
name = "backup shuttle"
|
|
id = "backup"
|
|
dwidth = 2
|
|
width = 8
|
|
height = 8
|
|
dir = 4
|
|
|
|
roundstart_move = "backup_away"
|
|
|
|
/obj/docking_port/mobile/emergency/backup/New()
|
|
// We want to be a valid emergency shuttle
|
|
// but not be the main one, keep whatever's set
|
|
// valid.
|
|
var/current_emergency = SSshuttle.emergency
|
|
..()
|
|
SSshuttle.emergency = current_emergency
|
|
SSshuttle.backup_shuttle = src
|
|
|
|
|
|
#undef UNLAUNCHED
|
|
#undef LAUNCHED
|
|
#undef EARLY_LAUNCHED
|