Files
Bubberstation/code/modules/shuttle/battlecruiser_starfury.dm
SkyratBot 922ec66ee7 [MIRROR] Better Ghost Selection [MDB IGNORE] (#25789)
* Better Ghost Selection

* yes

* oldcode updates and compat

---------

Co-authored-by: 13spacemen <46101244+13spacemen@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-12-25 00:11:10 +00:00

182 lines
7.3 KiB
Plaintext

/// The Starfury map template itself.
/datum/map_template/battlecruiser_starfury
name = "SBC Starfury"
mappath = "_maps/templates/battlecruiser_starfury.dmm"
// Stationary docking ports for the Starfury's strike shuttles.
/obj/docking_port/stationary/starfury_corvette
name = "SBC Starfury Corvette Bay"
shuttle_id = "SBC_corvette_bay"
roundstart_template = /datum/map_template/shuttle/starfury/corvette
hidden = TRUE
width = 14
height = 7
dwidth = 7
dir = NORTH
/obj/docking_port/stationary/starfury_fighter
name = "SBC Starfury Fighter Bay"
shuttle_id = "SBC_fighter_bay"
hidden = TRUE
width = 5
height = 7
dwidth = 2
dir = NORTH
/obj/docking_port/stationary/starfury_fighter/fighter_one
name = "SBC Starfury Port Fighter Bay"
shuttle_id = "SBC_fighter1_bay"
roundstart_template = /datum/map_template/shuttle/starfury/fighter_one
/obj/docking_port/stationary/starfury_fighter/fighter_two
name = "SBC Starfury Center Fighter Bay"
shuttle_id = "SBC_fighter2_bay"
roundstart_template = /datum/map_template/shuttle/starfury/fighter_two
/obj/docking_port/stationary/starfury_fighter/fighter_three
name = "SBC Starfury Starboard Fighter Bay"
shuttle_id = "SBC_fighter3_bay"
roundstart_template = /datum/map_template/shuttle/starfury/fighter_three
// Mobile docking ports for the Starfury's strike shuttles.
/obj/docking_port/mobile/syndicate_fighter
name = "syndicate fighter"
shuttle_id = "syndicate_fighter"
movement_force = list("KNOCKDOWN" = 0, "THROW" = 0)
hidden = TRUE
dir = NORTH
port_direction = SOUTH
/obj/docking_port/mobile/syndicate_fighter/fighter_one
name = "syndicate fighter one"
shuttle_id = "SBC_fighter1"
/obj/docking_port/mobile/syndicate_fighter/fighter_two
name = "syndicate fighter two"
shuttle_id = "SBC_fighter2"
/obj/docking_port/mobile/syndicate_fighter/fighter_three
name = "syndicate fighter three"
shuttle_id = "SBC_fighter3"
/obj/docking_port/mobile/syndicate_corvette
name = "syndicate corvette"
shuttle_id = "SBC_corvette"
movement_force = list("KNOCKDOWN" = 0, "THROW" = 0)
hidden = TRUE
dir = NORTH
port_direction = SOUTH
preferred_direction = WEST
/obj/machinery/computer/camera_advanced/shuttle_docker/syndicate/fighter
name = "syndicate fighter navigation computer"
desc = "Used to pilot syndicate fighters to commence precision strikes."
x_offset = 0
y_offset = 3
/obj/machinery/computer/camera_advanced/shuttle_docker/syndicate/fighter/fighter_one
shuttleId = "SBC_fighter1"
shuttlePortId = "SBC_fighter1_custom"
jump_to_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1, "SBC_fighter1_bay" = 1)
req_access = list(ACCESS_SYNDICATE)
/obj/machinery/computer/camera_advanced/shuttle_docker/syndicate/fighter/fighter_two
shuttleId = "SBC_fighter2"
shuttlePortId = "SBC_fighter2_custom"
jump_to_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1, "SBC_fighter2_bay" = 1)
req_access = list(ACCESS_SYNDICATE)
/obj/machinery/computer/camera_advanced/shuttle_docker/syndicate/fighter/fighter_three
shuttleId = "SBC_fighter3"
shuttlePortId = "SBC_fighter3_custom"
jump_to_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1, "SBC_fighter3_bay" = 1)
req_access = list(ACCESS_SYNDICATE)
/obj/machinery/computer/camera_advanced/shuttle_docker/syndicate/corvette
name = "syndicate corvette navigation computer"
desc = "Used to pilot the syndicate corvette to board enemy stations and ships."
shuttleId = "SBC_corvette"
shuttlePortId = "SBC_corvette_custom"
jump_to_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1, "SBC_corvette_bay" = 1)
y_offset = 3
x_offset = 0
/obj/machinery/computer/shuttle/starfury/fighter
name = "syndicate fighter control console"
desc = "A control computer which controls a shuttle which operates from the SBC Starfury.."
req_access = list(ACCESS_SYNDICATE)
/obj/machinery/computer/shuttle/starfury/fighter/fighter_one
shuttleId = "SBC_fighter1"
possible_destinations = "SBC_fighter1_custom;SBC_fighter1_bay;SBC_fighter2_bay;SBC_fighter3_bay;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s"
req_access = list(ACCESS_SYNDICATE)
/obj/machinery/computer/shuttle/starfury/fighter/fighter_two
shuttleId = "SBC_fighter2"
possible_destinations = "SBC_fighter2_custom;SBC_fighter1_bay;SBC_fighter2_bay;SBC_fighter3_bay;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s"
req_access = list(ACCESS_SYNDICATE)
/obj/machinery/computer/shuttle/starfury/fighter/fighter_three
shuttleId = "SBC_fighter3"
possible_destinations = "SBC_fighter3_custom;SBC_fighter1_bay;SBC_fighter2_bay;SBC_fighter3_bay;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s"
req_access = list(ACCESS_SYNDICATE)
/obj/machinery/computer/shuttle/starfury/corvette
name = "syndicate corvette control console"
desc = "A control computer which controls a shuttle which operates from the SBC Starfury.."
shuttleId = "SBC_corvette"
possible_destinations = "SBC_corvette_custom;SBC_corvette_bay;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s"
req_access = list(ACCESS_SYNDICATE)
/*
* Summons the SBC Starfury, a large syndicate battlecruiser, in Deep Space.
* It can be piloted into the station's area.
*/
/proc/summon_battlecruiser(datum/team/battlecruiser/team)
var/list/candidates = SSpolling.poll_ghost_candidates("Do you wish to be considered for battlecruiser crew?", check_jobban = ROLE_TRAITOR, pic_source = /obj/machinery/sleeper/syndie, role_name_text = "battlecruiser crew")
shuffle_inplace(candidates)
var/datum/map_template/ship = SSmapping.map_templates["battlecruiser_starfury.dmm"]
var/x = rand(TRANSITIONEDGE, world.maxx - TRANSITIONEDGE - ship.width)
var/y = rand(TRANSITIONEDGE, world.maxy - TRANSITIONEDGE - ship.height)
var/z = SSmapping.empty_space?.z_value
if(isnull(z))
CRASH("Battlecruiser found no empty space level to load in!")
var/turf/battlecruiser_loading_turf = locate(x, y, z)
if(!battlecruiser_loading_turf)
CRASH("Battlecruiser found no turf to load in!")
if(!ship.load(battlecruiser_loading_turf))
CRASH("Loading battlecruiser ship failed!")
if(!team)
team = new()
var/obj/machinery/nuclearbomb/selfdestruct/nuke = SSmachines.get_machines_by_type(/obj/machinery/nuclearbomb/selfdestruct)[1]
if(nuke.r_code == NUKE_CODE_UNSET)
nuke.r_code = random_nukecode()
team.nuke = nuke
team.update_objectives()
for(var/turf/open/spawned_turf as anything in ship.get_affected_turfs(battlecruiser_loading_turf)) //not as anything to filter out closed turfs
for(var/obj/effect/mob_spawn/ghost_role/human/syndicate/battlecruiser/spawner in spawned_turf)
spawner.antag_team = team
if(candidates.len > 0)
var/mob/our_candidate = candidates[1]
spawner.create_from_ghost(our_candidate)
spawner.antag_team.players_spawned += (our_candidate.ckey)
candidates.Splice(1, 2)
notify_ghosts(
"The battlecruiser has an object of interest: [our_candidate]!",
source = our_candidate,
)
else
notify_ghosts(
"The battlecruiser has an object of interest: [spawner]!",
source = spawner,
)
priority_announce("Unidentified armed ship detected near the station.")