Skip to content

Commit

Permalink
Merge branch 'master' into XM43E1-alt2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaga-404 committed Mar 22, 2024
2 parents 174c8ba + 3b6470c commit 6c68c61
Show file tree
Hide file tree
Showing 65 changed files with 1,360 additions and 1,063 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define MESSAGE_TYPE_ADMINLOG "adminlog"
#define MESSAGE_TYPE_ATTACKLOG "attacklog"
#define MESSAGE_TYPE_DEBUG "debug"
#define MESSAGE_TYPE_NICHE "niche"

/// Adds a generic box around whatever message you're sending in chat. Really makes things stand out.
#define examine_block(str) ("<div class='examine_block'>" + str + "</div>")
7 changes: 4 additions & 3 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ GLOBAL_LIST_INIT(job_squad_roles, JOB_SQUAD_ROLES_LIST)
GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)

#define JOB_AUXILIARY_OFFICER "Auxiliary Support Officer"
#define JOB_PILOT "Pilot Officer"
#define JOB_CAS_PILOT "Gunship Pilot"
#define JOB_DROPSHIP_PILOT "Dropship Pilot"
#define JOB_DROPSHIP_CREW_CHIEF "Dropship Crew Chief"
#define JOB_CREWMAN "Vehicle Crewman"
#define JOB_INTEL "Intelligence Officer"
#define JOB_DROPSHIP_ROLES /datum/timelock/dropship
#define JOB_DROPSHIP_ROLES_LIST list(JOB_DROPSHIP_CREW_CHIEF, JOB_PILOT)
#define JOB_DROPSHIP_ROLES_LIST list(JOB_DROPSHIP_CREW_CHIEF, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT)
#define JOB_AUXILIARY_ROLES /datum/timelock/auxiliary
#define JOB_AUXILIARY_ROLES_LIST list(JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_CREWMAN, JOB_INTEL)
#define JOB_AUXILIARY_ROLES_LIST list(JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_CREWMAN, JOB_INTEL)

#define JOB_POLICE "Military Police"
#define JOB_WARDEN "Military Warden"
Expand Down
8 changes: 4 additions & 4 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@
//=================================================

//Role defines, specifically lists of roles for job bans, crew manifests and the like.
GLOBAL_LIST_INIT(ROLES_COMMAND, list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_CREWMAN, JOB_POLICE, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_CHIEF_REQUISITION, JOB_CHIEF_ENGINEER, JOB_CMO, JOB_CHIEF_POLICE, JOB_SEA, JOB_SYNTH, JOB_WARDEN))
GLOBAL_LIST_INIT(ROLES_COMMAND, list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_CREWMAN, JOB_POLICE, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_CHIEF_REQUISITION, JOB_CHIEF_ENGINEER, JOB_CMO, JOB_CHIEF_POLICE, JOB_SEA, JOB_SYNTH, JOB_WARDEN))

//Marine roles
#define ROLES_OFFICERS list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_SYNTH, JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE)
#define ROLES_OFFICERS list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_SYNTH, JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE)
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_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT))
GLOBAL_LIST_INIT(ROLES_AUXIL_SUPPORT, list(JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_DROPSHIP_CREW_CHIEF, 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))
Expand All @@ -140,7 +140,7 @@ GLOBAL_LIST_INIT(ROLES_UNASSIGNED, list(JOB_SQUAD_MARINE))
//Role lists used for switch() checks in show_blurb_uscm(). Cosmetic, determines ex. "Engineering, USS Almayer", "2nd Bat. 'Falling Falcons'" etc.
#define BLURB_USCM_COMBAT JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_SEA,\
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_PILOT, JOB_DROPSHIP_CREW_CHIEF
#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_WO_PILOT
#define BLURB_USCM_MEDICAL JOB_CMO, JOB_RESEARCHER, JOB_DOCTOR, JOB_NURSE, JOB_WO_CMO, JOB_WO_RESEARCHER, JOB_WO_DOCTOR
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
continue

// Mods with larva protection cannot be drafted
if((cur_obs.client.admin_holder && (cur_obs.client.admin_holder.rights & R_MOD)) && !cur_obs.adminlarva)
if(check_client_rights(cur_obs.client, R_MOD, FALSE) && cur_obs.admin_larva_protection)
continue

if(hive)
Expand Down
3 changes: 2 additions & 1 deletion code/__HELPERS/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
JOB_XO,
JOB_SO,
JOB_INTEL,
JOB_PILOT,
JOB_CAS_PILOT,
JOB_DROPSHIP_PILOT,
JOB_DROPSHIP_CREW_CHIEF,
JOB_CORPORATE_LIAISON,
JOB_COMBAT_REPORTER,
Expand Down
10 changes: 5 additions & 5 deletions code/_onclick/click_hold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@
// Add the hovered atom to the trace
LAZYADD(mouse_trace_history, over_obj)

/client/MouseDrop(datum/over_object, datum/src_location, over_location, src_control, over_control, params)
/client/MouseDrop(datum/src_object, datum/over_object, src_location, over_location, src_control, over_control, params)
. = ..()

if(src_location)
SEND_SIGNAL(src_location, COMSIG_ATOM_DROPPED_ON, over_object, src)

if(over_object)
SEND_SIGNAL(over_object, COMSIG_ATOM_DROP_ON, src_location, src)
SEND_SIGNAL(over_object, COMSIG_ATOM_DROPPED_ON, src_object, src)

if(src_object)
SEND_SIGNAL(src_object, COMSIG_ATOM_DROP_ON, over_object, src)
8 changes: 4 additions & 4 deletions code/datums/components/temporary_mute.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
SIGNAL_HANDLER

if(!nolog)
log_say("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to say the following before their spawn mute ended: [message] (CKEY: [user.key]) (JOB: [user.job])")
msg_admin_niche("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to say the following before their spawn mute ended: [message] (CKEY: [user.key]) (JOB: [user.job]) (AREA: [get_area_name(user)])")
if(on_speak_message)
to_chat(parent, SPAN_BOLDNOTICE(on_speak_message))
return COMPONENT_OVERRIDE_SPEAK

/datum/component/temporary_mute/proc/on_hivemind(mob/user, message)
SIGNAL_HANDLER

log_say("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to hivemind the following before their spawn mute ended: [message] (CKEY: [user.key]) (JOB: [user.job])")
msg_admin_niche("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to hivemind the following before their spawn mute ended: [message] (CKEY: [user.key]) (JOB: [user.job]) (AREA: [get_area_name(user)])")
if(on_speak_message)
to_chat(parent, SPAN_BOLDNOTICE(on_speak_message))
return COMPONENT_OVERRIDE_HIVEMIND_TALK
Expand All @@ -78,15 +78,15 @@
if(!param && !istype(current_emote, /datum/emote/custom))
return

log_say("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to emote the following before their spawn mute ended: [param] (CKEY: [user.key]) (JOB: [user.job])")
msg_admin_niche("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to emote the following before their spawn mute ended: [param] (CKEY: [user.key]) (JOB: [user.job]) (AREA: [get_area_name(user)])")
if(on_emote_message)
to_chat(parent, SPAN_BOLDNOTICE(on_emote_message))
return COMPONENT_OVERRIDE_EMOTE

/datum/component/temporary_mute/proc/on_point(mob/user, atom/target)
SIGNAL_HANDLER

log_say("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to point at the following before their spawn mute ended: [target] (CKEY: [user.key]) (JOB: [user.job])")
msg_admin_niche("[user.name != "Unknown" ? user.name : "([user.real_name])"] attempted to point at the following before their spawn mute ended: [target] (CKEY: [user.key]) (JOB: [user.job]) (AREA: [get_area_name(user)])")
if(on_emote_message)
to_chat(parent, SPAN_BOLDNOTICE(on_emote_message))
return COMPONENT_OVERRIDE_POINT
9 changes: 6 additions & 3 deletions code/datums/factions/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
if(JOB_XO) marine_rk = "xo"
if(JOB_CO) marine_rk = "co"
if(JOB_GENERAL) marine_rk = "general"
if(JOB_PILOT) marine_rk = "po"
if(JOB_CAS_PILOT) marine_rk = "gp"
if(JOB_DROPSHIP_PILOT) marine_rk = "dp"
if(JOB_INTEL) marine_rk = "io"
if(JOB_DROPSHIP_CREW_CHIEF) marine_rk = "dcc"
if(JOB_CREWMAN) marine_rk = "tc"
Expand Down Expand Up @@ -85,8 +86,10 @@
border_rk = "command"
if(JOB_INTEL)
marine_rk = "io"
if(JOB_PILOT)
marine_rk = "po"
if(JOB_CAS_PILOT)
marine_rk = "gp"
if(JOB_DROPSHIP_PILOT)
marine_rk = "dp"
if(JOB_DROPSHIP_CREW_CHIEF)
marine_rk = "dcc"
if(JOB_CHIEF_POLICE)
Expand Down
59 changes: 37 additions & 22 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -385,34 +385,49 @@ Additional game mode variables.
available_xenos[larva_option] = list(hive)

if(!available_xenos.len || (instant_join && !available_xenos_non_ssd.len))
if(!xeno_candidate.client || !xeno_candidate.client.prefs || !(xeno_candidate.client.prefs.be_special & BE_ALIEN_AFTER_DEATH))
to_chat(xeno_candidate, SPAN_WARNING("There aren't any available xenomorphs or burrowed larvae. You can try getting spawned as a chestburster larva by toggling your Xenomorph candidacy in Preferences -> Toggle SpecialRole Candidacy."))
if(!xeno_candidate.client?.prefs || !(xeno_candidate.client.prefs.be_special & BE_ALIEN_AFTER_DEATH))
to_chat(xeno_candidate, SPAN_WARNING("There aren't any available xenomorphs or burrowed larvae. \
You can try getting spawned as a chestburster larva by toggling your Xenomorph candidacy in \
Preferences -> Toggle SpecialRole Candidacy."))
return FALSE
to_chat(xeno_candidate, SPAN_WARNING("There aren't any available xenomorphs or burrowed larvae."))

// Give the player a cached message of their queue status if they are an observer
if(!isobserver(xeno_candidate))
return FALSE
var/mob/dead/observer/candidate_observer = xeno_candidate
if(istype(candidate_observer))
if(candidate_observer.larva_queue_cached_message)
to_chat(xeno_candidate, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

// No cache, lets check now then
message_alien_candidates(get_alien_candidates(), dequeued = 0, cache_only = TRUE)
if(candidate_observer.larva_queue_cached_message)
var/datum/hive_status/cur_hive
for(var/hive_num in GLOB.hive_datum)
cur_hive = GLOB.hive_datum[hive_num]
for(var/mob_name in cur_hive.banished_ckeys)
if(cur_hive.banished_ckeys[mob_name] == xeno_candidate.ckey)
candidate_observer.larva_queue_cached_message += "\nNOTE: You are banished from the [cur_hive] and you may not rejoin unless the Queen re-admits you or dies. Your queue number won't update until there is a hive you aren't banished from."
break
to_chat(xeno_candidate, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE
// If an observing mod wants to join as a xeno, disable their larva protection so that they can enter the queue.
if(check_client_rights(candidate_observer.client, R_MOD, FALSE))
candidate_observer.admin_larva_protection = FALSE

// Give the player a cached message of their queue status if they are an observer
if(candidate_observer.larva_queue_cached_message)
to_chat(candidate_observer, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

// No cache, lets check now then
message_alien_candidates(get_alien_candidates(), dequeued = 0, cache_only = TRUE)

// If we aren't in the queue yet, let's teach them about the queue
if(!candidate_observer.larva_queue_cached_message)
candidate_observer.larva_queue_cached_message = "You are currently awaiting assignment in the larva queue. \
The ordering is based on your time of death or the time you joined. When you have been dead long enough and are not inactive, \
you will periodically receive messages where you are in the queue relative to other currently valid xeno candidates. \
Your current position will shift as others change their preferences or go inactive, but your relative position compared to all observers is the same. \
Note: Playing as a facehugger or in the thunderdome will not alter your time of death. \
This means you won't lose your relative place in queue if you step away, disconnect, play as a facehugger, or play in the thunderdome."
to_chat(candidate_observer, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

// We aren't in queue yet, lets teach them about the queue then
candidate_observer.larva_queue_cached_message = "You are currently awaiting assignment in the larva queue. The ordering is based on your time of death or the time you joined. When you have been dead long enough and are not inactive, you will periodically receive messages where you are in the queue relative to other currently valid xeno candidates. Your current position will shift as others change their preferences or go inactive, but your relative position compared to all observers is the same. Note: Playing as a facehugger or in the thunderdome will not alter your time of death. This means you won't lose your relative place in queue if you step away, disconnect, play as a facehugger, or play in the thunderdome."
to_chat(xeno_candidate, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
var/datum/hive_status/cur_hive
for(var/hive_num in GLOB.hive_datum)
cur_hive = GLOB.hive_datum[hive_num]
for(var/mob_name in cur_hive.banished_ckeys)
if(cur_hive.banished_ckeys[mob_name] == candidate_observer.ckey)
candidate_observer.larva_queue_cached_message += "\nNOTE: You are banished from the [cur_hive] and you may not rejoin unless \
the Queen re-admits you or dies. Your queue number won't update until there is a hive you aren't banished from."
break
to_chat(candidate_observer, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

var/mob/living/carbon/xenomorph/new_xeno
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/colonialmarines/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/datum/job/command/bridge/whiskey = JOB_SO,
/datum/job/command/tank_crew/whiskey = JOB_CREWMAN,
/datum/job/command/police/whiskey = JOB_POLICE,
/datum/job/command/pilot/whiskey = JOB_PILOT,
/datum/job/command/pilot/whiskey = JOB_CAS_PILOT,
/datum/job/logistics/requisition/whiskey = JOB_CHIEF_REQUISITION,
/datum/job/civilian/professor/whiskey = JOB_CMO,
/datum/job/civilian/doctor/whiskey = JOB_DOCTOR,
Expand Down
24 changes: 24 additions & 0 deletions code/game/jobs/job/command/auxiliary/cas_pilot.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/datum/job/command/pilot/cas_pilot
title = JOB_CAS_PILOT
total_positions = 1
spawn_positions = 1
allow_additional = TRUE
scaled = TRUE
supervisors = "the auxiliary support officer"
flags_startup_parameters = ROLE_ADD_TO_DEFAULT
gear_preset = /datum/equipment_preset/uscm_ship/gp
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>Your job is to fly, protect, and maintain the ship's gunship.</a> While you are an officer, your authority is limited to the dropship, where you have authority over the enlisted personnel."

/datum/job/command/pilot/whiskey
total_positions = 2
spawn_positions = 2

// Dropship Roles is both DP, GP and DCC combined to not force people to backtrack
AddTimelock(/datum/job/command/pilot/cas_pilot, list(
JOB_DROPSHIP_ROLES = 2 HOURS
))

/obj/effect/landmark/start/pilot/cas_pilot
name = JOB_CAS_PILOT
icon_state = "po_spawn"
job = /datum/job/command/pilot/cas_pilot
20 changes: 20 additions & 0 deletions code/game/jobs/job/command/auxiliary/dropship_pilot.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/datum/job/command/pilot/dropship_pilot
title = JOB_DROPSHIP_PILOT
total_positions = 1
spawn_positions = 1
allow_additional = TRUE
scaled = TRUE
supervisors = "the auxiliary support officer"
flags_startup_parameters = ROLE_ADD_TO_DEFAULT
gear_preset = /datum/equipment_preset/uscm_ship/dp
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>Your job is to fly, protect, and maintain the ship's transport dropship.</a> While you are an officer, your authority is limited to the dropship, where you have authority over the enlisted personnel. If you are not piloting, there is an autopilot fallback for command, but don't leave the dropship without reason."

// Dropship Roles is both DP, GP and DCC combined to not force people to backtrack
AddTimelock(/datum/job/command/pilot/dropship_pilot, list(
JOB_DROPSHIP_ROLES = 2 HOURS
))

/obj/effect/landmark/start/pilot/dropship_pilot
name = JOB_DROPSHIP_PILOT
icon_state = "po_spawn"
job = /datum/job/command/pilot/dropship_pilot
20 changes: 0 additions & 20 deletions code/game/jobs/job/command/auxiliary/pilot.dm

This file was deleted.

Loading

0 comments on commit 6c68c61

Please sign in to comment.