Skip to content

Commit

Permalink
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/t…
Browse files Browse the repository at this point in the history
…echs
  • Loading branch information
realforest2001 committed Mar 21, 2024
2 parents c0645ab + 3b6470c commit eef1fe3
Show file tree
Hide file tree
Showing 144 changed files with 11,610 additions and 4,255 deletions.
30 changes: 8 additions & 22 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,16 @@ jobs:

odlint:
name: Lint with OpenDream
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Get OpenDream Version
run: |
source dependencies.sh
echo "OPENDREAM_VERSION=$OPENDREAM_VERSION" >> $GITHUB_ENV
- name: Restore OpenDream cache
uses: actions/cache@v3
id: cache-od
- uses: actions/checkout@v4
- uses: robinraju/[email protected]
with:
path: ~/OpenDream
key: ${{ runner.os }}-opendream-${{ env.OPENDREAM_VERSION }}
- name: Download OpenDream
if: steps.cache-od.outputs.cache-hit != 'true'
run: |
bash tools/ci/download_od.sh
- name: Setup OpenDream
if: steps.cache-od.outputs.cache-hit != 'true'
run: |
bash tools/ci/setup_od.sh
- name: Run OpenDream
run: |
bash tools/ci/run_od.sh
repository: "OpenDreamProject/OpenDream"
tag: "latest"
fileName: "DMCompiler_linux-x64.tar.gz"
extract: true
- run: ./DMCompiler_linux-x64/DMCompiler --suppress-unimplemented colonialmarines.dme

compile_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
#define SOUND_ADMIN_MEME (1<<6)
#define SOUND_ADMIN_ATMOSPHERIC (1<<7)
#define SOUND_ARES_MESSAGE (1<<8)
#define SOUND_OBSERVER_ANNOUNCEMENTS (1<<9)

//toggles_chat
#define CHAT_OOC (1<<0)
Expand Down Expand Up @@ -156,7 +157,7 @@

#define TOGGLES_LANGCHAT_DEFAULT (LANGCHAT_SEE_EMOTES)

#define TOGGLES_SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_INTERNET|SOUND_ADMIN_MEME|SOUND_ADMIN_ATMOSPHERIC)
#define TOGGLES_SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_INTERNET|SOUND_ADMIN_MEME|SOUND_ADMIN_ATMOSPHERIC|SOUND_OBSERVER_ANNOUNCEMENTS)

#define TOGGLES_FLASHING_DEFAULT (FLASH_ROUNDSTART|FLASH_ROUNDEND|FLASH_CORPSEREVIVE|FLASH_ADMINPM|FLASH_UNNEST)

Expand Down
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)
5 changes: 4 additions & 1 deletion code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
if (mods["middle"])
if (isStructure(A) && get_dist(src, A) <= 1)
var/obj/structure/S = A
S.do_climb(src, mods)
if(S.climbable)
S.do_climb(src, mods)
else if(S.can_buckle)
S.buckle_mob(src, src)
return TRUE
else if(!(isitem(A) && get_dist(src, A) <= 1) && (client && (client.prefs.toggle_prefs & TOGGLE_MIDDLE_MOUSE_SWAP_HANDS)))
swap_hand()
Expand Down
6 changes: 4 additions & 2 deletions code/controllers/subsystem/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Frequency range: 1200 to 1600
Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency, even during mapmaking)
*/

#define UNIVERSAL_FREQ 1

#define MIN_FREE_FREQ 1201 // -------------------------------------------------

//Misc channels
Expand Down Expand Up @@ -327,11 +329,11 @@ SUBSYSTEM_DEF(radio)
if(length(extra_zs))
target_zs += extra_zs
for(var/obj/structure/machinery/telecomms/T as anything in tcomm_machines_ground)
if(!length(T.freq_listening) || (frequency in T.freq_listening))
if((UNIVERSAL_FREQ in T.freq_listening) || (frequency in T.freq_listening))
target_zs += SSmapping.levels_by_trait(ZTRAIT_GROUND)
break
for(var/obj/structure/machinery/telecomms/T as anything in tcomm_machines_almayer)
if(!length(T.freq_listening) || (frequency in T.freq_listening))
if((UNIVERSAL_FREQ in T.freq_listening) || (frequency in T.freq_listening))
target_zs += SSmapping.levels_by_trait(ZTRAIT_MARINE_MAIN_SHIP)
target_zs += SSmapping.levels_by_trait(ZTRAIT_RESERVED)
break
Expand Down
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
1 change: 0 additions & 1 deletion code/datums/diseases/black_goo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@
/obj/item/reagent_container/glass/bottle/labeled_black_goo_cure
name = "\"Pathogen\" cure bottle"
desc = "The bottle has a biohazard symbol on the front, and has a label, designating its use against Agent A0-3959X.91–15, colloquially known as the \"Black Goo\"."
icon_state = "bottle20"

/obj/item/reagent_container/glass/bottle/labeled_black_goo_cure/Initialize()
. = ..()
Expand Down
3 changes: 3 additions & 0 deletions code/datums/emergency_calls/ert_stations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@

/datum/lazy_template/ert/weyland_station
map_name = "weyland_ert_station"

/datum/lazy_template/ert/pizza_station
map_name = "pizza_ert_station"
1 change: 1 addition & 0 deletions code/datums/emergency_calls/pizza.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
objectives = "Make sure you get a tip!"
shuttle_id = MOBILE_SHUTTLE_ID_ERT_SMALL
name_of_spawn = /obj/effect/landmark/ert_spawns/distress_pizza
home_base = /datum/lazy_template/ert/pizza_station
probability = 1

/datum/emergency_call/pizza/create_member(datum/mind/M, turf/override_spawn_loc)
Expand Down
16 changes: 10 additions & 6 deletions code/datums/entities/player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -455,15 +455,19 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
LAZYSET(stats, S.stat_id, S)

/datum/entity/player/proc/load_byond_account_age()
var/datum/http_request/request = new()
request.prepare(RUSTG_HTTP_METHOD_GET, "https://www.byond.com/members/[ckey]?format=text")
request.execute_blocking()
var/datum/http_response/response = request.into_response()
if(response.errored)
var/list/http_request = world.Export("http://byond.com/members/[ckey]?format=text")
if(!http_request)
log_admin("Could not check BYOND account age for [ckey] - no response from server.")
return

var/body = file2text(http_request["CONTENT"])
if(!body)
log_admin("Could not check BYOND account age for [ckey] - invalid response.")
return

var/static/regex/regex = regex("joined = \"(\\d{4}-\\d{2}-\\d{2})\"")
if(!regex.Find(response.body))
if(!regex.Find(body))
log_admin("Could not check BYOND account age for [ckey] - no valid date in response.")
return

byond_account_age = regex.group[1]
Expand Down
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
8 changes: 7 additions & 1 deletion code/datums/tutorial/_tutorial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ GLOBAL_LIST_EMPTY_TYPED(ongoing_tutorials, /datum/tutorial)
var/parent_path = /datum/tutorial
/// A dictionary of "bind_name" : "keybind_button". The inverse of `key_bindings` on a client's prefs
var/list/player_bind_dict = list()
/// If the tutorial has been completed. This doesn't need to be modified if you call end_tutorial() with a param of TRUE
var/completion_marked = FALSE

/datum/tutorial/Destroy(force, ...)
GLOB.ongoing_tutorials -= src
Expand Down Expand Up @@ -83,7 +85,7 @@ GLOBAL_LIST_EMPTY_TYPED(ongoing_tutorials, /datum/tutorial)

if(tutorial_mob)
remove_action(tutorial_mob, /datum/action/tutorial_end) // Just in case to make sure the client can't try and leave the tutorial while it's mid-cleanup
if(tutorial_mob.client?.prefs && completed)
if(tutorial_mob.client?.prefs && (completed || completion_marked))
tutorial_mob.client.prefs.completed_tutorials |= tutorial_id
tutorial_mob.client.prefs.save_character()
var/mob/new_player/new_player = new
Expand Down Expand Up @@ -210,6 +212,10 @@ GLOBAL_LIST_EMPTY_TYPED(ongoing_tutorials, /datum/tutorial)

return player_bind_dict[action_name][1]

/// When called, will make anything that ends the tutorial mark it as completed. Does not need to be called if end_tutorial(TRUE) is called instead
/datum/tutorial/proc/mark_completed()
completion_marked = TRUE

/datum/action/tutorial_end
name = "Stop Tutorial"
action_icon_state = "hologram_exit"
Expand Down
Loading

0 comments on commit eef1fe3

Please sign in to comment.