Conversation
| namespace Content.Server._Mono.Grid.Modifiers; | ||
|
|
||
| [UsedImplicitly] | ||
| public sealed partial class EntityReplace : GridModifier |
There was a problem hiding this comment.
should probably be called GridModEntityReplace
| protected string _id => GetType().Name; | ||
|
|
||
| [DataField] | ||
| public string Comp = "Transform"; |
There was a problem hiding this comment.
i think there is some way to enforce this being a prototype name, maybe see what ComponentRegistry does
| var comp = _factory.GetComponent(modifier.Comp); | ||
| var ents = new HashSet<Entity<IComponent>>(); | ||
|
|
||
| GetGridEntities(uid, ents, comp.GetType()); | ||
|
|
||
| foreach (var ent in ents) | ||
| { | ||
| modifier.Modify(ent, _metaQuery.Get(ent), _xformQuery.Get(ent), EntityManager); | ||
| } |
There was a problem hiding this comment.
this should ideally be handled by the grid modifier, all this system should do is call the modifier with the grid as arg
also don't use xform query or metadata query, use Transform() and MetaData()
| _prototypeManager.RegisterIgnore("nukeopsRole"); | ||
| _prototypeManager.RegisterIgnore("ghostRoleRaffleDecider"); | ||
| _prototypeManager.RegisterIgnore("pointOfInterest"); // Frontier: worldgen-related, server-only | ||
| _prototypeManager.RegisterIgnore("gridModifier"); // mono |
There was a problem hiding this comment.
just declare it in shared even if the logic is on server
also makes it easier if we want to e.g. put it in UI later
| public sealed partial class ReplaceData | ||
| { | ||
| [DataField] | ||
| public EntityWhitelist? Whitelist; |
There was a problem hiding this comment.
do an alias getter/setter variable for Whitelist.Tags (or maybe 2 aliases, Tags if you want a list and Tag if you want one tag) so you can do tag whitelist without bloat
About the PR
Adds new
GridModifierSystem along with its own prototype and component.Currently its capable of replacing each entity on the grid.
Why / Balance
Capabilities of generating derelict ships with bunch of damage mods, or advanced ships with good mods.
How to test
Load in
Spawn some shuttles
Apply hullmods to them using
addgridmodifierMedia
Arkansaw with ReinforcedHull Hullmod

Requirements
Breaking changes
Changelog
🆑