Deal damage when dragging downed people
About the PR
Species now take damage when being dragged on the floor in a dead or critical state.
Why / Balance
- we have rollerbeds
- maybe let the medical professional come and get the patient instead of leaving a bloody trail to medical
Technical details
- new DamageOnDragComponent & its system that gets added to existing mob protototypes
Media
https://github.com/user-attachments/assets/3a554082-58de-47cb-bf31-dc968385ef77
Requirements
- [x] I have tested all added content and changes.
- [x] I have added media to this PR or it does not require an ingame showcase.
Changelog
:cl:
- add: Dragging downed people on the floor now deals damage to them
also add a terminating check to not damage deleting entities
I ask that you please test how this interacts with dead people that are wearing skates, because I've already had a moment where I died with skates on and someone bumped me into a wall and my leg came off :,) So please make sure this doesn't fuck someone up extremely all because they have skates on.
Direction approved 👍
that isn't a computation of velocity, the distance is what we care about, not distance over time.
that isn't a computation of velocity, the distance is what we care about, not distance over time.
Why just distance? Doesn't the function get called repeatedly every tick when entity is moved? It turns out distance over time regardless. To be precise, currently it's calculating distance over tick.
Why just distance?
because. how far you drag someone on the floor determines how much damage they take. that is the current design.
how far you drag someone on the floor determines how much damage they take. that is the current design.
I have dug into code and found out that MoveEvent is raised when physics updates, meaning the function is called each tick while object is moving. Calculating the location change between ticks technically is velocity -> location change rate in one tick, dividing with deltaTima would get you location change in one second. However, I just realized my suggestion would have been counter productive, so do NOT put deltaTime.
Adding damage is like an integrator, and integrators would look like this:
totalDamage += damageGain * velocity[m/s] * deltaTime[s/tick];
Which would eventually look like this if we cross out units:
totalDamage += damageGain * velocity[m/tick];
This line is similar to your code's behavior and your code applies damage over velocity correctly.
Sorry to bother you.
as something to consider, impstation tried this and reverted it at https://github.com/impstation/imp-station-14/pull/78. im open to trying it here too but it might be worth keeping the things mentioned there in mind!
this is true, chair meta needs to be prevented with only rollerbeds, and to an extent bodybags, removing it. a chair should do very little compared to a stretcher
Does impstation have fireman carry? Surely delta players are more likely to carry instead of drag.
The chair meta could be prevented by incapacitated characters dropping from chairs. Realistically you cannot make an incapacitated victim sit down tight unless buckled with seat belt. Okay! This would be funny: you put an incapacitated person on chair and mids the transport, they at random fall off the chair and take minor blunt damage. Fireman carry and (mobility) beds could prevent this.
@sowelipililimute Hey, are you still working on this? I'd love to see this merged and I'm willing to take over this PR if you are no longer interested in continuing it.
@sowelipililimute Hey, are you still working on this? I'd love to see this merged and I'm willing to take over this PR if you are no longer interested in continuing it.
we getting manslaughter charges with this
someone can revive it if they want this is clearly abandoned