Skip to content

Conversation

@TokenStyle
Copy link
Contributor

@TokenStyle TokenStyle commented Jul 27, 2025

About the PR

Two step's PR with the goal that I've doin, that players can squash cockroaches by stepping/walk on them, and add red blooded cockroaches with gib sound on death, and add hauberoach. This refactor adds a lot of possibilities to step triggers, like walking on plushies will make some sound.

  • Refactor DamageUserOnTrigger into DamageOnTrigger and add StepTriggerOnSizeComponent.
  • Make cockroach die when player's stepped on it (or something big enough).

And my wishes:

  • Transfer player's DNA to a cockroach when squashed and if the player's without shoes.
  • Blood cockroaches that drops red blood on death (yml only tho).
  • Transfer fibers to a cockroach that's squashed by the player's with shoes. Dunno how to do it tho', probably long-term thing. Maybe related to this issue transferring dna to clothes when worn #14744 .
  • Pacified entities can't squash cockroaches.

Why / Balance

Cockroaches have to die when player's walk on 'em.

Technical details

  • Add reliable comments for DamageUserOnTriggerSystem and DamageUserOnTriggerComponent.
  • Add DamageOnTriggerComponent and System that deals damage to triggering entity.
  • Add ForceIgnoreTriggerContinue to StepTriggerComponent so it's able to be used by yml devs. By default, StepTriggerAttemptEvent.Continue is never true (i.e., the mousetraps are manually from code sets StepTriggerAttemptEvent.Continue to true), so I've added this workaround.
  • Add StepTriggerOnSizeComponent and System that checks size of the tripper/stepped/walked entity.

Media

Requirements

Breaking changes

StepTriggerComponent now has ForceIgnoreTriggerContinue field, that's when true skips StepTriggerAttemptEvent.Continue check.

Changelog

no cl, no fun

@PJBot PJBot added S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Jul 27, 2025
@github-actions github-actions bot added the size/M Denotes a PR that changes 100-999 lines. label Jul 27, 2025
@TokenStyle
Copy link
Contributor Author

TokenStyle commented Jul 27, 2025

CollisionMask and CollisionLayer works not as intended, don't know how to fix rn, to fix StepTriggerOnSizeSystem logic, to check actual size of the entity, it should pass Mobs and LargeMobs, but Continue false for SmallMobs

@iaada
Copy link
Member

iaada commented Jul 27, 2025

I've had a similar desire for step triggers to crunch glass shards underfoot. However I was waiting for #39034, as it's a much larger trigger refactor. In particular it moves the triggers to shared.

@TokenStyle
Copy link
Contributor Author

Oh I gotcha, then I will upstream after #39034 , thanks!

@keronshb
Copy link
Member

Just going to move this to DNM while the trigger refactor is reviewed.
If it doesn't get resolved in a month or so I'll remove the tag. It's only so the refactor PR won't have to make too many changes while it's being reviewed.

@keronshb keronshb added the S: DO NOT MERGE Status: Open item that should NOT be merged. DNM. Allows test to run unlike draft. label Jul 27, 2025
@TokenStyle
Copy link
Contributor Author

Closed because of new PR that's follows Trigger System refactor #39267

@TokenStyle TokenStyle closed this Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S: DO NOT MERGE Status: Open item that should NOT be merged. DNM. Allows test to run unlike draft. S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/M Denotes a PR that changes 100-999 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants