Giter VIP home page Giter VIP logo

godot-uuid's People

Contributors

calinou avatar s4ndw1ch avatar xsellier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

godot-uuid's Issues

Wrong random range

Shouldn't the randomness be (randi() % (max_value + 1 - min_value)) + min_value ?

Using with Godot 3.2.1

In order to load globally on auto load I had to add the extends Node on the top of the file

`v4_rng` does not return deterministic results based on `RandomNumberGenerator`

Since randomize is called at the start of the v4_rng function.

Please see this PR for a fix:

#11

Which allows for deterministic creation of uuid, I think this was just a bug?

func get_rng(item: Dictionary) -> RandomNumberGenerator:
	var rng = RandomNumberGenerator.new()
	rng.set_seed(1)
	return rng


func _init(item: Dictionary) -> void:
	# The following ID should always be the same
	self.id = preload("uuid.gd").v4_rng(get_rng(item))

inconsistent tabs and spaces

uuid.gd file uses inconsistent tabs and spaces.

Line 76:Used tab character for indentation instead of space as used before in the file.
Line 84:Used tab character for indentation instead of space as used before in the file.

fix:
Convert tabs to spaces
or
Yeet as_dict

Adapt folder structure to official recommendation

Thanks a lot for your plugin!

The official documentation suggests that you put your plugin in addons/uuid/. Otherwise all the files of the plugin are copied to the root of a user's project when they install it. This might cause some clashes (e.g., I now have your README.md at the root of my project).

https://docs.godotengine.org/en/stable/community/asset_library/submitting_to_assetlib.html#introduction says:

When creating non-project assets, it is common practice to place your files inside of an addons/asset_name/ folder. Do this to avoid having your files clash with other assets, or with the files of users installing your asset. This folder will not be automatically generated when a user installs your asset.

Why `extends Node`?

This is more like a question rather than an actual issue. Is there any particular reason the script extends Node? Correct me if I'm wrong please, but wouldn't it be enough to just not extend anything at all (which implicitly extends Object)?

It's for sure not a performance killer or something. Though I think, where we don't need any node features it makes more sense to just not extend it, right?

Long story short, it might be no problem to simply delete line 3 from the script.

By the way, thanks for the implementation. I am considering using it for a tool I'd like to build in combination with an SQLite database. ๐Ÿ˜˜

Request for instructions

I'm trying to use the code for my own project, but I do not know which is the function needed to be called or where is the generated uuid located. Can we get a short step-by-step or shot explanation on how to use it?

Can you add this to the asset library?

Thanks for writing this utility method. Can you add this to the asset library so we don't have to copy the file into the project?

Would help simplify things like licensing, as well as easily let people get updates.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.