-
Notifications
You must be signed in to change notification settings - Fork 69
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
job slots console #476
job slots console #476
Conversation
Resources/Prototypes/_CD/Entities/Structures/Machines/Computers/computers.yml
Outdated
Show resolved
Hide resolved
Resources/Prototypes/_CD/Entities/Structures/Machines/Computers/computers.yml
Show resolved
Hide resolved
@dffdff2423 added an access reader to the computer, now it checks if the actor can access the computer and if not, it plays the deny sound |
Kinda meh on this, I think letting heads block more people from joining their department is generally gonna be a net negative. Blocking heads specifically makes sense given promotions but the only way to allow that currently is to blacklist everything. |
I kind of disagree, because it's HoP locked anyways, individual heads aren't going to be able to use this console meaning they'd have to go up and ask the HoP to restrict their whole department which is for sure going to net them a momentary odd look. I say we try it out with all the jobs being accessible (except Captain+) and then from there fine tune it if it goes poorly. |
Alright, next question then is if this needs to be a separate console that we have to map instead of being on a different console (probably the ID one). |
I think it should be a separate console. I think it would be a bit strange to put 2 UIs on the same entity. |
Alright I've been convinced you can hit merge whenever. |
|
||
private void AdjustSlot(ProtoId<JobPrototype> jobId, JobSlotAdjustment adjustment) | ||
{ | ||
SendMessage(new JobSlotsConsoleAdjustMessage(jobId, adjustment)); | ||
} | ||
|
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.
Use SendPredictedMessage and make the whole thing predicted?
|
||
_menu = new JobSlotsConsoleMenu(); | ||
_menu.OpenCentered(); | ||
_menu.OnClose += Close; | ||
_menu.OnAdjustPressed += AdjustSlot; | ||
} |
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.CreateWindow?
|
||
protected override void Dispose(bool disposing) | ||
{ | ||
base.Dispose(disposing); | ||
if (!disposing) | ||
return; | ||
_menu?.Close(); | ||
_menu = null; | ||
} |
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.
Obsolete
|
||
private DepartmentPrototype? GetPrimaryDepartmentForJob(ProtoId<JobPrototype> jobId) | ||
{ | ||
return _protoManager.EnumeratePrototypes<DepartmentPrototype>() | ||
.FirstOrDefault(d => d.Roles.Contains(jobId) && d.Primary) | ||
?? _protoManager.EnumeratePrototypes<DepartmentPrototype>() | ||
.FirstOrDefault(d => d.Roles.Contains(jobId)); | ||
} | ||
} |
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 really be on jobs or something rather than here.
About the PR
adds a job slots console that does exactly what it says
admins get a fancy version that can also make slots infinite or not
Why / Balance
Closes #346
Technical details
new ui, system, component, etc etc
has a ProtoId hashset to blacklist specific jobs from being modified
Debug bool for the admins, can probably implement more functionality in the future with it
Media
Click me!
Boo!
admin version:
sprites:
blacklist tooltip: