This commit is contained in:
Poojawa
2018-09-11 02:49:41 -05:00
parent 09512a6001
commit b6430559e9
104 changed files with 1522 additions and 765 deletions
+73 -9
View File
@@ -12,6 +12,8 @@
var/credit_cost = INFINITY
var/can_be_bought = TRUE
var/port_x_offset
var/port_y_offset
/datum/map_template/shuttle/proc/prerequisites_met()
return TRUE
@@ -21,7 +23,33 @@
mappath = "[prefix][shuttle_id].dmm"
. = ..()
/datum/map_template/shuttle/load(turf/T, centered)
/datum/map_template/shuttle/preload_size(path, cache)
. = ..(path, TRUE) // Done this way because we still want to know if someone actualy wanted to cache the map
if(!cached_map)
return
var/key
var/list/models = cached_map.grid_models
for(key in models)
if(findtext(models[key], "[/obj/docking_port/mobile]")) // Yay compile time checks
break // This works by assuming there will ever only be one mobile dock in a template at most
var/datum/grid_set/gset
for(var/i in cached_map.gridSets)
gset = i
var/ycrd = gset.ycrd
for(var/line in gset.gridLines)
if(key != line)
ycrd--
continue
port_x_offset = gset.xcrd
port_y_offset = ycrd
break
if(!cache)
cached_map = null
/datum/map_template/shuttle/load(turf/T, centered, register=TRUE)
. = ..()
if(!.)
return
@@ -34,7 +62,34 @@
if(length(place.baseturfs) < 2) // Some snowflake shuttle shit
continue
place.baseturfs.Insert(3, /turf/baseturf_skipover/shuttle)
for(var/obj/docking_port/mobile/port in place)
if(register)
port.register()
if(isnull(port_x_offset))
return
switch(port.dir) // Yeah this looks a little ugly but mappers had to do this in their head before
if(NORTH)
port.width = width
port.height = height
port.dwidth = port_x_offset - 1
port.dheight = port_y_offset - 1
if(EAST)
port.width = height
port.height = width
port.dwidth = height - port_y_offset
port.dheight = port_x_offset - 1
if(SOUTH)
port.width = width
port.height = height
port.dwidth = width - port_x_offset
port.dheight = height - port_y_offset
if(WEST)
port.width = height
port.height = width
port.dwidth = port_y_offset - 1
port.dheight = width - port_x_offset
for(var/obj/structure/closet/closet in place)
if(closet.anchorable)
closet.anchored = TRUE
@@ -110,6 +165,11 @@
// Shuttles start here:
/datum/map_template/shuttle/emergency/backup
suffix = "backup"
name = "Backup Shuttle"
can_be_bought = FALSE
/datum/map_template/shuttle/emergency/airless
suffix = "airless"
name = "Build your own shuttle kit"
@@ -126,6 +186,7 @@
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"
@@ -228,7 +289,7 @@
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. <span class='danger'>VIRUS ALERT: This entry seems to be booby-trapped with a redirector trap. Buy this at your own risk.</span>"
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 too 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
@@ -324,11 +385,11 @@
/datum/map_template/shuttle/whiteship/box
suffix = "box"
name = "NT Medical Ship"
name = "Hospital Ship"
/datum/map_template/shuttle/whiteship/meta
suffix = "meta"
name = "NT Recovery Whiteship"
name = "Salvage Ship"
/datum/map_template/shuttle/whiteship/pubby
suffix = "pubby"
@@ -340,8 +401,11 @@
/datum/map_template/shuttle/whiteship/delta
suffix = "delta"
name = "Unnamed NT Vessel"
admin_notes = "The Delta whiteship doesn't have a name, apparently."
name = "NT Frigate"
/datum/map_template/shuttle/whiteship/pod
suffix = "whiteship_pod"
name = "Salvage Pod"
/datum/map_template/shuttle/cargo/box
suffix = "box"
@@ -445,8 +509,8 @@
suffix = "syndicate_dropship"
name = "Syndicate Dropship"
/datum/map_template/shuttle/ruin/syndicate_fighter
suffix = "syndicate_fighter"
/datum/map_template/shuttle/ruin/syndicate_fighter_shiv
suffix = "syndicate_fighter_shiv"
name = "Syndicate Fighter"
/datum/map_template/shuttle/snowdin/mining