Skip to content
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

Role whitelists #191

Merged
merged 6 commits into from
Oct 18, 2023
Merged

Role whitelists #191

merged 6 commits into from
Oct 18, 2023

Conversation

DebugOk
Copy link
Contributor

@DebugOk DebugOk commented Oct 17, 2023

About the PR

1984 update real!

Why / Balance

Technical details

Instead of the way the old system did it via setting a "isWhitelisted" in the prototype, this instead uses a JobRequirement, meaning it can be added onto anything that requires them.

This does mean that anything using TryRequirementsMet will have to also pass in the players whitelist status. Clients can get it via the IsWhitelisted function from JobRequirementsManager, and the server can run

var isWhitelisted = player.ContentData()?.Whitelisted ?? false;

to get it, with player being the IPlayerSession belonging to the player.

Breaking changes

This breaks any code that uses TryRequirementsMet it is updated to pass in the whitelist status, but this should always be possible with a one line change.

Changelog
🆑

  • add: Certain roles require whitelist now. These being the captain, head of security and nukie commander.

@DebugOk DebugOk marked this pull request as draft October 17, 2023 14:38
@DebugOk DebugOk marked this pull request as ready for review October 17, 2023 14:51
@DebugOk DebugOk requested a review from DEATHB4DEFEAT October 18, 2023 06:20
@DebugOk
Copy link
Contributor Author

DebugOk commented Oct 18, 2023

The urge to say "Fuck it, ship it"

Copy link
Member

@DEATHB4DEFEAT DEATHB4DEFEAT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool way to do that.

@DEATHB4DEFEAT
Copy link
Member

The urge to say "Fuck it, ship it"

:shipit:

@DebugOk DebugOk merged commit c37a4d5 into DeltaV-Station:master Oct 18, 2023
10 checks passed
DeltaV-Bot pushed a commit that referenced this pull request Oct 18, 2023
LaryNevesPR pushed a commit to LaryNevesPR/Estacao-Andromeda that referenced this pull request Jan 3, 2025
…ets (DeltaV-Station#191)

## Mirror of PR #25955: [Trading Outpost now has half buy-only and half
sell-only
pallets](space-wizards/space-station-14#25955)
from <img src="https://avatars.githubusercontent.com/u/10567778?v=4"
alt="space-wizards" width="22"/>
[space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14)

###### `c0bbbc33c19eafcc8defaa7f1ec2df42e485b435`

PR opened by <img
src="https://avatars.githubusercontent.com/u/1471082?v=4" width="16"/><a
href="https://github.com/wafehling"> wafehling</a> at 2024-03-10
02:47:02 UTC

---

PR changed 8 files with 226 additions and 123 deletions.

The PR had the following labels:
- Changes: Sprites
- Status: Needs Review


---

<details open="true"><summary><h1>Original Body</h1></summary>

> ## About the PR
> I added two new entity types, a buy and sell only cargo pallet, and
added them to the trading outpost in place of the old pallets.
> 
> ## Why / Balance
> Since the day this was added, every single shift, at some point I'll
hear someone in cargo yelling about how **"You sold stuff I just
bought!"**
> 
> This seemed like the easiest way to fix the problem.
> 
> ## Technical details
> Added a variable to the cargo pallet component for labeling which type
it is, added two new varieties of the cargo pallet to the yml, and
adjusted all the calls for GetCargoPallets() to have boolean variables
for buyOnly and sellOnly to tell the function what kind of call you're
looking for.
> 
> If you don't give it any specifics it'll still treat any pallet as a
two-way one, but this function is only called 2 or 3 times and I've
adjusted them all and commented the function itself for anyone looking
to change/add it in the future.
> 
> The old pallet is still in the game and is set to "both" by default,
so it should work just fine for backwards compatibility.
> 
> ## Media
>
![image](https://github.com/space-wizards/space-station-14/assets/1471082/38cdf849-3e05-4f98-957f-65a719c2280d)
>
![image](https://github.com/space-wizards/space-station-14/assets/1471082/56e471e9-b45e-4332-bd55-7220566542ab)
>
![image](https://github.com/space-wizards/space-station-14/assets/1471082/a5e8e651-d301-420a-b2d7-cc4cf07a50af)
>
![image](https://github.com/space-wizards/space-station-14/assets/1471082/fdf2cf4c-fba8-46c9-9a30-7313a2204b5e)
>
![image](https://github.com/space-wizards/space-station-14/assets/1471082/3811edd0-bb32-44cf-b884-e0a9f4bf16fa)
> 
> 
> - [X] I have added screenshots/videos to this PR showcasing its
changes ingame, **or** this PR does not require an ingame showcase
> 
> ## Breaking changes
> 
> Shouldn't break anything, I've left the old pallets fully in, and
updated them to work with the new GetCargoPallets() function just like
they used to. Not sure if/where you'd still need them, but better safe
than sorry.
> 
> **Changelog**
> 🆑
> - tweak: The trading outpost now has dedicated buy-only and sell-only
pallets. No more accidentally selling orders you just bought. Cargonians
rejoice!
> 


</details>

Co-authored-by: SimpleStation14 <Unknown>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants