Files
fulpstation/code/datums/shuttles.dm
Emmett Gaines 49d1e9ee66 Shuttles have additional baseturfs, and other minor baseturf changes (#36388)
cl ninjanomnom
fix: Shuttles have proper baseturfs now.
fix: Mineral walls properly use their baseturfs when destroyed/drilled.
add: A new engineering goggle mode allows you to see the shuttle area you're standing in.
admin: Buildmode works a bit better with baseturfs now and can properly only remove the top layer of turfs when editing. Note that as a result the order you place turfs is important and a wall placed on space means when the wall is removed there will be space underneath.
/cl

This adds an area hook for turfs getting the PlaceOnTop proc called so shuttle areas are able to intercept it and add a special turf used for determining where the bottom of the shuttle is. I'm not too certain on this being the best way to handle it but the alternatives restrict the kind of turfs that are allowed to be on shuttles which I didn't want to do as it was part of the whole intent of the baseturf change to allow any turf type on shuttles.

The alternative to the area hook would require a tool which attaches turfs to a shuttle which is why there's a shuttle area viewing tool in this pr. I considered doing it this way first but decided it was too clunky.

In addition to other changes:

Tiled/Reinforced floors have proper baseturfs now.

A large amount of the remaining ChangeTurf calls were swapped over to various baseturf helpers so, for example, mining doesn't create a lavaland turf if somehow the mineral wall is on plating.

Escape pods, the aux base, and syndicate drop pod have been converted over to shuttle templates as well.

The error when the timid var is set incorrectly has been changed to a stack_trace.

The change turf file has been made all lowercase as per standard.
2018-04-05 11:13:20 +12:00

395 lines
17 KiB
Plaintext

/datum/map_template/shuttle
name = "Base Shuttle Template"
var/prefix = "_maps/shuttles/"
var/suffix
var/port_id
var/shuttle_id
var/description
var/prerequisites
var/admin_notes
var/credit_cost = INFINITY
var/can_be_bought = TRUE
/datum/map_template/shuttle/proc/prerequisites_met()
return TRUE
/datum/map_template/shuttle/New()
shuttle_id = "[port_id]_[suffix]"
mappath = "[prefix][shuttle_id].dmm"
. = ..()
/datum/map_template/shuttle/load(turf/T, centered)
. = ..()
if(!.)
return
var/list/turfs = block( locate(.[MAP_MINX], .[MAP_MINY], .[MAP_MINZ]),
locate(.[MAP_MAXX], .[MAP_MAXY], .[MAP_MAXZ]))
for(var/i in 1 to turfs.len)
var/turf/place = turfs[i]
if(istype(place, /turf/open/space)) // This assumes all shuttles are loaded in a single spot then moved to their real destination.
continue
place.baseturfs.Insert(3, /turf/baseturf_skipover/shuttle)
//Whatever special stuff you want
/datum/map_template/shuttle/proc/on_bought()
return
/datum/map_template/shuttle/emergency
port_id = "emergency"
name = "Base Shuttle Template (Emergency)"
/datum/map_template/shuttle/cargo
port_id = "cargo"
name = "Base Shuttle Template (Cargo)"
/datum/map_template/shuttle/ferry
port_id = "ferry"
name = "Base Shuttle Template (Ferry)"
/datum/map_template/shuttle/whiteship
port_id = "whiteship"
/datum/map_template/shuttle/labour
port_id = "labour"
can_be_bought = FALSE
/datum/map_template/shuttle/mining
port_id = "mining"
can_be_bought = FALSE
/datum/map_template/shuttle/cargo
port_id = "cargo"
can_be_bought = FALSE
/datum/map_template/shuttle/arrival
port_id = "arrival"
can_be_bought = FALSE
/datum/map_template/shuttle/infiltrator
port_id = "infiltrator"
can_be_bought = FALSE
/datum/map_template/shuttle/aux_base
port_id = "aux_base"
can_be_bought = FALSE
/datum/map_template/shuttle/escape_pod
port_id = "escape_pod"
can_be_bought = FALSE
/datum/map_template/shuttle/assault_pod
port_id = "assault_pod"
can_be_bought = FALSE
// Shuttles start here:
/datum/map_template/shuttle/emergency/airless
suffix = "airless"
name = "Build your own shuttle kit"
description = "Save money by building your own shuttle! The chassis will dock upon purchase, but launch will have to be authorized as usual via shuttle call. Interior and atmosphere not included."
admin_notes = "No brig, no medical facilities, no air."
credit_cost = -7500
/datum/map_template/shuttle/emergency/airless/prerequisites_met()
// first 10 minutes only
return world.time - SSticker.round_start_time < 6000
/datum/map_template/shuttle/emergency/airless/on_bought()
//enable buying engines from cargo
var/datum/supply_pack/P = SSshuttle.supply_packs[/datum/supply_pack/engineering/shuttle_engine]
P.special_enabled = TRUE
/datum/map_template/shuttle/emergency/asteroid
suffix = "asteroid"
name = "Asteroid Station Emergency Shuttle"
description = "A respectable mid-sized shuttle that first saw service shuttling Nanotrasen crew to and from their asteroid belt embedded facilities."
credit_cost = 3000
/datum/map_template/shuttle/emergency/bar
suffix = "bar"
name = "The Emergency Escape Bar"
description = "Features include sentient bar staff (a Bardrone and a Barmaid), bathroom, a quality lounge for the heads, and a large gathering table."
admin_notes = "Bardrone and Barmaid are GODMODE, will be automatically sentienced by the fun balloon at 60 seconds before arrival. \
Has medical facilities."
credit_cost = 5000
/datum/map_template/shuttle/emergency/russiafightpit
suffix = "russiafightpit"
name = "Mother Russia Bleeds"
description = "Dis is a high-quality shuttle, da. Many seats, lots of space, all equipment! Even includes entertainment! Such as lots to drink, and a fighting arena for drunk crew to have fun! If arena not fun enough, simply press button of releasing bears. Do not worry, bears trained not to break out of fighting pit, so totally safe so long as nobody stupid or drunk enough to leave door open. Try not to let asimov babycons ruin fun!"
admin_notes = "Includes a small variety of weapons. And bears. Only captain-access can release the bears. Bears won't smash the windows themselves, but they can escape if someone lets them."
credit_cost = 5000 // While the shuttle is rusted and poorly maintained, trained bears are costly.
/datum/map_template/shuttle/emergency/meteor
suffix = "meteor"
name = "Asteroid With Engines Strapped To It"
description = "A hollowed out asteroid with engines strapped to it. Due to its size and difficulty in steering it, this shuttle may damage the docking area."
admin_notes = "This shuttle will likely crush escape, killing anyone there."
credit_cost = -5000
/datum/map_template/shuttle/emergency/luxury
suffix = "luxury"
name = "Luxury Shuttle"
description = "A luxurious golden shuttle complete with an indoor swimming pool. Each crewmember wishing to board must bring 500 credits, payable in cash and mineral coin."
admin_notes = "Due to the limited space for non paying crew, this shuttle may cause a riot."
credit_cost = 10000
/datum/map_template/shuttle/emergency/discoinferno
suffix = "discoinferno"
name = "Disco Inferno"
description = "The glorious results of centuries of plasma research done by Nanotrasen employees. This is the reason why you are here. Get on and dance like you're on fire, burn baby burn!"
admin_notes = "Flaming hot."
credit_cost = 10000
/datum/map_template/shuttle/emergency/arena
suffix = "arena"
name = "The Arena"
description = "The crew must pass through an otherworldy arena to board this shuttle. Expect massive casualties. The source of the Bloody Signal must be tracked down and eliminated to unlock this shuttle."
admin_notes = "RIP AND TEAR."
credit_cost = 10000
/datum/map_template/shuttle/emergency/arena/prerequisites_met()
if("bubblegum" in SSshuttle.shuttle_purchase_requirements_met)
return TRUE
return FALSE
/datum/map_template/shuttle/emergency/birdboat
suffix = "birdboat"
name = "Birdboat Station Emergency Shuttle"
description = "Though a little on the small side, this shuttle is feature complete, which is more than can be said for the pattern of station it was commissioned for."
credit_cost = 1000
/datum/map_template/shuttle/emergency/box
suffix = "box"
name = "Box Station Emergency Shuttle"
credit_cost = 2000
description = "The gold standard in emergency exfiltration, this tried and true design is equipped with everything the crew needs for a safe flight home."
/datum/map_template/shuttle/emergency/clown
suffix = "clown"
name = "Snappop(tm)!"
description = "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(tm) 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! Check if the AI is watching you with our patent pending \"Peeping Tom AI Multitool Detector\" or PEEEEEETUR for short. \
Have a fun ride!"
admin_notes = "Brig is replaced by anchored greentext book surrounded by lavaland chasms, stationside door has been removed to prevent accidental dropping. No brig."
credit_cost = 8000
/datum/map_template/shuttle/emergency/cramped
suffix = "cramped"
name = "Secure Transport Vessel 5 (STV5)"
description = "Well, looks like CentCom only had this ship in the area, they probably weren't expecting you to need evac for a while. \
Probably best if you don't rifle around in whatever equipment they were transporting. I hope you're friendly with your coworkers, because there is very little space in this thing.\n\
\n\
Contains contraband armory guns, maintenance loot, and abandoned crates!"
admin_notes = "Due to origin as a solo piloted secure vessel, has an active GPS onboard labeled STV5."
/datum/map_template/shuttle/emergency/meta
suffix = "meta"
name = "Meta Station Emergency Shuttle"
credit_cost = 4000
description = "A fairly standard shuttle, though larger and slightly better equipped than the Box Station variant."
/datum/map_template/shuttle/emergency/mini
suffix = "mini"
name = "Ministation emergency shuttle"
credit_cost = 1000
description = "Despite its namesake, this shuttle is actually only slightly smaller than standard, and still complete with a brig and medbay."
/datum/map_template/shuttle/emergency/scrapheap
suffix = "scrapheap"
name = "Standby Evacuation Vessel \"Scrapheap Challenge\""
credit_cost = -1000
description = "Due to a lack of functional emergency shuttles, we bought this second hand from a scrapyard and pressed it into service. Please do not lean to heavily on the exterior windows, they are fragile."
admin_notes = "An abomination with no functional medbay, sections missing, and some very fragile windows. Surprisingly airtight."
/datum/map_template/shuttle/emergency/narnar
suffix = "narnar"
name = "Shuttle 667"
description = "Looks like this 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."
admin_notes = "Contains real cult ruins, mob eyeballs, and inactive constructs. Cult mobs will automatically be sentienced by fun balloon. \
Cloning pods in 'medbay' area are showcases and nonfunctional."
/datum/map_template/shuttle/emergency/pubby
suffix = "pubby"
name = "Pubby Station Emergency Shuttle"
description = "A small, but feature complete shuttle. It boasts a card table to keep crew members occupied on the long flight home."
credit_cost = 1000
/datum/map_template/shuttle/emergency/cere
suffix = "cere"
name = "Cere Station Emergency Shuttle"
description = "The large, beefed-up version of the box-standard shuttle. Includes an expanded brig, fully stocked medbay, enhanced cargo storage with mech chargers, \
an engine room stocked with various supplies, and a crew capacity of 80+ to top it all off. Live large, live Cere."
/datum/map_template/shuttle/emergency/supermatter
suffix = "supermatter"
name = "Hyperfractal Gigashuttle"
description = "\"I dunno, this seems kinda needlessly complicated.\"\n\
\"This shuttle has very a very high safety record, according to CentCom Officer Cadet Yins.\"\n\
\"Are you sure?\"\n\
\"Yes, it has a safety record of N-A-N, which is apparently larger than 100%.\""
admin_notes = "Supermatter that spawns on shuttle is special anchored 'hugbox' supermatter that cannot take damage and does not take in or emit gas. \
Outside of admin intervention, it cannot explode. \
It does, however, still dust anything on contact, emits high levels of radiation, and induce hallucinations in anyone looking at it without protective goggles. \
Emitters spawn powered on, expect admin notices, they are harmless."
credit_cost = 100000
/datum/map_template/shuttle/emergency/imfedupwiththisworld
suffix = "imfedupwiththisworld"
name = "Oh, Hi Daniel"
description = "How was space work today? Oh, pretty good. We got a new space station and the company will make a lot of money. What space station? I cannot tell you; it's space confidential. \
Aw, come space on. Why not? No, I can't. Anyway, how is your space roleplay life?"
credit_cost = -5000
/datum/map_template/shuttle/emergency/goon
suffix = "goon"
name = "NES Port"
description = "The Nanotrasen Emergency Shuttle Port(NES Port for short) is a shuttle used at other less known Nanotrasen facilities and has a more open inside for larger crowds, but fewer onboard shuttle facilities."
credit_cost = 500
/datum/map_template/shuttle/emergency/wabbajack
suffix = "wabbajack"
name = "NT Lepton Violet"
description = "The research team based on this vessel went missing one day, and no amount of investigation could discover what happened to them. \
The only occupants were a number of dead rodents, who appeared to have clawed each other to death. \
Needless to say, no engineering team wanted to go near the thing, and it's only being used as an Emergency Escape Shuttle because there is literally nothing else available."
admin_notes = "If the crew can solve the puzzle, they will wake the wabbajack statue. It will likely not end well. There's a reason it's boarded up. Maybe they should have just left it alone."
credit_cost = 15000
/datum/map_template/shuttle/emergency/omega
suffix = "omega"
name = "Omegastation Emergency Shuttle"
description = "On the smaller size with a modern design, this shuttle is for the crew who like the cosier things, while still being able to stretch their legs."
credit_cost = 1000
/datum/map_template/shuttle/ferry/base
suffix = "base"
name = "transport ferry"
description = "Standard issue Box/Metastation CentCom ferry."
/datum/map_template/shuttle/ferry/meat
suffix = "meat"
name = "\"meat\" ferry"
description = "Ahoy! We got all kinds o' meat aft here. Meat from plant people, people who be dark, not in a racist way, just they're dark black. \
Oh and lizard meat too,mighty popular that is. Definitely 100% fresh, just ask this guy here. *person on meatspike moans* See? \
Definitely high quality meat, nothin' wrong with it, nothin' added, definitely no zombifyin' reagents!"
admin_notes = "Meat currently contains no zombifying reagents, lizard on meatspike must be spawned in."
/datum/map_template/shuttle/ferry/lighthouse
suffix = "lighthouse"
name = "The Lighthouse(?)"
description = "*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!"
admin_notes = "Currently larger than ferry docking port on Box, will not hit anything, but must be force docked. Trader and ERT bodyguards are not included."
/datum/map_template/shuttle/ferry/fancy
suffix = "fancy"
name = "fancy transport ferry"
description = "At some point, someone upgraded the ferry to have fancier flooring... and less seats."
/datum/map_template/shuttle/whiteship/box
suffix = "box"
name = "NT Medical Ship"
/datum/map_template/shuttle/whiteship/meta
suffix = "meta"
name = "NT Recovery Whiteship"
/datum/map_template/shuttle/whiteship/pubby
suffix = "pubby"
name = "NT White UFO"
/datum/map_template/shuttle/whiteship/cere
suffix = "cere"
name = "NT Construction Vessel"
/datum/map_template/shuttle/whiteship/delta
suffix = "delta"
name = "Unnamed NT Vessel"
admin_notes = "The Delta whiteship doesn't have a name, apparently."
/datum/map_template/shuttle/cargo/box
suffix = "box"
name = "supply shuttle (Box)"
/datum/map_template/shuttle/cargo/birdboat
suffix = "birdboat"
name = "supply shuttle (Birdboat)"
/datum/map_template/shuttle/emergency/delta
suffix = "delta"
name = "Delta Station Emergency Shuttle"
description = "A large shuttle for a large station, this shuttle can comfortably fit all your overpopulation and crowding needs. Complete with all facilities plus additional equipment."
admin_notes = "Go big or go home."
credit_cost = 7500
/datum/map_template/shuttle/emergency/raven
suffix = "raven"
name = "CentCom Raven Battlecruiser"
description = "The CentCom Raven Battlecruiser is currently docked at the CentCom ship bay awaiting a mission, this Battlecruiser has been reassigned as an emergency escape shuttle for currently unknown reasons. The CentCom Raven Battlecruiser should comfortably fit a medium to large crew size crew and is complete with all required facitlities including a top of the range CentCom Medical Bay."
admin_notes = "The long way home"
credit_cost = 12500
/datum/map_template/shuttle/arrival/box
suffix = "box"
name = "arrival shuttle (Box)"
/datum/map_template/shuttle/cargo/box
suffix = "box"
name = "cargo ferry (Box)"
/datum/map_template/shuttle/mining/box
suffix = "box"
name = "mining shuttle (Box)"
/datum/map_template/shuttle/labour/box
suffix = "box"
name = "labour shuttle (Box)"
/datum/map_template/shuttle/infiltrator/basic
suffix = "basic"
name = "basic syndicate infiltrator"
/datum/map_template/shuttle/cargo/delta
suffix = "delta"
name = "cargo ferry (Delta)"
/datum/map_template/shuttle/mining/delta
suffix = "delta"
name = "mining shuttle (Delta)"
/datum/map_template/shuttle/labour/delta
suffix = "delta"
name = "labour shuttle (Delta)"
/datum/map_template/shuttle/arrival/delta
suffix = "delta"
name = "arrival shuttle (Delta)"
/datum/map_template/shuttle/arrival/pubby
suffix = "pubby"
name = "arrival shuttle (Pubby)"
/datum/map_template/shuttle/aux_base/default
suffix = "default"
name = "auxilliary base (Default)"
/datum/map_template/shuttle/escape_pod/default
suffix = "default"
name = "escape pod (Default)"
/datum/map_template/shuttle/escape_pod/large
suffix = "large"
name = "escape pod (Large)"
/datum/map_template/shuttle/assault_pod/default
suffix = "default"
name = "assault pod (Default)"