Skip to content

Commit

Permalink
Merge branch 'master' into co-1911
Browse files Browse the repository at this point in the history
  • Loading branch information
Byte-Boxer authored Jul 17, 2024
2 parents ce0f446 + de32c7d commit 7337e64
Show file tree
Hide file tree
Showing 771 changed files with 79,072 additions and 204,648 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
#define PROPERTY_NEUROSHIELDING "neuroshielding"
#define PROPERTY_ANTIADDICTIVE "anti-addictive"
#define PROPERTY_ADDICTIVE "addictive"
#define PROPERTY_ENCEPHALOPHRASIVE "encephalophrasive"
//Legendary, only in gen_tier 3+
#define PROPERTY_HYPERGENETIC "hypergenetic"
#define PROPERTY_BOOSTING "boosting"
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@

/// From /datum/action/xeno_action/proc/use_ability_wrapper(): (mob/owner)
#define COMSIG_XENO_ACTION_USED "xeno_action_used"
/// From /datum/action/xeno_action/proc/use_ability_wrapper(): (mob/owner)
#define COMSIG_XENO_PRE_ACTION_USED "xeno_pre_action_used"
/// From /datum/action/xeno_action/proc/use_ability_wrapper(): (mob/owner)
#define COMSIG_XENO_FAILED_ACTION_USED "xeno_failed_action_used"
/// From /mob/living/carbon/xenomorph/proc/check_blood_splash()
#define COMSIG_XENO_DEAL_ACID_DAMAGE "xeno_deal_acid_damage"
/// From /mob/living/carbon/xenomorph/proc/recalculate_speed()
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,5 @@
#define COMSIG_CAMERA_SET_AREA "camera_manager_set_area"
#define COMSIG_CAMERA_CLEAR "camera_manager_clear_target"
#define COMSIG_CAMERA_REFRESH "camera_manager_refresh"

#define COMSIG_PRED_BRACER_DECLOAKED "pred_bracer_decloaked"
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#define COMPONENT_CANCEL_MOVE (1<<0)
/// From /turf/open/gm/river/Entered(): (turf/open/gm/river/river, covered)
#define COMSIG_MOVABLE_ENTERED_RIVER "movable_entered_river"
/// From /atom/movable/proc/doMove: I think it only works with forceMove so watch out
#define COMSIG_MOVABLE_FORCEMOVE_PRE_CROSSED "movable_forcemove_pre_crossed"
#define COMPONENT_IGNORE_CROSS (1<<0)

///from /mob/living/carbon/xenomorph/start_pulling(): (mob/living/carbon/xenomorph/X)
#define COMSIG_MOVABLE_XENO_START_PULLING "movable_xeno_start_pulling"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#define COMSIG_ACTION_HIDDEN "action_hidden"
/// From base of /datum/action/proc/unhide_from(): (mob/owner)
#define COMSIG_ACTION_UNHIDDEN "action_unhidden"
/// From base of /datum/action/proc/action_activate() : ()
#define COMSIG_ACTION_ACTIVATED "action_activated"

///from /datum/component/bonus_damage_stack
#define COMSIG_BONUS_DAMAGE "bonus_damage"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define SQUAD_MARINE_INTEL "Intel"
#define SQUAD_SOF "SOF"
#define SQUAD_CBRN "CBRN"
#define SQUAD_FORECON "FORECON"

// Job name defines
#define JOB_SQUAD_MARINE "Rifleman"
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@
#define MATRIX_NVG 1
#define MATRIX_WIDE 2

#define RESEARCH_UPGRADE_NULL null
#define RESEARCH_UPGRADE_NOTHING_TO_PASS null
#define RESEARCH_UPGRADE_EXCLUDE_BUY -2
#define RESEARCH_UPGRADE_CATEGORY -1 //lord forgive me
#define RESEARCH_UPGRADE_ITEM 1
#define RESEARCH_UPGRADE_TIER_1 1
#define RESEARCH_UPGRADE_TIER_2 2
#define RESEARCH_UPGRADE_TIER_3 3
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#define TRACKER_LZ "track_lz"
#define TRACKER_CO "track_co"
#define TRACKER_XO "track_xo"
#define TRACKER_CMP "track_cmp"
#define TRACKER_CL "track_cl"

#define TRACKER_ASL "_asl" // Alpha Squad Leader
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -380,5 +380,6 @@ GLOBAL_LIST_INIT(default_xeno_onmob_icons, list(
#define MOBILITY_LIEDOWN (1<<8)

#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND)
#define MOBILITY_FLAGS_LYING_CAPABLE_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_LIEDOWN)
#define MOBILITY_FLAGS_CARBON_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_REST | MOBILITY_LIEDOWN)
#define MOBILITY_FLAGS_REST_CAPABLE_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_REST | MOBILITY_LIEDOWN)
3 changes: 3 additions & 0 deletions code/__DEFINES/sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
#define SOUND_ENVIRONMENT_DIZZY 24
#define SOUND_ENVIRONMENT_PSYCHOTIC 25

#define SOUND_ECHO_REVERB_ON list(0, 0, 0, 0, 0, 0.0, 0, 0.25, 1.5, 1.0, 0, 1.0, 0, 0.0, 0.0, 0.0, 1.0, 0)
#define SOUND_ECHO_REVERB_OFF list(0, 0, -10000, -10000, 0, 0.0, 0, 0.25, 1.5, 1.0, 0, 1.0, 0, 0.0, 0.0, 0.0, 1.0, 0) //-10000 to Room & RoomHF makes enviromental reverb effectively inaudible

#define AMBIENCE_SHIP 'sound/ambience/shipambience.ogg'
#define AMBIENCE_JUNGLE 'sound/ambience/ambienceLV624.ogg'
#define AMBIENCE_RIVER 'sound/ambience/ambienceriver.ogg'
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/tgs.config.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
#define TGS_WARNING_LOG(message) log_world("TGS Warn: [##message]")
#define TGS_ERROR_LOG(message) log_world("TGS Error: [##message]")
#define TGS_NOTIFY_ADMINS(event) message_admins(##event)
#define TGS_CLIENT_COUNT GLOB.clients.len
#define TGS_CLIENT_COUNT length(GLOB.clients)
#define TGS_PROTECT_DATUM(Path) GENERAL_PROTECT_DATUM(##Path)
4 changes: 4 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@
#define TRAIT_MERGED_WITH_WEEDS "merged_with_weeds"
/// Apply this to identify a mob as temporarily muted
#define TRAIT_TEMPORARILY_MUTED "temporarily_muted"
/// Mob wont get hit by stray projectiles
#define TRAIT_NO_STRAY "trait_no_stray"

// SPECIES TRAITS
/// Knowledge of Yautja technology
Expand Down Expand Up @@ -233,6 +235,8 @@
#define TRAIT_IN_TUTORIAL "t_IN_TUTORIAL"
/// If the mob is cloaked in any form
#define TRAIT_CLOAKED "t_cloaked"
/// If the mob won't drop items held in face slot when downed
#define TRAIT_IRON_TEETH "t_iron_teeth"

// -- ability traits --
/// Xenos with this trait cannot have plasma transfered to them
Expand Down
10 changes: 5 additions & 5 deletions code/__HELPERS/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
/proc/bitfield_to_list(bitfield = 0, list/wordlist)
var/list/return_list = list()
if(islist(wordlist))
var/max = min(wordlist.len, 24)
var/max = min(length(wordlist), 24)
var/bit = 1
for(var/i in 1 to max)
if(bitfield & bit)
Expand Down Expand Up @@ -148,10 +148,10 @@
* Returns TRUE if the list had nulls, FALSE otherwise
**/
/proc/list_clear_nulls(list/list_to_clear)
var/start_len = list_to_clear.len
var/start_len = length(list_to_clear)
var/list/new_list = new(start_len)
list_to_clear -= new_list
return list_to_clear.len < start_len
return length(list_to_clear) < start_len

///Return a list with no duplicate entries
/proc/unique_list(list/inserted_list)
Expand All @@ -174,6 +174,6 @@
if(!inserted_list)
return

for(var/i in 1 to inserted_list.len - 1)
inserted_list.Swap(i, rand(i, inserted_list.len))
for(var/i in 1 to length(inserted_list) - 1)
inserted_list.Swap(i, rand(i, length(inserted_list)))

2 changes: 1 addition & 1 deletion code/__HELPERS/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
if((!admin_only || channel.is_admin_channel) && (channel_tag in applicable_tags))
channels_to_use += channel

if(channels_to_use.len)
if(length(channels_to_use))
world.TgsChatBroadcast(message, channels_to_use)

/**
Expand Down
11 changes: 8 additions & 3 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

/proc/recursive_mob_check(atom/O, list/L = list(), recursion_limit = 3, client_check = 1, sight_check = 1, include_radio = 1)

//debug_mob += O.contents.len
//debug_mob += length(O.contents)
if(!recursion_limit)
return L
for(var/atom/A in O.contents)
Expand Down Expand Up @@ -235,7 +235,7 @@
* * 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)
/proc/get_alien_candidates(datum/hive_status/hive = null, sorted = TRUE, abomination = FALSE)
var/list/candidates = list()

for(var/mob/dead/observer/cur_obs as anything in GLOB.observer_list)
Expand Down Expand Up @@ -275,6 +275,11 @@
if(banished)
continue

if(abomination)
if(!(/datum/tutorial/xenomorph/abomination::tutorial_id in cur_obs.client.prefs.completed_tutorials))
to_chat(cur_obs, SPAN_BOLDNOTICE("You were passed over for playing as an Abomination because you have not completed its tutorial."))
continue

candidates += cur_obs

// Optionally sort by larva_queue_time
Expand All @@ -294,7 +299,7 @@
* * 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)
for(var/i in (1 + dequeued) to candidates.len)
for(var/i in (1 + dequeued) to length(candidates))
var/mob/dead/observer/cur_obs = candidates[i]

// Generate the messages
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/guid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/proc/GUID()
var/const/GUID_VERSION = "b"
var/const/GUID_VARIANT = "d"
var/node_id = copytext_char(md5("[rand()*rand(1,9999999)][world.name][world.hub][world.hub_password][world.internet_address][world.address][world.contents.len][world.status][world.port][rand()*rand(1,9999999)]"), 1, 13)
var/node_id = copytext_char(md5("[rand()*rand(1,9999999)][world.name][world.hub][world.hub_password][world.internet_address][world.address][length(world.contents)][world.status][world.port][rand()*rand(1,9999999)]"), 1, 13)

var/time_high = "[num2hex(text2num(time2text(world.realtime,"YYYY")), 2)][num2hex(world.realtime, 6)]"

Expand Down
10 changes: 5 additions & 5 deletions code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ world
/proc/getFlatIcon(image/appearance, defdir, deficon, defstate, defblend, start = TRUE, no_anim = FALSE, appearance_flags = FALSE)
// Loop through the underlays, then overlays, sorting them into the layers list
#define PROCESS_OVERLAYS_OR_UNDERLAYS(flat, process, base_layer) \
for (var/i in 1 to process.len) { \
for (var/i in 1 to length(process)) { \
var/image/current = process[i]; \
if (!current) { \
continue; \
Expand All @@ -347,7 +347,7 @@ world
} \
current_layer = base_layer + appearance.layer + current_layer / 1000; \
} \
for (var/index_to_compare_to in 1 to layers.len) { \
for (var/index_to_compare_to in 1 to length(layers)) { \
var/compare_to = layers[index_to_compare_to]; \
if (current_layer < layers[compare_to]) { \
layers.Insert(index_to_compare_to, current); \
Expand Down Expand Up @@ -403,7 +403,7 @@ world

var/curblend = appearance.blend_mode || defblend

if(appearance.overlays.len || appearance.underlays.len)
if(length(appearance.overlays) || length(appearance.underlays))
var/icon/flat = icon(flat_template)
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
var/list/layers = list()
Expand Down Expand Up @@ -556,15 +556,15 @@ world
/proc/sort_atoms_by_layer(list/atoms)
// Comb sort icons based on levels
var/list/result = atoms.Copy()
var/gap = result.len
var/gap = length(result)
var/swapped = 1
while (gap > 1 || swapped)
swapped = 0
if(gap > 1)
gap = floor(gap / 1.3) // 1.3 is the emperic comb sort coefficient
if(gap < 1)
gap = 1
for(var/i = 1; gap + i <= result.len; i++)
for(var/i = 1; gap + i <= length(result); i++)
var/atom/l = result[i] //Fucking hate
var/atom/r = result[gap+i] //how lists work here
if(l.layer > r.layer) //no "result[i].layer" for me
Expand Down
Loading

0 comments on commit 7337e64

Please sign in to comment.