Skip to content

Commit

Permalink
More explosion causes logged (#6683)
Browse files Browse the repository at this point in the history
# About the pull request

This PR simply resolves the causing object and mob if available for an
explosion start to add that to the attack log.

# Explain why it's good for the game
More for admins to sort through.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/76988376/c9d99aae-4619-4561-8b2e-37c5438f4230)

</details>


# Changelog
:cl: Drathek
admin: Added causes for explosion starts to attack logs
/:cl:
  • Loading branch information
Drulikar committed Jul 19, 2024
1 parent 98be4ed commit edadf64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion code/datums/autocells/explosion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ as having entered the turf.

falloff = max(falloff, power/100)

msg_admin_attack("Explosion with Power: [power], Falloff: [falloff], Shape: [falloff_shape] in [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]).", epicenter.x, epicenter.y, epicenter.z)
var/obj/causing_obj = explosion_cause_data?.resolve_cause()
var/mob/causing_mob = explosion_cause_data?.resolve_mob()
msg_admin_attack("Explosion with Power: [power], Falloff: [falloff], Shape: [falloff_shape],[causing_obj ? " from [causing_obj]" : ""][causing_mob ? " by [key_name(causing_mob)]" : ""] in [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]).", epicenter.x, epicenter.y, epicenter.z)

playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(power^2,1))

Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/explosion_recursive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ explosion resistance exactly as much as their health
falloff = max(falloff0, power/100) //prevent explosions with a range larger than 100 tiles
minimum_spread_power = -power * reflection_amplification_limit

msg_admin_attack("Explosion with Power: [power], Falloff: [falloff] in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]).", src.loc.x, src.loc.y, src.loc.z)
var/obj/causing_obj = explosion_cause_data?.resolve_cause()
var/mob/causing_mob = explosion_cause_data?.resolve_mob()
msg_admin_attack("Explosion with Power: [power], Falloff: [falloff],[causing_obj ? " from [causing_obj]" : ""][causing_mob ? " by [key_name(causing_mob)]" : ""] in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]).", loc.x, loc.y, loc.z)

playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(power^2,1))
playsound(epicenter, "explosion", 90, 1, max(round(power,1),7) )
Expand Down

0 comments on commit edadf64

Please sign in to comment.