-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Exploding cigar #36457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Exploding cigar #36457
Conversation
|
I love this but does it have to be job specific? |
|
castro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently refactoring trigger code and moving it to shared, so I would prefer if this PR would wait until after that is done, because this is quite a big merge conflict.
After that I can help you with rewriting this if you want.
| /// The entity which lit the triggering expendable entity | ||
| /// </summary> | ||
| [DataField] | ||
| public EntityUid? LitBy = default!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little problematic, because you can light the cigarette, give it to someone else, but the user will still be you.
Some XOnTriggerComponents apply the effect to the user, which will have strange long-range effects in that case. And in my refactor all of them will have a ApplyToUser bool instead.
This will also throw errors in case the user is deleted by the time it does trigger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to wait for that if you've got a way to solve the user issues. I've run into that before with triggers for interactinworld and the like as well, so I see why you want it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind linking the PRs? I did a quick search but I only found Slam's explosive trigger changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still work in progress, I can ping you once I make the PR
| return; | ||
|
|
||
| SetSmokableState(entity, SmokableState.Lit, smokable); | ||
| if (TryComp<TriggerOnSmokableExpendedComponent>(entity, out var triggerComp)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of hardcoding the component here like this.
Also this will not work if the cigarette is ignited in any other way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be fine, it only really sets litby for log purposes and otherwise doesn't do anything. Or rather, that was my intent, above issue withstanding.
| id: smokeableCigarBombHarmless | ||
| start: start | ||
| graph: | ||
| - node: start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indentation,
same below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
being honest, construction graphs explode every time I touch them, so I'm gonna pass on that for now.
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok the trigger refactor #39034 has been merged, so this will need some adjustments now:
TriggerOnSmokableExpendedshould be moved toContent.Shared.Trigger.*.- It has to be adjusted to the new trigger system so it inherits from
BaseTriggerOnXComponentand passes in the trigger key into theTriggermethod. - The subscription should be moved into its own system in the same namespace.
- The hardcoding of the trigger component into the smokingsystem should be removed.
- The user should be the person smoking the cigar. You can do something similar to this to obtain the the entity
|
Are you coming back to this? |
About the PR
Adds an exploding cigar to the uplink for most (all?) civil service roles.
Does this via a new trigger for when a smokable is expended.
By request, also adds a craftable harmless snap pop version. Took the moment to move the cigar tags into the tags yml too while I was there.
Why / Balance
I have no strong opinions on the explosion strength, I simply reused the values for the explosive banana.
I know we've been on a crusade about instant explosions, and this is stealth, but boyo does it take a long fricking time to explode. Its like 3 minutes. This does have a neat use case though of basically being a fuse if your goal is to use it to chain explode.
Technical details
I just connect the tubes man.
Media
https://imgur.com/a/FnZmDOp

Video.webm
just skip through the webm, the gif is like 3:30 of watching paint dry.
Requirements
Breaking changes
Changelog
🆑