Skip to content

Commit

Permalink
Merge branch 'master' into tacmap-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Cthulhu80 committed Jul 20, 2023
2 parents 18f1080 + aa43981 commit f54cb6e
Show file tree
Hide file tree
Showing 313 changed files with 38,415 additions and 26,001 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ var/global/list/note_categories = list("Admin", "Merit", "Commanding Officer", "
#define ANTIGRIEF_NEW_PLAYERS 1
/// Enables antigrief entirely: Nobody can activate explosives on the Almayer, unless the ship crashed.
#define ANTIGRIEF_ENABLED 2

/// Proc has been blocked by IsAdminAdvancedProcCall()
#define PROC_BLOCKED "PROCCALL BLOCKED"
1 change: 1 addition & 0 deletions code/__DEFINES/client_prefs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define TOGGLE_VEND_ITEM_TO_HAND (1<<15) // This toggles whether items from vendors will be automatically put into your hand.
#define TOGGLE_START_JOIN_CURRENT_SLOT (1<<16) // Whether joining at roundstart ignores assigned character slot for the job and uses currently selected slot.
#define TOGGLE_LATE_JOIN_CURRENT_SLOT (1<<17) //Whether joining during the round ignores assigned character slot for the job and uses currently selected slot.
#define TOGGLE_ABILITY_DEACTIVATION_OFF (1<<18) // This toggles whether selecting the same ability again can toggle it off

#define JOB_SLOT_RANDOMISED_SLOT -1
#define JOB_SLOT_CURRENT_SLOT 0
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@

// human armor
#define CLOTHING_ARMOR_NONE 0
#define CLOTHING_ARMOR_VERYLOW 5
#define CLOTHING_ARMOR_LOW 10
#define CLOTHING_ARMOR_MEDIUMLOW 15
#define CLOTHING_ARMOR_MEDIUM 20
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

/// From /obj/effect/alien/weeds/Initialize()
#define COMSIG_WEEDNODE_GROWTH_COMPLETE "weednode_growth_complete"
/// From /obj/effect/alien/weeds/Initialize()
#define COMSIG_WEEDNODE_GROWTH "weednode_growth"
/// From /obj/effect/alien/weeds/proc/on_weed_expand()
#define COMSIG_WEEDNODE_CANNOT_EXPAND_FURTHER "weednode_cannot_expand_further"

Expand All @@ -24,3 +26,6 @@
#define COMSIG_TRANSMITTER_UPDATE_ICON "transmitter_update_icon"

#define COMSIG_TENT_COLLAPSING "tent_collapsing"

/// from /obj/proc/afterbuckle()
#define COSMIG_OBJ_AFTER_BUCKLE "signal_obj_after_buckle"
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@

// from /datum/emergency_call/proc/spawn_candidates()
#define COMSIG_ERT_SETUP "ert_setup"

// from /proc/update_living_queens() : /mob/living/carbon/xenomorph/queen
#define COMSIG_HIVE_NEW_QUEEN "hive_new_queen"
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 @@ -53,3 +53,6 @@

/// From /datum/admins/proc/force_predator_round()
#define COMSIG_GLOB_PREDATOR_ROUND_TOGGLED "!predator_round_toglged"

/// From /datum/game_mode/colonialmarines/proc/check_ground_humans()
#define COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING "!groundside_forsaken_handling"
1 change: 1 addition & 0 deletions code/__DEFINES/sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#define AMBIENCE_ALMAYER 'sound/ambience/almayerambience.ogg'
#define AMBIENCE_LV624 'sound/ambience/ambienceLV624.ogg'
#define AMBIENCE_BIGRED 'sound/ambience/desert.ogg'
#define AMBIENCE_NV 'sound/ambience/ambienceNV.ogg'
#define AMBIENCE_PRISON 'sound/ambience/shipambience.ogg'
#define AMBIENCE_TRIJENT 'sound/ambience/desert.ogg'

Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/speech_channels.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
#define ME_CHANNEL "Me"
#define OOC_CHANNEL "OOC"
#define LOOC_CHANNEL "LOOC"
#define MOD_CHANNEL "MSAY"
#define ADMIN_CHANNEL "ASAY"
#define MENTOR_CHANNEL "Mentor"
2 changes: 1 addition & 1 deletion code/__DEFINES/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tgstation-server DMAPI

#define TGS_DMAPI_VERSION "6.5.0"
#define TGS_DMAPI_VERSION "6.5.2"

// All functions and datums outside this document are subject to change with any version and should not be relied on.

Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/// Creates a message packet for sending via output()
// This is {"type":type,"payload":payload}, but pre-encoded. This is much faster
// than doing it the normal way.
// To ensure this is correct, this is unit tested in tgui_create_message. However, CM does not have unit tests available.
// To ensure this is correct, this is unit tested in tgui_create_message.
#define TGUI_CREATE_MESSAGE(type, payload) ( \
"%7b%22type%22%3a%22[type]%22%2c%22payload%22%3a[url_encode(json_encode(payload))]%7d" \
)
Expand Down
10 changes: 8 additions & 2 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
#define TRAIT_SUPER_STRONG "t_super_strong"
/// Foreign biology. Basic medHUDs won't show the mob. (Yautja, Zombies)
#define TRAIT_FOREIGN_BIO "t_foreign_bio"
/// Eye color changes on intent. (G1 Synths)
/// Eye color changes on intent. (G1 Synths and WJs)
#define TRAIT_INTENT_EYES "t_intent_eyes"
/// Masked synthetic biology. Basic medHUDs will percieve the mob as human. (Infiltrator Synths)
#define TRAIT_INFILTRATOR_SYNTH "t_infiltrator_synth"
Expand Down Expand Up @@ -157,6 +157,8 @@
#define TRAIT_LEADERSHIP "t_leadership"
/// If the mob can see the reagents contents of stuff
#define TRAIT_REAGENT_SCANNER "reagent_scanner"
/// If the mob cannot eat/be fed
#define TRAIT_CANNOT_EAT "t_cannot_eat"
/// If the mob is being lazed by a sniper spotter
#define TRAIT_SPOTTER_LAZED "t_spotter_lazed"
/// If the mob has ear protection. Protects from external ear damage effects. Includes explosions, firing the RPG, screeching DEAFNESS only, and flashbangs.
Expand All @@ -179,6 +181,8 @@
#define TRAIT_ABILITY_NO_PLASMA_TRANSFER "t_ability_no_plasma_transfer"
/// Shows that the xeno queen is on ovi
#define TRAIT_ABILITY_OVIPOSITOR "t_ability_ovipositor"
/// Used for burrowed mobs, prevent's SG/sentrys/claymores from autofiring
#define TRAIT_ABILITY_BURROWED "t_ability_burrowed"

//-- item traits --
// TOOL TRAITS
Expand Down Expand Up @@ -231,7 +235,8 @@ GLOBAL_LIST_INIT(mob_traits, list(
TRAIT_TWOBORE_TRAINING,
TRAIT_LEADERSHIP,
TRAIT_DEXTROUS,
TRAIT_REAGENT_SCANNER
TRAIT_REAGENT_SCANNER,
TRAIT_ABILITY_BURROWED
))

/*
Expand Down Expand Up @@ -261,6 +266,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_BIMEX" = TRAIT_BIMEX,
"TRAIT_EMOTE_CD_EXEMPT" = TRAIT_EMOTE_CD_EXEMPT,
"TRAIT_LISPING" = TRAIT_LISPING,
"TRAIT_CANNOT_EAT" = TRAIT_CANNOT_EAT,
),
/mob/living/carbon/xenomorph = list(
"TRAIT_ABILITY_NO_PLASMA_TRANSFER" = TRAIT_ABILITY_NO_PLASMA_TRANSFER,
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/weather.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#define PROB_WEATHER_SOROKYNE 100 //Map specific defines go here.
#define PROB_WEATHER_BIG_RED 30
#define PROB_WEATHER_LV624 30
#define PROB_WEATHER_NEW_VARADERO 100

#define WEATHER_TYPE_NO_WEATHER 0
#define WEATHER_TYPE_SNOW 1
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/wj_emotes.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#define JOE_EMOTE_CATEGORY_GREETING "Greeting"
#define JOE_EMOTE_CATEGORY_TASK_UPDATE "Task Update"
#define JOE_EMOTE_CATEGORY_RESTRICTED_AREA "Restricted Area"
#define JOE_EMOTE_CATEGORY_FAREWELL "Farewell"
#define JOE_EMOTE_CATEGORY_QUIP "Quip"
#define JOE_EMOTE_CATEGORY_WARNING "Warning"
#define JOE_EMOTE_CATEGORY_QUESTION "Question"
#define JOE_EMOTE_CATEGORY_NOTICE "Notice"
3 changes: 3 additions & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
// Weed defines
#define WEED_LEVEL_WEAK 0
#define WEED_LEVEL_STANDARD 1.5
#define WEED_LEVEL_HARDY 1.6
#define WEED_LEVEL_HIVE 4

#define WEED_RANGE_STANDARD 3
Expand Down Expand Up @@ -167,6 +168,8 @@
#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 facehugger converts to a npc
#define XENO_FACEHUGGER_LEAVE_TIMER 420 //420 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

Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ var/atom/cmp_dist_origin=null
/// 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
return A.client.player_details.larva_queue_time - B.client.player_details.larva_queue_time
26 changes: 18 additions & 8 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,14 @@
else
return get_step(start, EAST)

/// Get a list of observers that can be alien candidates, optionally sorted by larva_queue_time
/proc/get_alien_candidates(sorted = TRUE)
/**
* Get a list of observers that can be alien candidates.
*
* Arguments:
* * hive - The hive we're filling a slot for to check if the player is banished
* * sorted - Whether to sort by larva_queue_time (default TRUE) or leave unsorted
*/
/proc/get_alien_candidates(datum/hive_status/hive = null, sorted = TRUE)
var/list/candidates = list()

for(var/mob/dead/observer/cur_obs as anything in GLOB.observer_list)
Expand Down Expand Up @@ -273,6 +279,15 @@
if((cur_obs.client.admin_holder && (cur_obs.client.admin_holder.rights & R_MOD)) && !cur_obs.adminlarva)
continue

if(hive)
var/banished = FALSE
for(var/mob_name in hive.banished_ckeys)
if(hive.banished_ckeys[mob_name] == cur_obs.ckey)
banished = TRUE
break
if(banished)
continue

candidates += cur_obs

// Optionally sort by larva_queue_time
Expand All @@ -290,21 +305,16 @@
* * 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.")
var/cached_message = SPAN_XENONOTICE("You are currently [i-dequeued]\th in the larva queue.")
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: 0 additions & 1 deletion code/__HELPERS/type2type.dm
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@
if(rights & R_POSSESS) . += "[seperator]+POSSESS"
if(rights & R_PERMISSIONS) . += "[seperator]+PERMISSIONS"
if(rights & R_STEALTH) . += "[seperator]+STEALTH"
if(rights & R_REJUVINATE) . += "[seperator]+REJUVINATE"
if(rights & R_COLOR) . += "[seperator]+COLOR"
if(rights & R_VAREDIT) . += "[seperator]+VAREDIT"
if(rights & R_SOUNDS) . += "[seperator]+SOUND"
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/verb_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if(!target)
CRASH("add_verb called without a target")
if(IsAdminAdvancedProcCall())
return
return PROC_BLOCKED
var/mob/mob_target = null

if(ismob(target))
Expand Down Expand Up @@ -56,7 +56,7 @@
*/
/proc/remove_verb(client/target, verb_or_list_to_remove)
if(IsAdminAdvancedProcCall())
return
return PROC_BLOCKED

var/mob/mob_target = null
if(ismob(target))
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ DEFINE_BITFIELD(rights, list(
"POSSESS" = R_POSSESS,
"PERMISSIONS" = R_PERMISSIONS,
"STEALTH" = R_STEALTH,
"REJUVENATE" = R_REJUVINATE,
"COLOR" = R_COLOR,
"VAREDIT" = R_VAREDIT,
"SOUNDS" = R_SOUNDS,
Expand Down
16 changes: 10 additions & 6 deletions code/controllers/configuration/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

/datum/controller/configuration/proc/admin_reload()
if(IsAdminAdvancedProcCall())
return
alert_proccall("configuration admin_reload")
return PROC_BLOCKED
log_admin("[key_name(usr)] has forcefully reloaded the configuration from disk.")
message_admins("[key_name_admin(usr)] has forcefully reloaded the configuration from disk.")
full_wipe()
Expand All @@ -33,7 +34,8 @@

/datum/controller/configuration/proc/Load(_directory)
if(IsAdminAdvancedProcCall()) //If admin proccall is detected down the line it will horribly break everything.
return
alert_proccall("configuration Load")
return PROC_BLOCKED
if(_directory)
directory = _directory
if(entries)
Expand Down Expand Up @@ -117,7 +119,8 @@

/datum/controller/configuration/proc/full_wipe()
if(IsAdminAdvancedProcCall())
return
alert_proccall("configuration full_wipe")
return PROC_BLOCKED
entries_by_type.Cut()
QDEL_LIST_ASSOC_VAL(entries)
entries = null
Expand Down Expand Up @@ -163,7 +166,8 @@

/datum/controller/configuration/proc/LoadEntries(filename, list/stack = list())
if(IsAdminAdvancedProcCall())
return
alert_proccall("configuration LoadEntries")
return PROC_BLOCKED

var/filename_to_test = world.system_type == MS_WINDOWS ? lowertext(filename) : filename
if(filename_to_test in stack)
Expand Down Expand Up @@ -264,7 +268,7 @@
CRASH("Missing config entry for [entry_type]!")
if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]")
return
return PROC_BLOCKED
return E.config_entry_value


Expand All @@ -278,7 +282,7 @@
CRASH("Missing config entry for [entry_type]!")
if((E.protection & CONFIG_ENTRY_LOCKED) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Set" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
log_admin_private("Config rewrite of [entry_type] to [new_val] attempted by [key_name(usr)]")
return
return PROC_BLOCKED
return E.ValidateAndSet("[new_val]")


Expand Down
5 changes: 5 additions & 0 deletions code/controllers/configuration/entries/game_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,8 @@
/datum/config_entry/number/extra_larva_per_burst
config_entry_value = 1
integer = FALSE

/datum/config_entry/number/embryo_burst_timer
min_val = 1
config_entry_value = 450
integer = TRUE
2 changes: 1 addition & 1 deletion code/controllers/subsystem/x_evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define EVOLUTION_INCREMENT_TIME (30 MINUTES) // Evolution increases by 1 every 25 minutes.

SUBSYSTEM_DEF(xevolution)
name = "Evilution"
name = "Evilution" //This is not a typo, do not change it.
wait = 1 MINUTES
priority = SS_PRIORITY_INACTIVITY

Expand Down
11 changes: 8 additions & 3 deletions code/datums/components/footstep.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@
var/falloff
///This can be a list OR a soundfile OR null. Determines whatever sound gets played.
var/footstep_sounds
var/drag_sounds

/datum/component/footstep/Initialize(steps_ = 2, volume_ = 50, range_ = null, falloff_ = 1, footstep_sounds_ = "alien_footstep_large")
/datum/component/footstep/Initialize(steps_ = 2, volume_ = 50, range_ = null, falloff_ = 1, footstep_sounds_ = "alien_footstep_large", drag_sounds_ = 'sound/effects/alien_dragsound_large.ogg')
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
steps = steps_
volume = volume_
range = range_
falloff = falloff_
footstep_sounds = footstep_sounds_
drag_sounds = drag_sounds_

RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), PROC_REF(play_simplestep))

Expand All @@ -31,7 +33,7 @@
return

var/mob/living/LM = parent
if(LM.buckled || LM.lying || LM.throwing || LM.is_ventcrawling)
if(LM.buckled || LM.throwing || LM.is_ventcrawling || LM.stat == DEAD)
return

if(LM.life_steps_total % steps)
Expand All @@ -44,5 +46,8 @@
var/turf/open/T = prepare_step()
if(!T)
return
if(isfile(footstep_sounds) || istext(footstep_sounds))
var/mob/living/parent_mob = parent
if(parent_mob.lying && (isfile(drag_sounds) || istext(drag_sounds)))
playsound(T, drag_sounds, volume, rand(20000, 25000), range, falloff = falloff)
else if(isfile(footstep_sounds) || istext(footstep_sounds))
playsound(T, footstep_sounds, volume, rand(20000, 25000), range, falloff = falloff)
Loading

0 comments on commit f54cb6e

Please sign in to comment.