gelly-gmod / gelly

Library to integrate fluids into a game engine
GNU General Public License v3.0
18 stars 3 forks source link

59 - Improved damage type system #69

Closed cast-e closed 2 months ago

cast-e commented 2 months ago

Ticket

Resolves #59

Changes

Blood color also changes depending on NPC blood color. This doesn't happen with ragdolls since they don't carry the blood color from their NPC counterparts gm_flatgrass0000

cast-e commented 2 months ago

Added back the damage properties but now according to attacker active weapon instead of damage type

cast-e commented 2 months ago

@Derpius i´ve fixed almost all issues that you pointed out except the blood color logic since the gelly.setFluidMaterial(material) function is not working properly

yogwoggf commented 2 months ago

Looking very nice, I will work on the mod system a tad more before merging. I'll raise a ticket soon and add it to this PR as a blocker.

Derpius commented 2 months ago

Why do changes to the mod system have to happen first? These changes seem fine to merge now

yogwoggf commented 2 months ago

I wrote up #84 and an implementation (#85) and just merged it for this PR. You can use a material-specific override for each emitter now, and that should significantly clean up your code and make it easier to merge. @cast-e

Example

local alienBloodMaterial = gellyx.presets.copyPresetMaterial("Blood")
alienBloodMaterial.Absorption = Vector(0.3, 0.1, 0.3)

... later ...

gellyx.emitters.Sphere({ <params>, material = alienBloodMaterial })
yogwoggf commented 2 months ago

82's initial implementation is done. I'll see if I can get it merged soon, but it shouldn't conflict with this PR. Therefore I'm removing my unofficial designation of #82 as a blocker. Once you can update your code to the new API, I'll merge @cast-e

yogwoggf commented 2 months ago

Also, it'd be helpful if you could add a minor increment to the changelog, including all of your changes. Check out CHANGELOG.md to see examples