-
Notifications
You must be signed in to change notification settings - Fork 146
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
Add Multiple Tracking Options to the Pinpointer #418
Conversation
What does this PR do? |
Can you edit this PR description and give more details? What exactly is it? why is it needed, ect... |
It would be preferable for both ease and history to directly embed it in the PR description. |
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.
Overall I'd like to see the solution made less hard-coded. Right now it requires modifying an enum to add new modes to a pinpointer- ideally a 'mode' would be a serializable object, allowing you to define the properties of that mode entirely in YAML.
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.
Please avoid modifying files that aren't relevant. You should be able to simply 'revert changes' on this file without affecting anything.
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 certainly not relevant to this pr :P
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.
/// Used for tracking the nuke bomb - isn't a tag for pinpointer purposes. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class NuclearBombSindicateComponent : Component |
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 isn't how you spell Syndicate.
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.
I assume this the closest English spelling of Синдикат
Content.Shared/Nuke/SharedNuke.cs
Outdated
{ | ||
ALL, | ||
STATION, | ||
SINDICAT |
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 even less how you spell Syndicate
Content.Shared/Nuke/SharedNuke.cs
Outdated
public enum NukesAvailable : byte | ||
{ | ||
ALL, | ||
STATION, | ||
SINDICAT | ||
} |
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.
The solution of having an Enum for explicit 'modes' of nuke tracking being 'All', 'Station', and 'Syndicate' is a very hardcoded solution to what should be entirely doable in YAML. I feel for this pr to make sense the Pinpointer itself just needs to be slightly reworked.
|
||
private void OnMultiplePinpointerStartup(EntityUid uid, MultiplePinpointerComponent multiple, ComponentStartup args) | ||
{ | ||
if (EntityManager.TryGetComponent(uid, out PinpointerComponent? tool)) |
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 probably just be an EnsureComp
rather than not doing anything if it isn't found.
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.
The public methods here should have XML docs.
if (!Resolve(uid, ref multiple, ref pin)) | ||
return; | ||
|
||
Dirty(uid, multiple); |
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.
Is there a reason we're dirtying it right at the start?
var modes = new string[multiple.Modes.Count]; | ||
var i = 0; | ||
|
||
foreach (var tag in multiple.Modes) | ||
{ | ||
modes[i] = tag; | ||
i++; | ||
} | ||
|
||
var current = modes[multiple.CurrentEntry]; |
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.
Am I crazy or does this not make any sense?
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.
Seems to be some unneeded changes in this file
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.
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 repeating a lot of what PSprite said but this is not a flexible system. The system, ideally, should track any entity with specific tags or components, defined in .yml.
As an example, I should be able to make a pinpointer that tracks the closest chair with a tag or component of "wooden".
I should be able to define in .yml what the pinpointer should track, is the point.
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 does nothing. Refer to above.
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.
nuke.OriginStation != owningStation)) | ||
nuke.OriginMapGrid != (transform.MapID, transform.GridUid) || | ||
nuke.OriginStation != owningStation)) || | ||
(NukesAvailable == NukesAvailable.SINDICAT && |
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.
(NukesAvailable == NukesAvailable.SINDICAT && | |
(NukesAvailable == NukesAvailable.SYNDICATE && |
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.
/// Used for tracking the nuke bomb - isn't a tag for pinpointer purposes. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class NuclearBombSindicateComponent : Component |
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.
I assume this the closest English spelling of Синдикат
name: syndicate pinpointer | ||
description: Produced specifically for nuclear operative missions, get that disk! | ||
id: PinpointerLonolyOperative | ||
suffix: LonolyOps |
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 don't like this suffix name.
suffix: Sindicat | ||
components: | ||
- type: NukeCodePaper | ||
NukesAvailable: Sindicat |
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.
NukesAvailable: Sindicat | |
NukesAvailable: Syndicate |
- type: entity | ||
parent: NukeCodePaper | ||
id: NukeCodePaperSindicat | ||
suffix: Sindicat |
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.
suffix: Sindicat | |
suffix: Syndicate |
|
||
- type: entity | ||
parent: NukeCodePaper | ||
id: NukeCodePaperSindicat |
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.
id: NukeCodePaperSindicat | |
id: NukeCodePaperSyndicate |
@@ -114,6 +114,26 @@ | |||
satchel: ClothingBackpackDuffelSyndicateOperative | |||
duffelbag: ClothingBackpackDuffelSyndicateOperative | |||
|
|||
#Syndicate Lonoly Operative Outfit - Full Kit |
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.
Why is this a full gear change from the regular operatives? To include the pinpointer?
So, how can i fix the checks? |
I got it for you, the tests should run on your PR now. It just required a merge master to get a key update to make the tests work again after Microsoft broke them. |
Going to set this as draft; issues marked by PSprite are still not addressed |
#Syndicate Lonoly Operative Outfit - include a special pinpointer | ||
- type: startingGear | ||
id: SyndicateLonolyOperativeGearFull |
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.
typo
components: | ||
- type: Transform | ||
pos: -2.5,-12.5 | ||
parent: 1 | ||
- proto: NukeCodePaper | ||
- proto: NukeCodePaperStation |
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.
?
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 done so that the nuclear bomb in Shuttle Syndicate is always provided with its own codes.
@@ -332,6 +332,18 @@ | |||
- id: PinpointerSyndicateNuclear | |||
- id: DeathAcidifierImplanter | |||
|
|||
- type: entity | |||
parent: ClothingBackpackDuffelSyndicateBundle | |||
id: ClothingBackpackDuffelSyndicateLonolyOperative |
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.
typo
@@ -62,7 +62,7 @@ | |||
randomizeName: false | |||
- type: NukeOperative | |||
- type: Loadout | |||
prototypes: [SyndicateOperativeGearFull] | |||
prototypes: [SyndicateLonolyOperativeGearFull] |
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.
typo
satchel: ClothingBackpackDuffelSyndicateLonolyOperative | ||
duffelbag: ClothingBackpackDuffelSyndicateLonolyOperative |
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 these exist?
@Spatison will review this in 4 hours. This might need changes, not sure.. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@Spatison is this being worked on? |
I am closing this project, I do not have the time and desire to work on it in the near future |
Description
PR adds a system of multiple targets for one pinpointer.
Reworks the pinpointer for nuclear operatives, adding the ability to track a nuclear sindicat bomb and a syndicate shuttle along with the nuclear authentication disk.
Nuclear bomb in Shuttle Syndicate now always comes with its codes.
TODO
Media
https://youtu.be/YCcFzrtYp8E
Changelog
🆑