Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/tg/ Status Effects Part 2 - datum, KD, KO, Stuns #4842

Merged
merged 111 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
aae4b6c
WIP
fira Nov 2, 2023
3266b3e
fixes
fira Nov 2, 2023
39eb055
adjustments
fira Nov 3, 2023
86705c1
more fixes
fira Nov 3, 2023
9249933
srsly CI
fira Nov 3, 2023
e158f90
Merge branch 'master' into tg-effects-1123
fira Nov 4, 2023
b7f5956
conflict fix
fira Nov 4, 2023
8b47687
typo chloroform
fira Nov 4, 2023
e102514
WIP
fira Nov 5, 2023
c8f28fd
crawling tweaks
fira Nov 5, 2023
1540058
tweak
fira Nov 5, 2023
83013e3
endurance change
fira Nov 5, 2023
d587c68
remove now unused resting procs
fira Nov 5, 2023
cd8e217
move stop pulling logic
fira Nov 5, 2023
af2854c
oopsie
fira Nov 5, 2023
614185d
Merge branch 'master' into tg-effects-1123
fira Nov 7, 2023
aa3d3c7
Merge branch 'tg-effects-1123' into tg-effects-part2-poc
fira Nov 7, 2023
f7e0bde
transform fixes
fira Nov 7, 2023
fcaa324
Merge branch 'tg-effects-1123' into tg-effects-part2-poc
fira Nov 7, 2023
d84fab8
Explosions now stun again
fira Nov 7, 2023
dd9b2dc
AGH
fira Nov 7, 2023
03eb8c9
Merge branch 'tg-effects-1123' into tg-effects-part2-poc
fira Nov 7, 2023
e14781f
fix xeno immobilized overlay bein shown too often
fira Nov 7, 2023
152d696
add snowflake ignore check for projectiles and nests
fira Nov 7, 2023
f8e985f
you can't do this to me
fira Nov 7, 2023
716d9e6
so embarassing
fira Nov 7, 2023
d72fcc9
Refactor Freeze
fira Nov 8, 2023
ee1bc99
small oopsie
fira Nov 8, 2023
fd6a8da
WIP
fira Nov 9, 2023
261d685
comment revert
fira Nov 9, 2023
ecc0fd6
useless src
fira Nov 9, 2023
65be7a2
explicit ui_data
fira Nov 9, 2023
f974e82
Merge branch 'master' into tg-effects-prelude-freeze
fira Nov 9, 2023
e503e46
Merge branch 'master' into tg-effects-1123
fira Nov 9, 2023
fe450ec
minute adjustments
fira Nov 9, 2023
72637f9
merged doubled init
fira Nov 9, 2023
37f3a29
animation fix
fira Nov 9, 2023
9037518
Merge branch 'tg-effects-prelude-freeze' into tg-effects-1123
fira Nov 9, 2023
f26d91b
bugfix
fira Nov 9, 2023
b0a9fe8
Merge branch 'tg-effects-prelude-living' into tg-effects-1123
fira Nov 9, 2023
ee19848
small memory change
fira Nov 9, 2023
2393c4d
fix merge accidents and two bugs
fira Nov 9, 2023
092060e
Merge branch 'tg-effects-1123' into tg-effects-part2-poc
fira Nov 9, 2023
aeb375b
add missing handler
fira Nov 9, 2023
65d39e5
Merge branch 'tg-effects-1123' into tg-effects-part2-poc
fira Nov 9, 2023
45283be
Merge branch 'master' into tg-effects-prelude-freeze
fira Nov 13, 2023
99491e4
Merge branch 'tg-effects-prelude-freeze' into tg-effects-1123
fira Nov 13, 2023
9425267
WIP
fira Nov 13, 2023
651974a
watch this blow up
fira Nov 13, 2023
54bea03
reverted sent changes
fira Nov 13, 2023
ddb1ff6
missing trait in trait list
fira Nov 13, 2023
426b2db
Merge branch 'tg-effects-1123' into tg-effects-part2-poc
fira Nov 13, 2023
b6393a1
fix explosion crawling
fira Nov 13, 2023
084c827
explicit explosion stun
fira Nov 13, 2023
2eaeec0
Merge branch 'master' into tg-effects-1123
fira Nov 16, 2023
b4a7332
double trait
fira Nov 16, 2023
a6ecfcd
review fixes
fira Nov 17, 2023
935d77d
comment removal
fira Nov 17, 2023
f5390a3
fix incorrect logic for welding goggles
fira Nov 19, 2023
7890da1
fix double seats, probably
fira Nov 19, 2023
39af3a7
fix buckled movement probably
fira Nov 19, 2023
617580a
rest cd
fira Nov 20, 2023
7d4a9fa
fix welding mask logic
fira Nov 20, 2023
863589c
bugfixes
fira Nov 20, 2023
f63732c
stasis bag safety check
fira Nov 20, 2023
cef8d44
fix roundstart nesting angle
fira Nov 20, 2023
442a4ff
resting doesnt prevent opening xeno tacmap anymore
fira Nov 20, 2023
62d5b98
fix freeze overlay on nested
fira Nov 20, 2023
e86e71e
Merge branch 'master' into tg-effects-1123
fira Nov 20, 2023
d11da00
Merge branch 'tg-effects-1123' into tg-effects-part2-poc
fira Nov 20, 2023
7525607
doc
fira Nov 20, 2023
465f7c3
compile fixes, knockdown now immobilizess, as CM Dev intended
fira Nov 20, 2023
ba21d32
Merge branch 'master' into tg-effects-part2-poc
fira Nov 20, 2023
f753342
Merge branch 'master' into tg-effects-1123
fira Nov 20, 2023
8ca5960
Merge branch 'tg-effects-1123' into tg-effects-part2-poc
fira Nov 20, 2023
3016d51
remove random offset on buckled
fira Nov 21, 2023
0091b02
fix missing animation parallel causing knock to cancel some others
fira Nov 21, 2023
8f794cf
Merge branch 'master' into tg-effects-1123
fira Nov 22, 2023
d5be1f3
fix species limbs and falling over during creation
fira Nov 24, 2023
2122188
consistency fix
fira Nov 24, 2023
30b6443
Merge branch 'master' into tg-effects-1123
fira Nov 25, 2023
bb1226a
a noob, i am
fira Nov 25, 2023
b009be3
Merge branch 'master' into tg-effects-1123
fira Nov 27, 2023
300f32f
Merge branch 'tg-effects-1123' into tg-effects-part2-poc
fira Nov 27, 2023
a66e316
Merge branch 'master' into tg-effects-part2-poc
fira Nov 27, 2023
1e20b82
clean up icon file
fira Nov 27, 2023
f6034d7
fixed missing alerts updates on hud/mob changes
fira Nov 27, 2023
d931172
Tackles now stun. Removed some carlarc stuff
fira Nov 30, 2023
3efb737
Stun+Knockdown combo fixes
fira Nov 30, 2023
b9d4a83
lunge
fira Nov 30, 2023
2faa171
SIGHHHHHHHHHHHH
fira Nov 30, 2023
4a693cf
Tabling now stuns
fira Nov 30, 2023
fc4b61f
pounce stun
fira Dec 1, 2023
c456cca
WOOPS
fira Dec 1, 2023
8086ac4
Merge branch 'master' into tg-effects-part2-poc
realforest2001 Dec 1, 2023
572fdd5
fix timer overriding, this is a fallback anyway
fira Dec 2, 2023
ad1a99b
Merge branch 'master' into tg-effects-part2-poc
fira Dec 7, 2023
da7199f
typo + whitespace
fira Dec 7, 2023
5212bc1
comments
fira Dec 7, 2023
bb96e2a
fix pounces + armbrace memes
fira Dec 7, 2023
db8c3a0
Merge branch 'master' into tg-effects-part2-poc
fira Dec 8, 2023
e5e08cc
Fix Warrior Fling not Stunning
fira Dec 9, 2023
6bb5ac4
spell fix
fira Dec 9, 2023
94ca521
layering changes
fira Dec 10, 2023
14f57b1
fix xeno hide layers on crit
fira Dec 10, 2023
31e15dc
fix sleeping dreams
fira Dec 10, 2023
2f46a5e
fix crit sound overrides and xeno crit blind
fira Dec 10, 2023
6fa7d17
fix xenohide to unhide on KO rather than lying down
fira Dec 10, 2023
5950865
Merge branch 'master' into tg-effects-part2-poc
fira Dec 16, 2023
f6536a2
Merge branch 'master' into tg-effects-part2-poc
fira Dec 18, 2023
d2bfe9b
comments
fira Dec 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions code/__DEFINES/alerts.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#define ALERT_BUCKLED "buckled"
#define ALERT_HANDCUFFED "handcuffed"
#define ALERT_LEGCUFFED "legcuffed"
#define ALERT_FLOORED "floored"
#define ALERT_INCAPACITATED "incapacitated"
#define ALERT_KNOCKEDOUT "knockedout"
#define ALERT_IMMOBILIZED "immobilized"
5 changes: 0 additions & 5 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
#define COMSIG_LIVING_SPEAK "living_speak"
#define COMPONENT_OVERRIDE_SPEAK (1<<0)

#define COMSIG_LIVING_APPLY_EFFECT "living_apply_effect"
#define COMSIG_LIVING_ADJUST_EFFECT "living_adjust_effect"
#define COMSIG_LIVING_SET_EFFECT "living_set_effect"
#define COMPONENT_CANCEL_EFFECT (1<<0)

/// From /obj/structure/proc/do_climb(var/mob/living/user, mods)
#define COMSIG_LIVING_CLIMB_STRUCTURE "climb_over_structure"
/// From /mob/living/Collide(): (atom/A)
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
#define COMSIG_MOB_MOVE_OR_LOOK "mob_move_or_look"
#define COMPONENT_OVERRIDE_MOB_MOVE_OR_LOOK (1<<0)

///from rejuv
#define COMSIG_LIVING_POST_FULLY_HEAL "living_post_fully_heal"

///from /mob/living/emote(): ()
#define COMSIG_MOB_EMOTE "mob_emote"

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// Multiplier for Stun/KD/KO/etc durations in new backend, due to old system being based on life ticks
#define GLOBAL_STATUS_MULTIPLIER 20 // each in-code unit is worth 20ds of duration

#define HEALTH_THRESHOLD_DEAD -100
#define HEALTH_THRESHOLD_CRIT -50

Expand Down
25 changes: 25 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
///if it allows multiple instances of the effect
#define STATUS_EFFECT_MULTIPLE 0
///if it allows only one, preventing new instances
#define STATUS_EFFECT_UNIQUE 1
///if it allows only one, but new instances replace
#define STATUS_EFFECT_REPLACE 2
/// if it only allows one, and new instances just instead refresh the timer
#define STATUS_EFFECT_REFRESH 3

///Processing flags - used to define the speed at which the status will work
///This is fast - 0.2s between ticks (I believe!)
#define STATUS_EFFECT_FAST_PROCESS 0
///This is slower and better for more intensive status effects - 1s between ticks
#define STATUS_EFFECT_NORMAL_PROCESS 1

//Incapacitated status effect flags
/// If the incapacitated status effect will ignore a mob in restraints (handcuffs)
#define IGNORE_RESTRAINTS (1<<0)
/// If the incapacitated status effect will ignore a mob in stasis (stasis beds)
#define IGNORE_STASIS (1<<1)
/// If the incapacitated status effect will ignore a mob being agressively grabbed
#define IGNORE_GRAB (1<<2)

/// Time threshold after which we launch ending timer - this should be higher than the slowest processing rate
#define STATUS_EFFECT_TIME_THRESHOLD (2 SECONDS)
4 changes: 3 additions & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,11 @@
#define SS_PRIORITY_FAST_OBJECTS 105
#define SS_PRIORITY_OBJECTS 104
#define SS_PRIORITY_DECORATOR 99
#define SS_PRIORITY_EFFECTS 97
#define SS_PRIORITY_FASTEFFECTS 96
#define SS_PRIORITY_HIJACK 97
#define SS_PRIORITY_POWER 95
#define SS_PRIORITY_EFFECTS 92
#define SS_PRIORITY_OLDEFFECTS 92
#define SS_PRIORITY_MACHINERY 90
#define SS_PRIORITY_FZ_TRANSITIONS 88
#define SS_PRIORITY_ROUND_RECORDING 83
Expand Down
1 change: 1 addition & 0 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
hud_version = display_hud_version
persistent_inventory_update(screenmob)
mymob.update_action_buttons(TRUE)
reorganize_alerts(screenmob)
mymob.reload_fullscreens()

// ensure observers get an accurate and up-to-date view
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystem/processing/effects.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
PROCESSING_SUBSYSTEM_DEF(effects)
name = "Effects"
wait = 1 SECONDS
flags = SS_NO_INIT | SS_KEEP_TIMING
priority = SS_PRIORITY_EFFECTS
4 changes: 4 additions & 0 deletions code/controllers/subsystem/processing/fasteffects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PROCESSING_SUBSYSTEM_DEF(fasteffects)
name = "Fast Effects"
wait = 0.2 SECONDS
priority = SS_PRIORITY_FASTEFFECTS
5 changes: 5 additions & 0 deletions code/controllers/subsystem/processing/oldeffects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PROCESSING_SUBSYSTEM_DEF(oldeffects)
name = "Old Effects"
wait = 1 SECONDS
flags = SS_NO_INIT | SS_KEEP_TIMING
priority = SS_PRIORITY_OLDEFFECTS
3 changes: 2 additions & 1 deletion code/datums/ammo/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@
/datum/ammo/proc/knockback_effects(mob/living/living_mob, obj/projectile/fired_projectile)
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
target.apply_effect(0.7, WEAKEN) // 0.9 seconds of stun, per agreement from Balance Team when switched from MC stuns to exact stuns
target.Stun(0.7) // Previous comment said they believed 0.7 was 0.9s and that the balance team approved this. Geez...
target.KnockDown(0.7)
target.apply_effect(1, SUPERSLOW)
target.apply_effect(2, SLOW)
to_chat(target, SPAN_XENODANGER("You are shaken by the sudden impact!"))
Expand Down
3 changes: 2 additions & 1 deletion code/datums/ammo/bullet/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!"))
target.apply_effect(0.5, WEAKEN)
target.KnockDown(0.5) // purely for visual effect, noone actually cares
target.Stun(0.5)
target.apply_effect(2, SUPERSLOW)
target.apply_effect(5, SLOW)
else
Expand Down
12 changes: 8 additions & 4 deletions code/datums/ammo/bullet/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!"))
target.apply_effect(0.5, WEAKEN)
target.KnockDown(0.5) // If you ask me the KD should be left out, but players like their visual cues
target.Stun(0.5)
target.apply_effect(1, SUPERSLOW)
target.apply_effect(3, SLOW)
else
Expand Down Expand Up @@ -249,7 +250,8 @@
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!"))
target.apply_effect(0.5, WEAKEN)
target.KnockDown(0.5) // If you ask me the KD should be left out, but players like their visual cues
target.Stun(0.5)
target.apply_effect(2, SUPERSLOW)
target.apply_effect(5, SLOW)
else
Expand Down Expand Up @@ -338,7 +340,8 @@
return

shake_camera(M, 3, 4)
M.apply_effect(2, WEAKEN)
M.KnockDown(2) // If you ask me the KD should be left out, but players like their visual cues
M.Stun(2)
M.apply_effect(4, SLOW)
if(iscarbonsizexeno(M))
to_chat(M, SPAN_XENODANGER("The impact knocks you off your feet!"))
Expand All @@ -351,7 +354,8 @@
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!"))
target.apply_effect(0.5, WEAKEN)
target.KnockDown(0.5) // If you ask me the KD should be left out, but players like their visual cues
target.Stun(0.5)
target.apply_effect(2, SUPERSLOW)
target.apply_effect(5, SLOW)
else
Expand Down
17 changes: 4 additions & 13 deletions code/datums/ammo/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
icon_state = "shrapnel_plasma"
damage_type = BURN

/datum/ammo/bullet/shrapnel/plasma/on_hit_mob(mob/hit_mob, obj/projectile/hit_projectile)
hit_mob.apply_effect(2, WEAKEN)
/datum/ammo/bullet/shrapnel/plasma/on_hit_mob(mob/living/hit_mob, obj/projectile/hit_projectile)
hit_mob.Stun(2)

/datum/ammo/energy/yautja/caster
name = "root caster bolt"
Expand Down Expand Up @@ -141,12 +141,8 @@
log_attack("[key_name(C)] was stunned by a high power stun bolt from [key_name(P.firer)] at [get_area(P)]")

if(ishuman(C))
var/mob/living/carbon/human/H = C
stun_time++
H.apply_effect(stun_time, WEAKEN)
else
M.apply_effect(stun_time, WEAKEN)

C.apply_effect(stun_time, WEAKEN)
C.apply_effect(stun_time, STUN)
..()

Expand Down Expand Up @@ -217,12 +213,7 @@
continue
to_chat(M, SPAN_DANGER("A powerful electric shock ripples through your body, freezing you in place!"))
M.apply_effect(stun_time, STUN)

if (ishuman(M))
var/mob/living/carbon/human/H = M
H.apply_effect(stun_time, WEAKEN)
else
M.apply_effect(stun_time, WEAKEN)
M.apply_effect(stun_time, WEAKEN)

/datum/ammo/energy/yautja/rifle/bolt
name = "plasma rifle bolt"
Expand Down
2 changes: 0 additions & 2 deletions code/datums/ammo/rocket.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
/datum/ammo/rocket/ap/on_hit_mob(mob/M, obj/projectile/P)
var/turf/T = get_turf(M)
M.ex_act(150, P.dir, P.weapon_cause_data, 100)
M.apply_effect(2, WEAKEN)
M.apply_effect(2, PARALYZE)
if(ishuman_strict(M)) // No yautya or synths. Makes humans gib on direct hit.
M.ex_act(300, P.dir, P.weapon_cause_data, 100)
Expand All @@ -84,7 +83,6 @@
var/hit_something = 0
for(var/mob/M in T)
M.ex_act(150, P.dir, P.weapon_cause_data, 100)
M.apply_effect(4, WEAKEN)
M.apply_effect(4, PARALYZE)
hit_something = 1
continue
Expand Down
16 changes: 9 additions & 7 deletions code/datums/ammo/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@

if(!isxeno(M))
if(insta_neuro)
if(M.GetKnockDownValueNotADurationDoNotUse() < 3) // If they have less than somewhere random between 4 and 6 seconds KD left and assuming it doesnt get refreshed itnernally
M.adjust_effect(1 * power, WEAKEN)
if(M.GetKnockDownDuration() < 3) // Why are you not using KnockDown(3) ? Do you even know 3 is SIX seconds ? So many questions left unanswered.
M.KnockDown(power)
M.Stun(power)
return

if(ishuman(M))
Expand All @@ -65,8 +66,9 @@
no_clothes_neuro = TRUE

if(no_clothes_neuro)
if(M.GetKnockDownValueNotADurationDoNotUse() < 5) // If they have less than somewhere random between 8 and 10 seconds KD left and assuming it doesnt get refreshed itnernally
M.adjust_effect(1 * power, WEAKEN) // KD them a bit more
if(M.GetKnockDownDuration() < 5) // Nobody actually knows what this means. Supposedly it means less than 10 seconds. Frankly if you get locked into 10s of knockdown to begin with there are bigger issues.
M.KnockDown(power)
M.Stun(power)
M.visible_message(SPAN_DANGER("[M] falls prone."))

/proc/apply_scatter_neuro(mob/living/M)
Expand All @@ -79,9 +81,9 @@
H.visible_message(SPAN_DANGER("[M] shrugs off the neurotoxin!"))
return

if(M.GetKnockDownValueNotADurationDoNotUse() < 0.7) // basically (knocked_down && prob(90))
M.apply_effect(0.7, WEAKEN)
M.visible_message(SPAN_DANGER("[M] falls prone."))
M.KnockDown(0.7) // Completely arbitrary values from another time where stun timers incorrectly stacked. Kill as needed.
M.Stun(0.7)
M.visible_message(SPAN_DANGER("[M] falls prone."))

/datum/ammo/xeno/toxin/on_hit_mob(mob/M,obj/projectile/P)
if(ishuman(M))
Expand Down
4 changes: 2 additions & 2 deletions code/datums/effects/_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
if(!validate_atom(thing) || QDELETED(thing))
qdel(src)
return
START_PROCESSING(SSeffects, src)
START_PROCESSING(SSoldeffects, src)

affected_atom = thing
LAZYADD(affected_atom.effects_list, src)
Expand Down Expand Up @@ -118,7 +118,7 @@
if(affected_atom)
LAZYREMOVE(affected_atom.effects_list, src)
affected_atom = null
STOP_PROCESSING(SSeffects, src)
STOP_PROCESSING(SSoldeffects, src)
. = ..()


Expand Down
Loading