Skip to content

Commit

Permalink
outpost spawn + some other garbage
Browse files Browse the repository at this point in the history
  • Loading branch information
meemofcourse committed Nov 10, 2023
1 parent 4a1f47c commit 86566a6
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 15 deletions.
13 changes: 12 additions & 1 deletion _maps/outpost/indie_space.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,7 @@
"ki" = (
/obj/structure/chair/office,
/obj/machinery/light/small/directional/west,
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel/grimy,
/area/outpost/crew/dorm)
"ks" = (
Expand Down Expand Up @@ -1762,6 +1763,7 @@
},
/obj/machinery/light/small/directional/west,
/obj/structure/extinguisher_cabinet/directional/south,
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel,
/area/outpost/crew/dorm)
"pY" = (
Expand All @@ -1774,6 +1776,13 @@
},
/turf/open/floor/plasteel/tech,
/area/outpost/cargo)
"pZ" = (
/obj/effect/turf_decal/corner/opaque/bottlegreen{
dir = 10
},
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel,
/area/outpost/crew/dorm)
"qc" = (
/obj/structure/table,
/obj/structure/window/reinforced{
Expand Down Expand Up @@ -3823,6 +3832,7 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{
dir = 8
},
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel,
/area/outpost/crew/dorm)
"HG" = (
Expand Down Expand Up @@ -5371,6 +5381,7 @@
/obj/effect/turf_decal/corner/opaque/bottlegreen{
dir = 5
},
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel,
/area/outpost/crew/dorm)
"WT" = (
Expand Down Expand Up @@ -12737,7 +12748,7 @@ nU
nU
nU
yl
Df
pZ
wL
Ez
SC
Expand Down
7 changes: 7 additions & 0 deletions _maps/outpost/nanotrasen_asteroid.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@
/obj/item/radio/intercom/directional/north{
pixel_x = -3
},
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel/tech,
/area/outpost/security/armory)
"dv" = (
Expand Down Expand Up @@ -1723,6 +1724,7 @@
/obj/effect/turf_decal/industrial/caution{
pixel_x = 17
},
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel/tech/grid,
/area/outpost/security/armory)
"gx" = (
Expand Down Expand Up @@ -2094,6 +2096,7 @@
/obj/effect/turf_decal/techfloor{
dir = 8
},
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel/tech/grid,
/area/outpost/security/armory)
"hW" = (
Expand Down Expand Up @@ -3511,6 +3514,7 @@
req_access_txt = "101";
pixel_x = -3
},
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel/tech,
/area/outpost/security/armory)
"mP" = (
Expand Down Expand Up @@ -3666,6 +3670,7 @@
/obj/effect/turf_decal/techfloor{
dir = 4
},
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel/tech/grid,
/area/outpost/security/armory)
"nz" = (
Expand Down Expand Up @@ -10238,6 +10243,7 @@
dir = 4
},
/obj/machinery/airalarm/directional/east,
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel/tech,
/area/outpost/security/armory)
"JK" = (
Expand Down Expand Up @@ -10709,6 +10715,7 @@
dir = 8
},
/obj/machinery/light/directional/west,
/obj/effect/landmark/ert_outpost_spawn,
/turf/open/floor/plasteel/tech,
/area/outpost/security/armory)
"Lv" = (
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ GLOBAL_LIST_EMPTY(blobstart) //blobs, santa, respawning devils
GLOBAL_LIST_EMPTY(secequipment) //sec equipment lockers that scale with the number of sec players
GLOBAL_LIST_EMPTY(deathsquadspawn)
GLOBAL_LIST_EMPTY(emergencyresponseteamspawn)
GLOBAL_LIST_EMPTY(emergencyresponseteamsoutpostpawn)
GLOBAL_LIST_EMPTY(ruin_landmarks)
GLOBAL_LIST_EMPTY(stationroom_landmarks) //List of all spawns for stationrooms

Expand Down
10 changes: 6 additions & 4 deletions code/datums/ert.dm
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
/datum/ert
var/mobtype = /mob/living/carbon/human
var/team = /datum/team/ert
var/opendoors = TRUE
var/opendoors = FALSE
var/leader_role = /datum/antagonist/ert/commander
var/enforce_human = TRUE
var/enforce_human = FALSE
var/roles = list(/datum/antagonist/ert/security, /datum/antagonist/ert/medic, /datum/antagonist/ert/engineer) //List of possible roles to be assigned to ERT members.
var/rename_team
var/code
var/mission = "Assist your employers in achieving their goals. Protect corporate assets."
var/teamsize = 5
var/polldesc
/// If TRUE, gives the team members "[role] [random last name]" style names
var/random_names = TRUE
var/random_names = FALSE
/// 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. By default, a Kunai-Class.
/// A custom map template to spawn the ERT at. If use_custom_shuttle is FALSE, the ERT will spawn on foot. By default, a Kunai-Class.
var/datum/map_template/ert_template = /datum/map_template/shuttle/subshuttles/kunai
/// If we should actually _use_ the ert_template custom shuttle
var/use_custom_shuttle = TRUE
/// If TRUE, the ERT will spawn at the outpost. If use_custom_shuttle is also TRUE, the shuttle will be docked at the outpost
var/spawn_at_outpost = FALSE

// Nanotrasen

Expand Down
16 changes: 13 additions & 3 deletions code/game/objects/effects/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -344,20 +344,30 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
return INITIALIZE_HINT_QDEL

/obj/effect/landmark/ert_spawn
name = "Emergencyresponseteam"
name = "Emergency response team spawn"
icon_state = "ert_spawn"

/obj/effect/landmark/ert_outpost_spawn
name = "Emergency response team outpost spawn"
icon_state = "ert_spawn"

/obj/effect/landmark/ert_outpost_spawn/Initialize(mapload)
..()
GLOB.emergencyresponseteamsoutpostpawn += loc
return INITIALIZE_HINT_QDEL


/obj/effect/landmark/ert_spawn/Initialize(mapload)
..()
GLOB.emergencyresponseteamspawn += loc
return INITIALIZE_HINT_QDEL

/obj/effect/landmark/ert_shuttle_spawn
name = "ertshuttlespawn"
name = "Emergency response team shuttle spawn"
icon_state = "ert_spawn"

/obj/effect/landmark/ert_shuttle_brief_spawn
name = "ertshuttlebriefspawn"
name = "Emergency response team briefing officer spawn"
icon_state = "ert_brief_spawn"

//ninja energy nets teleport victims here
Expand Down
34 changes: 30 additions & 4 deletions code/modules/admin/verbs/one_click_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@
.["mainsettings"]["random_names"]["value"] = newtemplate.random_names ? "Yes" : "No"
.["mainsettings"]["spawn_admin"]["value"] = newtemplate.spawn_admin ? "Yes" : "No"
.["mainsettings"]["use_custom_shuttle"]["value"] = newtemplate.use_custom_shuttle ? "Yes" : "No"
.["mainsettings"]["spawn_at_outpost"]["value"] = newtemplate.spawn_at_outpost ? "Yes" : "No"


/datum/admins/proc/equipAntagOnDummy(mob/living/carbon/human/dummy/mannequin, datum/antagonist/antag)
Expand Down Expand Up @@ -294,6 +295,7 @@
"random_names" = list("desc" = "Randomize names", "type" = "boolean", "value" = "[(ertemplate.random_names ? "Yes" : "No")]"),
"spawn_admin" = list("desc" = "Spawn yourself as briefing officer", "type" = "boolean", "value" = "[(ertemplate.spawn_admin ? "Yes" : "No")]"),
"use_custom_shuttle" = list("desc" = "Use the ERT's custom shuttle (if it has one)", "type" = "boolean", "value" = "[(ertemplate.use_custom_shuttle ? "Yes" : "No")]"),
"spawn_at_outpost" = list("desc" = "Spawn the ERT/Dock the ERT at the Outpost", "type" = "boolean", "value" = "[(ertemplate.spawn_at_outpost ? "Yes" : "No")]"),
)
)

Expand All @@ -315,12 +317,13 @@
ertemplate.teamsize = prefs["teamsize"]["value"]
ertemplate.mission = prefs["mission"]["value"]
ertemplate.polldesc = prefs["polldesc"]["value"]
ertemplate.enforce_human = prefs["enforce_human"]["value"] == "Yes" // these next 6 are effectively toggles
ertemplate.enforce_human = prefs["enforce_human"]["value"] == "Yes" // these next 7 are effectively toggles
ertemplate.opendoors = prefs["open_armory"]["value"] == "Yes"
ertemplate.leader_experience = prefs["leader_experience"]["value"] == "Yes"
ertemplate.random_names = prefs["random_names"]["value"] == "Yes"
ertemplate.spawn_admin = prefs["spawn_admin"]["value"] == "Yes"
ertemplate.use_custom_shuttle = prefs["use_custom_shuttle"]["value"] == "Yes"
ertemplate.spawn_at_outpost = prefs["use_custom_shuttle"]["value"] == "Yes"

var/list/spawnpoints = GLOB.emergencyresponseteamspawn
var/index = 0
Expand All @@ -338,10 +341,33 @@
to_chat(usr, span_warning("No applicants for ERT. Aborting spawn."))
return FALSE

if(ertemplate.spawn_at_outpost && !ertemplate.use_custom_shuttle)
if(!length(GLOB.emergencyresponseteamsoutpostpawn))
stack_trace("No ERT outpost spawns! ERT spawning at CentCom.")
return
spawnpoints = GLOB.emergencyresponseteamsoutpostpawn


if(ertemplate.use_custom_shuttle && ertemplate.ert_template)
to_chat(usr, span_boldnotice("Attempting to spawn ERT custom shuttle, this may take a few seconds..."))
var/datum/map_template/shuttle/template = new ertemplate.ert_template // this is stolen from events/pirates.dm. i am a hack
var/datum/overmap/ship/controlled/ship = new(SSovermap.get_unused_overmap_square(), template)

var/datum/map_template/shuttle/template = new ertemplate.ert_template
var/spawn_location

if(ertemplate.spawn_at_outpost)
if(length(SSovermap.outposts) > 1)
var/temp_loc = input(usr, "Select outpost to spawn at") as null|anything in SSovermap.outposts
if(!temp_loc)
message_admins("ERT Shuttle found no outpost to spawn at!")
return
spawn_location = temp_loc
else
spawn_location = SSovermap.outposts[1]

if(!spawn_location)
spawn_location = SSovermap.get_unused_overmap_square()

var/datum/overmap/ship/controlled/ship = new(spawn_location, template)

if(!ship)
CRASH("Loading ERT shuttle failed!")
Expand All @@ -364,7 +390,7 @@

if(ertemplate.spawn_admin)
if(isobserver(usr))
var/mob/living/carbon/human/admin_officer = new (brief_spawn || spawnpoints[1])
var/mob/living/carbon/human/admin_officer = new (brief_spawn || spawn_turfs || spawnpoints[1])
var/chosen_outfit = usr.client?.prefs?.brief_outfit
usr.client.prefs.copy_to(admin_officer)
admin_officer.equipOutfit(chosen_outfit)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/ert/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
outfit = /datum/outfit/centcom/ert/solgov/inspector
role = "Solarian Inspector"

/datum/antagonist/ert/official/greet()
datum/antagonist/ert/solgov/inspector/greet()

Check warning on line 270 in code/modules/antagonists/ert/ert.dm

View workflow job for this annotation

GitHub Actions / Run Linters

relatively pathed proc defined here
to_chat(owner, "<B><font size=3 color=red>You are a Solarian Inspector.</font></B>")
if (ert_team)
to_chat(owner, "The Department of Administrative Affairs is sending you to [station_name()] with the task: [ert_team.mission.explanation_text]")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/outfits/ert/inteq_ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/datum/outfit/centcom/ert/inteq/shotgun
name = "ERT - Inteq Shotgunner"

suit_store = /obj/item/gun/ballistic/shotgun/automatic/combat
suit_store = /obj/item/gun/ballistic/shotgun/automatic/combat/compact
belt = /obj/item/storage/belt/security/webbing/inteq/alt

backpack_contents = list(/obj/item/storage/box/lethalshot=2, /obj/item/radio=1)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/outfits/ert/syndicate_ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@
ears = /obj/item/radio/headset/syndicate/captain
r_pocket = /obj/item/megaphone/command

backpack_contents = list(/obj/item/storage/firstaid/tactical=1, /obj/item/holosign_creator/medical=1, /obj/item/autosurgeon/cmo=1, /obj/item/radio=1)
backpack_contents = list(/obj/item/storage/firstaid/tactical=1, /obj/item/holosign_creator/medical=1, /obj/item/autosurgeon/cmo=1, /obj/item/radio=1, /obj/item/antag_spawner/nuke_ops/borg_tele/medical/unlocked=1)

id_role = "Lead Medical Technician"

0 comments on commit 86566a6

Please sign in to comment.