Commit graph

746 commits

Author SHA1 Message Date
Rémi Verschelde
349e62835b i18n: Add support for Scots (sco) language
Fixes #6931.

(cherry picked from commit ede36aca8d)
2017-01-12 19:15:30 +01:00
karroffel
b1fc41a301 exposed OS.set_exit_code and OS.get_exit_code to ObjectTypeDB
(cherry picked from commit fbfcc981d9)
2017-01-12 19:15:30 +01:00
Rémi Verschelde
d8223ffa75 Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!

(cherry picked from commit c7bc44d5ad)
2017-01-12 19:15:30 +01:00
Fabio Alessandrelli
6940830627 Properly localize absolute path.
Calling localize_path will return a localized path in res:// if the
path starts with the resource file-system/folder, and will return
the unchanged absolute path otherwise.

Closes #6979 and #7161.

(cherry picked from commit cdc97ca453)
2017-01-12 19:15:28 +01:00
Bojidar Marinov
71b35c527f Remove extraneous line in .po reader, which caused it to disregard first line
Fixes #7337

(cherry picked from commit 474eafbbf6)
2017-01-12 19:15:28 +01:00
Bojidar Marinov
85585c7fc5 Add named colors to GDScript/core.
Names and values taken from https://en.wikipedia.org/wiki/X11_color_names

(cherry picked from commit 23381a530b)
2017-01-12 19:15:27 +01:00
Kazuo256
b56c00cc56 Add Array.front() and Array.back()
(cherry picked from commit bf4fda64fd)
2017-01-12 19:15:26 +01:00
Fabio Alessandrelli
7a77fd1cd5 Expose HTTP classes' set_ip_type to scripting
(cherry picked from commit d194e1c48e)
2017-01-04 00:46:33 +01:00
Fabio Alessandrelli
3bb1709fd7 Separate hostname resolve cache based on ip_type
(cherry picked from commit c1c1ec690e)
2017-01-04 00:46:33 +01:00
Fabio Alessandrelli
00fdcf3cd0 IP_Address now handle IPv4 and IPv6 transparently
IP_Address changes:
- Converts to and from String transparently while handling IPv4 as IPv6
  mapped (::ffff:[IP]) address internally.
- Completely remove AddrType enum.
- Setting/Getting of ip array is now only possible through dedicated functions
  (ie. set_ipv4, get_ipv4, set_ipv6, get_ipv6)
- Add function to know if the address is a valid IPv4 (for IP implementation and enet)

(cherry picked from commit 1aff508dd9)
2017-01-04 00:46:33 +01:00
Fabio Alessandrelli
7ef71b9013 Allow setting ip_type for TCP/UDP and HTTP classes
(cherry picked from commit a77a0118f6)
2017-01-04 00:46:33 +01:00
Fabio Alessandrelli
e8a6cbc897 Migrate int.IP_TYPE_ constants to IP.TYPE_
(cherry picked from commit c18c5013f8)
2017-01-04 00:46:32 +01:00
Fabio Alessandrelli
a46a643f90 Use an instance variable for ip_type in raw sockets
PacketPeerUDP/StreamPeerTCP/TCP_Server now uses an instance variable
to store the selected ip_type (IPv4/IPv6/ANY, where ANY = dual stack).
All calls to resolve addresses, sending/receving data, connecting/listening
will use that socket type.

(cherry picked from commit 95bdd97768)
2017-01-04 00:46:32 +01:00
Fabio Alessandrelli
2fff8e8cde Set proper ip_type default for listen() and resolve_hostname()
(cherry picked from commit 7eef15b734)
2016-12-11 18:12:46 +01:00
Fabio Alessandrelli
a2048efd72 Add optional IP type param in TCP/UDP connect/set_send_address
(cherry picked from commit 2f1c859272)
2016-12-11 18:12:45 +01:00
Fabio Alessandrelli
6e0de0cce8 TCPServer listen now default to IP type ANY (v6 socket with v4 support)
(cherry picked from commit ee69bd81cf)
2016-12-11 18:12:45 +01:00
Ariel Manzur
5546929712 added implementation of is_valid_ip_address()
(cherry picked from commit a3131a6b5b)
2016-12-11 12:35:06 +01:00
Ariel Manzur
d8b0070b8c added windows support for ipv6, cleaned up unix code
(cherry picked from commit 672225b710)
2016-12-11 12:35:06 +01:00
Ariel Manzur
904285f4b4 address type for http client
(cherry picked from commit 1c2ac490cf)
2016-12-11 12:35:06 +01:00
Ariel Manzur
53fea7f196 fixed some byte order and parsing problems
(cherry picked from commit 1d45f35a4a)
2016-12-11 12:35:06 +01:00
Ariel Manzur
fd1022fd29 adding ipv6
(cherry picked from commit 887a897c02)
2016-12-11 12:35:06 +01:00
ISylvox
0413d85add vsnc --> vsync
(cherry picked from commit b5c383fd61)
2016-11-15 08:34:43 +01:00
SPTelur
51fe9fc132 Some missing License notice has been added
(cherry picked from commit df737ebb46)
2016-11-15 08:34:16 +01:00
Pedro J. Estébanez
fada9d7a8e Clean/fix triangulation internals
Drop unused variable
Remove commented-out code
Fix leak by using Vector instead of raw memory

(cherry picked from commit 0e1972aa51)
2016-11-15 08:30:09 +01:00
volzhs
2b00fdc679 Fix wrong number for ERR_* on comment
(cherry picked from commit 42f2380190)
2016-11-15 08:29:09 +01:00
Ariel Manzur
67f65f6639 memory ops implemented as OS functions by default 2016-11-08 19:04:56 -03:00
Rémi Verschelde
eaf803f71e style: Various other PEP8 fixes in Python files
Done with `autopep8 --select=E7`, fixes:

- E701 - Put colon-separated compound statement on separate lines.
- E702 - Put semicolon-separated compound statement on separate lines.
- E703 - Put semicolon-separated compound statement on separate lines.
- E711 - Fix comparison with None.
- E712 - Fix (trivial case of) comparison with boolean.
- E713 - Fix (trivial case of) non-membership check.
- E721 - Fix various deprecated code (via lib2to3).
2016-11-02 22:30:34 +01:00
Rémi Verschelde
a7389217f8 style: Fix PEP8 blank lines issues in Python files
Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
2016-11-02 22:29:36 +01:00
Rémi Verschelde
e259bf8bbb style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-02 22:28:28 +01:00
Rémi Verschelde
561c1f17a1 style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:

- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
2016-11-02 22:26:55 +01:00
Damon
e3be51f87c Fix locale for macOS-style locales
(cherry picked from commit 1e7f078ce9)
2016-10-31 00:04:39 +01:00
Damon Myers
68b6b50d28 Change set_locale to fallback to the global language (#6910)
(cherry picked from commit 470ead74db)
2016-10-31 00:04:26 +01:00
volzhs
e56961f58b Fix comparison bug with InputEvent
(cherry picked from commit b76a0ca40c)
2016-10-31 00:02:04 +01:00
Rémi Verschelde
5a49e45d21 SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.

(cherry picked from commit fc8ccd5b8c)
2016-10-30 14:51:34 +01:00
Juan Linietsky
7d25d20861 Added a generic AStar implementation to Godot.
It's pretty fast, use it for games where Navigation does not cut it.

(cherry picked from commit 827a9aa829)
2016-10-18 18:35:44 +02:00
Fabio Alessandrelli
ea48675ffa Properly handle absolute paths in Globals::localize_path
This give a proper fix for #4280 - #3106 , allowing absolute paths
that starts from the file system, not the resource folder

(cherry picked from commit 2f2cea070e)
2016-10-17 20:49:12 +02:00
Răzvan Cosmin Rădulescu
04255541a0 Fixes hash float negative 0 problem
Before this was giving an error:

var a = {Vector2(1, 0): 5, Vector2(-1, 0): 7}
    print(a)
    print(a[Vector2(1, 0)])
    print(a[-Vector2(1, 0)])

This simple commit fixes the issue.

(cherry picked from commit 9ad0850301)
2016-10-17 20:48:15 +02:00
Mateusz Adamczyk
ce1138cb02 Added simple check to viewport, if matrix32 is invesile (https://github.com/godotengine/godot/issues/6296).
(cherry picked from commit 8671836b76)
2016-10-09 17:40:37 +02:00
Răzvan Cosmin Rădulescu
97ebfddaaf fixes #6331, Variant::can_convert
(cherry picked from commit f2af5ab949)
2016-10-09 17:34:00 +02:00
J08nY
5b942f056a Vector3: added angle_to(Vector3 other)
(cherry picked from commit deb36b44d1)
2016-10-09 17:33:36 +02:00
J08nY
44ba542de6 Vector3: format properly, fix indents
(cherry picked from commit f468cfc379)
2016-10-09 17:33:30 +02:00
Pedro J. Estébanez
12d4d65668 Improve debug focus behavior
Fix focusing debugged game on Windows
Add re-focusing editor on continue

(cherry picked from commit 66dac878ac)
2016-10-09 17:29:59 +02:00
Fabio Alessandrelli
56dc7aa568 Properly encode InputEvent of type NONE. Fix #5987
In the editor settings you can disable default editor shortcuts.
When a default shortcut is disabled an InputEvent of type NONE must
be stored in the config file to allow the editor to remember that setting.
variant_parser.cpp was not properly encoding InputEvent of type NONE causing
the "corruption" of the editor settings file.

(cherry picked from commit 941f460384)
2016-10-09 17:29:27 +02:00
J08nY
f315d352ec PCKPacker: moved from tools into core, fixes #4129
(cherry picked from commit b1fba2e013)
2016-10-09 17:28:11 +02:00
volzhs
73e7ccabf5 Fix typo for word_wrap
(cherry picked from commit c333659ebc)
2016-10-09 17:23:58 +02:00
volzhs
721599c797 Fix error when using 2 or more slashes on resource path
(cherry picked from commit 0866f49f4e)
2016-10-09 17:23:53 +02:00
Andreas Haas
5adb75c2e7 Throw error when trying to emit a non-existing signal.
closes #6017

(cherry picked from commit 276087e92d)
2016-10-09 17:22:08 +02:00
Andreas Haas
33223e7a8a Add function to get readable names for joystick events
Closes #6476

(cherry picked from commit e0fcd9331a)
2016-10-09 17:19:57 +02:00
anneomcl
12edde80f2 Fix for #6158. Converting Vector2 to Size2 for scaling functions.
(cherry picked from commit aa5ade834c)
2016-10-09 17:18:54 +02:00
Andreas Haas
94e5c48004 Expose Vector2::clamped() to scripts
Needed this and wondered that there's no built-in function for it.
So I wanted to implement it and saw that it's actually already there, just wasn't bound ^^

(cherry picked from commit c21412fa7e)
2016-10-09 17:18:29 +02:00