Skip to content

Commit 4446d55

Browse files
committed
Update to Godot 4.5 Stable Release
1 parent 8345c01 commit 4446d55

9 files changed

Lines changed: 208 additions & 210 deletions

File tree

.github/workflows/builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525

2626
env:
2727
GODOT_BASE_DOWNLOAD_URL: https://github.com/godotengine/godot
28-
GODOT_VERSION: 4.4.1
28+
GODOT_VERSION: 4.5
2929
GODOT_VERSION_TYPE: stable
3030
OPENVIC_BASE_BRANCH: master
3131

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Main Repo for the OpenVic Project
77
For detailed instructions, view the Contributor Quickstart Guide [here](docs/contribution-quickstart-guide.md)
88

99
## System Requirements
10-
* [Godot 4.4.1](https://github.com/godotengine/godot/releases/tag/4.4.1-stable)
10+
* [Godot 4.5](https://github.com/godotengine/godot/releases/tag/4.5-stable)
1111
* [scons](https://scons.org/)
1212

1313
> [!WARNING]
@@ -26,7 +26,7 @@ See [Cloning](docs/contribution/cloning.md).
2626
## [Godot Documentation](https://docs.godotengine.org/en/latest/)
2727

2828
## Build/Run Instructions
29-
1. Install [Godot 4.4.1](https://github.com/godotengine/godot/releases/tag/4.4.1-stable) and [scons](https://scons.org/) for your system.
29+
1. Install [Godot 4.5](https://github.com/godotengine/godot/releases/tag/4.5-stable) and [scons](https://scons.org/) for your system.
3030
2. Run the command `git submodule update --init --recursive` to retrieve all related submodules.
3131
3. Run `scons` in the project root, you should see a libopenvic file in `game/bin/openvic`.
3232
4. Open with Godot 4, click import and navigate to the `game` directory.

docs/contribution-quickstart-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
![](images/installation/scons-install.png)
3535

3636
## 4. [Godot](https://github.com/godotengine/godot/releases/latest)
37-
- Download Godot 4.4 The current version for the project will be on the [main README](../README.md) page.
37+
- Download Godot 4.5 The current version for the project will be on the [main README](../README.md) page.
3838

3939
![](images/installation/godot-dl-page.png)
4040

extension/doc_tools/doc_status.py

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
import fnmatch
44
import math
55
import os
6-
import platform
76
import re
87
import sys
98
import xml.etree.ElementTree as ET
109
from typing import Dict, List, Set
1110

11+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../"))
12+
13+
from misc.utility.color import Ansi, force_stdout_color, is_stdout_color
14+
1215
################################################################################
1316
# Config #
1417
################################################################################
1518

1619
flags = {
17-
"c": platform.platform() != "Windows", # Disable by default on windows, since we use ANSI escape codes
20+
"c": is_stdout_color(),
1821
"b": False,
1922
"g": False,
2023
"s": False,
@@ -85,16 +88,16 @@
8588
"Constructors",
8689
]
8790
colors = {
88-
"name": [36], # cyan
89-
"part_big_problem": [4, 31], # underline, red
90-
"part_problem": [31], # red
91-
"part_mostly_good": [33], # yellow
92-
"part_good": [32], # green
93-
"url": [4, 34], # underline, blue
94-
"section": [1, 4], # bold, underline
95-
"state_off": [36], # cyan
96-
"state_on": [1, 35], # bold, magenta/plum
97-
"bold": [1], # bold
91+
"name": [Ansi.CYAN], # cyan
92+
"part_big_problem": [Ansi.RED, Ansi.UNDERLINE], # underline, red
93+
"part_problem": [Ansi.RED], # red
94+
"part_mostly_good": [Ansi.YELLOW], # yellow
95+
"part_good": [Ansi.GREEN], # green
96+
"url": [Ansi.BLUE, Ansi.UNDERLINE], # underline, blue
97+
"section": [Ansi.BOLD, Ansi.UNDERLINE], # bold, underline
98+
"state_off": [Ansi.CYAN], # cyan
99+
"state_on": [Ansi.BOLD, Ansi.MAGENTA], # bold, magenta/plum
100+
"bold": [Ansi.BOLD], # bold
98101
}
99102
overall_progress_description_weight = 10
100103

@@ -111,13 +114,10 @@ def validate_tag(elem: ET.Element, tag: str) -> None:
111114

112115

113116
def color(color: str, string: str) -> str:
114-
if flags["c"] and terminal_supports_color():
115-
color_format = ""
116-
for code in colors[color]:
117-
color_format += "\033[" + str(code) + "m"
118-
return color_format + string + "\033[0m"
119-
else:
117+
if not is_stdout_color():
120118
return string
119+
color_format = "".join([str(x) for x in colors[color]])
120+
return f"{color_format}{string}{Ansi.RESET}"
121121

122122

123123
ansi_escape = re.compile(r"\x1b[^m]*m")
@@ -127,16 +127,6 @@ def nonescape_len(s: str) -> int:
127127
return len(ansi_escape.sub("", s))
128128

129129

130-
def terminal_supports_color():
131-
p = sys.platform
132-
supported_platform = p != "Pocket PC" and (p != "win32" or "ANSICON" in os.environ)
133-
134-
is_a_tty = hasattr(sys.stdout, "isatty") and sys.stdout.isatty()
135-
if not supported_platform or not is_a_tty:
136-
return False
137-
return True
138-
139-
140130
################################################################################
141131
# Classes #
142132
################################################################################
@@ -342,6 +332,7 @@ def generate_for_class(c: ET.Element):
342332
table_column_names.append("Docs URL")
343333
table_columns.append("url")
344334

335+
force_stdout_color(flags["c"])
345336

346337
################################################################################
347338
# Help #

0 commit comments

Comments
 (0)