Skip to content

Commit

Permalink
Merge branch 'master' into SolarisUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
Steelpoint committed Aug 11, 2024
2 parents 922772d + 04b3134 commit 922855f
Show file tree
Hide file tree
Showing 571 changed files with 63,191 additions and 64,106 deletions.
7 changes: 7 additions & 0 deletions code/__DEFINES/autowiki.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifdef AUTOWIKI
#define AUTOWIKI_SKIP(skip) autowiki_skip = skip
#define IS_AUTOWIKI_SKIP(datum) datum.autowiki_skip
#else
#define AUTOWIKI_SKIP(skip)
#define IS_AUTOWIKI_SKIP(datum) UNLINT(FALSE)
#endif
1 change: 1 addition & 0 deletions code/__DEFINES/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#define CAMERA_NET_CONTAINMENT "Containment"
#define CAMERA_NET_CONTAINMENT_HIDDEN "Containment Hidden"
#define CAMERA_NET_RESEARCH "Research"
#define CAMERA_NET_BRIG "Brig"
#define CAMERA_NET_ALAMO "Alamo"
#define CAMERA_NET_NORMANDY "Normandy"
#define CAMERA_NET_COLONY "Colony"
Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
* Chemistry defines
*/

/// Amount of bottle icon variations in total
#define BOTTLE_ICON_CHOICES 4
/// Amount of random icon variations for pills in total
#define PILL_ICON_CHOICES 21
#define PILL_ICON_CHOICES 22
/* Pill icon classes to generate mappings for */
#define PILL_ICON_CLASSES list("bica", "kelo", "dex", "para", "tram", "atox", "tox", "inap", "peri", "spac", "drug", "stim", "alky", "imi", "qc", "tric", "psych", "oxy")

Expand Down
27 changes: 14 additions & 13 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,25 @@
#define GUN_TRIGGER_SAFETY (1<<1)
#define GUN_UNUSUAL_DESIGN (1<<2)
#define GUN_SILENCED (1<<3)
#define GUN_CANT_EXECUTE (1<<4)
///If checking for ammo with current.mag you have to check it against numerical values, as booleans will not trigger.
#define GUN_INTERNAL_MAG (1<<4)
#define GUN_AUTO_EJECTOR (1<<5)
#define GUN_AMMO_COUNTER (1<<6)
#define GUN_BURST_FIRING (1<<7)
#define GUN_FLASHLIGHT_ON (1<<8)
#define GUN_WY_RESTRICTED (1<<9)
#define GUN_SPECIALIST (1<<10)
#define GUN_WIELDED_FIRING_ONLY (1<<11)
#define GUN_INTERNAL_MAG (1<<5)
#define GUN_AUTO_EJECTOR (1<<6)
#define GUN_AMMO_COUNTER (1<<7)
#define GUN_BURST_FIRING (1<<8)
#define GUN_FLASHLIGHT_ON (1<<9)
#define GUN_WY_RESTRICTED (1<<10)
#define GUN_SPECIALIST (1<<11)
#define GUN_WIELDED_FIRING_ONLY (1<<12)
/// removes unwielded accuracy and scatter penalties (not recoil)
#define GUN_ONE_HAND_WIELDED (1<<12)
#define GUN_ANTIQUE (1<<13)
#define GUN_ONE_HAND_WIELDED (1<<13)
#define GUN_ANTIQUE (1<<14)
/// Whether the gun has been fired by its current user (reset upon `dropped()`)
#define GUN_RECOIL_BUILDUP (1<<14)
#define GUN_RECOIL_BUILDUP (1<<15)
/// support weapon, bipod will grant autofire
#define GUN_SUPPORT_PLATFORM (1<<15)
#define GUN_SUPPORT_PLATFORM (1<<16)
/// No gun description, only base desc
#define GUN_NO_DESCRIPTION (1<<16)
#define GUN_NO_DESCRIPTION (1<<17)
// NOTE: Don't add flags past 1<<23, it'll break things due to BYOND limitations. You can usually use a Component instead.

#define USES_STREAKS (1<<0)
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 @@ -360,6 +360,7 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_XENOMORPH_QUEEN "Queen"

// For coloring the ranks in the statistics menu
#define JOB_PLAYTIME_TIER_0 (0 HOURS)
#define JOB_PLAYTIME_TIER_1 (10 HOURS)
#define JOB_PLAYTIME_TIER_2 (25 HOURS)
#define JOB_PLAYTIME_TIER_3 (70 HOURS)
Expand Down
7 changes: 4 additions & 3 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
#define CANROOT (1<<6)
#define GODMODE (1<<12)
#define FAKEDEATH (1<<13) //Replaces stuff like changeling.changeling_fakedeath
#define DISFIGURED (1<<14) //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system
//#define DISFIGURED (1<<14) //unused
#define XENO_HOST (1<<15) //Tracks whether we're gonna be a baby alien's mummy.
#define IMMOBILE_ACTION (1<<16) // If you are performing an action that prevents you from being pushed by your own people.
#define PERMANENTLY_DEAD (1<<17)
Expand Down Expand Up @@ -166,8 +166,9 @@
#define ORGAN_ROBOT 2

#define ORGAN_HEALTHY 0
#define ORGAN_BRUISED 1
#define ORGAN_BROKEN 2
#define ORGAN_LITTLE_BRUISED 1 //used by stethoscopes and penlights
#define ORGAN_BRUISED 2
#define ORGAN_BROKEN 3

//=================================================

Expand Down
9 changes: 5 additions & 4 deletions code/__DEFINES/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@

// engineer skill
#define SKILL_ENGINEER_DEFAULT 0
#define SKILL_ENGINEER_TRAINED 1 //barricade repair && c4 use (mini-engis, specs)
#define SKILL_ENGINEER_ENGI 2 //plasteel barricade deconstruction, hacking&&planet engine fixing&&apc building, Telecomms fixing (Combat Engi, OT, etc.)
#define SKILL_ENGINEER_MASTER 3 //Synths
#define SKILL_ENGINEER_MAX 3
#define SKILL_ENGINEER_NOVICE 1 //barricade repair && c4 use (mini-engis, specs)
#define SKILL_ENGINEER_TRAINED 2 //plasteel barricade deconstruction, hacking&&planet engine fixing&&apc building, Telecomms fixing (OT, etc.)
#define SKILL_ENGINEER_ENGI 3 // Slightly faster at everything (Combat Technicians)
#define SKILL_ENGINEER_MASTER 4 //Synths
#define SKILL_ENGINEER_MAX 4

//medical skill
#define SKILL_MEDICAL_DEFAULT 0
Expand Down
22 changes: 22 additions & 0 deletions code/__DEFINES/sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,28 @@
#define SOUND_CHANNEL_LOBBY 1023
#define SOUND_CHANNEL_Z 1024


//default byond sound echo list index positions.
//ECHO_DIRECT and ECHO_ROOM are the only two that actually appear to do anything, and represent the dry and wet channels of the environment effects, respectively.
#define ECHO_DIRECT 1
#define ECHO_DIRECTHF 2
#define ECHO_ROOM 3
#define ECHO_ROOMHF 4
#define ECHO_OBSTRUCTION 5
#define ECHO_OBSTRUCTIONLFRATIO 6
#define ECHO_OCCLUSION 7
#define ECHO_OCCLUSIONLFRATIO 8
#define ECHO_OCCLUSIONROOMRATIO 9
#define ECHO_OCCLUSIONDIRECTRATIO 10
#define ECHO_EXCLUSION 11
#define ECHO_EXCLUSIONLFRATIO 12
#define ECHO_OUTSIDEVOLUMEHF 13
#define ECHO_DOPPLERFACTOR 14
#define ECHO_ROLLOFFFACTOR 15
#define ECHO_ROOMROLLOFFFACTOR 16
#define ECHO_AIRABSORPTIONFACTOR 17
#define ECHO_FLAGS 18

//default byond sound environments
#define SOUND_ENVIRONMENT_NONE -1
#define SOUND_ENVIRONMENT_GENERIC 0
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
#define SS_INIT_NIGHTMARE 21.5
#define SS_INIT_TIMETRACK 21.1
#define SS_INIT_HUMANS 21
#define SS_INIT_WHO 20
#define SS_INIT_POWER 19
#define SS_INIT_INFLUXMCSTATS 12
#define SS_INIT_INFLUXSTATS 11
Expand Down
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 "7.1.2"
#define TGS_DMAPI_VERSION "7.1.3"

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

Expand Down
2 changes: 2 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
13 changes: 7 additions & 6 deletions code/__DEFINES/turfs.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#define RANGE_TURFS(RADIUS, CENTER) \
block( \
(CENTER).x-(RADIUS), (CENTER).y-(RADIUS), (CENTER).z, \
(CENTER).x+(RADIUS), (CENTER).y+(RADIUS), (CENTER).z \
)

/// Returns a list of turfs within H_RADIUS tiles horizontally and V_RADIUS tiles vertically of CENTER.
#define RECT_TURFS(H_RADIUS, V_RADIUS, CENTER) \
block( \
(CENTER).x-(H_RADIUS), (CENTER).y-(V_RADIUS), (CENTER).z, \
(CENTER).x+(H_RADIUS), (CENTER).y+(V_RADIUS), (CENTER).z \
)

/// Returns a list of turfs within Dist tiles of Center. When Dist >= 5 faster than a `range()` filtered to `/turf`s.
#define RANGE_TURFS(Dist, Center) RECT_TURFS(Dist, Dist, Center)

/// Returns a list of turfs within Dist tiles of Center, excluding Center. When Dist >= 5 faster than an `orange()` filtered to `/turf`s.
#define ORANGE_TURFS(Dist, Center) (RANGE_TURFS(Dist, Center) - Center)

///Returns all turfs in a zlevel
#define Z_TURFS(ZLEVEL) block(1, 1, (ZLEVEL), world.maxx, world.maxy, (ZLEVEL))

Expand Down
18 changes: 12 additions & 6 deletions code/__HELPERS/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,23 @@
* You should only pass integers in.
*/
/proc/pick_weight(list/list_to_pick)
if(length(list_to_pick) == 0)
return null

var/total = 0
var/item
for(item in list_to_pick)
for(var/item in list_to_pick)
if(!list_to_pick[item])
list_to_pick[item] = 0
total += list_to_pick[item]

total = rand(0, total)
for(item in list_to_pick)
total -= list_to_pick[item]
if(total <= 0 && list_to_pick[item])
total = rand(1, total)
for(var/item in list_to_pick)
var/item_weight = list_to_pick[item]
if(item_weight == 0)
continue

total -= item_weight
if(total <= 0)
return item

return null
Expand Down
3 changes: 3 additions & 0 deletions code/__HELPERS/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ GLOBAL_LIST_INIT(cmp_field, "name")
/proc/cmp_typepaths_asc(A, B)
return sorttext("[B]","[A]")

/proc/cmp_typepaths_name_asc(atom/A, atom/B)
return sorttext(initial(A.name), initial(B.name))

/// Compares mobs based on their timeofdeath value in ascending order
/proc/cmp_mob_deathtime_asc(mob/A, mob/B)
return A.timeofdeath - B.timeofdeath
Expand Down
9 changes: 7 additions & 2 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
var/list/turfs = new/list()
var/rsq = radius * (radius+0.5)

for(var/turf/T in range(radius, centerturf))
for(var/turf/T as anything in RANGE_TURFS(radius, centerturf))
var/dx = T.x - centerturf.x
var/dy = T.y - centerturf.y
if(dx*dx + dy*dy <= rsq)
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 Down
16 changes: 0 additions & 16 deletions code/__HELPERS/lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,6 @@
result = first ^ second
return result

//Pretends to pick an element based on its weight but really just seems to pick a random element.
/proc/pickweight(list/L)
var/total = 0
var/item
for (item in L)
if (!L[item])
L[item] = 1
total += L[item]

total = rand(1, total)
for (item in L)
total -=L [item]
if (total <= 0)
return item
return null

/// Pick a random element from the list and remove it from the list.
/proc/pick_n_take(list/L)
RETURN_TYPE(L[_].type)
Expand Down
Loading

0 comments on commit 922855f

Please sign in to comment.