Skip to content

Commit cdbdfc0

Browse files
authored
Fix Malaguero + Other Stress Events (#5747)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> ## About The Pull Request <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> Fixes inaccurate descriptions and not sending the owner through the stress args ## Why It's Good For The Game <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> <!-- !! Do not add whitespace in-between the entries, do not change the tags and do not leave the tags without any entries. --> :cl: fix: fixed Malaguero + other stress events /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> ## Pre-Merge Checklist <!-- Don't bother filling these in while creating your Pull Request, just click the checkboxes after the Pull Request is opened and you are redirected to the page. --> - [x] You tested this on a local server. - [x] This code did not runtime during testing. - [x] You documented all of your changes. <!-- Neither the compiler nor workflow checks are perfect at detecting runtimes and errors. It is important to test your code/feature/fix locally. -->
1 parent fc38b6b commit cdbdfc0

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

code/_onclick/hud/screen_objects.dm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,10 +1555,12 @@
15551555
if(!length(M.stressors))
15561556
to_chat(M, span_info("I'm not feeling much of anything right now."))
15571557
for(var/datum/stress_event/stress_event in M.stressors)
1558-
if(!stress_event.can_show())
1558+
if(!stress_event.can_show(M))
15591559
continue
15601560
var/count = stress_event.stacks
1561-
var/ddesc = islist(stress_event.desc) ? pick(stress_event.desc) : stress_event.desc
1561+
var/ddesc = stress_event.get_desc(M)
1562+
if(islist(ddesc))
1563+
ddesc = pick(ddesc)
15621564
if(count > 1)
15631565
to_chat(M, "[ddesc] (x[count])")
15641566
else

code/datums/chimeric_organs/inputs/stress.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
/datum/chimeric_node/input/stress/proc/on_stress_add(datum/source, datum/stress_event/event)
1515
SIGNAL_HANDLER
1616
if(stress_needed > 0)
17-
if(stress_needed > event.get_stress())
17+
if(stress_needed > event.get_stress(src))
1818
return FALSE
1919
else
20-
if(stress_needed < event.get_stress())
20+
if(stress_needed < event.get_stress(src))
2121
return FALSE
2222
var/potency = node_purity / 100
2323
trigger_output(potency)

code/modules/mob/living/carbon/stress.dm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,15 @@
184184
existing_event.timer = initial(existing_event.timer) + world.time // RESET THE TIMER
185185
if(existing_event.stacks >= existing_event.max_stacks)
186186
return
187-
var/pre_stack = existing_event.get_stress()
187+
var/pre_stack = existing_event.get_stress(src)
188188
existing_event.stacks++
189-
var/post_stack = existing_event.get_stress()
189+
var/post_stack = existing_event.get_stress(src)
190190
adjust_stress(post_stack-pre_stack)
191191
existing_event.on_apply(src)
192192
else
193193
new_event.timer += world.time
194194
stressors += new_event
195-
adjust_stress(new_event.get_stress())
195+
adjust_stress(new_event.get_stress(src))
196196
new_event.on_apply(src)
197197
SEND_SIGNAL(src, COMSIG_MOB_ADD_STRESS, new_event)
198198

@@ -205,7 +205,7 @@
205205
var/datum/stress_event/stress_event = has_stress_type(stress_type)
206206
if(stress_event)
207207
stress_event.on_remove(src)
208-
adjust_stress(-1 * stress_event.get_stress())
208+
adjust_stress(-1 * stress_event.get_stress(src))
209209
stressors -= stress_event
210210
qdel(stress_event)
211211

0 commit comments

Comments
 (0)