Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhials committed Jun 8, 2024
2 parents 723de7e + d01c4be commit 7064a74
Show file tree
Hide file tree
Showing 105 changed files with 2,487 additions and 447 deletions.
1,254 changes: 1,254 additions & 0 deletions _maps/deathmatch/finaldestination.dmm

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions _maps/map_files/Birdshot/birdshot.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -38619,11 +38619,11 @@
dir = 1
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/structure/disposalpipe/sorting/mail{
dir = 4
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/effect/mapping_helpers/mail_sorting/service/janitor_closet,
/obj/structure/disposalpipe/sorting/mail/flip{
dir = 8
},
/turf/open/floor/iron/white/small,
/area/station/service/janitor)
"nVe" = (
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// These mobs have particularly hygienic tongues
#define TRAIT_WOUND_LICKER "wound_licker"

/// This trait designate that the mob was originally a monkey
#define TRAIT_BORN_MONKEY "born_as_a_monkey"

/// Added to a mob, allows that mob to experience flavour-based moodlets when examining food
#define TRAIT_REMOTE_TASTING "remote_tasting"

Expand Down
7 changes: 3 additions & 4 deletions code/__DEFINES/transport.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,11 @@ DEFINE_BITFIELD(request_flags, list(
#define XING_STATE_RED 2
#define XING_STATE_MALF 3

#define AMBER_THRESHOLD_NORMAL 45
#define RED_THRESHOLD_NORMAL 20
#define AMBER_THRESHOLD_DEGRADED 30
#define RED_THRESHOLD_DEGRADED 15
#define XING_THRESHOLD_AMBER 45
#define XING_THRESHOLD_RED 27

#define DEFAULT_TRAM_LENGTH 10
#define DEFAULT_TRAM_MIDPOINT 5

// Tram machinery subtype
#define TRANSPORT_SYSTEM_NORMAL 0
Expand Down
11 changes: 8 additions & 3 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -474,13 +474,18 @@ GLOBAL_LIST_INIT(skin_tone_names, list(
. += borg

//Returns a list of AI's
/proc/active_ais(check_mind=FALSE, z = null)
/proc/active_ais(check_mind=FALSE, z = null, skip_syndicate, only_syndicate)
. = list()
for(var/mob/living/silicon/ai/ai as anything in GLOB.ai_list)
if(ai.stat == DEAD)
continue
if(ai.control_disabled)
continue
var/syndie_ai = istype(ai, /mob/living/silicon/ai/weak_syndie)
if(skip_syndicate && syndie_ai)
continue
if(only_syndicate && !syndie_ai)
continue
if(check_mind)
if(!ai.mind)
continue
Expand All @@ -507,8 +512,8 @@ GLOBAL_LIST_INIT(skin_tone_names, list(
. = pick(borgs)
return .

/proc/select_active_ai(mob/user, z = null)
var/list/ais = active_ais(FALSE, z)
/proc/select_active_ai(mob/user, z = null, skip_syndicate, only_syndicate)
var/list/ais = active_ais(FALSE, z, skip_syndicate, only_syndicate)
if(ais.len)
if(user)
. = input(user,"AI signals detected:", "AI Selection", ais[1]) in sort_list(ais)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE,
"TRAIT_BONSAI" = TRAIT_BONSAI,
"TRAIT_BOOZE_SLIDER" = TRAIT_BOOZE_SLIDER,
"TRAIT_BORN_MONKEY" = TRAIT_BORN_MONKEY,
"TRAIT_BRAINWASHING" = TRAIT_BRAINWASHING,
"TRAIT_BRAWLING_KNOCKDOWN_BLOCKED" = TRAIT_BRAWLING_KNOCKDOWN_BLOCKED,
"TRAIT_BYPASS_EARLY_IRRADIATED_CHECK" = TRAIT_BYPASS_EARLY_IRRADIATED_CHECK,
Expand Down
20 changes: 1 addition & 19 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
return
if(LAZYACCESS(modifiers, ALT_CLICK)) // alt and alt-gr (rightalt)
if(LAZYACCESS(modifiers, RIGHT_CLICK))
alt_click_on_secondary(A)
base_click_alt_secondary(A)
else
base_click_alt(A)
return
Expand Down Expand Up @@ -386,24 +386,6 @@
A.CtrlClick(src)
return


///The base proc of when something is right clicked on when alt is held - generally use alt_click_secondary instead
/atom/proc/alt_click_on_secondary(atom/A)
. = SEND_SIGNAL(src, COMSIG_MOB_ALTCLICKON_SECONDARY, A)
if(. & COMSIG_MOB_CANCEL_CLICKON)
return
A.alt_click_secondary(src)

///The base proc of when something is right clicked on when alt is held
/atom/proc/alt_click_secondary(mob/user)
if(!user.can_interact_with(src))
return FALSE
if(SEND_SIGNAL(src, COMSIG_CLICK_ALT_SECONDARY, user) & COMPONENT_CANCEL_CLICK_ALT_SECONDARY)
return
if(isobserver(user) && user.client && check_rights_for(user.client, R_DEBUG))
user.client.toggle_tag_datum(src)
return

/mob/proc/TurfAdjacent(turf/tile)
return tile.Adjacent(src)

Expand Down
43 changes: 41 additions & 2 deletions code/_onclick/click_alt.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* ### Base proc for alt click interaction.
* ### Base proc for alt click interaction left click.
*
* If you wish to add custom `click_alt` behavior for a single type, use that proc.
*/
Expand Down Expand Up @@ -53,7 +53,6 @@

client.loot_panel.open(tile)


/**
* ## Custom alt click interaction
* Override this to change default alt click behavior. Return `CLICK_ACTION_SUCCESS`, `CLICK_ACTION_BLOCKING` or `NONE`.
Expand Down Expand Up @@ -86,6 +85,46 @@
return NONE


/**
* ### Base proc for alt click interaction right click.
*
* If you wish to add custom `click_alt_secondary` behavior for a single type, use that proc.
*/
/mob/proc/base_click_alt_secondary(atom/target)
SHOULD_NOT_OVERRIDE(TRUE)

//Hook on the mob to intercept the click
if(SEND_SIGNAL(src, COMSIG_MOB_ALTCLICKON_SECONDARY, target) & COMSIG_MOB_CANCEL_CLICKON)
return

var/can_use_click_action = FALSE
if(isturf(target))
// Turfs are special because they can't be used with can_perform_action
can_use_click_action = can_perform_turf_action(target)
else
can_use_click_action = can_perform_action(target, target.interaction_flags_click | SILENT_ADJACENCY)
if(!can_use_click_action)
return

//Hook on the atom to intercept the click
if(SEND_SIGNAL(target, COMSIG_CLICK_ALT_SECONDARY, src) & COMPONENT_CANCEL_CLICK_ALT_SECONDARY)
return
if(isobserver(src) && client && check_rights_for(client, R_DEBUG))
client.toggle_tag_datum(src)
return
target.click_alt_secondary(src)

/**
* ## Custom alt click secondary interaction
* Override this to change default alt right click behavior.
*
* ### Guard clauses
* Consider adding `interaction_flags_click` before adding unique guard clauses.
**/
/atom/proc/click_alt_secondary(mob/user)
SHOULD_CALL_PARENT(FALSE)
return NONE

/// Helper proc to validate turfs. Used because can_perform_action does not support turfs.
/mob/proc/can_perform_turf_action(turf/target)
if(!CanReach(target)) // No error message for parity with SILENT_ADJACENCY
Expand Down
6 changes: 3 additions & 3 deletions code/_onclick/hud/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@
if(!R.client)
return

//Module is not currently active
screenmob.client.screen -= R.model.get_inactive_modules()

if(!R.shown_robot_modules || !screenmob.hud_used.hud_shown)
//Modules display is hidden
screenmob.client.screen -= module_store_icon //"store" icon

for(var/atom/A in R.model.get_inactive_modules())
//Module is not currently active
screenmob.client.screen -= A
R.shown_robot_modules = 0
screenmob.client.screen -= R.robot_modules_background
return
Expand Down
5 changes: 3 additions & 2 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@
user.client.give_award(/datum/award/achievement/misc/selfouch, user)

user.do_attack_animation(target_mob)
target_mob.attacked_by(src, user)
if(!target_mob.attacked_by(src, user))
return TRUE

SEND_SIGNAL(src, COMSIG_ITEM_POST_ATTACK, target_mob, user, params)

Expand Down Expand Up @@ -318,7 +319,7 @@
SEND_SIGNAL(attacking_item, COMSIG_ITEM_ATTACK_ZONE, src, user, targeting)

if(damage <= 0)
return FALSE
return TRUE

if(ishuman(src) || client) // istype(src) is kinda bad, but it's to avoid spamming the blackbox
SSblackbox.record_feedback("nested tally", "item_used_for_combat", 1, list("[attacking_item.force]", "[attacking_item.type]"))
Expand Down
2 changes: 2 additions & 0 deletions code/datums/actions/mobs/charge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

/datum/action/cooldown/mob_cooldown/charge/Activate(atom/target_atom)
disable_cooldown_actions()
// No charging and meleeing (overridded by StartCooldown after charge ends)
next_melee_use_time = world.time + 100 SECONDS
charge_sequence(owner, target_atom, charge_delay, charge_past)
StartCooldown()
enable_cooldown_actions()
Expand Down
6 changes: 4 additions & 2 deletions code/datums/components/armor_plate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
var/upgrade_name
/// Adds a prefix to the item, demonstrating that it is upgraded in some way.
var/upgrade_prefix = "reinforced"
/// Tracks whether or not we've received an upgrade or not.
var/have_upgraded = FALSE

/datum/armor/armor_plate
melee = 10
Expand Down Expand Up @@ -81,11 +83,11 @@
to_chat(user, span_info("You strengthen [mecha_for_upgrading], improving its resistance against attacks."))
else
SEND_SIGNAL(target_for_upgrading, COMSIG_ARMOR_PLATED, amount, maxamount)
if(upgrade_prefix)
if(upgrade_prefix && !have_upgraded)
target_for_upgrading.name = "[upgrade_prefix] [target_for_upgrading.name]"
have_upgraded = TRUE
to_chat(user, span_info("You strengthen [target_for_upgrading], improving its resistance against attacks."))


/datum/component/armor_plate/proc/dropplates(datum/source, force)
SIGNAL_HANDLER

Expand Down
13 changes: 11 additions & 2 deletions code/datums/components/crafting/tailoring.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,19 @@
/datum/crafting_recipe/drakecloak
name = "Ash Drake Armour"
result = /obj/item/clothing/suit/hooded/cloak/drake
time = 6 SECONDS
time = 4 SECONDS
reqs = list(
/obj/item/stack/sheet/bone = 10,
/obj/item/stack/sheet/sinew = 2,
/obj/item/drake_remains = 1,
)
category = CAT_CLOTHING

/datum/crafting_recipe/drakeremains
name = "Drake Remains"
result = /obj/item/drake_remains
time = 1 SECONDS
reqs = list(
/obj/item/stack/sheet/bone = 10,
/obj/item/stack/sheet/animalhide/ashdrake = 5,
)
category = CAT_CLOTHING
Expand Down
4 changes: 2 additions & 2 deletions code/datums/components/energized.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
tram_velocity_sign = tram.travel_direction & EAST ? 1 : -1

// How far away are we? negative if already passed.
var/approach_distance = tram_velocity_sign * (plate_pos - (tram_pos + (DEFAULT_TRAM_LENGTH * 0.5)))
var/approach_distance = tram_velocity_sign * (plate_pos - (tram_pos + DEFAULT_TRAM_MIDPOINT))

// Check if our victim is in the active path of the tram.
if(!tram.controller_active)
Expand All @@ -106,7 +106,7 @@
return FALSE
if((tram.travel_direction & EAST) && outbound > tram.destination_platform.platform_code)
return FALSE
if(approach_distance >= AMBER_THRESHOLD_DEGRADED)
if(approach_distance >= XING_THRESHOLD_AMBER)
return FALSE

// Finally the interesting part where they ACTUALLY get hit!
Expand Down
6 changes: 6 additions & 0 deletions code/datums/components/shielded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
var/show_charge_as_alpha = FALSE
/// The item we use for recharging
var/recharge_path
/// Whether or not we lose a charge when hit by 0 damage items or projectiles
var/lose_charge_on_damageless = FALSE

/// The cooldown tracking when we were last hit
COOLDOWN_DECLARE(recently_hit_cd)
/// The cooldown tracking when we last replenished a charge
Expand Down Expand Up @@ -172,6 +175,9 @@
if(lose_multiple_charges) // if the shield has health like damage we'll lose charges equal to the damage of the hit
charge_loss = damage

else if(!lose_charge_on_damageless && !damage)
charge_loss = 0

adjust_charge(-charge_loss)

INVOKE_ASYNC(src, PROC_REF(actually_run_hit_callback), owner, attack_text, current_charges)
Expand Down
1 change: 0 additions & 1 deletion code/datums/diseases/_disease.dm
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@
return FALSE
end = Temp


/datum/disease/proc/cure(add_resistance = TRUE)
if(severity == DISEASE_SEVERITY_UNCURABLE) //aw man :(
return
Expand Down
5 changes: 2 additions & 3 deletions code/datums/diseases/advance/symptoms/sneeze.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@
if(!suppress_warning)
affected_mob.emote("sniff")
else
active_disease.airborne_spread(spread_range, force_spread = TRUE, require_facing = TRUE)
if(affected_mob.can_spread_airborne_diseases()) //don't spread germs if they covered their mouth
affected_mob.infectious_sneeze(active_disease, TRUE, range = spread_range)
if(cartoon_sneezing) //Yeah, this can fling you around even if you have a space suit helmet on. It's, uh, bluespace snot, yeah.
affected_mob.emote("sneeze")
to_chat(affected_mob, span_userdanger("You are launched violently backwards by an all-mighty sneeze!"))
var/sneeze_distance = rand(2,4) //twice as far as a normal baseball bat strike will fling you
var/turf/target = get_ranged_target_turf(affected_mob, REVERSE_DIR(affected_mob.dir), sneeze_distance)
affected_mob.throw_at(target, sneeze_distance, rand(1,4)) //with the wounds update, sneezing at 7 speed was causing peoples bones to spontaneously explode, turning cartoonish sneezing into a nightmarishly lethal GBS 2.0 outbreak
else if(COOLDOWN_FINISHED(src, sneeze_cooldown) || !COOLDOWN_FINISHED(src, sneeze_cooldown) && prob(60) && !off_cooldown_sneezed)
affected_mob.emote("sneeze")
COOLDOWN_START(src, sneeze_cooldown, 5 SECONDS)
if(!off_cooldown_sneezed && !COOLDOWN_FINISHED(src, sneeze_cooldown))
off_cooldown_sneezed = TRUE
Expand Down
6 changes: 3 additions & 3 deletions code/datums/diseases/cold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cures = list(/datum/reagent/medicine/spaceacillin)
agent = "XY-rhinovirus"
viable_mobtypes = list(/mob/living/carbon/human)
spreading_modifier = 0.5
spreading_modifier = 0.1
spread_text = "Airborne"
severity = DISEASE_SEVERITY_NONTHREAT
required_organ = ORGAN_SLOT_LUNGS
Expand All @@ -20,7 +20,7 @@
switch(stage)
if(2)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("sneeze")
affected_mob.infectious_sneeze(src, TRUE)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
Expand All @@ -33,7 +33,7 @@
return FALSE
if(3)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("sneeze")
affected_mob.infectious_sneeze(src, TRUE)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
Expand Down
4 changes: 2 additions & 2 deletions code/datums/diseases/cold9.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
if(2)
affected_mob.adjust_bodytemperature(-5 * seconds_per_tick)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("sneeze")
affected_mob.infectious_sneeze(src, TRUE)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
Expand All @@ -34,7 +34,7 @@
if(3)
affected_mob.adjust_bodytemperature(-10 * seconds_per_tick)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("sneeze")
affected_mob.infectious_sneeze(src, TRUE)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/diseases/dna_spread.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
switch(stage)
if(2, 3) //Pretend to be a cold and give time to spread.
if(SPT_PROB(4, seconds_per_tick))
affected_mob.emote("sneeze")
affected_mob.sneeze()
if(SPT_PROB(4, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/diseases/fake_gbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
switch(stage)
if(2)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("sneeze")
affected_mob.sneeze()
if(3)
if(SPT_PROB(2.5, seconds_per_tick))
affected_mob.emote("cough")
Expand Down
Loading

0 comments on commit 7064a74

Please sign in to comment.