Files
Bubberstation/code/modules/capture_the_flag/map_loading.dm
NamelessFairy a8a6625714 Additional CTF maps (#57230)
This pull request adds a map loader as well as new maps to CTF. When a game starts a CTF map will be selected at random and will be playable by ghosts.

As well as this new functionality CTF now fully supports 4 teams. A green and yellow team have been added complete with both standard and instagib gear.

At current five maps are planned:
Classic - the original map we all know and love
Four Side - A four team CTF map where all teams compete over one flag
Downtown - Terrestrial city themed map
Limbo - Wizard themed map featuring portals and uses KOTH rather than CTF
Cruiser - Space themed map utilizing the powerup system

Random maps are selected on game load
Support for four teams added

Why It's Good For The Game

CTF has been more or less the same on the surface since its creation. This PR allows for some much needed map variety which will increase replay value. CTF is far more regularly played then mafia due to its fast rounds and common use during round end delays and I believe that it deserves a boost in content.
Changelog

cl
add: CTF can now selects a random map at game start
add: CTF now supports four teams
add: Gear for yellow and green CTF teams has been added
add: CTF ID cards for all 4 teams have been added - courtesy of maxymax13
add: a new CTF map, Four Side has been added
add: a new CTF map, Downtown has been added
add: a new KOTH map, Limbo has been added
add: a new CTF map, Cruiser has been added
fix: KOTH capture points retain their sprites after being claimed
/cl
2021-03-26 10:01:43 +13:00

52 lines
1.5 KiB
Plaintext

/obj/effect/landmark/ctf
name = "CTF Map Spawner"
/obj/effect/landmark/ctf/Initialize(mapload)
. = ..()
INVOKE_ASYNC(src, .proc/load_map)
/obj/effect/landmark/ctf/proc/load_map()
var/list/map_options = subtypesof(/datum/map_template/ctf)
var/turf/spawn_area = get_turf(src)
var/datum/map_template/ctf/current_map
current_map = pick(map_options)
current_map = new current_map
if(!spawn_area)
CRASH("No spawn area detected for CTF!")
else if(!current_map)
CRASH("No map prepared")
var/list/bounds = current_map.load(spawn_area, TRUE)
if(!bounds)
CRASH("Loading CTF map failed!")
/datum/map_template/ctf
var/description = ""
/datum/map_template/ctf/classic
name = "Classic"
description = "The original CTF map."
mappath = "_maps/map_files/CTF/classic.dmm"
/datum/map_template/ctf/fourSide
name = "Four Side"
description = "A CTF map created to demonstrate 4 team CTF, features a single centred flag rather than one per team."
mappath = "_maps/map_files/CTF/fourSide.dmm"
/datum/map_template/ctf/downtown
name = "Downtown"
description = "A CTF map that takes place in a terrestrial city."
mappath = "_maps/map_files/CTF/downtown.dmm"
/datum/map_template/ctf/limbo
name = "Limbo"
description = "A KOTH map that takes place in a wizard den with looping hallways"
mappath = "_maps/map_files/CTF/limbo.dmm"
/datum/map_template/ctf/cruiser
name = "Crusier"
description = "A CTF map that takes place across multiple space ships, one carring a powerful device that can accelerate those who obtain it"
mappath = "_maps/map_files/CTF/cruiser.dmm"