Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into projectile-smooth…
Browse files Browse the repository at this point in the history
…-movement
  • Loading branch information
Doubleumc committed Dec 6, 2023
2 parents f405a0a + 8b69334 commit a15fe7e
Show file tree
Hide file tree
Showing 368 changed files with 9,281 additions and 6,063 deletions.
5 changes: 5 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@
/// From /mob/living/Collide(): (atom/A)
#define COMSIG_LIVING_PRE_COLLIDE "living_pre_collide"
#define COMPONENT_LIVING_COLLIDE_HANDLED (1<<0)

///from base of mob/living/set_buckled(): (new_buckled)
#define COMSIG_LIVING_SET_BUCKLED "living_set_buckled"
///from base of mob/living/set_body_position()
#define COMSIG_LIVING_SET_BODY_POSITION "living_set_body_position"
6 changes: 0 additions & 6 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
#define COMSIG_MOB_FIRED_GUN_ATTACHMENT "mob_fired_gun_attachment"
/// From /mob/proc/death
#define COMSIG_MOB_DEATH "mob_death"
/// From /mob/proc/update_canmove()
#define COMSIG_MOB_GETTING_UP "mob_getting_up"
/// From /mob/proc/update_canmove()
#define COMSIG_MOB_KNOCKED_DOWN "mob_knocked_down"
/// For when a mob is dragged
#define COMSIG_MOB_DRAGGED "mob_dragged"
/// From /obj/item/proc/unequipped()
Expand Down Expand Up @@ -86,8 +82,6 @@
//from /mob/proc/on_deafness_loss()
#define COMSIG_MOB_REGAINED_HEARING "mob_regained_hearing"

#define COMSIG_MOB_POST_UPDATE_CANMOVE "mob_can_move"

#define COMSIG_ATTEMPT_MOB_PULL "attempt_mob_pull"
#define COMPONENT_CANCEL_MOB_PULL (1<<0)

Expand Down
28 changes: 28 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,31 @@ GLOBAL_LIST_INIT(default_xeno_onmob_icons, list(
#define CORE_LIMBS list("chest","head","groin")

#define SYMPTOM_ACTIVATION_PROB 3

// Body position defines.
/// Mob is standing up, usually associated with lying_angle value of 0.
#define STANDING_UP 0
/// Mob is lying down, usually associated with lying_angle values of 90 or 270.
#define LYING_DOWN 1

/// Possible value of [/atom/movable/buckle_lying]. If set to a different (positive-or-zero) value than this, the buckling thing will force a lying angle on the buckled.
#define NO_BUCKLE_LYING -1

// ====================================
// /mob/living /tg/ mobility_flags
// These represent in what capacity the mob is capable of moving
// Because porting this is underway, NOT ALL FLAGS ARE CURRENTLY IN.

/// can move
#define MOBILITY_MOVE (1<<0)
/// can, and is, standing up
#define MOBILITY_STAND (1<<1)
/// can rest
#define MOBILITY_REST (1<<7)
/// can lie down
#define MOBILITY_LIEDOWN (1<<8)

#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND)
#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)

4 changes: 4 additions & 0 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
#define RADIO_CHANNEL_PMC_CCT "PMC CCT"
#define RADIO_CHANNEL_WY_WO "SpecOps"

//Listening Devices
#define RADIO_CHANNEL_BUG_A "Listening Device A"
#define RADIO_CHANNEL_BUG_B "Listening Device B"

//1-Channel ERTs
#define RADIO_CHANNEL_DUTCH_DOZEN "DD"
#define RADIO_CHANNEL_VAI "VAI"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#define SKILL_SPEC_DEFAULT 0
/// Is trained to use specialist gear, but hasn't picked a kit.
#define SKILL_SPEC_TRAINED 1
/// Is trained to use specialist gear & HAS picked a kit. (Functionally same as SPEC_ROCKET)
#define SKILL_SPEC_KITTED 2
/// Can use RPG
#define SKILL_SPEC_ROCKET 2
/// Can use thermal cloaks and custom M4RA rifle
Expand Down
45 changes: 41 additions & 4 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,18 @@
// #define TRAIT_X "t_x"

//-- mob traits --
/// Prevents voluntary movement.
#define TRAIT_IMMOBILIZED "immobilized"
/// Apply this to make a mob not dense, and remove it when you want it to no longer make them undense, other sorces of undesity will still apply. Always define a unique source when adding a new instance of this!
#define TRAIT_UNDENSE "undense"
/// Forces the user to stay unconscious.
#define TRAIT_KNOCKEDOUT "knockedout"
/// Prevents voluntary movement.
#define TRAIT_IMMOBILIZED "immobilized"
/// Prevents voluntary standing or staying up on its own.
#define TRAIT_FLOORED "floored"
/// Forces user to stay standing
#define TRAIT_FORCED_STANDING "forcedstanding"
/// Stuns preventing movement and using objects but without further impairement
#define TRAIT_INCAPACITATED "incapacitated"
/// Apply this to identify a mob as merged with weeds
#define TRAIT_MERGED_WITH_WEEDS "merged_with_weeds"

Expand Down Expand Up @@ -298,7 +306,10 @@ GLOBAL_LIST_INIT(mob_traits, list(
*/
GLOBAL_LIST_INIT(traits_by_type, list(
/mob = list(
"TRAIT_KNOCKEDOUT" = TRAIT_KNOCKEDOUT,
"TRAIT_IMMOBILIZED" = TRAIT_IMMOBILIZED,
"TRAIT_INCAPACITATED" = TRAIT_INCAPACITATED,
"TRAIT_FLOORED" = TRAIT_FLOORED,
"TRAIT_UNDENSE" = TRAIT_UNDENSE,
"TRAIT_YAUTJA_TECH" = TRAIT_YAUTJA_TECH,
"TRAIT_SUPER_STRONG" = TRAIT_SUPER_STRONG,
Expand Down Expand Up @@ -416,13 +427,39 @@ GLOBAL_LIST(trait_name_map)
//Status trait coming from clothing.
#define TRAIT_SOURCE_CLOTHING "t_s_clothing"

/// traits associated with actively interacted machinery
#define INTERACTION_TRAIT "interaction"
/// trait associated to being buckled
#define BUCKLED_TRAIT "buckled" // Yes the name doesn't conform. /tg/ appears to have changed naming style inbetween
/// trait source when an effect is coming from a fakedeath effect (refactor this)
#define FAKEDEATH_TRAIT "fakedeath"
/// trait source where a condition comes from body state
#define BODY_TRAIT "body"
/// Trait associated to lying down (having a [lying_angle] of a different value than zero).
#define LYING_DOWN_TRAIT "lying-down"
/// trait associated to a stat value or range of
#define STAT_TRAIT "stat"
/// trait effect related to the queen ovipositor
#define OVIPOSITOR_TRAIT "ovipositor"
/// trait associated to being held in a chokehold
#define CHOKEHOLD_TRAIT "chokehold"
/// trait effect related to active specialist gear
#define SPECIALIST_GEAR_TRAIT "specialist_gear"
/// traits associated with usage of snowflake dropship double seats
#define DOUBLE_SEATS_TRAIT "double_seats"
/// traits associated with xeno on-ground weeds
#define XENO_WEED_TRAIT "xeno_weed"
/// traits associated with actively interacted machinery
#define INTERACTION_TRAIT "interaction"
/// traits bound by stunned status effects
#define STUNNED_TRAIT "stunned"
/// traits bound by knocked_down status effect
#define KNOCKEDDOWN_TRAIT "knockeddown"
/// traits bound by knocked_out status effect
#define KNOCKEDOUT_TRAIT "knockedout"
/// traits from being pounced
#define POUNCED_TRAIT "pounced"
/// traits from step_triggers on the map
#define STEP_TRIGGER_TRAIT "step_trigger"
/// traits from hacked machine interactions
#define HACKED_TRAIT "hacked"
/// traits from chloroform usage
#define CHLOROFORM_TRAIT "chloroform"
7 changes: 7 additions & 0 deletions code/__DEFINES/vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,10 @@
//Whether or not to load ammo boxes depending on ammo loaded into the vendor
//Only relevant in big vendors, like Requisitions or Squad Prep
#define VEND_LOAD_AMMO_BOXES (1<<9)

// Redemption Tokens
#define VEND_TOKEN_ENGINEER "Engineer"
#define VEND_TOKEN_SPEC "Specialist"
#define VEND_TOKEN_SYNTH "Synthetic"
/// Token invalid/unrecognised.
#define VEND_TOKEN_VOID "Void"
2 changes: 2 additions & 0 deletions code/__HELPERS/animations.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// The duration of the animate call in mob/living/update_transform
#define UPDATE_TRANSFORM_ANIMATION_TIME (0.2 SECONDS)
1 change: 1 addition & 0 deletions code/__HELPERS/status_effects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define TRAIT_STATUS_EFFECT(effect_id) "[effect_id]-trait"
5 changes: 5 additions & 0 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
text = replacetext(text, char, repl_chars[char])
return text

///Helper for only alphanumeric characters plus common punctuation, spaces, underscore and hyphen _ -.
/proc/replace_non_alphanumeric_plus(text)
var/regex/alphanumeric = regex(@{"[^a-z0-9 ,.?!\-_&]"}, "gi")
return alphanumeric.Replace(text, "")

/proc/readd_quotes(text)
var/list/repl_chars = list("&#34;" = "\"", "&#39;" = "'")
for(var/char in repl_chars)
Expand Down
16 changes: 8 additions & 8 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1089,15 +1089,15 @@ GLOBAL_DATUM(action_purple_power_up, /image)
target_orig_turf = get_turf(target)
var/obj/user_holding = busy_user.get_active_hand()
var/obj/target_holding
var/cur_user_lying = busy_user.lying
var/cur_user_lying = busy_user.body_position
var/cur_target_lying
var/expected_total_time = delayfraction*numticks
var/time_remaining = expected_total_time

if(has_target && istype(T))
cur_target_zone_sel = T.zone_selected
target_holding = T.get_active_hand()
cur_target_lying = T.lying
cur_target_lying = T.body_position

. = TRUE
for(var/i in 1 to numticks)
Expand All @@ -1121,13 +1121,13 @@ GLOBAL_DATUM(action_purple_power_up, /image)
)
. = FALSE
break
if(user_flags & INTERRUPT_KNOCKED_DOWN && busy_user.knocked_down || \
target_is_mob && (target_flags & INTERRUPT_KNOCKED_DOWN && T.knocked_down)
if(user_flags & INTERRUPT_KNOCKED_DOWN && HAS_TRAIT(busy_user, TRAIT_FLOORED) || \
target_is_mob && (target_flags & INTERRUPT_KNOCKED_DOWN && HAS_TRAIT(T, TRAIT_FLOORED))
)
. = FALSE
break
if(user_flags & INTERRUPT_STUNNED && busy_user.stunned || \
target_is_mob && (target_flags & INTERRUPT_STUNNED && T.stunned)
if(user_flags & INTERRUPT_STUNNED && HAS_TRAIT(busy_user, TRAIT_INCAPACITATED)|| \
target_is_mob && (target_flags & INTERRUPT_STUNNED && HAS_TRAIT(T, TRAIT_INCAPACITATED))
)
. = FALSE
break
Expand Down Expand Up @@ -1201,8 +1201,8 @@ GLOBAL_DATUM(action_purple_power_up, /image)
)
. = FALSE
break
if(user_flags & INTERRUPT_CHANGED_LYING && busy_user.lying != cur_user_lying || \
target_is_mob && (target_flags & INTERRUPT_CHANGED_LYING && T.lying != cur_target_lying)
if(user_flags & INTERRUPT_CHANGED_LYING && busy_user.body_position != cur_user_lying || \
target_is_mob && (target_flags & INTERRUPT_CHANGED_LYING && T.body_position != cur_target_lying)
)
. = FALSE
break
Expand Down
7 changes: 7 additions & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ DEFINE_BITFIELD(mob_flags, list(
"NOBIOSCAN" = NOBIOSCAN,
))

DEFINE_BITFIELD(mobility_flags, list(
"MOVE" = MOBILITY_MOVE,
"STAND" = MOBILITY_STAND,
"REST" = MOBILITY_REST,
"LIEDOWN" = MOBILITY_LIEDOWN
))

DEFINE_BITFIELD(flags, list(
"NO_BLOOD" = NO_BLOOD,
"NO_BREATHE" = NO_BREATHE,
Expand Down
6 changes: 2 additions & 4 deletions code/_onclick/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

/mob/living/carbon/human/UnarmedAttack(atom/A, proximity, click_parameters)

if(lying) //No attacks while laying down
if(body_position == LYING_DOWN) //No attacks while laying down
return 0

var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
Expand All @@ -88,7 +88,7 @@
/atom/proc/attack_hand(mob/user)
return

/mob/living/carbon/human/MouseDrop_T(atom/dropping, mob/user)
/mob/living/carbon/human/MouseDrop_T(atom/dropping, mob/living/user)
if(user != src)
return . = ..()

Expand Down Expand Up @@ -153,6 +153,4 @@
target.Move(user.loc, get_dir(target.loc, user.loc))
target.update_transform(TRUE)

target.update_canmove()


4 changes: 2 additions & 2 deletions code/_onclick/ventcrawl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
to_chat(src, SPAN_WARNING("You must be conscious to do this!"))
return

if(lying)
if(is_mob_incapacitated())
to_chat(src, SPAN_WARNING("You can't vent crawl while you're stunned!"))
return

Expand Down Expand Up @@ -88,7 +88,7 @@
return

updatehealth()
if(stat || stunned || dazed || knocked_down || lying || health < 0 || !client || !ventcrawl_carry())
if(is_mob_incapacitated(src) || health < 0 || !client || !ventcrawl_carry())
vent_found.animate_ventcrawl_reset()
return

Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

/mob/living/carbon/xenomorph/UnarmedAttack(atom/target, proximity, click_parameters, tile_attack = FALSE, ignores_resin = FALSE)
if(lying || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) //No attacks while laying down
if(body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) //No attacks while laying down
return FALSE
var/mob/alt

Expand All @@ -21,7 +21,7 @@

if (!L.is_xeno_grabbable() || L == src) //Xenos never attack themselves.
continue
if (L.lying)
if (L.body_position == LYING_DOWN)
alt = L
continue
target = L
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 @@ -127,3 +127,8 @@
min_val = 1
config_entry_value = 450
integer = TRUE

/datum/config_entry/number/whiskey_required_players
min_val = 0
config_entry_value = 140
integer = TRUE
15 changes: 14 additions & 1 deletion code/controllers/subsystem/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency
//Misc channels
#define YAUT_FREQ 1205
#define DUT_FREQ 1210
#define CMB_FREQ 1220
#define VAI_FREQ 1215
#define RMC_FREQ 1216
#define CMB_FREQ 1220

//WY Channels (1230-1249)
#define WY_FREQ 1231
Expand All @@ -99,6 +99,11 @@ Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency
#define CLF_MED_FREQ 1274
#define CLF_CCT_FREQ 1275

//Listening Bugs (1290-1291)
#define BUG_A_FREQ 1290
#define BUG_B_FREQ 1291

//General Radio
#define MIN_FREQ 1460 // ------------------------------------------------------
#define PUB_FREQ 1461
#define MAX_FREQ 1468 // ------------------------------------------------------
Expand Down Expand Up @@ -191,6 +196,9 @@ GLOBAL_LIST_INIT(radiochannels, list(
RADIO_CHANNEL_CLF_ENGI = CLF_ENGI_FREQ,
RADIO_CHANNEL_CLF_MED = CLF_MED_FREQ,
RADIO_CHANNEL_CLF_CCT = CLF_CCT_FREQ,

RADIO_CHANNEL_BUG_A = BUG_A_FREQ,
RADIO_CHANNEL_BUG_B = BUG_B_FREQ,
))

// Response Teams
Expand All @@ -205,6 +213,9 @@ GLOBAL_LIST_INIT(radiochannels, list(
// PMC Frequencies
#define PMC_FREQS list(PMC_FREQ, PMC_CMD_FREQ, PMC_ENGI_FREQ, PMC_MED_FREQ, PMC_CCT_FREQ, WY_WO_FREQ, WY_FREQ)

//Listening Device Frequencies
#define BUG_FREQS list(BUG_A_FREQ, BUG_B_FREQ)

//Depts - used for colors in headset.dm, as well as deciding what the marine comms tower can listen into
#define DEPT_FREQS list(COMM_FREQ, MED_FREQ, ENG_FREQ, SEC_FREQ, SENTRY_FREQ, ALPHA_FREQ, BRAVO_FREQ, CHARLIE_FREQ, DELTA_FREQ, ECHO_FREQ, CRYO_FREQ, REQ_FREQ, JTAC_FREQ, INTEL_FREQ, WY_FREQ)

Expand Down Expand Up @@ -269,6 +280,8 @@ SUBSYSTEM_DEF(radio)
"[HC_FREQ]" = "hcradio",
"[PVST_FREQ]" = "pvstradio",
"[COLONY_FREQ]" = "deptradio",
"[BUG_A_FREQ]" = "airadio",
"[BUG_B_FREQ]" = "aiprivradio",
)

/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, new_frequency as num, filter = null as text|null)
Expand Down
3 changes: 2 additions & 1 deletion code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ SUBSYSTEM_DEF(vote)
var/datum/game_mode/M = mode_type
if(initial(M.config_tag))
var/vote_cycle_met = !initial(M.vote_cycle) || (text2num(SSperf_logging?.round?.id) % initial(M.vote_cycle) == 0)
if(initial(M.votable) && vote_cycle_met)
var/min_players_met = length(GLOB.clients) >= M.required_players
if(initial(M.votable) && vote_cycle_met && min_players_met)
choices += initial(M.config_tag)
if("groundmap")
question = "Ground map vote"
Expand Down
5 changes: 5 additions & 0 deletions code/datums/ASRS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,8 @@
buyable = 0
group = "ASRS"
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ingredient/asrs
buyable = 0
group = "ASRS"
cost = ASRS_LOW_WEIGHT
6 changes: 4 additions & 2 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@
I.ui_action_click(owner, holder_item)

/datum/action/item_action/can_use_action()
if(ishuman(owner) && !owner.is_mob_incapacitated() && !owner.lying)
return TRUE
if(ishuman(owner) && !owner.is_mob_incapacitated())
var/mob/living/carbon/human/human = owner
if(human.body_position == STANDING_UP)
return TRUE

/datum/action/item_action/update_button_icon()
button.overlays.Cut()
Expand Down
Loading

0 comments on commit a15fe7e

Please sign in to comment.