Skip to content

Commit

Permalink
TGS Test Merge (#8442)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Feb 13, 2025
2 parents b140b2e + 1219b9d commit d2767b1
Show file tree
Hide file tree
Showing 63 changed files with 315 additions and 239 deletions.
6 changes: 3 additions & 3 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
#define COMSIG_MOB_ATTEMPTING_EQUIP "mob_attempting_equip"
#define COMPONENT_MOB_CANCEL_ATTEMPT_EQUIP (1<<0)

/// For when a mob is devoured by a Xeno
#define COMSIG_MOB_DEVOURED "mob_devoured"
#define COMPONENT_CANCEL_DEVOUR (1<<0)
/// For when a mob is hauled by a Xeno
#define COMSIG_MOB_HAULED "mob_hauled"
#define COMPONENT_CANCEL_HAUL (1<<0)
// Reserved for tech trees
#define COMSIG_MOB_ENTER_TREE "mob_enter_tree"
#define COMPONENT_CANCEL_TREE_ENTRY (1<<0)
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
#define TRAIT_TEMPORARILY_MUTED "temporarily_muted"
/// Mob wont get hit by stray projectiles
#define TRAIT_NO_STRAY "trait_no_stray"
/// When a Xeno hauls us. We can take out our knife or gun if hauled though we are immobilized, also shielded from most damage.
#define TRAIT_HAULED "hauled"
// only used by valkyrie
#define TRAIT_VALKYRIE_ARMORED "trait_valkyrie_armored"

Expand Down Expand Up @@ -439,6 +441,8 @@ GLOBAL_LIST(trait_name_map)
#define TRAIT_SOURCE_STRAIN "t_s_strain"
///Status trait coming from being buckled.
#define TRAIT_SOURCE_BUCKLE "t_s_buckle"
//Status trait coming from being hauled by a xeno.
#define TRAIT_SOURCE_XENO_HAUL "t_s_xeno_haul"
///Status trait coming from being assigned as [acting] squad leader.
#define TRAIT_SOURCE_SQUAD_LEADER "t_s_squad_leader"
///Status trait coming from their job
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/typecheck/xenos.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
var/datum/hive_status/corrupted/renegade/renegade_hive = hive
return renegade_hive.iff_protection_check(src, attempt_harm_mob)

if(HAS_TRAIT(attempt_harm_mob, TRAIT_HAULED))
return TRUE

return hive.is_ally(attempt_harm_mob)

// need this to set the data for walls/eggs/huggers when they are initialized
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

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

if(body_position == LYING_DOWN) //No attacks while laying down
if(body_position == LYING_DOWN && !HAS_TRAIT(src, TRAIT_HAULED)) //No attacks while laying down
return 0

var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
Expand Down
9 changes: 9 additions & 0 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
/obj/item/proc/attack_self(mob/user)
if(HAS_TRAIT(user, TRAIT_HAULED))
return
SHOULD_CALL_PARENT(TRUE)
SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user)
SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK_SELF, src)
Expand Down Expand Up @@ -35,6 +37,13 @@
else if(initiate_surgery_moment(I, src, null, user))
return TRUE
*/
if(HAS_TRAIT(user, TRAIT_HAULED))
var/mob/living/carbon/human/victim = user
if(src == victim) // No stabbing ourselves to death
return
if(victim.handle_haul_resist(user, src, I))
return ATTACKBY_HINT_UPDATE_NEXT_MOVE
return
if(istype(I) && ismob(user))
return I.attack(src, user)

Expand Down
10 changes: 5 additions & 5 deletions code/datums/ammo/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
/datum/ammo/xeno/acid/on_hit_mob(mob/M, obj/projectile/P)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(C.status_flags & XENO_HOST && HAS_TRAIT(C, TRAIT_NESTED) || C.stat == DEAD)
if(C.status_flags & XENO_HOST && HAS_TRAIT(C, TRAIT_NESTED) || C.stat == DEAD || HAS_TRAIT(C, TRAIT_HAULED))
return FALSE
..()

Expand Down Expand Up @@ -252,7 +252,7 @@
/datum/ammo/xeno/boiler_gas/on_hit_mob(mob/moob, obj/projectile/proj)
if(iscarbon(moob))
var/mob/living/carbon/carbon = moob
if(carbon.status_flags & XENO_HOST && HAS_TRAIT(carbon, TRAIT_NESTED) || carbon.stat == DEAD)
if(carbon.status_flags & XENO_HOST && HAS_TRAIT(carbon, TRAIT_NESTED) || carbon.stat == DEAD || HAS_TRAIT(carbon, TRAIT_HAULED))
return
var/datum/effects/neurotoxin/neuro_effect = locate() in moob.effects_list
if(!neuro_effect)
Expand Down Expand Up @@ -302,7 +302,7 @@
/datum/ammo/xeno/boiler_gas/acid/on_hit_mob(mob/moob, obj/projectile/proj)
if(iscarbon(moob))
var/mob/living/carbon/carbon = moob
if(carbon.status_flags & XENO_HOST && HAS_TRAIT(carbon, TRAIT_NESTED) || carbon.stat == DEAD)
if(carbon.status_flags & XENO_HOST && HAS_TRAIT(carbon, TRAIT_NESTED) || carbon.stat == DEAD || HAS_TRAIT(carbon, TRAIT_HAULED))
return
to_chat(moob,SPAN_HIGHDANGER("Acid covers your body! Oh fuck!"))
playsound(moob,"acid_strike",75,1)
Expand Down Expand Up @@ -330,7 +330,7 @@
/datum/ammo/xeno/bone_chips/on_hit_mob(mob/living/M, obj/projectile/P)
if(iscarbon(M))
var/mob/living/carbon/C = M
if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD)
if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD || HAS_TRAIT(C, TRAIT_HAULED))
return
if(ishuman_strict(M) || isxeno(M))
playsound(M, 'sound/effects/spike_hit.ogg', 25, 1, 1)
Expand Down Expand Up @@ -360,7 +360,7 @@
/datum/ammo/xeno/bone_chips/spread/runner/on_hit_mob(mob/living/M, obj/projectile/P)
if(iscarbon(M))
var/mob/living/carbon/C = M
if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD)
if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD || HAS_TRAIT(C, TRAIT_HAULED))
return
if(ishuman_strict(M) || isxeno(M))
playsound(M, 'sound/effects/spike_hit.ogg', 25, 1, 1)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/diseases/xeno_transformation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
if (prob(4))
to_chat(affected_mob, SPAN_DANGER("You can feel something move...inside."))
if (prob(5))
to_chat(affected_mob, "\italic " + pick("Soon we will be one...", "Must... devour...", "Capture...", "We are perfect."))
to_chat(affected_mob, "\italic " + pick("Soon we will be one...", "Must... evolve...", "Capture...", "We are perfect."))
if(4)
if (prob(10))
to_chat(affected_mob, pick(SPAN_DANGER("Your skin feels very tight."), SPAN_DANGER("Your blood boils!")))
affected_mob.take_limb_damage(3)
if (prob(5))
affected_mob.whisper(pick("Soon we will be one...", "Must... devour...", "Capture...", "We are perfect.", "Hsssshhhhh!"))
affected_mob.whisper(pick("Soon we will be one...", "Must... evolve...", "Capture...", "We are perfect.", "Hsssshhhhh!"))
if (prob(8))
to_chat(affected_mob, SPAN_DANGER("You can feel... something...inside you."))
if(5)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/effects/acid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

if(ishuman(A))
var/mob/living/carbon/human/H = A
if(H.status_flags & XENO_HOST && HAS_TRAIT(H, TRAIT_NESTED) || H.stat == DEAD)
if(H.status_flags & XENO_HOST && HAS_TRAIT(H, TRAIT_NESTED) || H.stat == DEAD || HAS_TRAIT(H, TRAIT_HAULED))
return FALSE

. = ..()
Expand Down
10 changes: 5 additions & 5 deletions code/datums/pain/_pain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@

if(new_level >= PAIN_LEVEL_SEVERE && feels_pain)
RegisterSignal(source_mob, COMSIG_MOB_DRAGGED, PROC_REF(oxyloss_drag), override = TRUE)
RegisterSignal(source_mob, COMSIG_MOB_DEVOURED, PROC_REF(handle_devour), override = TRUE)
RegisterSignal(source_mob, COMSIG_MOB_HAULED, PROC_REF(handle_haul), override = TRUE)
RegisterSignal(source_mob, COMSIG_MOVABLE_PRE_THROW, PROC_REF(oxy_kill), override = TRUE)

last_level = new_level
Expand Down Expand Up @@ -232,7 +232,7 @@
if(new_level < PAIN_LEVEL_SEVERE)
UnregisterSignal(source_mob, list(
COMSIG_MOB_DRAGGED,
COMSIG_MOB_DEVOURED,
COMSIG_MOB_HAULED,
COMSIG_MOVABLE_PRE_THROW
))

Expand Down Expand Up @@ -294,14 +294,14 @@
if(H.species.flags & HAS_HARDCRIT)
source.apply_damage(20, OXY)

/datum/pain/proc/handle_devour(mob/living/source, mob/living/carbon/xenomorph/devourer)
/datum/pain/proc/handle_haul(mob/living/source, mob/living/carbon/xenomorph/hauler)
SIGNAL_HANDLER
if(source.chestburst)
return
if(source.ally_of_hivenumber(devourer.hivenumber))
if(source.ally_of_hivenumber(hauler.hivenumber))
return
oxy_kill(source)
return COMPONENT_CANCEL_DEVOUR
return COMPONENT_CANCEL_HAUL

/datum/pain/proc/oxy_kill(mob/living/source)
SIGNAL_HANDLER
Expand Down
2 changes: 1 addition & 1 deletion code/datums/pain/pain_yautja.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/datum/pain/yautja/oxyloss_drag(mob/living/source, mob/puller)
return

/datum/pain/yautja/handle_devour(mob/living/source)
/datum/pain/yautja/handle_haul(mob/living/source)
return

/datum/pain/yautja/oxy_kill(mob/living/source)
Expand Down
14 changes: 7 additions & 7 deletions code/datums/tutorial/xenomorph/xenomorph_basic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@
SIGNAL_HANDLER
TUTORIAL_ATOM_FROM_TRACKING(/mob/living/carbon/human, human_dummy)
UnregisterSignal(human_dummy, COMSIG_MOVABLE_XENO_START_PULLING)
message_to_player("Well done. Now devour the human by clicking on your character with the grab selected in your hand. You must not move during this process.")
update_objective("Devour the grabbed human by clicking on them with the grab in-hand.")
RegisterSignal(human_dummy, COMSIG_MOB_DEVOURED, PROC_REF(nest_cap_phase_five))
message_to_player("Well done. Now haul the human by clicking on your character with the grab selected in your hand. You must not move during this process.")
update_objective("Haul the grabbed human by clicking on them with the grab in-hand.")
RegisterSignal(human_dummy, COMSIG_MOB_HAULED, PROC_REF(nest_cap_phase_five))

/datum/tutorial/xenomorph/basic/proc/nest_cap_phase_five()
SIGNAL_HANDLER
message_to_player("Well done, you can reguritate the human using the new ability you have gained.")
message_to_player("Be careful. Real humans may put up a fight and can try to cut out of you from inside!")
give_action(xeno, /datum/action/xeno_action/onclick/regurgitate)
message_to_player("Well done, you can release the human using the new ability you have gained.")
message_to_player("Be careful. Real humans may put up a fight and can try to cut out of your grip, killing you!")
give_action(xeno, /datum/action/xeno_action/onclick/release_haul)
addtimer(CALLBACK(src, PROC_REF(nest_cap_phase_six)), 15 SECONDS)

/datum/tutorial/xenomorph/basic/proc/nest_cap_phase_six()
Expand All @@ -227,7 +227,7 @@

/datum/tutorial/xenomorph/basic/proc/nest_cap_phase_seven()
TUTORIAL_ATOM_FROM_TRACKING(/mob/living/carbon/human, human_dummy)
UnregisterSignal(human_dummy, COMSIG_MOB_DEVOURED)
UnregisterSignal(human_dummy, COMSIG_MOB_HAULED)
RegisterSignal(human_dummy, COMSIG_MOB_NESTED, PROC_REF(on_mob_nested))
message_to_player("Nest the captive human!")
update_objective("Nest the captive human!")
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/effects/effect_system/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@
return FALSE
if(isyautja(affected_mob) && prob(75))
return FALSE
if(HAS_TRAIT(affected_mob, TRAIT_NESTED) && affected_mob.status_flags & XENO_HOST)
if(HAS_TRAIT(affected_mob, TRAIT_NESTED) && affected_mob.status_flags & XENO_HOST || HAS_TRAIT(affected_mob, TRAIT_HAULED))
return FALSE

affected_mob.last_damage_data = cause_data
Expand Down Expand Up @@ -600,7 +600,7 @@
return FALSE
if(isyautja(moob))
return FALSE
if(HAS_TRAIT(moob, TRAIT_NESTED) && moob.status_flags & XENO_HOST)
if(HAS_TRAIT(moob, TRAIT_NESTED) && moob.status_flags & XENO_HOST || HAS_TRAIT(moob, TRAIT_HAULED))
return FALSE

var/mob/living/carbon/human/human_moob
Expand Down Expand Up @@ -658,7 +658,7 @@
return FALSE
if(isyautja(moob) && prob(75))
return FALSE
if(HAS_TRAIT(moob, TRAIT_NESTED) && moob.status_flags & XENO_HOST)
if(HAS_TRAIT(moob, TRAIT_NESTED) && moob.status_flags & XENO_HOST || HAS_TRAIT(moob, TRAIT_HAULED))
return FALSE

var/mob/living/carbon/human/human_moob
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/explosives/grenades/grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
to_chat(user, SPAN_WARNING("Your programming prevents you from using this!"))
return FALSE

if(HAS_TRAIT(user, TRAIT_HAULED)) // If somehow they have a grenade in hand while hauled, we don't want them to prime it
return FALSE

return TRUE

/obj/item/explosive/grenade/dropped(mob/user)
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,8 @@ W is always an item. stop_warning prevents messaging. user may be null.**/
return handle_item_insertion(W, prevent_warning, user)

/obj/item/storage/attack_hand(mob/user, mods)
if(HAS_TRAIT(user, TRAIT_HAULED))
return
if (loc == user)
if((mods && mods["alt"] || storage_flags & STORAGE_USING_DRAWING_METHOD) && ishuman(user) && length(contents)) //Alt mod can reach attack_hand through the clicked() override.
var/obj/item/I
Expand Down
6 changes: 3 additions & 3 deletions code/modules/admin/autoreply.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ ON_CONFIG_LOAD(/datum/autoreply/mentor/macros)
Rangefinders allow you to get tile coordinates (longitude and latitude) by lasing it while zoomed in (produces a GREEN laser). Ctrl + Click on any open tile to start lasing. Ctrl + Click on your rangefinders to stop lasing without zooming out. Coordinates can be used by Staff Officers to send supply drops or to perform Orbital Bombardment. You also can use them to call mortar fire if there are engineers with a mortar. \
Laser Designators have a second mode (produces a RED laser) that allows highlighting targets for Close Air Support performed by dropship pilots. They also have a fixed ID number that is shown on the pilot's weaponry console. Examine the laser designator to check its ID. Red laser must be maintained as long as needed in order for the dropship pilot to bomb the designated area. To switch between lasing modes, Alt + Click the laser designator. Alternatively, Right + Click it in hand and click \"Toggle Mode\"."

/datum/autoreply/mentor/devour
title = "X: Devour as Xeno"
message = "Devouring is useful to quickly transport incapacitated hosts from one place to another. In order to devour a host as a Xeno, grab the mob (CTRL+Click) and then click on yourself to begin devouring. The host can break out of your stomach, which will result in your death so make sure your target is incapacitated. After approximately 1 minute host will be automatically regurgitated. To release your target voluntary, click 'Regurgitate' on the HUD to throw them back up."
/datum/autoreply/mentor/haul
title = "X: Haul as Xeno"
message = "Hauling is useful to quickly transport incapacitated hosts from one place to another. In order to haul a host as a Xeno, grab the mob (CTRL+Click) and then click on yourself to begin hauling. The host can break out of your grip, which will result in your death so make sure your target is incapacitated. After approximately 1 minute host will be automatically released. To release your target voluntary, click 'Release' on the HUD to throw them back up."

/datum/autoreply/mentor/plasma
title = "X: No plasma regen"
Expand Down
5 changes: 2 additions & 3 deletions code/modules/animations/animation_library.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ Can look good elsewhere as well.*/
if(A.clone)
if(src.Adjacent(A.clone))
A = A.clone
if(buckled || anchored)
return //it would look silly.
if(buckled || anchored || HAS_TRAIT(src, TRAIT_HAULED)) //it would look silly.
return
var/pixel_x_diff = 0
var/pixel_y_diff = 0
var/direction = get_dir(src, A)
Expand Down Expand Up @@ -207,7 +207,6 @@ Can look good elsewhere as well.*/
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2, flags = ANIMATION_PARALLEL)
animate(pixel_x = initial(pixel_x), pixel_y = initial(pixel_y), time = 2)


/atom/proc/animation_spin(speed = 5, loop_amount = -1, clockwise = TRUE, sections = 3, angular_offset = 0, pixel_fuzz = 0)
if(!sections)
return
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@
if(is_mob_incapacitated())
return

if(HAS_TRAIT(src, TRAIT_HAULED))
return

if(pickup_recent_item_on_turf(user_turf))
return

Expand Down
Loading

0 comments on commit d2767b1

Please sign in to comment.