ajouts d'objectifs sur la carte, déplacements des icônes et divers changements

This commit is contained in:
2025-09-13 12:48:52 +02:00
parent e56ec31069
commit 85cd832864
81 changed files with 983 additions and 307 deletions

View File

@@ -1,5 +1,11 @@
extends Resource
class_name GameData
@export var currentTerrainData : TerrainData
@export var current_terrain_data : TerrainData
@export var unlocked_plant_types_path : Array[PlantType] = [
preload("res://entities/plants/resources/plant_types/champ.tres"),
preload("res://entities/plants/resources/plant_types/chardi.tres"),
preload("res://entities/plants/resources/plant_types/maias.tres"),
preload("res://entities/plants/resources/plant_types/pili.tres"),
]

View File

@@ -1,24 +1,31 @@
extends Resource
class_name TerrainData
const TERRAIN_IMAGE_GAME_FACTOR = 40
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MAX_SIZE = 300
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE = 50
const TERRAIN_IMAGE_GAME_FACTOR = 40.
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MAX_SIZE = 400.
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE = 100.
const DEFAULT_TERRAIN_SIZE = Vector2(2000,2000)
@export var terrainSize : Vector2 = Vector2(1000,1000)
@export var terrain_size : Vector2
func _init(size : Vector2 = DEFAULT_TERRAIN_SIZE):
terrain_size = size
generate_default_contamination()
#region ------------------ Contamination ------------------
@export var contamination : Image = null
func generate_default_contamination(
central_zone_max_size : int = DEFAULT_CONTAMINATION_CENTRAL_ZONE_MAX_SIZE,
central_zone_min_size : int = DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE,
central_zone_max_size : float = DEFAULT_CONTAMINATION_CENTRAL_ZONE_MAX_SIZE,
central_zone_min_size : float = DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE,
):
var noise: Noise = FastNoiseLite.new()
noise.seed = randi()
noise.noise_type = FastNoiseLite.TYPE_CELLULAR
noise.frequency = 0.005 * TERRAIN_IMAGE_GAME_FACTOR
var imageSize = terrainSize / TERRAIN_IMAGE_GAME_FACTOR;
var imageSize = terrain_size / TERRAIN_IMAGE_GAME_FACTOR;
var noise_image = noise.get_image(
imageSize.x,
@@ -68,19 +75,42 @@ func is_in_image(pixel_point : Vector2, image : Image):
and pixel_point.y < image.get_height())
func get_contamination(point : Vector2) -> float:
var pixel_point : Vector2 = get_pixel_point(point)
var pixel_point : Vector2i = get_pixel_point(point)
if (is_in_image(pixel_point, contamination)):
return contamination.get_pixel(
int(round(pixel_point.x)),
int(round(pixel_point.y))
pixel_point.x,
pixel_point.y
).r
return 0
func get_decontamination_coverage() -> float:
return ImageTools.get_color_coverage(contamination)
func get_pixel_point(point : Vector2) -> Vector2:
return (
func get_decontamination_surface() -> float:
return ImageTools.get_color_pixel_count(contamination)/TERRAIN_IMAGE_GAME_FACTOR * 10
func get_pixel_point(point : Vector2) -> Vector2i:
return Vector2i(
Vector2(point) / float(TERRAIN_IMAGE_GAME_FACTOR)
- Vector2.ONE / 2
)
#endregion
#region ------------------ Objectives ------------------
func generate_objective_rewards(level = 1, amount = 1) -> Array[ObjectiveReward]:
var possible_objective_rewards_path : Array[ObjectiveReward] = [
IncreaseDayLimitReward.new(randi_range(level + 1, level + 3)),
LootItemReward.new(load("res://common/inventory/resources/items/compost.tres")),
UpgradePlayerMaxEnergyReward.new(),
]
var objectives_reward : Array[ObjectiveReward] = []
var i = 0
while i < amount and len(possible_objective_rewards_path) > 0:
var r = possible_objective_rewards_path.pick_random()
possible_objective_rewards_path.erase(r)
objectives_reward.append(r)
i += 1
return objectives_reward

View File

@@ -0,0 +1,7 @@
extends Node
var game_data : GameData
func _init():
if not game_data:
game_data = GameData.new()

View File

@@ -0,0 +1 @@
uid://dcamb3xjyfqm1

1
common/icons/bolt.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#ffffff" class="icon icon-tabler icons-tabler-filled icon-tabler-bolt"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M13 2l.018 .001l.016 .001l.083 .005l.011 .002h.011l.038 .009l.052 .008l.016 .006l.011 .001l.029 .011l.052 .014l.019 .009l.015 .004l.028 .014l.04 .017l.021 .012l.022 .01l.023 .015l.031 .017l.034 .024l.018 .011l.013 .012l.024 .017l.038 .034l.022 .017l.008 .01l.014 .012l.036 .041l.026 .027l.006 .009c.12 .147 .196 .322 .218 .513l.001 .012l.002 .041l.004 .064v6h5a1 1 0 0 1 .868 1.497l-.06 .091l-8 11c-.568 .783 -1.808 .38 -1.808 -.588v-6h-5a1 1 0 0 1 -.868 -1.497l.06 -.091l8 -11l.01 -.013l.018 -.024l.033 -.038l.018 -.022l.009 -.008l.013 -.014l.04 -.036l.028 -.026l.008 -.006a1 1 0 0 1 .402 -.199l.011 -.001l.027 -.005l.074 -.013l.011 -.001l.041 -.002z" /></svg>

After

Width:  |  Height:  |  Size: 887 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dcgnamu7sb3ov"
path="res://.godot/imported/bolt.svg-a559d5e701996c7d105fc68102331434.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/bolt.svg"
dest_files=["res://.godot/imported/bolt.svg-a559d5e701996c7d105fc68102331434.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-hourglass-empty"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1z" /><path d="M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1z" /></svg>

After

Width:  |  Height:  |  Size: 464 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cxkmn71f8d2hy"
path="res://.godot/imported/hourglass-empty.svg-e7568d697204ad5aa1416ea495c59e73.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/hourglass-empty.svg"
dest_files=["res://.godot/imported/hourglass-empty.svg-e7568d697204ad5aa1416ea495c59e73.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-mouse-2"
version="1.1"
id="svg4"
sodipodi:docname="left_click.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs4" />
<sodipodi:namedview
id="namedview4"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="37"
inkscape:cx="11.202703"
inkscape:cy="12.945946"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
stroke="none"
d="M0 0h24v24H0z"
fill="none"
id="path1" />
<path
id="path2"
style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;-inkscape-stroke:none"
d="M 10,2 C 7.250429,2 5,4.250429 5,7 v 3 7 c 0,2.74957 2.250429,5 5,5 h 4 c 2.74957,0 5,-2.25043 5,-5 V 10 7 C 19,4.250429 16.74957,2 14,2 h -2 z m 3,2 h 1 c 1.668693,0 3,1.3313062 3,3 v 2 h -4 z m -6,7 h 5 5 v 6 c 0,1.668693 -1.331307,3 -3,3 H 10 C 8.3313062,20 7,18.668693 7,17 Z"
sodipodi:nodetypes="sscsssscsscscssccccccssssc" />
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://djb52fosgmv4j"
path="res://.godot/imported/left_click.svg-f515b89b9c254e1eacbc2bef4d187a50.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/left_click.svg"
dest_files=["res://.godot/imported/left_click.svg-f515b89b9c254e1eacbc2bef4d187a50.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

1
common/icons/logout.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-logout"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" /><path d="M9 12h12l-3 -3" /><path d="M18 15l3 -3" /></svg>

After

Width:  |  Height:  |  Size: 451 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dex283rx00fjb"
path="res://.godot/imported/logout.svg-15891d2f0d875a13ef182339fdbc6039.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/logout.svg"
dest_files=["res://.godot/imported/logout.svg-15891d2f0d875a13ef182339fdbc6039.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 468 B

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://0xg54agef5gh"
path="res://.godot/imported/package.svg-a9602fd424cfb199cd9405d02663e7df.ctex"
path="res://.godot/imported/package.svg-0d0e7de2f6c04b754487a1f6252ee2a1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/inventory/assets/icons/package.svg"
dest_files=["res://.godot/imported/package.svg-a9602fd424cfb199cd9405d02663e7df.ctex"]
source_file="res://common/icons/package.svg"
dest_files=["res://.godot/imported/package.svg-0d0e7de2f6c04b754487a1f6252ee2a1.ctex"]
[params]
@@ -32,6 +32,6 @@ process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
svg/scale=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#ffffff" class="icon icon-tabler icons-tabler-filled icon-tabler-player-pause"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /><path d="M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /></svg>

After

Width:  |  Height:  |  Size: 412 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b5cuxgisrsfgt"
path="res://.godot/imported/player-pause.svg-8c388309845b649483858ace29fdf914.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/player-pause.svg"
dest_files=["res://.godot/imported/player-pause.svg-8c388309845b649483858ace29fdf914.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#ffffff" class="icon icon-tabler icons-tabler-filled icon-tabler-player-play"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" /></svg>

After

Width:  |  Height:  |  Size: 326 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vmsn54d1ptih"
path="res://.godot/imported/player-play.svg-230ff7b9a6c52930be11873163a0e7de.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/player-play.svg"
dest_files=["res://.godot/imported/player-play.svg-230ff7b9a6c52930be11873163a0e7de.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-mouse-2"
version="1.1"
id="svg4"
sodipodi:docname="right_click.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs4" />
<sodipodi:namedview
id="namedview4"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="37"
inkscape:cx="11.202703"
inkscape:cy="12.945946"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
stroke="none"
d="M0 0h24v24H0z"
fill="none"
id="path1" />
<path
id="path2"
style="color:#000000;fill:#ffffff;stroke:none;-inkscape-stroke:none;stroke-opacity:1;fill-opacity:1"
d="M 10,2 C 7.250429,2 5,4.250429 5,7 v 3 7 c 0,2.74957 2.250429,5 5,5 h 4 c 2.74957,0 5,-2.25043 5,-5 V 10 7 C 19,4.250429 16.74957,2 14,2 h -2 z m 0,2 h 1 V 9 H 7 V 7 C 7,5.3313062 8.3313062,4 10,4 Z m -3,7 h 5 5 v 6 c 0,1.668693 -1.331307,3 -3,3 H 10 C 8.3313062,20 7,18.668693 7,17 Z"
sodipodi:nodetypes="sscsssscsscsscccsscccssssc" />
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://y3083o1fhgn0"
path="res://.godot/imported/right_click.svg-1adb207c34017f29e28afdeafbacdd7f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/right_click.svg"
dest_files=["res://.godot/imported/right_click.svg-1adb207c34017f29e28afdeafbacdd7f.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

1
common/icons/rotate.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-rotate"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5" /></svg>

After

Width:  |  Height:  |  Size: 357 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bewr0t1wi8pff"
path="res://.godot/imported/rotate.svg-8b3d996ae2422076b9f55d10f0455aa8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/rotate.svg"
dest_files=["res://.godot/imported/rotate.svg-8b3d996ae2422076b9f55d10f0455aa8.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 524 B

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bo3o2qf3i20ke"
path="res://.godot/imported/scuba-diving-tank.svg-d6c94087bb8fe7a9f788baf1911a56a2.ctex"
path="res://.godot/imported/scuba-diving-tank.svg-2724f573f5956cc7af7dbc8616ac0aa4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/inventory/assets/icons/scuba-diving-tank.svg"
dest_files=["res://.godot/imported/scuba-diving-tank.svg-d6c94087bb8fe7a9f788baf1911a56a2.ctex"]
source_file="res://common/icons/scuba-diving-tank.svg"
dest_files=["res://.godot/imported/scuba-diving-tank.svg-2724f573f5956cc7af7dbc8616ac0aa4.ctex"]
[params]

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#ffffff" class="icon icon-tabler icons-tabler-filled icon-tabler-seedling"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 3a7 7 0 0 1 6.95 6.155a6.97 6.97 0 0 1 5.05 -2.155h3a1 1 0 0 1 1 1v1a7 7 0 0 1 -7 7h-2v4a1 1 0 0 1 -2 0v-7h-2a7 7 0 0 1 -7 -7v-2a1 1 0 0 1 1 -1z" /></svg>

After

Width:  |  Height:  |  Size: 387 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b0wy3dbpxbnt7"
path="res://.godot/imported/seedling.svg-86222438bce7bb2a4f266ea315728eb5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/seedling.svg"
dest_files=["res://.godot/imported/seedling.svg-86222438bce7bb2a4f266ea315728eb5.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

Before

Width:  |  Height:  |  Size: 498 B

After

Width:  |  Height:  |  Size: 498 B

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bf6nw4onkhavr"
path="res://.godot/imported/shovel.svg-f17d484b3a88170abdf08077458176fb.ctex"
path="res://.godot/imported/shovel.svg-094c34e330000cc8ea425d6acf7556bd.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/inventory/assets/icons/shovel.svg"
dest_files=["res://.godot/imported/shovel.svg-f17d484b3a88170abdf08077458176fb.ctex"]
source_file="res://common/icons/shovel.svg"
dest_files=["res://.godot/imported/shovel.svg-094c34e330000cc8ea425d6acf7556bd.ctex"]
[params]

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-users-group"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 13a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M8 21v-1a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v1" /><path d="M15 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M17 10h2a2 2 0 0 1 2 2v1" /><path d="M5 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M3 13v-1a2 2 0 0 1 2 -2h2" /></svg>

After

Width:  |  Height:  |  Size: 583 B

View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b38hdpsvqcwg8"
path="res://.godot/imported/users-group.svg-e8465fccc5e5f0e575fcbdabcdf52e8b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/users-group.svg"
dest_files=["res://.godot/imported/users-group.svg-e8465fccc5e5f0e575fcbdabcdf52e8b.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=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Package" load_steps=4 format=3 uid="uid://bya8sm6rm6747"]
[ext_resource type="Texture2D" uid="uid://0xg54agef5gh" path="res://common/inventory/assets/icons/package.svg" id="1_lhhdv"]
[ext_resource type="Texture2D" uid="uid://0xg54agef5gh" path="res://common/icons/package.svg" id="1_lhhdv"]
[ext_resource type="Script" uid="uid://b6kubqgq0k7vj" path="res://common/inventory/scripts/items/package.gd" id="1_x02bb"]
[ext_resource type="PackedScene" uid="uid://bkwh1ntvgkkrt" path="res://entities/interactables/machines/compost/compost.tscn" id="2_uulso"]
@@ -8,7 +8,7 @@
script = ExtResource("1_x02bb")
scene = ExtResource("2_uulso")
name = "Compost"
description = "The compost allow you to upgrade your max energy when putting in it a certain amount of seeds."
description = "The compost allow you to generate one energy for a certain amount of seeds."
icon = ExtResource("1_lhhdv")
use_zone_radius = 5
use_energy = 1

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Seed" load_steps=3 format=3 uid="uid://lrl2okkhyxmx"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/game/assets/icons/bolt.svg" id="1_dy25s"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="1_dy25s"]
[ext_resource type="Script" uid="uid://bypjcvlc15gsm" path="res://common/inventory/scripts/items/seed.gd" id="2_mgcdi"]
[resource]

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Shovel" load_steps=3 format=3 uid="uid://ddqalo1k30i5x"]
[ext_resource type="Texture2D" uid="uid://bf6nw4onkhavr" path="res://common/inventory/assets/icons/shovel.svg" id="1_7g3xd"]
[ext_resource type="Texture2D" uid="uid://bf6nw4onkhavr" path="res://common/icons/shovel.svg" id="1_7g3xd"]
[ext_resource type="Script" uid="uid://dya38x1h1uiyg" path="res://common/inventory/scripts/items/shovel.gd" id="1_28h2r"]
[resource]

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Item" load_steps=3 format=3 uid="uid://dbja8xm7ehw1v"]
[ext_resource type="Texture2D" uid="uid://bo3o2qf3i20ke" path="res://common/inventory/assets/icons/scuba-diving-tank.svg" id="1_sy4rh"]
[ext_resource type="Texture2D" uid="uid://bo3o2qf3i20ke" path="res://common/icons/scuba-diving-tank.svg" id="1_sy4rh"]
[ext_resource type="Script" uid="uid://bq7admu4ahs5r" path="res://common/inventory/scripts/item.gd" id="2_aikyk"]
[resource]

View File

@@ -1,13 +1,15 @@
class_name ImageTools
static func get_color_coverage(image: Image, color: Color = Color.WHITE):
static func get_color_coverage(image: Image, color: Color = Color.WHITE) -> float:
return float(get_color_pixel_count(image, color))/(image.get_width()*image.get_height())
static func get_color_pixel_count(image: Image, color: Color = Color.WHITE) -> int:
var pixel_color_count = 0.
for x in range(image.get_width()):
for y in range(image.get_height()):
if image.get_pixel(x, y) == color:
pixel_color_count += 1.
return pixel_color_count/(image.get_width()*image.get_height())
return pixel_color_count
static func draw_circle(image: Image, center: Vector2i, length: int, color: Color = Color.WHITE):
for x in range(image.get_width()):