-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
paper is now burnable #10373
paper is now burnable #10373
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
ec82e3c
to
f19d90b
Compare
if(transform.GridUid != null) | ||
{ | ||
var tile = _transformSystem.GetGridOrMapTilePosition(uid, transform); | ||
var temperature = 700f; | ||
var volume = 50f; | ||
_atmosphereSystem.HotspotExpose(transform.GridUid.Value, | ||
_transformSystem.GetGridOrMapTilePosition(uid, transform), | ||
700f, 50f, true); | ||
tile, | ||
temperature, volume, true); | ||
|
||
// Spread the fire to other flammables on the same tile | ||
var fireEvent = new TileFireEvent(temperature, volume); | ||
foreach (var entity in _lookup.GetEntitiesIntersecting(transform.GridUid.Value, tile)) | ||
{ | ||
RaiseLocalEvent(entity, ref fireEvent, false); | ||
} | ||
|
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 looks very suss. Instead of the flammable relaying itself to atmos it's relaying directly to other flammables in an expensive loop every tick.
I've given up on burn chaining for this PR and have opted to just implement basic paper burning instead. Maybe later I'll try my hand at physics and fixtures again to figure out how to chain burning papers. |
if (flammable.Ignitable) | ||
{ | ||
flammable.FireStacks = Math.Max(2, flammable.FireStacks); | ||
} |
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 should be getting handled in Ignite
, not only interact using. IMO Ignitable
should be renamed to be something like AlwaysCombustible
, since I think that fits better what this is going for
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.
actually, an even better solution would be to just make FireStacks
serializable, and add an option to prevent FireStacks
from ever decreasing (then just give paper permanent firestacks), which 1) has this same behavior in a more intuitive way and 2) allows more granularity with how 'always capable of being on fire' something is
About the PR
This started by wanting to Implement Charcoal #10042. To begin with it I wanted to have a easy way for the players to make ash. So down the rabbit hole I went and found myself playing with fire. So now you can burn papers. It works fairly well, you can burn whole piles of paper with any isHot tool. Fire can spread to nearby papers but they currently have to be really damn close to one other.
Things I would like to improve (now or later):
Screenshots
Changelog
🆑