Skip to content

Commit

Permalink
water particle code cleanup (#6721)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->

# About the pull request

removes todo that does not need to be done and renames var

# Explain why it's good for the game

eh just a bit cleaner code


# Testing Photographs and Procedure
<!-- Include any screenshots/videos/debugging steps of the modified code
functioning successfully, ideally including edge cases. -->

<!-- !! If you are modifying sprites, you **must** include one or more
in-game screenshots or videos of the new sprites. !! -->

<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# 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. Be sure to properly
label your changes in the changelog. 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. -->
<!-- If you add a name after the ':cl', that name will be used in the
changelog. You must add your CKEY after the CL if your GitHub name
doesn't match. Maintainers freely reserve the right to remove and add
tags should they deem it appropriate. -->

:cl:
code: cleans up water particle code
/:cl:

<!-- Both :cl:'s are required for the changelog to work! -->

---------

Co-authored-by: vincibrv <[email protected]>
  • Loading branch information
cuberound and uuuuhuuuu committed Jul 22, 2024
1 parent a3ed0fe commit 4dd2902
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions code/game/objects/effects/effect_system/particle_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
unacidable = TRUE // So effect are not targeted by alien acid.

/obj/effect/particle_effect/initialize_pass_flags(datum/pass_flags_container/PF)
/obj/effect/particle_effect/initialize_pass_flags(datum/pass_flags_container/pass_flags)
..()
if (PF)
PF.flags_pass = PASS_OVER|PASS_AROUND|PASS_UNDER|PASS_THROUGH|PASS_MOB_THRU
if (pass_flags)
pass_flags.flags_pass = PASS_OVER|PASS_AROUND|PASS_UNDER|PASS_THROUGH|PASS_MOB_THRU

//Water

Expand All @@ -22,17 +22,14 @@
var/life = 15
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

/obj/effect/particle_effect/water/initialize_pass_flags(datum/pass_flags_container/PF)
/obj/effect/particle_effect/water/initialize_pass_flags(datum/pass_flags_container/pass_flags)
..()
if (PF)
PF.flags_pass = PASS_THROUGH|PASS_OVER|PASS_MOB_THRU|PASS_UNDER
if (pass_flags)
pass_flags.flags_pass = PASS_THROUGH|PASS_OVER|PASS_MOB_THRU|PASS_UNDER

/obj/effect/particle_effect/water/Move(turf/newloc)
//var/turf/T = src.loc
//if (istype(T, /turf))
// T.firelevel = 0 //TODO: FIX
if (--src.life < 1)
//SN src = null
life -= 1
if (life < 1)
qdel(src)
if(newloc.density)
return 0
Expand Down

0 comments on commit 4dd2902

Please sign in to comment.