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

Fix unit tests #1727

Merged
merged 10 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Add health log
  • Loading branch information
m-dzianishchyts committed Jan 11, 2025
commit fda386bc934cd68240369ba71384bbeb29d9efad
1 change: 1 addition & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@
set_stat(CONSCIOUS)
return
health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
log_world("[name] health update: [health] = [maxHealth](max) - [getOxyLoss()](oxy) - [getToxLoss()](tox) - [getFireLoss()](fire) - [getBruteLoss()](brute) - [getCloneLoss()](clone)")

SEND_SIGNAL(src, COMSIG_LIVING_HEALTH_UPDATE)
update_stat("updatehealth([reason])")
Expand Down
4 changes: 2 additions & 2 deletions code/tests/attack_chain/test_attack_chain_cult_dagger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
cultist.click_on(cultist_bro)

for(var/log_text in victim.puppet.attack_log_old)
log_world("victim: " + log_text)
log_world("victim ([victim.puppet.name]): " + log_text)

for(var/log_text in cultist_bro.puppet.attack_log_old)
log_world("cultist_bro: " + log_text)
log_world("cultist_bro ([cultist_bro.puppet.name]): " + log_text)

TEST_ASSERT(victim.check_attack_log("Attacked with ritual dagger"), "non-cultist missing dagger attack log")
TEST_ASSERT_NOTEQUAL(victim.puppet.health, victim.puppet.getMaxHealth(), "cultist attacking non-cultist with dagger caused no damage")
Expand Down
Loading