Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ports ERT features #11415

Merged
merged 13 commits into from
Nov 27, 2024
936 changes: 491 additions & 445 deletions _maps/Prefab/Departments.dmm

Large diffs are not rendered by default.

807 changes: 807 additions & 0 deletions _maps/shuttles/ert/ert_bounty.dmm

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2140,7 +2140,6 @@
#include "code\modules\antagonists\obsessed\objectives\protect.dm"
#include "code\modules\antagonists\obsessed\objectives\spend_time.dm"
#include "code\modules\antagonists\obsessed\objectives\steal_heirloom.dm"
#include "code\modules\antagonists\official\official.dm"
#include "code\modules\antagonists\pirate\pirate.dm"
#include "code\modules\antagonists\prisoner\prisoner.dm"
#include "code\modules\antagonists\revenant\revenant.dm"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/browser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
if ("color")
settings["mainsettings"][setting]["value"] = input(user, "Enter new value for [settings["mainsettings"][setting]["desc"]]", "Enter new value for [settings["mainsettings"][setting]["desc"]]", settings["mainsettings"][setting]["value"]) as color
if ("boolean")
settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in list("Yes","No")
settings["mainsettings"][setting]["value"] = (settings["mainsettings"][setting]["value"] == "Yes") ? "No" : "Yes"
if ("ckey")
settings["mainsettings"][setting]["value"] = input(user, "[settings["mainsettings"][setting]["desc"]]?") in list("none") + GLOB.directory
if (settings["mainsettings"][setting]["callback"])
Expand Down
33 changes: 31 additions & 2 deletions code/datums/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
var/mission = "Assist the station."
var/teamsize = 5
var/polldesc
/// If TRUE, gives the team members "[role] [random last name]" style names
var/random_names = TRUE
/// If TRUE, the admin who created the response team will be spawned in the briefing room in their preferred briefing outfit (assuming they're a ghost)
var/spawn_admin = FALSE
/// If TRUE, we try and pick one of the most experienced players who volunteered to fill the leader slot
var/leader_experience = TRUE
/// A custom map template to spawn the ERT at. If this is null or use_custom_shuttle is FALSE, the ERT will spawn at Centcom.
var/datum/map_template/ert_template
/// If we should actually _use_ the ert_template custom shuttle
var/use_custom_shuttle = TRUE

/datum/ert/New()
if (!polldesc)
Expand Down Expand Up @@ -39,10 +49,12 @@
code = "Green"
teamsize = 1
opendoors = FALSE
leader_role = /datum/antagonist/official
roles = list(/datum/antagonist/official)
leader_role = /datum/antagonist/ert/official
roles = list(/datum/antagonist/ert/official)
rename_team = "CentCom Officials"
polldesc = "a CentCom Official"
random_names = FALSE
leader_experience = FALSE

/datum/ert/centcom_official/New()
mission = "Conduct a routine performance review of [station_name()] and its Captain."
Expand Down Expand Up @@ -80,6 +92,12 @@
rename_team = "Horde of Interns"
mission = "Assist in conflict resolution."
polldesc = "an unpaid internship opportunity with Nanotrasen"
random_names = FALSE

/datum/ert/intern/unarmed
roles = list(/datum/antagonist/ert/intern/unarmed)
leader_role = /datum/antagonist/ert/intern/leader/unarmed
rename_team = "Unarmed Horde of Interns"

/datum/ert/lawyer
roles = list(/datum/antagonist/ert/lawyer)
Expand Down Expand Up @@ -127,3 +145,14 @@
mission = "Eliminate the kudzu with extreme prejudice"
polldesc = "an elite gardening team"
code = "Vine Green"

/datum/ert/bounty_hunters
roles = list(/datum/antagonist/ert/bounty_armor, /datum/antagonist/ert/bounty_hook, /datum/antagonist/ert/bounty_synth)
leader_role = /datum/antagonist/ert/bounty_armor
teamsize = 3
opendoors = FALSE
rename_team = "Bounty Hunters"
mission = "Assist the station in catching perps, dead or alive."
polldesc = "a Centcom-hired bounty hunting gang"
random_names = FALSE
ert_template = /datum/map_template/shuttle/ert/bounty
59 changes: 59 additions & 0 deletions code/datums/helper_datums/teleport.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,65 @@
// DING! You have passed the gauntlet, and are "probably" safe.
return F

/// Checks if a given turf is a "safe" location
/proc/is_safe_turf(turf/random_location, extended_safety_checks = FALSE, dense_atoms = FALSE, no_teleport = FALSE)
Tsar-Salat marked this conversation as resolved.
Show resolved Hide resolved
. = FALSE
if(!isfloorturf(random_location))
return
var/turf/open/floor/floor_turf = random_location
//var/area/destination_area = floor_turf.loc

if(no_teleport)
return

var/datum/gas_mixture/floor_gas_mixture = floor_turf.air
if(!floor_gas_mixture)
return

var/list/gases_to_check = list(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/plasma)
var/trace_gases
for(var/id in floor_gas_mixture.get_gases())
if(id in gases_to_check)
continue
trace_gases = TRUE
break

// Can most things breathe?
if(trace_gases)
return
if(!(floor_gas_mixture.get_gases(/datum/gas/oxygen) && floor_gas_mixture.get_gases(/datum/gas/oxygen) >= 16))
return
if(floor_gas_mixture.get_gases(/datum/gas/plasma))
return
if(floor_gas_mixture.get_gases(/datum/gas/carbon_dioxide) && floor_gas_mixture.get_gases(/datum/gas/carbon_dioxide) >= 10)
return

// Aim for goldilocks temperatures and pressure
if((floor_gas_mixture.return_temperature() <= 270) || (floor_gas_mixture.return_temperature() >= 360))
return
var/pressure = floor_gas_mixture.return_pressure()
if((pressure <= 20) || (pressure >= 550))
return

if(extended_safety_checks)
if(islava(floor_turf)) //chasms aren't /floor, and so are pre-filtered
var/turf/open/lava/lava_turf = floor_turf // Cyberboss: okay, this makes no sense and I don't understand the above comment, but I'm too lazy to check history to see what it's supposed to do right now
if(!lava_turf.is_safe())
return

// Check that we're not warping onto a table or window
if(!dense_atoms)
var/density_found = FALSE
for(var/atom/movable/found_movable in floor_turf)
if(found_movable.density)
density_found = TRUE
break
if(density_found)
return

// DING! You have passed the gauntlet, and are "probably" safe.
return TRUE

/proc/get_teleport_turfs(turf/center, precision = 0)
if(!precision)
return list(center)
Expand Down
9 changes: 9 additions & 0 deletions code/datums/shuttles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@
port_id = "snowdin"
can_be_bought = FALSE

/datum/map_template/shuttle/ert
port_id = "ert"
can_be_bought = FALSE

// Shuttles start here:

/datum/map_template/shuttle/emergency/backup
Expand Down Expand Up @@ -812,6 +816,11 @@
suffix = "excavation"
name = "Snowdin Excavation Elevator"

// Custom ERT shuttles
/datum/map_template/shuttle/ert/bounty
suffix = "bounty"
name = "Bounty Hunter ERT Shuttle"

/datum/map_template/shuttle/tram
port_id = "tram"
can_be_bought = FALSE
Expand Down
8 changes: 8 additions & 0 deletions code/game/objects/effects/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,14 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
GLOB.emergencyresponseteamspawn += loc
return INITIALIZE_HINT_QDEL

/obj/effect/landmark/ert_shuttle_spawn
name = "ertshuttlespawn"
icon_state = "ert_spawn"

/obj/effect/landmark/ert_shuttle_brief_spawn
name = "ertshuttlebriefspawn"
icon_state = "ert_brief_spawn"

//ninja energy nets teleport victims here
/obj/effect/landmark/holding_facility
name = "Holding Facility"
Expand Down
10 changes: 10 additions & 0 deletions code/game/objects/items/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,16 @@ update_label("John Doe", "Clowny")
assignment = "CentCom Attorney"
icon_state = "centcom"

/// Trim for Bounty Hunters hired by centcom.
/obj/item/card/id/silver/bounty/ert
registered_name = "Bounty Hunter"
assignment = "Bounty Hunter"
icon_state = "ert"

/obj/item/card/id/silver/bounty/ert/Initialize(mapload)
. = ..()
access = list(ACCESS_CENT_GENERAL)

/obj/item/card/id/ert/lawyer/Initialize(mapload)
. = ..()
access = list(ACCESS_CENT_GENERAL, ACCESS_COURT, ACCESS_BRIG, ACCESS_FORENSICS_LOCKERS)
Expand Down
Loading
Loading