Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into liaison-drip
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Jun 27, 2023
2 parents ff8d4cd + f173b79 commit 78227e8
Show file tree
Hide file tree
Showing 161 changed files with 19,165 additions and 1,134 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@
// Used for smothering fires upon weather event start/stop
#define COMSIG_GLOB_WEATHER_CHANGE "!weather_event_changed"

/// From /obj/structure/machinery/telecomms/proc/tcomms_shutdown(), called when the relay turns off
#define COMSIG_GLOB_GROUNDSIDE_TELECOMM_TURNED_OFF "!groundside_telecomm_turned_off"

/// From /datum/admins/proc/force_predator_round()
#define COMSIG_GLOB_PREDATOR_ROUND_TOGGLED "!predator_round_toglged"
2 changes: 1 addition & 1 deletion code/__DEFINES/defenses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Defines for barricade upgrades
#define BARRICADE_UPGRADE_BURN "Biohazard Upgrade (+Burn)"
#define BARRICADE_UPGRADE_BRUTE "Reinforced Upgrade (+Brute)"
#define BARRICADE_UPGRADE_EXPLOSIVE "Explosive Upgrade (+Explosive)"
#define BARRICADE_UPGRADE_ANTIFF "Composite Upgrade (++Explosive, ++Projectile, ++Fire)"

// Defines for defense stats
#define DEFENSE_FUNCTIONAL 0
Expand Down
9 changes: 5 additions & 4 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,24 +163,25 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
//------------------------------------

//-------- PMC --------//
#define JOB_PMC "PMC Standard"
#define JOB_PMC_STANDARD "Weyland-Yutani PMC (Standard)"
#define JOB_PMC_ENGINEER "PMC Corporate Technician"
#define JOB_PMC_MEDIC "PMC Corporate Medic"
#define JOB_PMC_DOCTOR "PMC Trauma Surgeon"
#define JOB_PMC_INVESTIGATOR "PMC Medical Investigator"
#define JOB_PMC_DETAINER "Weyland-Yutani PMC (Detainer)"
#define JOB_PMC_ELITE "PMC Elite"
#define JOB_PMC_GUNNER "PMC Support Weapons Specialist" //Renamed from Specialist to Support Specialist as it only has SG skills.
#define JOB_PMC_SNIPER "PMC Weapons Specialist" //Renamed from Sharpshooter to specialist as it uses specialist skills.
#define JOB_PMC_CREWMAN "PMC Crewman"
#define JOB_PMC_CREWMAN "Weyland-Yutani PMC (Crewman)"
#define JOB_PMC_NINJA "PMC Ninja"
#define JOB_PMC_XENO_HANDLER "PMC Xeno Handler"
#define JOB_PMC_COMMANDO "PMC Commando"
#define JOB_PMC_LEADER "PMC Leader"
#define JOB_PMC_LEAD_INVEST "PMC Lead Investigator"
#define JOB_PMC_DIRECTOR "PMC Site Director"
#define JOB_PMC_SYNTH "PMC Support Synthetic"
#define JOB_PMC_SYNTH "PMC Support Synthetic"

#define JOB_PMC_GRUNT_LIST list(JOB_PMC, JOB_PMC_ENGINEER, JOB_PMC_MEDIC, JOB_PMC_INVESTIGATOR, JOB_PMC_ELITE, JOB_PMC_GUNNER, JOB_PMC_SNIPER, JOB_PMC_CREWMAN, JOB_PMC_NINJA, JOB_PMC_XENO_HANDLER, JOB_PMC_COMMANDO, JOB_PMC_LEADER, JOB_PMC_LEAD_INVEST)
#define JOB_PMC_GRUNT_LIST list(JOB_PMC_STANDARD, JOB_PMC_ENGINEER, JOB_PMC_MEDIC, JOB_PMC_INVESTIGATOR, JOB_PMC_DETAINER, JOB_PMC_ELITE, JOB_PMC_GUNNER, JOB_PMC_SNIPER, JOB_PMC_CREWMAN, JOB_PMC_NINJA, JOB_PMC_XENO_HANDLER, JOB_PMC_COMMANDO, JOB_PMC_LEADER, JOB_PMC_LEAD_INVEST)

//-------- WY --------//

Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#define OVEREAT_TIME 200

//=================================================
#define ALIEN_SELECT_AFK_BUFFER 1 // How many minutes that a person can be AFK before not being allowed to be an alien.

#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point
Expand Down
11 changes: 8 additions & 3 deletions code/__DEFINES/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,16 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse
#define CLEANABLE_MISC "misc" //Anything else

//For nuke announcements
#define NUKE_SHOW_TIMER_TEN_SEC 1
#define NUKE_SHOW_TIMER_MINUTE 2
#define NUKE_SHOW_TIMER_HALF 4
#define NUKE_SHOW_TIMER_TEN_SEC (1<<0)
#define NUKE_SHOW_TIMER_MINUTE (1<<1)
#define NUKE_SHOW_TIMER_HALF (1<<2)
#define NUKE_SHOW_TIMER_ALL (NUKE_SHOW_TIMER_TEN_SEC|NUKE_SHOW_TIMER_MINUTE|NUKE_SHOW_TIMER_HALF)

#define NUKE_DECRYPT_SHOW_TIMER_COMPLETE (1<<3)
#define NUKE_DECRYPT_SHOW_TIMER_MINUTE (1<<4)
#define NUKE_DECRYPT_SHOW_TIMER_HALF (1<<5)
#define NUKE_DECRYPT_SHOW_TIMER_ALL (NUKE_SHOW_TIMER_TEN_SEC|NUKE_SHOW_TIMER_HALF|NUKE_DECRYPT_SHOW_TIMER_COMPLETE|NUKE_DECRYPT_SHOW_TIMER_MINUTE|NUKE_DECRYPT_SHOW_TIMER_HALF)

//For recipes
#define ONE_TYPE_PER_TURF 1
#define ONE_TYPE_PER_BORDER 2
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@

//pilot skill, hidden
#define SKILL_PILOT_DEFAULT 0
#define SKILL_PILOT_TRAINED 1 // DCC, Synth
#define SKILL_PILOT_EXPERT 2 // Pilot
#define SKILL_PILOT_TRAINED 1 // DCC
#define SKILL_PILOT_EXPERT 2 // Pilot, Synth
#define SKILL_PILOT_MAX 2

//Navigations skill - for seting orbital alt
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/urls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#define URL_WIKI_MST_GUIDE "https://cm-ss13.com/wiki/Mess_Technician"
#define URL_WIKI_CL_GUIDE "https://cm-ss13.com/wiki/Corporate_Liaison" // Misc //
#define URL_WIKI_SURV_GUIDE "https://cm-ss13.com/wiki/Survivor"
#define URL_WIKI_WJ_GUIDE "https://cm-ss13.com/wiki/Seegson_Working_Joe_Manual"

// ------ FORUM LINKS ------ //
#define URL_FORUM "https://forum.cm-ss13.com/"
Expand Down
16 changes: 16 additions & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,22 @@
#define WEED_BASE_GROW_SPEED (5 SECONDS)
#define WEED_BASE_DECAY_SPEED (10 SECONDS)

/// The time you must be dead to join as a xeno larva
#define XENO_JOIN_DEAD_LARVA_TIME (2.5 MINUTES)
/// The time you must be dead to join as xeno (not larva)
#define XENO_JOIN_DEAD_TIME (5 MINUTES)
/// The time of inactivity you cannot exceed to join as a xeno
#define XENO_JOIN_AFK_TIME_LIMIT (5 MINUTES)
/// The amount of time after round start before buried larva spawns are disallowed
#define XENO_BURIED_LARVA_TIME_LIMIT (30 MINUTES)

/// The time against away_timer when an AFK xeno larva can be replaced
#define XENO_LEAVE_TIMER_LARVA 80 //80 seconds
/// The time against away_timer when an AFK xeno (not larva) can be replaced
#define XENO_LEAVE_TIMER 300 //300 seconds
/// The time against away_timer when an AFK xeno gets listed in the available list so ghosts can get ready
#define XENO_AVAILABLE_TIMER 60 //60 seconds

/// Between 2% to 10% of explosion severity
#define WEED_EXPLOSION_DAMAGEMULT rand(2, 10)*0.01

Expand Down
4 changes: 0 additions & 4 deletions code/__HELPERS/_time.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@

#define DECISECONDS_TO_HOURS /36000

#define XENO_LEAVE_TIMER_LARVA 80 //80 seconds
#define XENO_LEAVE_TIMER 300 //300 seconds
#define XENO_AVAILABLE_TIMER 60 //60 seconds, when to add a xeno to the avaliable list so ghosts can get ready

var/midnight_rollovers = 0
var/rollovercheck_last_timeofday = 0

Expand Down
9 changes: 9 additions & 0 deletions code/__HELPERS/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,12 @@ var/atom/cmp_dist_origin=null

/proc/cmp_typepaths_asc(A, B)
return sorttext("[B]","[A]")

/// Compares mobs based on their timeofdeath value in ascending order
/proc/cmp_mob_deathtime_asc(mob/A, mob/B)
return A.timeofdeath - B.timeofdeath

/// Compares observers based on their larva_queue_time value in ascending order
/// Assumes the client on the observer is not null
/proc/cmp_obs_larvaqueuetime_asc(mob/dead/observer/A, mob/dead/observer/B)
return A.client.larva_queue_time - B.client.larva_queue_time
5 changes: 0 additions & 5 deletions code/__HELPERS/files.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@

return text

//Sends resource files to client cache
/client/proc/getFiles()
for(var/file in args)
src << browse_rsc(file)

/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list(".txt",".log",".htm"))
var/path = root

Expand Down
61 changes: 48 additions & 13 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,35 +241,70 @@
else
return get_step(start, EAST)

// Same as above but for alien candidates.
/proc/get_alien_candidates()
/// Get a list of observers that can be alien candidates, optionally sorted by larva_queue_time
/proc/get_alien_candidates(sorted = TRUE)
var/list/candidates = list()

for(var/i in GLOB.observer_list)
var/mob/dead/observer/O = i
for(var/mob/dead/observer/cur_obs as anything in GLOB.observer_list)
// Preference check
if(!cur_obs.client || !cur_obs.client.prefs || !(cur_obs.client.prefs.be_special & BE_ALIEN_AFTER_DEATH))
continue

// Jobban check
if(!O.client || !O.client.prefs || !(O.client.prefs.be_special & BE_ALIEN_AFTER_DEATH) || jobban_isbanned(O, JOB_XENOMORPH))
if(jobban_isbanned(cur_obs, JOB_XENOMORPH))
continue

//players that can still be revived are skipped
if(O.mind && O.mind.original && ishuman(O.mind.original))
var/mob/living/carbon/human/H = O.mind.original
if (H.check_tod() && H.is_revivable())
if(cur_obs.mind && cur_obs.mind.original && ishuman(cur_obs.mind.original))
var/mob/living/carbon/human/cur_human = cur_obs.mind.original
if(cur_human.check_tod() && cur_human.is_revivable())
continue

// copied from join as xeno
var/deathtime = world.time - O.timeofdeath
if(deathtime < 3000 && ( !O.client.admin_holder || !(O.client.admin_holder.rights & R_ADMIN)) )
var/deathtime = world.time - cur_obs.timeofdeath
if(deathtime < XENO_JOIN_DEAD_TIME && ( !cur_obs.client.admin_holder || !(cur_obs.client.admin_holder.rights & R_ADMIN)) )
continue

// Admins and AFK players cannot be drafted
if(O.client.inactivity / 600 > ALIEN_SELECT_AFK_BUFFER + 5 || (O.client.admin_holder && (O.client.admin_holder.rights & R_MOD)) && O.adminlarva == 0)
// AFK players cannot be drafted
if(cur_obs.client.inactivity > XENO_JOIN_AFK_TIME_LIMIT)
continue

candidates += O
// Mods with larva protection cannot be drafted
if((cur_obs.client.admin_holder && (cur_obs.client.admin_holder.rights & R_MOD)) && !cur_obs.adminlarva)
continue

candidates += cur_obs

// Optionally sort by larva_queue_time
if(sorted && length(candidates))
candidates = sort_list(candidates, GLOBAL_PROC_REF(cmp_obs_larvaqueuetime_asc))

return candidates

/**
* Messages observers that are currently candidates an update on the queue.
*
* Arguments:
* * candidates - The list of observers from get_alien_candidates()
* * dequeued - How many candidates to skip messaging because they were dequeued
* * cache_only - Whether to not actually send a to_chat message and instead only update larva_queue_cached_message
*/
/proc/message_alien_candidates(list/candidates, dequeued, cache_only = FALSE)
var/new_players = 0
for(var/i in (1 + dequeued) to candidates.len)
var/mob/dead/observer/cur_obs = candidates[i]

// Generate the messages
var/cached_message = SPAN_XENONOTICE("You are currently [i-dequeued]\th in the larva queue. There are [new_players] ahead of you that have yet to play this round.")
cur_obs.larva_queue_cached_message = cached_message
if(!cache_only)
var/chat_message = dequeued ? replacetext(cached_message, "currently", "now") : cached_message
to_chat(candidates[i], chat_message)

// Count how many are prioritized
if(cur_obs.client.larva_queue_time < 2) // 0 and 1 because facehuggers/t-domers are slightly deprioritized
new_players++

/proc/convert_k2c(temp)
return ((temp - T0C))

Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ GLOBAL_LIST_EMPTY_TYPED(alive_human_list, /mob/living/carbon/human) // list of a
GLOBAL_LIST_EMPTY_TYPED(xeno_mob_list, /mob/living/carbon/xenomorph)
GLOBAL_LIST_EMPTY_TYPED(living_xeno_list, /mob/living/carbon/xenomorph)
GLOBAL_LIST_EMPTY_TYPED(xeno_cultists, /mob/living/carbon/human)
GLOBAL_LIST_EMPTY_TYPED(player_embryo_list, /obj/item/alien_embryo)

GLOBAL_LIST_EMPTY_TYPED(hellhound_list, /mob/living/carbon/xenomorph/hellhound)
GLOBAL_LIST_EMPTY_TYPED(zombie_list, /mob/living/carbon/human)
Expand Down
4 changes: 3 additions & 1 deletion code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@
return

// Click handled elsewhere. (These clicks are not affected by the next_move cooldown)
if (click(A, mods) || A.clicked(src, mods, location, params))
if(click(A, mods))
return
if(A.clicked(src, mods, location, params))
return

// Default click functions from here on.
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
return FALSE

var/deathtime = world.time - timeofdeath
if(deathtime < 2.5 MINUTES)
if(deathtime < XENO_JOIN_DEAD_LARVA_TIME)
var/message = "You have been dead for [DisplayTimeText(deathtime)]."
message = SPAN_WARNING("[message]")
to_chat(src, message)
to_chat(src, SPAN_WARNING("You must wait 2.5 minutes before rejoining the game!"))
to_chat(src, SPAN_WARNING("You must wait atleast 2.5 minutes before rejoining the game!"))
ManualFollow(target)
return FALSE

Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
Have no reason to click on anything at all.
*/
/mob/new_player/click()
return 1
return
2 changes: 1 addition & 1 deletion code/_onclick/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ so that it doesn't double up on the delays) so that it applies the delay immedia
return TRUE

if(next_move >= world.time)
return TRUE
return FALSE

return ..()

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/configuration/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Voting

// Gamemode to auto-switch to at the start of the round
/datum/config_entry/string/gamemode_default
config_entry_value = "extended"
config_entry_value = "Extended"

// Rounds needed for gamemode vote
/datum/config_entry/number/gamemode_rounds_needed
Expand Down
14 changes: 14 additions & 0 deletions code/controllers/subsystem/assets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ SUBSYSTEM_DEF(assets)
var/list/preload = list()
var/datum/asset_transport/transport = new()

/datum/controller/subsystem/assets/OnConfigLoad()
var/newtransporttype = /datum/asset_transport
switch (CONFIG_GET(string/asset_transport))
if ("webroot")
newtransporttype = /datum/asset_transport/webroot

if (newtransporttype == transport.type)
return

var/datum/asset_transport/newtransport = new newtransporttype ()
if (newtransport.validate_config())
transport = newtransport
transport.Load()

/datum/controller/subsystem/assets/Initialize()
for(var/type in typesof(/datum/asset))
var/datum/asset/A = type
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ SUBSYSTEM_DEF(ticker)

for(var/mob/living/carbon/human/player in GLOB.human_mob_list)
if(player.mind)
if(player.job == "Commanding Officers")
if(player.job == JOB_CO)
captainless = FALSE
if(player.job)
RoleAuthority.equip_role(player, RoleAuthority.roles_by_name[player.job], late_join = FALSE)
Expand Down
8 changes: 4 additions & 4 deletions code/datums/effects/neurotoxin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
/// Stamina damage per tick. Major balance number.
var/stam_dam = 7

/datum/effects/neurotoxin/New(atom/thing)
..(thing)
cause_data = create_cause_data("neurotoxic gas")
/datum/effects/neurotoxin/New(atom/thing, mob/from = null)
..(thing, from, effect_name)

/datum/effects/neurotoxin/validate_atom(atom/thing)
if(isxeno(thing) || isobj(thing))
Expand All @@ -36,9 +35,10 @@
var/mob/living/carbon/affected_mob = affected_atom
if(!.)
return FALSE
if(affected_mob.stat)
if(affected_mob.stat == DEAD)
return
// General effects
affected_mob.last_damage_data = cause_data
affected_mob.apply_stamina_damage(stam_dam)
affected_mob.make_dizzy(12)

Expand Down
8 changes: 4 additions & 4 deletions code/datums/elements/bloody_feet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
H.bloody_footsteps = steps_to_take
LAZYADD(entered_bloody_turf, target)

RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
RegisterSignal(target, COMSIG_HUMAN_BLOOD_CROSSED, PROC_REF(blood_crossed))
RegisterSignal(target, COMSIG_HUMAN_CLEAR_BLOODY_FEET, PROC_REF(clear_blood))
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved), override = TRUE)
RegisterSignal(target, COMSIG_HUMAN_BLOOD_CROSSED, PROC_REF(blood_crossed), override = TRUE)
RegisterSignal(target, COMSIG_HUMAN_CLEAR_BLOODY_FEET, PROC_REF(clear_blood), override = TRUE)
if(shoes)
LAZYSET(target_shoes, target, shoes)
RegisterSignal(shoes, COMSIG_ITEM_DROPPED, PROC_REF(on_shoes_removed))
RegisterSignal(shoes, COMSIG_ITEM_DROPPED, PROC_REF(on_shoes_removed), override = TRUE)

if(dry_time)
addtimer(CALLBACK(src, PROC_REF(clear_blood), target), dry_time)
Expand Down
Loading

0 comments on commit 78227e8

Please sign in to comment.