first Prototype
This commit is contained in:
parent
e11825c698
commit
35ce267482
481 changed files with 17315 additions and 1 deletions
1
addons/localization_editor/uuid/.gitattributes
vendored
Normal file
1
addons/localization_editor/uuid/.gitattributes
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.gd linguist-language=GDScript
|
||||
21
addons/localization_editor/uuid/LICENSE
Normal file
21
addons/localization_editor/uuid/LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2018 Xavier Sellier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
14
addons/localization_editor/uuid/README.md
Normal file
14
addons/localization_editor/uuid/README.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
uuid - static uuid generator for Godot Engine
|
||||
===========================================
|
||||
|
||||
The *uuid* class is a GDScript 'static' class that provides a unique identifier generation for [Godot Engine](https://godotengine.org).
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
Copy the `uuid.gd` file in your project folder, and preload it using a constant.
|
||||
|
||||
Licensing
|
||||
---------
|
||||
|
||||
MIT (See license file for more informations)
|
||||
BIN
addons/localization_editor/uuid/logo.png
Normal file
BIN
addons/localization_editor/uuid/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
34
addons/localization_editor/uuid/logo.png.import
Normal file
34
addons/localization_editor/uuid/logo.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://krygx8vsji2q"
|
||||
path="res://.godot/imported/logo.png-ab394230b0f418030caf3fee144227ba.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/localization_editor/uuid/logo.png"
|
||||
dest_files=["res://.godot/imported/logo.png-ab394230b0f418030caf3fee144227ba.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
90
addons/localization_editor/uuid/logo.svg
Normal file
90
addons/localization_editor/uuid/logo.svg
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
|
||||
sodipodi:docname="logo.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.979899"
|
||||
inkscape:cx="-780.35684"
|
||||
inkscape:cy="736.70042"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1021"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="false" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="opacity:1;fill:#eeeeee;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26499999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="rect824"
|
||||
width="39.823158"
|
||||
height="39.823158"
|
||||
x="-239.74075"
|
||||
y="92.405174"
|
||||
inkscape:export-xdpi="81.639999"
|
||||
inkscape:export-ydpi="81.639999" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:14.80780602px;line-height:9.254879px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#eeeeee;fill-opacity:1;stroke:#00adb5;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
x="-226.37508"
|
||||
y="125.88918"
|
||||
id="text821"
|
||||
inkscape:export-xdpi="57.34"
|
||||
inkscape:export-ydpi="57.34"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan819"
|
||||
x="-226.37508"
|
||||
y="125.88918"
|
||||
style="fill:#eeeeee;fill-opacity:1;stroke:#00adb5;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">v4</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.24773884px;line-height:9.5298357px;font-family:'Roboto Mono Medium for Powerline';-inkscape-font-specification:'Roboto Mono Medium for Powerline';letter-spacing:0px;word-spacing:0px;fill:#393e46;fill-opacity:1;stroke:#222831;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
x="-237.8987"
|
||||
y="107.61478"
|
||||
id="text828"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan826"
|
||||
x="-237.8987"
|
||||
y="107.61478"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Mono Medium for Powerline';-inkscape-font-specification:'Roboto Mono Medium for Powerline';fill:#393e46;fill-opacity:1;stroke:#222831;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">UUID</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
37
addons/localization_editor/uuid/logo.svg.import
Normal file
37
addons/localization_editor/uuid/logo.svg.import
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dndwvnn0a53sq"
|
||||
path="res://.godot/imported/logo.svg-d954970adbcf78d2021b10b3f28c7092.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/localization_editor/uuid/logo.svg"
|
||||
dest_files=["res://.godot/imported/logo.svg-d954970adbcf78d2021b10b3f28c7092.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
29
addons/localization_editor/uuid/uuid.gd
Normal file
29
addons/localization_editor/uuid/uuid.gd
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# TODO Remove in future
|
||||
# https://github.com/godotengine/godot/pull/42408
|
||||
extends Node
|
||||
class_name UUID
|
||||
|
||||
static func getRandomInt(max_value):
|
||||
randomize()
|
||||
return randi() % max_value
|
||||
|
||||
static func randomBytes(n):
|
||||
var r = []
|
||||
for index in range(0, n):
|
||||
r.append(getRandomInt(256))
|
||||
return r
|
||||
|
||||
static func uuidbin():
|
||||
var b = randomBytes(16)
|
||||
b[6] = (b[6] & 0x0f) | 0x40
|
||||
b[8] = (b[8] & 0x3f) | 0x80
|
||||
return b
|
||||
|
||||
static func v4():
|
||||
var b = uuidbin()
|
||||
var low = '%02x%02x%02x%02x' % [b[0], b[1], b[2], b[3]]
|
||||
var mid = '%02x%02x' % [b[4], b[5]]
|
||||
var hi = '%02x%02x' % [b[6], b[7]]
|
||||
var clock = '%02x%02x' % [b[8], b[9]]
|
||||
var node = '%02x%02x%02x%02x%02x%02x' % [b[10], b[11], b[12], b[13], b[14], b[15]]
|
||||
return '%s-%s-%s-%s-%s' % [low, mid, hi, clock, node]
|
||||
1
addons/localization_editor/uuid/uuid.gd.uid
Normal file
1
addons/localization_editor/uuid/uuid.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bsir2jtil5q57
|
||||
Loading…
Add table
Add a link
Reference in a new issue