Skip to content

Add support for custom RandomNumberGenerator in functions pick_random and pop_random in Array #116271

Draft
Scarface1809 wants to merge 1 commit intogodotengine:masterfrom
Scarface1809:array_pick_random
Draft

Add support for custom RandomNumberGenerator in functions pick_random and pop_random in Array #116271
Scarface1809 wants to merge 1 commit intogodotengine:masterfrom
Scarface1809:array_pick_random

Conversation

@Scarface1809
Copy link
Contributor

This PR implements the pick_random and pop_random functions in Array supporting a custom RandomNumberGenerator, as mentioned in Godot Proposal Issue #14115.

@Scarface1809 Scarface1809 requested review from a team as code owners February 14, 2026 04:25
@Scarface1809 Scarface1809 force-pushed the array_pick_random branch 6 times, most recently from 7754b45 to df5a9b0 Compare February 15, 2026 20:53
@Scarface1809 Scarface1809 requested a review from a team as a code owner February 15, 2026 20:53
@Scarface1809 Scarface1809 force-pushed the array_pick_random branch 3 times, most recently from eb666b9 to 3cfbce2 Compare February 15, 2026 22:58
@Scarface1809 Scarface1809 marked this pull request as draft February 16, 2026 00:26
@Scarface1809 Scarface1809 force-pushed the array_pick_random branch 5 times, most recently from 30a9dd9 to c268d11 Compare February 16, 2026 03:33
@AThousandShips AThousandShips added this to the 4.x milestone Feb 16, 2026
@Wiggan
Copy link

Wiggan commented Feb 18, 2026

Fun to see that you took it upon yourself to implement my proposal! :)
@AThousandShips out of curiosity, how does it break compat? Should be backward compatible as far as I can see?

Or maybe it does break it at some lower level...?

@Scarface1809
Copy link
Contributor Author

Fun to see that you took it upon yourself to implement my proposal! :) @AThousandShips out of curiosity, how does it break compat? Should be backward compatible as far as I can see?

Trying to at least. It has more issues than i expected.

@AThousandShips
Copy link
Member

It adds a new unconditional parameter to a method, that breaks compatibility

@Wiggan
Copy link

Wiggan commented Feb 19, 2026

It adds a new unconditional parameter to a method, that breaks compatibility

Oh, I thought it was conditional in both cases, going with the original behavior if no RNG is provided...

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.

3 participants