Skip to content

Commit

Permalink
TGS Test Merge (#6191)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Jul 30, 2024
2 parents a4b16ee + cf48484 commit 4300491
Show file tree
Hide file tree
Showing 42 changed files with 3,054 additions and 389 deletions.
8 changes: 8 additions & 0 deletions code/__DEFINES/ARES.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@

/// Time until someone can respawn as Working Joe
#define JOE_JOIN_DEAD_TIME (15 MINUTES)



#define FACTION_ARES "Ares"
#define FACTION_LIST_ARES_MARINE list(FACTION_MARINE, FACTION_ARES)
#define FACTION_LIST_ARES_ALL list(FACTION_ARES, FACTION_MARINE, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_ARES_WY list(FACTION_ARES, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_ARES_ALONE list(FACTION_ARES)
2 changes: 2 additions & 0 deletions code/__DEFINES/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ most of them are tied into map-placed objects. This should be reworked in the fu
#define ACCESS_LIST_MARINE_ALL "Almayer (ALL)"
///Used by the Wey-Yu - USCM Liaison
#define ACCESS_LIST_MARINE_LIAISON "Wey-Yu (Liaison)"
///Used by the Wey-Yu AIST aboard Almayer
#define ACCESS_LIST_MARINE_LIAISON_AIST "Wey-Yu (AIST)"

///The accesses granted to emergency responders.
#define ACCESS_LIST_EMERGENCY_RESPONSE "Almayer (ERT)"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_GENERAL "USCM General"
#define JOB_ACMC "Assistant Commandant of the Marine Corps"
#define JOB_CMC "Commandant of the Marine Corps"
#define JOB_AI_TECH "AI Service Technician"

// Used to add a timelock to a job. Will be passed onto derivatives
#define AddTimelock(Path, timelockList) \
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@
#define COOLDOWN_COMM_CENTRAL 30 SECONDS
#define COOLDOWN_COMM_DESTRUCT 5 MINUTES

#define FORCE_SCAN_LOCK 25 MINUTES
#define COOLDOWN_FORCE_SCAN 15 MINUTES

///Cooldown for pred recharge
#define COOLDOWN_BRACER_CHARGE 3 MINUTES

Expand Down
5 changes: 3 additions & 2 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
#define ROLE_WHITELISTED 16
#define ROLE_NO_ACCOUNT 32
#define ROLE_CUSTOM_SPAWN 64
#define ROLE_HIDDEN 128
//=================================================

//Role defines, specifically lists of roles for job bans, crew manifests and the like.
Expand All @@ -128,7 +129,7 @@ GLOBAL_LIST_INIT(ROLES_CIC, list(JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO))
GLOBAL_LIST_INIT(ROLES_AUXIL_SUPPORT, list(JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_TANK_CREW, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT))
GLOBAL_LIST_INIT(ROLES_MISC, list(JOB_SYNTH, JOB_WORKING_JOE, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_MESS_SERGEANT, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH))
GLOBAL_LIST_INIT(ROLES_POLICE, list(JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE))
GLOBAL_LIST_INIT(ROLES_ENGINEERING, list(JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, JOB_MAINT_TECH, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH))
GLOBAL_LIST_INIT(ROLES_ENGINEERING, list(JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, JOB_MAINT_TECH, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH, JOB_AI_TECH))
GLOBAL_LIST_INIT(ROLES_REQUISITION, list(JOB_CHIEF_REQUISITION, JOB_CARGO_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION))
GLOBAL_LIST_INIT(ROLES_MEDICAL, list(JOB_CMO, JOB_RESEARCHER, JOB_DOCTOR, JOB_NURSE, JOB_WO_CMO, JOB_WO_RESEARCHER, JOB_WO_DOCTOR))
GLOBAL_LIST_INIT(ROLES_MARINES, list(JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE))
Expand All @@ -153,7 +154,7 @@ GLOBAL_LIST_INIT(ROLES_UNASSIGNED, list(JOB_SQUAD_MARINE))
JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE
#define BLURB_USCM_FLIGHT JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_DROPSHIP_CREW_CHIEF
#define BLURB_USCM_MP JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE
#define BLURB_USCM_ENGI JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, JOB_MAINT_TECH, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH, JOB_TANK_CREW, JOB_WO_PILOT
#define BLURB_USCM_ENGI JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, JOB_MAINT_TECH, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH, JOB_TANK_CREW, JOB_WO_PILOT, JOB_AI_TECH
#define BLURB_USCM_MEDICAL JOB_CMO, JOB_RESEARCHER, JOB_DOCTOR, JOB_NURSE, JOB_WO_CMO, JOB_WO_RESEARCHER, JOB_WO_DOCTOR
#define BLURB_USCM_REQ JOB_CHIEF_REQUISITION, JOB_CARGO_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION
#define BLURB_USCM_WY JOB_CORPORATE_LIAISON
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@

#define RADIO_CHANNEL_YAUTJA "Yautja"

#define RADIO_CHANNEL_AICORE "AI Core"
3 changes: 2 additions & 1 deletion code/__HELPERS/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@
JOB_CHIEF_POLICE,
JOB_WARDEN,
JOB_SEA,
JOB_MARINE
JOB_MARINE,
JOB_AI_TECH
)
1 change: 1 addition & 0 deletions code/controllers/subsystem/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency
#define MAX_FREE_FREQ 1599 // -------------------------------------------------

GLOBAL_LIST_INIT(radiochannels, list(
RADIO_CHANNEL_AICORE = AI_FREQ,
RADIO_CHANNEL_YAUTJA = YAUT_FREQ,
RADIO_CHANNEL_VAI = VAI_FREQ,
RADIO_CHANNEL_CMB = CMB_FREQ,
Expand Down
2 changes: 2 additions & 0 deletions code/datums/factions/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@
if(JOB_PROVOST_MARSHAL, JOB_PROVOST_CMARSHAL, JOB_PROVOST_SMARSHAL)
marine_rk = "pvm"
border_rk = "command"
if(JOB_AI_TECH)
marine_rk = "aist"
// TIS
if(JOB_TIS_IO)
marine_rk = "tisio"
Expand Down
10 changes: 10 additions & 0 deletions code/game/area/almayer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@
is_resin_allowed = FALSE
resin_construction_allowed = FALSE

/area/almayer/command/aist_office
name = "\improper AIST Office"
icon_state = "airoom"
fake_zlevel = 1 // upperdeck
soundscape_playlist = list()
flags_area = AREA_NOTUNNEL|AREA_UNWEEDABLE
can_build_special = FALSE
is_resin_allowed = FALSE
resin_construction_allowed = FALSE

/area/almayer/command/securestorage
name = "\improper Upper Deck Secure Storage"
icon_state = "corporatespace"
Expand Down
13 changes: 13 additions & 0 deletions code/game/jobs/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,19 @@
ACCESS_MARINE_MEDBAY,
) + get_access(ACCESS_LIST_COLONIAL_ALL)

if(ACCESS_LIST_MARINE_LIAISON_AIST)
return list(
ACCESS_WY_GENERAL,
ACCESS_WY_COLONIAL,
ACCESS_WY_EXEC,
ACCESS_MARINE_COMMAND,
ACCESS_MARINE_MEDBAY,
ACCESS_MARINE_ENGINEERING,
ACCESS_MARINE_SYNTH,
ACCESS_MARINE_AI,
ACCESS_ARES_DEBUG,
) + get_access(ACCESS_LIST_COLONIAL_ALL)

if(ACCESS_LIST_COLONIAL_ALL)
return list(
ACCESS_CIVILIAN_PUBLIC,
Expand Down
40 changes: 40 additions & 0 deletions code/game/jobs/job/special/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,43 @@
title = JOB_RIOT
/datum/job/special/uscm/riot/chief
title = JOB_RIOT_CHIEF

#define USCM_TECH "USCM"
#define WY_TECH "Wey-Yu"

/datum/job/special/uscm/ai_tech
title = JOB_AI_TECH
selection_class = "job_ce"
supervisors = "the acting commanding officer"
total_positions = 1
spawn_positions = 1
flags_startup_parameters = ROLE_WHITELISTED
gear_preset = /datum/equipment_preset/uscm_event/ai_tech

// job option
job_options = list(USCM_TECH = "USCM", WY_TECH = "WY")
var/corporate = FALSE

//check the job option. and change the gear preset
/datum/job/special/uscm/ai_tech/handle_job_options(option)
if(option != USCM_TECH)
corporate = TRUE
supervisors = "Weyland Yutani"
gear_preset = /datum/equipment_preset/uscm_event/ai_tech/corporate
else
corporate = FALSE
gear_preset = /datum/equipment_preset/uscm_event/ai_tech

/datum/job/special/uscm/ai_tech/check_whitelist_status(mob/user)
if(check_rights(R_PERMISSIONS, show_msg = FALSE))
return TRUE
return FALSE

/datum/job/special/uscm/ai_tech/generate_entry_message()
entry_message_body = "You are a [corporate ? FACTION_WY : FACTION_MARINE] AI Service Technician temporarily assigned to the [MAIN_SHIP_NAME]. Your goal is to ensure the onboard AI, [MAIN_AI_SYSTEM], is operating effectively. Your job involves heavy roleplay and requires you to behave like [corporate ? "a senior corporate representative, remaining in character at all times.<br>As a Weyland Yutani Technician you have access to the Corporate Office aboard the USS Almayer. Although you should cooperate with the onboard Liaison, you are not their subordinate nor they yours. You should help The Company interests where applicable but do not abuse your access to the AI Systems." : "an officer and to stay in character at all times. You are required to adhere to and obey <a href='"+LAW_PLACEHOLDER+"'>Marine Law</a>. Failure to do so may result in punitive action against you. Godspeed.\n\nThe access code for APOLLO Interface is [GLOB.ares_link.code_apollo].\nThe access code for ARES Interface is [GLOB.ares_link.code_interface]."]"
return ..()

/obj/effect/landmark/start/aist
name = JOB_AI_TECH
icon_state = "aist_spawn"
job = /datum/job/special/uscm/ai_tech
32 changes: 32 additions & 0 deletions code/game/machinery/ARES/ARES.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,35 @@
name = "ARES Substrate"
desc = "The memory substrate of ARES, containing complex protocols and information. Limited capabilities can operate on substrate alone, without the main ARES Unit operational."
icon_state = "substrate"


/// Sentry
/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares
name = "UA X512-S mini sentry"
faction_group = FACTION_LIST_ARES_MARINE

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/Initialize()
link_sentry()
. = ..()

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/Destroy()
delink_sentry()
. = ..()

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/start_processing()
sync_iff()
..()

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/proc/sync_iff()
var/datum/ares_link/ares_link = GLOB.ares_link
if(!ares_link || !ares_link.faction_group)
faction_group = FACTION_LIST_ARES_MARINE
faction_group = ares_link.faction_group

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/proc/link_sentry()
var/datum/ares_link/link = GLOB.ares_link
link.core_sentries += src

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/proc/delink_sentry()
var/datum/ares_link/link = GLOB.ares_link
link.core_sentries -= src
37 changes: 37 additions & 0 deletions code/game/machinery/ARES/ARES_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@

data["security_vents"] = link.get_ares_vents()

data["sentry_setting"] = link.faction_label
data["sentry_setting"] = link.faction_label
data["faction_options"] = link.faction_options

return data

/obj/structure/machinery/computer/ares_console/ui_status(mob/user, datum/ui_state/state)
Expand Down Expand Up @@ -573,6 +577,24 @@
COOLDOWN_START(datacore, ares_nuclear_cooldown, COOLDOWN_COMM_DESTRUCT)
return TRUE

if("bioscan")
if(!SSticker.mode)
return FALSE //Not a game mode?
if(world.time < FORCE_SCAN_LOCK)
to_chat(operator, SPAN_WARNING("Bio sensors are not yet ready to initiate a scan!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(!(COOLDOWN_FINISHED(datacore, ares_bioscan_cooldown)) || (world.time < (GLOB.last_human_bioscan + COOLDOWN_FORCE_SCAN)))
to_chat(operator, SPAN_WARNING("It is too soon since the last scan, wait for the sensor array to reset!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE

GLOB.bioscan_data.ares_bioscan(FALSE, 2)
COOLDOWN_START(datacore, ares_bioscan_cooldown, COOLDOWN_FORCE_SCAN)
playsound(src, 'sound/machines/terminal_processing.ogg', 15, 1)
message_admins("BIOSCAN: [key_name(operator)] triggered a Marine bioscan via ARES AIST.")
return TRUE

if("trigger_vent")
playsound = FALSE
var/obj/structure/pipes/vents/pump/no_boom/gas/sec_vent = locate(params["vent"])
Expand All @@ -599,5 +621,20 @@
aicore_lockdown(user)
return TRUE

if("update_sentries")
playsound = FALSE
var/new_iff = params["chosen_iff"]
if(!new_iff)
to_chat(user, SPAN_WARNING("ERROR: Unknown setting."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(new_iff == link.faction_label)
return FALSE
link.change_iff(new_iff)
playsound(src, 'sound/machines/chime.ogg', 15, 1)
message_admins("ARES: [key_name(user)] updated ARES Sentry IFF to [new_iff].")
to_chat(user, SPAN_WARNING("Sentry IFF settings updated!"))
return TRUE

if(playsound)
playsound(src, "keyboard_alt", 15, 1)
25 changes: 24 additions & 1 deletion code/game/machinery/ARES/ARES_interface_admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@
return FALSE
var/list/data = list()

data["is_pda"] = FALSE

data["admin_login"] = "[admin_interface.logged_in], [user.client.admin_holder?.rank]"
data["admin_access_log"] = list(admin_interface.access_list)
data["admin_access_log"] = admin_interface.access_list

data["current_menu"] = admin_interface.current_menu
data["last_page"] = admin_interface.last_menu
Expand Down Expand Up @@ -232,6 +234,8 @@
data["access_tickets"] = logged_access

data["security_vents"] = get_ares_vents()
data["sentry_setting"] = faction_label
data["faction_options"] = faction_options

return data

Expand Down Expand Up @@ -514,3 +518,22 @@
log_ares_security("Nerve Gas Release", "Released Nerve Gas from Vent '[sec_vent.vent_tag]'.", MAIN_AI_SYSTEM)
sec_vent.create_gas(VENT_GAS_CN20_XENO, 6, 5 SECONDS)
log_admin("[key_name(user)] released nerve gas from Vent '[sec_vent.vent_tag]' via ARES.")

if("security_lockdown")
if(!COOLDOWN_FINISHED(datacore, aicore_lockdown))
to_chat(user, SPAN_BOLDWARNING("AI Core Lockdown procedures are on cooldown! They will be ready in [COOLDOWN_SECONDSLEFT(datacore, aicore_lockdown)] seconds!"))
return FALSE
aicore_lockdown(user)
return TRUE

if("update_sentries")
var/new_iff = params["chosen_iff"]
if(!new_iff)
to_chat(user, SPAN_WARNING("ERROR: Unknown setting."))
return FALSE
if(new_iff == faction_label)
return FALSE
change_iff(new_iff)
message_admins("ARES: [key_name(user)] updated ARES Sentry IFF to [new_iff].")
to_chat(user, SPAN_WARNING("Sentry IFF settings updated!"))
return TRUE
17 changes: 17 additions & 0 deletions code/game/machinery/ARES/ARES_interface_apollo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@
data["access_tickets"] = logged_access

data["security_vents"] = link.get_ares_vents()
data["sentry_setting"] = link.faction_label
data["faction_options"] = link.faction_options

return data

Expand Down Expand Up @@ -444,6 +446,21 @@
aicore_lockdown(user)
return TRUE

if("update_sentries")
playsound = FALSE
var/new_iff = params["chosen_iff"]
if(!new_iff)
to_chat(user, SPAN_WARNING("ERROR: Unknown setting."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(new_iff == link.faction_label)
return FALSE
link.change_iff(new_iff)
playsound(src, 'sound/machines/chime.ogg', 15, 1)
message_admins("ARES: [key_name(user)] updated ARES Sentry IFF to [new_iff].")
to_chat(user, SPAN_WARNING("Sentry IFF settings updated!"))
return TRUE

if(playsound)
playsound(src, "keyboard_alt", 15, 1)

Expand Down
Loading

0 comments on commit 4300491

Please sign in to comment.