Compare commits

..

10 Commits

106 changed files with 2508 additions and 644 deletions

2
.gitignore vendored
View File

@ -17,3 +17,5 @@ data_*/
mono_crash.*.json
.vscode
.export/

View File

@ -1,13 +1,13 @@
extends Resource
class_name TerrainData
const TERRAIN_IMAGE_GAME_FACTOR = 50
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MAX_SIZE = 1000
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE = 200
const TERRAIN_IMAGE_GAME_FACTOR = 40
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MAX_SIZE = 300
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE = 50
signal terrain_updated
@export var terrainSize : Vector2 = Vector2(2000,2000)
@export var terrainSize : Vector2 = Vector2(1000,1000)
@export var contamination : Image = null
@ -63,8 +63,14 @@ func impact_contamination(position : Vector2, impact_radius : int, to_value : fl
)
func get_contamination(point : Vector2) -> float:
var pixel_point : Vector2 = Vector2(point) / float(TERRAIN_IMAGE_GAME_FACTOR)
var pixel_point : Vector2 = (
Vector2(point) / float(TERRAIN_IMAGE_GAME_FACTOR)
- Vector2.ONE / 2
)
return contamination.get_pixel(
int(round(pixel_point.x)),
int(round(pixel_point.y))
).r
func get_decontamination_coverage() -> float:
return ImageTools.get_color_coverage(contamination)

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="SeedItem" load_steps=3 format=3 uid="uid://lrl2okkhyxmx"]
[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/player_info/assets/icons/bolt.svg" id="1_dy25s"]
[ext_resource type="Script" uid="uid://bypjcvlc15gsm" path="res://common/inventory/scripts/items/seed_item.gd" id="2_mgcdi"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/game/assets/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]
script = ExtResource("2_mgcdi")

View File

@ -0,0 +1,13 @@
[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="Script" uid="uid://dya38x1h1uiyg" path="res://common/inventory/scripts/items/shovel.gd" id="1_28h2r"]
[resource]
script = ExtResource("1_28h2r")
area_width = 50.0
area_distance = 50.0
name = "Shovel"
description = "Can dig burried seed, and transform mature plants to seeds."
icon = ExtResource("1_7g3xd")
metadata/_custom_type_script = "uid://dya38x1h1uiyg"

View File

@ -1,11 +0,0 @@
[gd_resource type="Resource" script_class="Item" load_steps=3 format=3 uid="uid://bb8etgye1qtfx"]
[ext_resource type="Script" uid="uid://bq7admu4ahs5r" path="res://common/inventory/scripts/item.gd" id="1_0wi27"]
[ext_resource type="Texture2D" uid="uid://bf6nw4onkhavr" path="res://common/inventory/assets/icons/shovel.svg" id="1_cxwlc"]
[resource]
script = ExtResource("1_0wi27")
name = "Shovel"
description = "Transform plants to seeds"
icon = ExtResource("1_cxwlc")
metadata/_custom_type_script = "uid://bq7admu4ahs5r"

View File

@ -31,15 +31,26 @@ func add_items(items_to_add: Array[Item], fillup: bool = false):
func lenght() -> int:
return len(items)
func get_item(ind: int = 0):
func set_item(item : Item, ind: int = 0) -> bool:
if ind >= max_items:
return false
while len(items) <= ind:
items.append(null)
items[ind] = item
emit_signal("inventory_changed", self)
return true
func get_item(ind: int = 0) -> Item:
if len(items) <= ind:
return null;
return items[ind]
func pop_item(ind: int = 0):
func pop_item(ind: int = 0) -> Item:
var item_removed: Item = items.pop_at(ind)
emit_signal("inventory_changed", self)
return item_removed
func swap_items(item_to_add: Item, ind_to_get: int = 0):
func swap_items(item_to_add: Item, ind_to_get: int = 0) -> Item:
var item_to_get := items[ind_to_get]
items[ind_to_get] = item_to_add
emit_signal("inventory_changed", self)

View File

@ -2,11 +2,17 @@ extends Resource
class_name Item
@export var name: String
@export var description: String
@export_multiline var description: String
@export var icon: Texture2D
func can_use() -> bool:
func is_one_time_use():
return false
func use() -> bool:
func can_use(_player : Player) -> bool:
return false
func use_requirement_text() -> String:
return ""
func use(_player : Player) -> bool:
return false

View File

@ -0,0 +1,25 @@
@tool
extends Item
class_name Seed
@export var plant_type: PlantType :
set(v):
plant_type = v
if plant_type:
name = plant_type.name
description = plant_type.description
icon = plant_type.seed_texture
func _init(_plant_type : PlantType = null):
plant_type = _plant_type
func is_one_time_use():
return true
func can_use(player : Player) -> bool:
return not player.planet.is_there_contamination(player.global_position)
func use(player : Player) -> bool:
if not can_use(player):
return false
return player.planet.plant(plant_type, player.global_position)

View File

@ -1,11 +0,0 @@
extends Item
class_name SeedItem
@export var plant_type: PlantType
func _init():
if plant_type:
if plant_type.name:
name = plant_type.name
if plant_type.seed_texture:
icon = plant_type.seed_texture

View File

@ -0,0 +1,21 @@
extends ToolItem
class_name Shovel
func can_use(player : Player) -> bool:
var areas = player.action_area.get_overlapping_areas()
for area in areas :
if area is Plant or area is UndergroundLoot:
return true
return false
func use(player : Player) -> bool:
if not can_use(player):
return false
var areas = player.action_area.get_overlapping_areas()
for area in areas :
if area is Plant:
area.harvest()
if area is UndergroundLoot:
area.dig()
return true

View File

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

View File

@ -0,0 +1,11 @@
extends Item
class_name ToolItem
@export var area_width: float = 50
@export var area_distance: float = 50
func generate_action_area():
return ActionArea.new(
area_width,
area_distance
)

View File

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

View File

@ -1,5 +1,14 @@
class_name ImageTools
static func get_color_coverage(image: Image, color: Color = Color.WHITE):
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())
static func draw_circle(image: Image, center: Vector2i, length: int, color: Color = Color.WHITE):
for x in range(image.get_width()):
for y in range(image.get_height()):

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="54.516888mm"
height="71.574326mm"
viewBox="0 0 54.516888 71.574326"
version="1.1"
id="svg1"
inkscape:export-filename="compost.svg"
inkscape:export-xdpi="51.66227"
inkscape:export-ydpi="51.66227"
xml:space="preserve"
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"><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="mm" /><defs
id="defs1" /><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-20.067568,-29.766889)"><rect
style="fill:#c9c9c9;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="rect5"
width="10.702703"
height="54.532818"
x="25.418919"
y="29.76689"
ry="4.1948323" /><rect
style="fill:#c9c9c9;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="rect8"
width="43.814186"
height="44.307919"
x="25.418921"
y="39.991791"
ry="4.1948323" /><rect
style="fill:#ffffff;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="rect3"
width="10.702703"
height="54.532818"
x="20.067568"
y="46.808395"
ry="4.1948323" /><rect
style="fill:#c9c9c9;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="rect6"
width="10.702703"
height="54.532818"
x="58.530403"
y="29.76689"
ry="4.1948323" /><rect
style="fill:#ffffff;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="rect4"
width="10.702703"
height="54.532818"
x="63.881756"
y="46.808395"
ry="4.1948323" /><rect
style="fill:#ffffff;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="rect7"
width="43.814186"
height="44.307919"
x="25.418919"
y="57.033298"
ry="0" /></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://f2rte5jc0psp"
path="res://.godot/imported/compost.svg-503fc2423ba701b15edd51da5ab01164.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/interactables/compost/assets/sprites/compost.svg"
dest_files=["res://.godot/imported/compost.svg-503fc2423ba701b15edd51da5ab01164.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

View File

@ -0,0 +1,129 @@
[gd_scene load_steps=10 format=3 uid="uid://bkwh1ntvgkkrt"]
[ext_resource type="Script" uid="uid://dw6jgsasb2fe1" path="res://entities/interactables/compost/scripts/compost.gd" id="1_1758a"]
[ext_resource type="Texture2D" uid="uid://f2rte5jc0psp" path="res://entities/interactables/compost/assets/sprites/compost.svg" id="2_r6435"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_etofw"]
bg_color = Color(0.260098, 0.11665, 0.0419712, 0.231373)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3ao1n"]
bg_color = Color(0.270222, 0.270222, 0.270222, 1)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="RectangleShape2D" id="RectangleShape2D_coj8m"]
size = Vector2(77, 92)
[sub_resource type="Animation" id="Animation_1758a"]
resource_name = "empty"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Compost:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, 12.605), Vector2(0, -24.56), Vector2(0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Compost:scale")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector2(0.291262, 0.291262), Vector2(0.291, 0.191), Vector2(0.291, 0.366), Vector2(0.291262, 0.291262)]
}
[sub_resource type="Animation" id="Animation_r6435"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Compost:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.291262, 0.291262)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Compost:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_etofw"]
resource_name = "fill"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Compost:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0.291262, 0.291262), Vector2(0.291, 0.231), Vector2(0.291262, 0.291262)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_etofw"]
_data = {
&"RESET": SubResource("Animation_r6435"),
&"empty": SubResource("Animation_1758a"),
&"fill": SubResource("Animation_etofw")
}
[node name="Compost" type="Area2D"]
script = ExtResource("1_1758a")
[node name="Compost" type="Sprite2D" parent="."]
modulate = Color(0.615686, 0.501961, 0.270588, 1)
scale = Vector2(0.291262, 0.291262)
texture = ExtResource("2_r6435")
[node name="ProgressBar" type="ProgressBar" parent="Compost"]
unique_name_in_owner = true
offset_left = -62.0
offset_top = -7.0
offset_right = 62.0
offset_bottom = 120.0
theme_override_styles/background = SubResource("StyleBoxFlat_etofw")
theme_override_styles/fill = SubResource("StyleBoxFlat_3ao1n")
value = 20.0
fill_mode = 3
show_percentage = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
position = Vector2(-0.5, 2)
shape = SubResource("RectangleShape2D_coj8m")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_etofw")
}

View File

@ -0,0 +1,34 @@
extends Interactable
class_name Compost
@export var value_per_seed : float = 0.5
var fill_value : float = 0.
func _process(_delta):
%ProgressBar.value = lerp(%ProgressBar.value, fill_value * 100, 0.5)
func _ready():
fill_value = 0.
func can_interact(p : Player) -> bool:
return p.inventory.get_item() and p.inventory.get_item() is Seed
func requirement_text() -> String:
return "You must have a seed in hand"
func interact(p : Player) -> bool:
if not can_interact(p):
return false
p.delete_item()
fill_value += value_per_seed
if fill_value >= 1.:
$AnimationPlayer.play("empty")
fill_value = 0
p.upgrade()
value_per_seed /= 1.5
else:
$AnimationPlayer.play("fill")
return true

View File

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

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://cd3re3552pt7m"]
[gd_scene load_steps=2 format=3 uid="uid://c3uusrlts538q"]
[ext_resource type="Script" uid="uid://dedg615xudpoq" path="res://entities/interactables/item_object/script/item_object.gd" id="1_hxea8"]

View File

@ -1,8 +1,36 @@
[gd_scene load_steps=6 format=3 uid="uid://bcj812ox8xv2t"]
[gd_scene load_steps=7 format=3 uid="uid://bcj812ox8xv2t"]
[ext_resource type="Texture2D" uid="uid://bf6nw4onkhavr" path="res://common/inventory/assets/icons/shovel.svg" id="1_7u8ru"]
[ext_resource type="Script" uid="uid://reliyx2pg7kf" path="res://entities/interactables/item_object/script/item_object_sprite.gd" id="1_wing4"]
[ext_resource type="Texture2D" uid="uid://bo3o2qf3i20ke" path="res://common/inventory/assets/icons/scuba-diving-tank.svg" id="2_ng3e4"]
[ext_resource type="Texture2D" uid="uid://c1eiu5ag7lcp8" path="res://entities/interactables/item_object/assets/sprites/shadow.svg" id="2_ng201"]
[sub_resource type="Animation" id="Animation_wing4"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Shadow:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.875, 0.875)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Icon:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_ng201"]
resource_name = "default"
length = 2.0
@ -10,77 +38,26 @@ loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/path = NodePath("Shadow:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1, 2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, -5), Vector2(0, 0)]
"values": [Vector2(0.875, 0.875), Vector2(0.7, 0.7), Vector2(0.875, 0.875)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Shadow:position")
tracks/1/path = NodePath("Icon:position")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1, 2),
"times": PackedFloat32Array(0, 1, 2.06667),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0, 23), Vector2(0, 28), Vector2(0, 23)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Shadow:scale")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 1, 2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0.875, 0.875), Vector2(0.7, 0.7), Vector2(0.875, 0.875)]
}
[sub_resource type="Animation" id="Animation_wing4"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Shadow:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 23)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Shadow:scale")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.875, 0.875)]
"values": [Vector2(0, 0), Vector2(0, -8), Vector2(0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ng3e4"]
@ -89,8 +66,11 @@ _data = {
&"default": SubResource("Animation_ng201")
}
[node name="ItemObjectSprite" type="Sprite2D"]
texture = ExtResource("1_7u8ru")
[node name="ItemObjectSprite" type="Node2D"]
script = ExtResource("1_wing4")
[node name="Icon" type="Sprite2D" parent="."]
texture = ExtResource("2_ng3e4")
[node name="Shadow" type="Sprite2D" parent="."]
modulate = Color(1, 1, 1, 0.227451)

View File

@ -1,16 +1,18 @@
@tool
extends Interactable
class_name ItemObject
const ITEM_AREA_WIDTH = 10
const ITEM_SPRITE_SIZE = 40.
const SPRITE_SCENE : PackedScene = preload("res://entities/interactables/item_object/item_object_sprite.tscn")
@export var item : Item :
set(_item):
item = _item
if sprite:
sprite.texture = item.icon
if object_sprite:
object_sprite.apply_texture_to_sprite(item.icon, ITEM_SPRITE_SIZE)
@onready var sprite : Sprite2D = generate_sprite()
@onready var object_sprite : ItemObjectSprite = generate_sprite()
func _init(_item = null):
if _item:
@ -20,12 +22,14 @@ func _ready():
generate_collision(10)
func interact(player : Player) -> bool:
if player.inventory.lenght() < player.inventory.max_items:
player.inventory.add_item(item)
pickup_animation(player)
var swapped_item = player.inventory.get_item()
player.get_item(item)
if swapped_item:
item = swapped_item
else :
var swaped_item = player.inventory.swap_items(item)
item = swaped_item
pickup_animation(player)
return true
@ -39,10 +43,13 @@ func pickup_animation(player : Player):
queue_free()
)
func generate_sprite() -> Sprite2D:
var s = SPRITE_SCENE.instantiate() as Sprite2D
add_child(s)
func generate_sprite() -> ItemObjectSprite:
var spriteNode = SPRITE_SCENE.instantiate() as ItemObjectSprite
add_child(spriteNode)
s.texture = item.icon
spriteNode.apply_texture_to_sprite(
item.icon,
ITEM_SPRITE_SIZE
)
return s
return spriteNode

View File

@ -0,0 +1,12 @@
extends Node2D
class_name ItemObjectSprite
@onready var iconSprite = $Icon
func apply_texture_to_sprite(texture, item_sprite_size = 50.):
if texture:
iconSprite.texture = texture
iconSprite.scale = Vector2(
1./(texture.get_width()/item_sprite_size),
1./(texture.get_height()/item_sprite_size)
)

View File

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

View File

@ -6,6 +6,12 @@ var available : bool = true
func _ready():
printerr("Abstract Interactable class used")
func can_interact(_p : Player) -> bool:
return true
func interact_requirement_text() -> String:
return ""
func interact(_p : Player) -> bool:
printerr("Interact function called on abstract Interactable class")
return false

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dwr3c6r6piwaa"
path="res://.godot/imported/growing.png-7b76a9f596f5cec79fdd8685670b16b5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/plants/assets/sprites/maias/growing.png"
dest_files=["res://.godot/imported/growing.png-7b76a9f596f5cec79fdd8685670b16b5.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d3apfwbqsg5ha"
path="res://.godot/imported/mature.png-8766aea5da569488db27850c55c8418b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/plants/assets/sprites/maias/mature.png"
dest_files=["res://.godot/imported/mature.png-8766aea5da569488db27850c55c8418b.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cpx7bkrvttasr"
path="res://.godot/imported/planted.png-4bf3c8ff7d8aae08d7e3691f7e49cab2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/plants/assets/sprites/maias/planted.png"
dest_files=["res://.godot/imported/planted.png-4bf3c8ff7d8aae08d7e3691f7e49cab2.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://pltmnkqd5ut2"
path="res://.godot/imported/grille_seeds.png-5193c30dc41cd45a15f8418b446b498e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/plants/assets/sprites/seeds/grille_seeds.png"
dest_files=["res://.godot/imported/grille_seeds.png-5193c30dc41cd45a15f8418b446b498e.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

View File

@ -0,0 +1,130 @@
[gd_scene load_steps=7 format=3 uid="uid://2hrg6yjk0yt0"]
[ext_resource type="Script" uid="uid://bmjjpk4lvijws" path="res://entities/plants/scripts/plant_sprite.gd" id="1_pq8o7"]
[ext_resource type="Texture2D" uid="uid://b3wom2xu26g43" path="res://entities/plants/assets/sprites/default_plant_glowing.png" id="2_hyinx"]
[sub_resource type="Animation" id="Animation_rbgiq"]
resource_name = "harvest"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:skew")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, -0.698132, 0.698132]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.133333, 0.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
[sub_resource type="Animation" id="Animation_j6jm5"]
resource_name = "bump"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.233333, 0.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0.15, 0.15), Vector2(0.15, 0.075), Vector2(0.15, 0.15)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:position")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.233333, 0.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, 17.475), Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_wyuub"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.15, 0.15)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite2D:skew")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite2D:modulate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8eofq"]
_data = {
&"RESET": SubResource("Animation_wyuub"),
&"bump": SubResource("Animation_j6jm5"),
&"harvest": SubResource("Animation_rbgiq")
}
[node name="PlantSprite" type="Node2D"]
script = ExtResource("1_pq8o7")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.15, 0.15)
texture = ExtResource("2_hyinx")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_8eofq")
}

View File

@ -1,22 +1,31 @@
[gd_resource type="Resource" script_class="PlantType" load_steps=7 format=3 uid="uid://b04vho33bl52b"]
[gd_resource type="Resource" script_class="PlantType" load_steps=9 format=3 uid="uid://b04vho33bl52b"]
[ext_resource type="Texture2D" uid="uid://c7mp7tkkkk6o5" path="res://entities/plants/assets/sprites/default/growing.png" id="1_fp5j6"]
[ext_resource type="Script" path="res://entities/plants/scripts/plant_type.gd" id="1_moyj3"]
[ext_resource type="Script" uid="uid://jnye5pe1bgqw" path="res://entities/plants/scripts/plant_type.gd" id="1_moyj3"]
[ext_resource type="Script" path="res://entities/plants/scripts/plant_effects/decontaminate_terrain_effect.gd" id="2_cky1j"]
[ext_resource type="Texture2D" uid="uid://bupl1y0cfj21q" path="res://entities/plants/assets/sprites/default/mature.png" id="3_ffarr"]
[ext_resource type="Texture2D" uid="uid://ba413oun7ry78" path="res://entities/plants/assets/sprites/default/planted.png" id="4_2s6re"]
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_cky1j"]
[sub_resource type="Resource" id="Resource_q68uy"]
script = ExtResource("2_cky1j")
impact_radius = 100
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
[sub_resource type="AtlasTexture" id="AtlasTexture_qt76e"]
atlas = ExtResource("6_cky1j")
region = Rect2(1140, 345, 141, 128)
[resource]
script = ExtResource("1_moyj3")
name = ""
growing_time = 2
name = "Chardi"
description = "This plant reduce contamination around when it becomes mature."
growing_time = 1
seed_texture = SubResource("AtlasTexture_qt76e")
planted_texture = ExtResource("4_2s6re")
growing_texture = ExtResource("1_fp5j6")
mature_texture = ExtResource("3_ffarr")
mature_effect = SubResource("Resource_q68uy")
harvest_types_path = Array[String]([])
harvest_number = Array[int]([1, 2, 1])
metadata/_custom_type_script = "uid://jnye5pe1bgqw"

View File

@ -0,0 +1,24 @@
[gd_resource type="Resource" script_class="PlantType" load_steps=7 format=3 uid="uid://dsctivn1vrem2"]
[ext_resource type="Script" uid="uid://jnye5pe1bgqw" path="res://entities/plants/scripts/plant_type.gd" id="1_eqtut"]
[ext_resource type="Texture2D" uid="uid://dwr3c6r6piwaa" path="res://entities/plants/assets/sprites/maias/growing.png" id="1_vyplc"]
[ext_resource type="Texture2D" uid="uid://d3apfwbqsg5ha" path="res://entities/plants/assets/sprites/maias/mature.png" id="3_pi4ie"]
[ext_resource type="Texture2D" uid="uid://cpx7bkrvttasr" path="res://entities/plants/assets/sprites/maias/planted.png" id="4_iqcy2"]
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_mwrj8"]
[sub_resource type="AtlasTexture" id="AtlasTexture_sri3b"]
atlas = ExtResource("6_mwrj8")
region = Rect2(1697, 331, 125, 158)
[resource]
script = ExtResource("1_eqtut")
name = "Maias"
description = "This gorgeous flower has no effect, but produce a lot of seeds."
growing_time = 1
seed_texture = SubResource("AtlasTexture_sri3b")
planted_texture = ExtResource("4_iqcy2")
growing_texture = ExtResource("1_vyplc")
mature_texture = ExtResource("3_pi4ie")
harvest_types_path = Array[String](["uid://b04vho33bl52b", "uid://dsctivn1vrem2"])
harvest_number = Array[int]([3, 4])
metadata/_custom_type_script = "uid://jnye5pe1bgqw"

View File

@ -1,48 +1,59 @@
extends Node2D
extends Area2D
class_name Plant
const PLANT_AREA_WIDTH = 10
const PLANT_SPRITE_SCALE = 0.15
const HARVESTED_SEED_POSITION_RANGE = 100
const RANDOM_MAX_GROW_INTERVAL = 0.4
const SPRITE_SCENE : PackedScene = preload("res://entities/plants/plant_sprite.tscn")
enum State {PLANTED, GROWING, MATURE}
var plant_type : PlantType
var planet : Planet
@export var plant_type: PlantType
var planet: Planet # mis à jour par la classe Planet
var state: State = State.PLANTED: set = change_state
var day : int = 0
@export var day: int = 0 : set = set_day
@onready var plant_sprite : Sprite2D = generate_sprite()
@onready var plant_area : Area2D = generate_area()
@onready var plant_sprite: PlantSprite = generate_sprite()
@onready var collision_shape: CollisionShape2D = generate_collision_shape()
func _init(_plant_type, _planet):
func _init(_plant_type = null, _planet = null):
plant_type = _plant_type
planet = _planet
func generate_sprite() -> Sprite2D:
var sprite = Sprite2D.new()
func generate_sprite() -> PlantSprite:
var spriteObject : PlantSprite = SPRITE_SCENE.instantiate()
add_child(sprite)
sprite.texture = get_state_texture(state)
sprite.scale = Vector2.ONE * PLANT_SPRITE_SCALE
sprite.offset
add_child(spriteObject)
spriteObject.apply_texture_to_sprite(
get_state_texture(state),
false
)
return sprite
return spriteObject
func generate_area() -> Area2D:
var area = Area2D.new()
func generate_collision_shape() -> CollisionShape2D:
var collision = CollisionShape2D.new()
var collision_shape = CircleShape2D.new()
collision_shape.radius = PLANT_AREA_WIDTH
var shape = CircleShape2D.new()
shape.radius = PLANT_AREA_WIDTH
collision.shape = collision_shape
area.add_child(collision)
add_child(area)
collision.shape = shape
add_child(collision)
return area
return collision
func pass_day():
# Méthode déclenchée par la classe planet
func _pass_day():
await get_tree().create_timer(randf_range(0., RANDOM_MAX_GROW_INTERVAL)).timeout
day += 1
func set_day(d):
day = d
if day == 0:
change_state(State.PLANTED)
if day > plant_type.growing_time:
change_state(State.MATURE)
else:
@ -50,11 +61,14 @@ func pass_day():
func change_state(_state: State):
state = _state
plant_sprite.texture = get_state_texture(state)
if state == State.MATURE and plant_type.mature_effect:
plant_type.mature_effect.effect(self)
plant_sprite.apply_texture_to_sprite(
get_state_texture(state)
)
func get_state_texture(s: State) -> Texture2D:
match s:
State.PLANTED:
@ -64,3 +78,29 @@ func get_state_texture(s : State) -> Texture2D:
State.MATURE:
return plant_type.mature_texture
return null
func harvest():
if state == State.MATURE:
var seed_number = plant_type.harvest_number.pick_random()
for i in range(seed_number):
var seed_plant_type : PlantType = plant_type
if len(plant_type.harvest_types_path):
seed_plant_type = load(plant_type.harvest_types_path.pick_random())
var item_object = planet.drop_item(
Seed.new(seed_plant_type),
global_position
)
var tween : Tween = get_tree().create_tween()
tween.tween_property(
item_object,
"position",
Vector2(
item_object.position.x + randi()%HARVESTED_SEED_POSITION_RANGE,
item_object.position.y + randi()%HARVESTED_SEED_POSITION_RANGE
),
0.2
)
plant_sprite.start_harvest_animation()
await plant_sprite.harvest_animation_finished
queue_free()

View File

@ -0,0 +1,17 @@
extends Node2D
class_name PlantSprite
signal harvest_animation_finished
@onready var sprite = $Sprite2D
func apply_texture_to_sprite(texture, with_animation = true):
if with_animation:
$AnimationPlayer.play("bump")
await $AnimationPlayer.animation_finished
sprite.texture = texture
func start_harvest_animation():
$AnimationPlayer.play("harvest")
await $AnimationPlayer.animation_finished
harvest_animation_finished.emit()

View File

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

View File

@ -2,6 +2,7 @@ extends Resource
class_name PlantType
@export var name : String
@export_multiline var description : String
@export var growing_time : int
@ -11,3 +12,6 @@ class_name PlantType
@export var mature_texture : Texture
@export var mature_effect : PlantEffect
@export_file var harvest_types_path : Array[String] = []
@export var harvest_number : Array[int] = [1,2]

View File

@ -55,16 +55,16 @@ stream_0/stream = ExtResource("15_qpopc")
script = ExtResource("1_abrql")
[node name="Sprite" type="Sprite2D" parent="."]
position = Vector2(2, -55)
position = Vector2(2, -46)
scale = Vector2(0.084375, 0.084375)
texture = ExtResource("1_symyc")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-2, -20)
position = Vector2(-2, -18)
shape = SubResource("CircleShape2D_sglur")
[node name="InteractArea2D" type="Area2D" parent="."]
position = Vector2(0, -14)
position = Vector2(0, -12)
[node name="CollisionShape2D" type="CollisionShape2D" parent="InteractArea2D"]
shape = SubResource("CircleShape2D_abrql")
@ -82,3 +82,4 @@ stream = SubResource("AudioStreamRandomizer_24ehl")
[node name="AudioStreamPlayer_movement" type="AudioStreamPlayer" parent="Audio"]
stream = SubResource("AudioStreamRandomizer_bwdx1")
volume_db = -20.0

View File

@ -0,0 +1,44 @@
extends Area2D
class_name ActionArea
const OPACITY = 0.3
const ACTIVATED_COLOR = Color.TURQUOISE
const DEACTIVATED_COLOR = Color.REBECCA_PURPLE
var collision_shape : CollisionShape2D = null
var area_width : float = 40
var area_distance : float = 80
var activated : bool = false :
set(v):
var old = activated
activated = v
if old != activated:
queue_redraw()
func _init(
_area_width : float = 40,
_area_distance : float = 80
):
area_width = _area_width
area_distance = _area_distance
func _ready():
collision_shape = CollisionShape2D.new()
collision_shape.position.x = area_distance
collision_shape.shape = CircleShape2D.new()
collision_shape.shape.radius = area_width
add_child(collision_shape)
func _process(_delta):
look_at(get_global_mouse_position())
func _draw():
draw_circle(
Vector2(
area_distance,
0
),
area_width,
Color((ACTIVATED_COLOR if activated else DEACTIVATED_COLOR), OPACITY)
)

View File

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

View File

@ -2,15 +2,15 @@ extends CharacterBody2D
class_name Player
signal player_updated(player: Player)
signal action_tried_without_energy
signal upgraded
var planet : Planet # mis à jour par la classe Planet
@export var speed = 400
@export var testPlantType : PlantType
@onready var inventory : Inventory = Inventory.new()
var max_energy : int = 10
var max_energy : int = 3
var controlling_player : bool = true :
set(v):
@ -23,10 +23,23 @@ var closest_interactable : Interactable = null :
closest_interactable = v
if old != closest_interactable:
player_updated.emit(self)
var can_use_item : bool = false :
set(v):
var old = can_use_item
can_use_item = v
if old != can_use_item:
player_updated.emit(self)
var can_interact : bool = false :
set(v):
var old = can_interact
can_interact = v
if old != can_interact:
player_updated.emit(self)
var energy : int = max_energy :
set(v):
energy = v
emit_signal("player_updated", self)
var action_area : ActionArea = null
func _ready():
emit_signal("player_updated", self)
@ -40,13 +53,16 @@ func get_input():
var old_velocity=velocity
calculate_direction()
if Input.is_action_just_pressed("action") and energy > 0:
action()
if Input.is_action_just_pressed("interact") and closest_interactable:
can_use_item = inventory.get_item() and inventory.get_item().can_use(self)
can_interact = closest_interactable and closest_interactable.can_interact(self)
if action_area:
action_area.activated = can_use_item
if Input.is_action_just_pressed("action"):
try_use_item()
if Input.is_action_just_pressed("interact") and closest_interactable and can_interact:
closest_interactable.interact(self)
if Input.is_action_just_pressed("drop") and inventory.lenght() > 0:
var item_to_drop = inventory.pop_item()
planet.drop_item(item_to_drop, global_position)
if Input.is_action_just_pressed("drop") and inventory.get_item():
drop_item()
if old_velocity.length()==0 and velocity.length()!=0:
$Audio/AudioStreamPlayer_movement.play()
@ -56,14 +72,37 @@ func calculate_direction():
if input_direction.x:
$Sprite.flip_h = (input_direction.x < 0)
func action():
if planet:
planet.plant(
testPlantType,
global_position
)
func try_use_item():
if energy == 0 and inventory.get_item():
action_tried_without_energy.emit()
if energy > 0 and can_use_item:
use_item()
func pass_day():
func get_item(item : Item):
remove_action_area()
inventory.set_item(item)
if item is ToolItem:
add_action_area(item.generate_action_area())
func drop_item():
var item_to_drop = inventory.pop_item()
planet.drop_item(item_to_drop, global_position)
remove_action_area()
func delete_item():
inventory.set_item(null)
remove_action_area()
func use_item():
var item = inventory.get_item()
var is_item_used = item.use(self)
if is_item_used:
energy -= 1
if item.is_one_time_use():
delete_item()
# Méthode déclenchée par la classe planet
func _pass_day():
energy = max_energy
func detect_closest_interactable():
@ -82,6 +121,19 @@ func detect_closest_interactable():
else :
closest_interactable = null
func add_action_area(area : ActionArea):
action_area = area
add_child(action_area)
func remove_action_area():
if (action_area):
remove_child(action_area)
func upgrade():
max_energy += 1
energy += 1
upgraded.emit()
func _process(_delta):
get_input()
move_and_slide()
@ -94,4 +146,4 @@ func _on_root_gui_day_pass_finished():
controlling_player = true
func _on_root_gui_game_click():
action()
try_use_item()

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="121.41377mm"
height="49.165478mm"
viewBox="0 0 121.41377 49.165478"
version="1.1"
id="svg1"
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">
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="mm" />
<defs
id="defs1" />
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-77.923929,-55.520125)">
<path
id="path1"
style="fill:#ffffff;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
d="M 141.47612,55.520125 A 35.11824,35.11824 0 0 0 107.53969,81.850818 26.422297,26.422297 0 0 0 104.01691,81.607939 26.422297,26.422297 0 0 0 77.923926,104.6856 H 199.239 a 28.094591,28.094591 0 0 0 0.0987,-1.00304 28.094591,28.094591 0 0 0 -26.09504,-28.015344 35.11824,35.11824 0 0 0 -31.76654,-20.147091 z" />
<path
id="path2"
style="fill:#c9c9c9;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
d="M 149.00176,77.594747 A 22.241554,22.241554 0 0 0 127.96997,92.741626 22.241554,22.241554 0 0 0 117.22799,89.969702 22.241554,22.241554 0 0 0 96.380164,104.6856 h 95.746606 a 22.241554,22.241554 0 0 0 -21.05091,-15.385108 22.241554,22.241554 0 0 0 -2.3983,0.171566 22.241554,22.241554 0 0 0 -19.6758,-11.877311 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bu26h0iqutnky"
path="res://.godot/imported/underground_loot.svg-94513f7cc11df7cda1992e530bcff786.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/underground_loot/assets/sprites/underground_loot.svg"
dest_files=["res://.godot/imported/underground_loot.svg-94513f7cc11df7cda1992e530bcff786.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

View File

@ -0,0 +1,48 @@
extends Area2D
class_name UndergroundLoot
const AREA_WIDTH = 10
const LOOTED_ITEM_RANDOM_RANGE = 100
const SPRITE_SCENE : PackedScene = preload("res://entities/underground_loot/underground_loot_sprite.tscn")
@export var loot : Array[Item]
var planet : Planet # mis à jour par la classe Planet
@onready var sprite_object: Node2D = generate_sprite()
@onready var collision_shape: CollisionShape2D = generate_collision_shape()
func _init(_planet = null):
planet = _planet
func generate_sprite() -> Node2D:
var object = SPRITE_SCENE.instantiate()
add_child(object)
return object
func generate_collision_shape() -> CollisionShape2D:
var collision = CollisionShape2D.new()
var shape = CircleShape2D.new()
shape.radius = AREA_WIDTH
collision.shape = shape
add_child(collision)
return collision
func dig():
for item in loot:
var item_object = planet.drop_item(item, global_position)
var tween : Tween = get_tree().create_tween()
tween.tween_property(
item_object,
"position",
Vector2(
item_object.position.x + randi()%LOOTED_ITEM_RANDOM_RANGE,
item_object.position.y + randi()%LOOTED_ITEM_RANDOM_RANGE
),
0.2
)
queue_free()

View File

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

View File

@ -0,0 +1,10 @@
[gd_scene load_steps=2 format=3 uid="uid://dxjud7bti0na0"]
[ext_resource type="Texture2D" uid="uid://bu26h0iqutnky" path="res://entities/underground_loot/assets/sprites/underground_loot.svg" id="1_t1xxm"]
[node name="UndergroundLootSprites" type="Node2D"]
[node name="Sprite2D" type="Sprite2D" parent="."]
modulate = Color(0.286275, 0.219608, 0.313726, 1)
scale = Vector2(0.0806452, 0.0806452)
texture = ExtResource("1_t1xxm")

43
export_presets.cfg Normal file
View File

@ -0,0 +1,43 @@
[preset.0]
name="Web"
platform="Web"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=".export/web/index.html"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.0.options]
custom_template/debug=""
custom_template/release=""
variant/extensions_support=false
variant/thread_support=false
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/ensure_cross_origin_isolation_headers=true
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=0
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color(0, 0, 0, 1)

97
game.tscn Normal file
View File

@ -0,0 +1,97 @@
[gd_scene load_steps=20 format=3 uid="uid://d28cp7a21kwou"]
[ext_resource type="PackedScene" uid="uid://12nak7amd1uq" path="res://gui/game/game_gui.tscn" id="1_iotsf"]
[ext_resource type="PackedScene" uid="uid://csiacsndm62ll" path="res://gui/game/pause/pause.tscn" id="2_215e1"]
[ext_resource type="PackedScene" uid="uid://bgvbgeq46wee2" path="res://entities/player/player.tscn" id="2_lc2xo"]
[ext_resource type="PackedScene" uid="uid://v41hfc7haaye" path="res://gui/game/win/win.tscn" id="3_7sc4i"]
[ext_resource type="Script" uid="uid://dedg615xudpoq" path="res://entities/interactables/item_object/script/item_object.gd" id="3_215e1"]
[ext_resource type="PackedScene" uid="uid://tsi5j1uxppa4" path="res://stages/terrain/planet/planet.tscn" id="6_e8heu"]
[ext_resource type="Resource" uid="uid://ddqalo1k30i5x" path="res://common/inventory/resources/items/default_shovel.tres" id="6_lc2xo"]
[ext_resource type="PackedScene" uid="uid://bkwh1ntvgkkrt" path="res://entities/interactables/compost/compost.tscn" id="7_215e1"]
[ext_resource type="Script" uid="uid://bq7admu4ahs5r" path="res://common/inventory/scripts/item.gd" id="7_rvswv"]
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="8_boyg6"]
[ext_resource type="Resource" uid="uid://b04vho33bl52b" path="res://entities/plants/resources/plants/default.tres" id="9_e36ub"]
[ext_resource type="Script" uid="uid://bypjcvlc15gsm" path="res://common/inventory/scripts/items/seed.gd" id="10_hb5m1"]
[ext_resource type="Resource" uid="uid://dsctivn1vrem2" path="res://entities/plants/resources/plants/maias.tres" id="11_x5p1p"]
[ext_resource type="PackedScene" uid="uid://dj7gp3crtg2yt" path="res://entities/camera/camera.tscn" id="12_qhcbd"]
[sub_resource type="AtlasTexture" id="AtlasTexture_qt76e"]
atlas = ExtResource("8_boyg6")
region = Rect2(1140, 345, 141, 128)
[sub_resource type="Resource" id="Resource_lc2xo"]
script = ExtResource("10_hb5m1")
plant_type = ExtResource("9_e36ub")
name = "Chardi"
description = "This plant reduce contamination around when it becomes mature."
icon = SubResource("AtlasTexture_qt76e")
metadata/_custom_type_script = "uid://bypjcvlc15gsm"
[sub_resource type="Resource" id="Resource_215e1"]
script = ExtResource("10_hb5m1")
plant_type = ExtResource("9_e36ub")
name = "Chardi"
description = "This plant reduce contamination around when it becomes mature."
icon = SubResource("AtlasTexture_qt76e")
metadata/_custom_type_script = "uid://bypjcvlc15gsm"
[sub_resource type="AtlasTexture" id="AtlasTexture_sri3b"]
atlas = ExtResource("8_boyg6")
region = Rect2(1697, 331, 125, 158)
[sub_resource type="Resource" id="Resource_7sc4i"]
script = ExtResource("10_hb5m1")
plant_type = ExtResource("11_x5p1p")
name = "Maias"
description = "This gorgeous flower has no effect, but produce a lot of seeds."
icon = SubResource("AtlasTexture_sri3b")
metadata/_custom_type_script = "uid://bypjcvlc15gsm"
[node name="Game" type="Node2D"]
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="RootGui" parent="CanvasLayer" instance=ExtResource("1_iotsf")]
metadata/_edit_use_anchors_ = true
[node name="Pause" parent="CanvasLayer" instance=ExtResource("2_215e1")]
process_mode = 3
visible = false
z_index = 1000
[node name="Win" parent="CanvasLayer" instance=ExtResource("3_7sc4i")]
visible = false
[node name="Entities" type="Node2D" parent="."]
y_sort_enabled = true
[node name="Player" parent="Entities" instance=ExtResource("2_lc2xo")]
[node name="ShovelObject" type="Area2D" parent="Entities"]
position = Vector2(2, 72)
script = ExtResource("3_215e1")
item = ExtResource("6_lc2xo")
metadata/_custom_type_script = "uid://dedg615xudpoq"
[node name="Compost" parent="Entities" instance=ExtResource("7_215e1")]
position = Vector2(3, 458)
[node name="Planet" parent="." node_paths=PackedStringArray("import_entities_from_node") instance=ExtResource("6_e8heu")]
loot_items = Array[ExtResource("7_rvswv")]([SubResource("Resource_lc2xo"), SubResource("Resource_215e1"), SubResource("Resource_7sc4i")])
import_entities_from_node = NodePath("../Entities")
[node name="Camera" parent="." node_paths=PackedStringArray("following") instance=ExtResource("12_qhcbd")]
position = Vector2(2.22, 0)
following = NodePath("../Entities/Player")
[connection signal="day_pass_finished" from="CanvasLayer/RootGui" to="Entities/Player" method="_on_root_gui_day_pass_finished"]
[connection signal="day_pass_finished" from="CanvasLayer/RootGui" to="Planet" method="_on_root_gui_day_pass_finished"]
[connection signal="day_pass_pressed" from="CanvasLayer/RootGui" to="Entities/Player" method="_on_root_gui_day_pass_pressed"]
[connection signal="day_pass_proceed" from="CanvasLayer/RootGui" to="Planet" method="_on_root_gui_day_pass_proceed"]
[connection signal="game_click" from="CanvasLayer/RootGui" to="Entities/Player" method="_on_root_gui_game_click"]
[connection signal="pause_asked" from="CanvasLayer/RootGui" to="CanvasLayer/Pause" method="_on_root_gui_pause_asked"]
[connection signal="action_tried_without_energy" from="Entities/Player" to="CanvasLayer/RootGui" method="_on_player_action_tried_without_energy"]
[connection signal="player_updated" from="Entities/Player" to="CanvasLayer/RootGui" method="_on_player_updated"]
[connection signal="upgraded" from="Entities/Player" to="CanvasLayer/RootGui" method="_on_player_upgraded"]
[connection signal="day_limit_exceed" from="Planet" to="CanvasLayer/Win" method="_on_planet_day_limit_exceed"]
[connection signal="planet_updated" from="Planet" to="CanvasLayer/RootGui" method="_on_planet_updated"]

View File

Before

Width:  |  Height:  |  Size: 887 B

After

Width:  |  Height:  |  Size: 887 B

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dcgnamu7sb3ov"
path="res://.godot/imported/bolt.svg-346ec638bad7861a6c0a47abfe0480f6.ctex"
path="res://.godot/imported/bolt.svg-71cbe0c7c38f15f305dc23930d585037.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/player_info/assets/icons/bolt.svg"
dest_files=["res://.godot/imported/bolt.svg-346ec638bad7861a6c0a47abfe0480f6.ctex"]
source_file="res://gui/game/assets/icons/bolt.svg"
dest_files=["res://.godot/imported/bolt.svg-71cbe0c7c38f15f305dc23930d585037.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 294 KiB

After

Width:  |  Height:  |  Size: 294 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cm3ehinvvj52i"
path="res://.godot/imported/Interface sans boutons.png-6f58a6b9570fde0ac2945334970770a8.ctex"
path="res://.godot/imported/Interface sans boutons.png-8803a272a5ab9636d02d2ab305d64a0e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/player_info/assets/texture/Interface sans boutons.png"
dest_files=["res://.godot/imported/Interface sans boutons.png-6f58a6b9570fde0ac2945334970770a8.ctex"]
source_file="res://gui/game/assets/texture/Interface sans boutons.png"
dest_files=["res://.godot/imported/Interface sans boutons.png-8803a272a5ab9636d02d2ab305d64a0e.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 285 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://c2pgaklnj5w3d"
path="res://.godot/imported/Tablette info.png-0d02a3ea4c574d196b3e778477072d61.ctex"
path="res://.godot/imported/Tablette info.png-1bbdbf5d41cf3eed26f09b419e160733.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/assets/texture/Tablette info.png"
dest_files=["res://.godot/imported/Tablette info.png-0d02a3ea4c574d196b3e778477072d61.ctex"]
source_file="res://gui/game/assets/texture/Tablette info.png"
dest_files=["res://.godot/imported/Tablette info.png-1bbdbf5d41cf3eed26f09b419e160733.ctex"]
[params]

494
gui/game/game_gui.tscn Normal file
View File

@ -0,0 +1,494 @@
[gd_scene load_steps=21 format=3 uid="uid://12nak7amd1uq"]
[ext_resource type="Script" uid="uid://cqao7n800qy40" path="res://gui/game/scripts/game_gui.gd" id="1_udau0"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/game/ressources/default_theme.tres" id="2_nq5i2"]
[ext_resource type="Texture2D" uid="uid://cm3ehinvvj52i" path="res://gui/game/assets/texture/Interface sans boutons.png" id="3_n4kem"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/game/assets/icons/bolt.svg" id="4_k4juk"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/game/ressources/default_label_settings.tres" id="4_ujg5r"]
[ext_resource type="Texture2D" uid="uid://c2pgaklnj5w3d" path="res://gui/game/assets/texture/Tablette info.png" id="6_fovlv"]
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="7_n4kem"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="8_n4kem"]
[ext_resource type="Texture2D" uid="uid://b5cuxgisrsfgt" path="res://gui/game/pause/assets/icons/player-pause.svg" id="9_2wykm"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ek73b"]
atlas = ExtResource("7_n4kem")
region = Rect2(76, 75, 124, 135)
[sub_resource type="LabelSettings" id="LabelSettings_ek73b"]
font = ExtResource("8_n4kem")
font_size = 20
[sub_resource type="LabelSettings" id="LabelSettings_n4kem"]
font_size = 12
[sub_resource type="Animation" id="Animation_iyvkh"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("RechargeFade:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0, 0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("RechargeFade:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("MarginContainer/PlayerInfo/EnergyInfo:offset_left")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [-44.0]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Effect:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Effect:modulate")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("MarginContainer/PlayerInfo/EnergyInfo:offset_bottom")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [12.5]
}
[sub_resource type="Animation" id="Animation_n4kem"]
resource_name = "no_energy_left"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MarginContainer/PlayerInfo/EnergyInfo:offset_left")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0333333, 0.1, 0.166667, 0.233333, 0.3, 0.366667, 0.433333, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [-44.0, -40.0, -44.0, -48.0, -44.0, -40.0, -44.0, -40.0, -44.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Effect:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Effect:modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.266667),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Color(0.866667, 0.152941, 0.337255, 0), Color(0.866667, 0.152941, 0.337255, 0.392157), Color(0.866667, 0.152941, 0.337255, 0)]
}
[sub_resource type="Animation" id="Animation_k4juk"]
resource_name = "recharge_fade_in"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("RechargeFade:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("RechargeFade:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_fovlv"]
resource_name = "recharge_fade_out"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("RechargeFade:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.166667, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("RechargeFade:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(1),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_2wykm"]
resource_name = "upgrade"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Effect:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Effect:modulate")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.133333, 0.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Color(0.67451, 0.52549, 0.203922, 0), Color(0.67451, 0.52549, 0.203922, 0.572549), Color(0.67451, 0.52549, 0.203922, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("MarginContainer/PlayerInfo/EnergyInfo:offset_bottom")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.233333, 0.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [12.5, -32.0, 12.5]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_n4kem"]
_data = {
&"RESET": SubResource("Animation_iyvkh"),
&"no_energy_left": SubResource("Animation_n4kem"),
&"recharge_fade_in": SubResource("Animation_k4juk"),
&"recharge_fade_out": SubResource("Animation_fovlv"),
&"upgrade": SubResource("Animation_2wykm")
}
[sub_resource type="Gradient" id="Gradient_2wykm"]
offsets = PackedFloat32Array(0, 0.279476, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_id0t5"]
gradient = SubResource("Gradient_2wykm")
fill = 1
fill_from = Vector2(0.5, 0.5)
[node name="RootGui" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_udau0")
[node name="GameAction" type="TextureButton" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme = ExtResource("2_nq5i2")
[node name="PlayerInfo" type="Control" parent="MarginContainer"]
custom_minimum_size = Vector2(337, 160)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 0
[node name="Background" type="TextureRect" parent="MarginContainer/PlayerInfo"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("3_n4kem")
expand_mode = 2
stretch_mode = 5
[node name="EnergyInfo" type="HBoxContainer" parent="MarginContainer/PlayerInfo"]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = -1
anchor_left = 0.281899
anchor_top = 0.384375
anchor_right = 0.281899
anchor_bottom = 0.584375
offset_left = -44.0
offset_top = -12.5
offset_right = 44.0
offset_bottom = 12.5
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 0
metadata/_edit_use_anchors_ = true
[node name="Icon" type="TextureRect" parent="MarginContainer/PlayerInfo/EnergyInfo"]
custom_minimum_size = Vector2(36.64, 0)
layout_mode = 2
texture = ExtResource("4_k4juk")
stretch_mode = 5
[node name="EnergyCount" type="Label" parent="MarginContainer/PlayerInfo/EnergyInfo"]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("2_nq5i2")
text = "0/3"
label_settings = ExtResource("4_ujg5r")
horizontal_alignment = 1
vertical_alignment = 1
[node name="DecontaminationCoverage" type="Label" parent="MarginContainer/PlayerInfo"]
unique_name_in_owner = true
layout_mode = 0
offset_left = 157.0
offset_top = 86.0
offset_right = 291.0
offset_bottom = 126.0
text = "100%"
label_settings = ExtResource("4_ujg5r")
horizontal_alignment = 1
vertical_alignment = 1
[node name="DayPass" type="Button" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 8
focus_mode = 0
theme = ExtResource("2_nq5i2")
text = "Recharge"
icon = ExtResource("4_k4juk")
[node name="ItemInfo" type="TextureRect" parent="MarginContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 300)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 8
theme = ExtResource("2_nq5i2")
texture = ExtResource("6_fovlv")
expand_mode = 3
stretch_mode = 4
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/ItemInfo"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 35
theme_override_constants/margin_top = 35
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 75
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/ItemInfo/MarginContainer"]
layout_mode = 2
theme = ExtResource("2_nq5i2")
[node name="ItemIcon" type="TextureRect" parent="MarginContainer/ItemInfo/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 50)
layout_mode = 2
texture = SubResource("AtlasTexture_ek73b")
expand_mode = 1
stretch_mode = 5
[node name="ItemName" type="Label" parent="MarginContainer/ItemInfo/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "fdqsd"
label_settings = SubResource("LabelSettings_ek73b")
horizontal_alignment = 1
[node name="ItemDesc" type="Label" parent="MarginContainer/ItemInfo/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
text = "Ceci est une pelle qui sert exclusivement à faire des choses intéressantes. Ceci est une pelle qui sert exclusivement à faire des choses intéressantes. Ceci est une pelle qui sert exclusivement à faire des choses intéressantes. Ceci est une pelle qui sert exclusivement à faire des choses intéressantes. "
label_settings = SubResource("LabelSettings_n4kem")
autowrap_mode = 3
clip_text = true
[node name="AvailableActions" type="HBoxContainer" parent="MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
theme = ExtResource("2_nq5i2")
[node name="Plant" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "Space/Click - Plant Seed"
[node name="Interact" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "E - Interact"
[node name="GetItem" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "E - Take Item"
[node name="SwapItem" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "E - Swap Item"
[node name="DropItem" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "W - Drop Item"
[node name="UseItem" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "Space/Click - Use Item"
[node name="TopRightContent" type="HBoxContainer" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
alignment = 1
[node name="DayCount" type="Label" parent="MarginContainer/TopRightContent"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
text = "Day 0"
label_settings = ExtResource("4_ujg5r")
vertical_alignment = 1
[node name="Pause" type="Button" parent="MarginContainer/TopRightContent"]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
focus_mode = 0
icon = ExtResource("9_2wykm")
[node name="RechargeFade" type="ColorRect" parent="."]
physics_interpolation_mode = 0
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 0)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_n4kem")
}
[node name="GridContainer" type="GridContainer" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="Effect" type="TextureRect" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = SubResource("GradientTexture2D_id0t5")
[connection signal="button_down" from="GameAction" to="." method="_on_game_action_button_down"]
[connection signal="pressed" from="MarginContainer/DayPass" to="." method="_on_day_pass_pressed"]
[connection signal="pressed" from="MarginContainer/TopRightContent/Pause" to="." method="_on_pause_pressed"]

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

@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://duvusidiuik4p"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
uid="uid://dex283rx00fjb"
path="res://.godot/imported/logout.svg-adb7b7ff1fadfa9220dcf694870580b9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
source_file="res://gui/game/pause/assets/icons/logout.svg"
dest_files=["res://.godot/imported/logout.svg-adb7b7ff1fadfa9220dcf694870580b9.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-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-cb8236066c72679196b716c41226079f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/pause/assets/icons/player-pause.svg"
dest_files=["res://.godot/imported/player-pause.svg-cb8236066c72679196b716c41226079f.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

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-25043c6a392478c90f845ddfdfb35372.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/pause/assets/icons/player-play.svg"
dest_files=["res://.godot/imported/player-play.svg-25043c6a392478c90f845ddfdfb35372.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

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-af6a45b9d3420200a268c1390881e44f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/game/pause/assets/icons/rotate.svg"
dest_files=["res://.godot/imported/rotate.svg-af6a45b9d3420200a268c1390881e44f.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

106
gui/game/pause/pause.tscn Normal file
View File

@ -0,0 +1,106 @@
[gd_scene load_steps=9 format=3 uid="uid://csiacsndm62ll"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/game/ressources/default_theme.tres" id="1_51ks3"]
[ext_resource type="Script" uid="uid://crt2d4m5ba25i" path="res://gui/game/pause/scripts/pause.gd" id="1_he4ox"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="2_8d1kg"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/game/ressources/default_label_settings.tres" id="3_0pdto"]
[ext_resource type="Texture2D" uid="uid://vmsn54d1ptih" path="res://gui/game/pause/assets/icons/player-play.svg" id="5_apjlw"]
[ext_resource type="Texture2D" uid="uid://bewr0t1wi8pff" path="res://gui/game/pause/assets/icons/rotate.svg" id="6_58dya"]
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://gui/game/pause/assets/icons/logout.svg" id="7_yj6f1"]
[sub_resource type="LabelSettings" id="LabelSettings_apjlw"]
font = ExtResource("2_8d1kg")
font_size = 50
[node name="Pause" type="Control"]
z_index = 10
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_he4ox")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Tutorial" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_51ks3")
[node name="VBoxContainer" type="VBoxContainer" parent="Tutorial"]
layout_mode = 2
theme = ExtResource("1_51ks3")
theme_override_constants/separation = 9
alignment = 1
[node name="PauseTitle" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "Pause"
label_settings = SubResource("LabelSettings_apjlw")
horizontal_alignment = 1
[node name="StoryTitle" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "Story"
label_settings = ExtResource("3_0pdto")
horizontal_alignment = 1
[node name="StoryText" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "You are a robot who has recently arrived on a barren planet. Find and plant seeds to reduce the contamination.
You have limited energy, but can recharge when passing days.
You have 10 days to decontaminate as much as possible.
PS: You can compost seeds at the bottom of the map to upgrade max enegy.
"
horizontal_alignment = 1
[node name="ControlsTitle" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "Controls"
label_settings = ExtResource("3_0pdto")
horizontal_alignment = 1
[node name="ControlsText" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "QWERTY/AZERTY/Directional Arrows : Move
E : Interact/Pickup Items
Space/Click : Use Item
W : Drop Item
"
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Tutorial/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Resume" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Resume Game"
icon = ExtResource("5_apjlw")
[node name="Restart" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Restart"
icon = ExtResource("6_58dya")
[node name="Quit" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Quit"
icon = ExtResource("7_yj6f1")
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Resume" to="." method="_on_resume_pressed"]
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Restart" to="." method="_on_restart_pressed"]
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Quit" to="." method="_on_quit_pressed"]

View File

@ -0,0 +1,27 @@
extends Control
var pause = false :
set(v):
print(pause)
pause = v
visible = pause
get_tree().paused = pause
func _ready():
pause = false
func _input(_event):
if Input.is_action_just_pressed("pause"):
pause = not pause
func _on_resume_pressed():
pause = false
func _on_restart_pressed():
get_tree().reload_current_scene()
func _on_quit_pressed():
get_tree().quit()
func _on_root_gui_pause_asked():
pause = true

View File

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

View File

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 285 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://qx75h1k3wmm1"
path="res://.godot/imported/Tablette info.png-e89cd3fdb4a303341f3bbad730de279c.ctex"
path="res://.godot/imported/Tablette info.png-b4fbef928a773f595b589d989235c266.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/ressources/Tablette info.png"
dest_files=["res://.godot/imported/Tablette info.png-e89cd3fdb4a303341f3bbad730de279c.ctex"]
source_file="res://gui/game/ressources/Tablette info.png"
dest_files=["res://.godot/imported/Tablette info.png-b4fbef928a773f595b589d989235c266.ctex"]
[params]

View File

@ -1,6 +1,6 @@
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://dqwayi8yjwau2"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="1_w0wva"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="1_w0wva"]
[resource]
font = ExtResource("1_w0wva")

View File

@ -1,6 +1,6 @@
[gd_resource type="Theme" load_steps=5 format=3 uid="uid://bgcmd213j6gk1"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="1_hv6r3"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="1_hv6r3"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hv6r3"]
bg_color = Color(0.976471, 0.741176, 0.4, 1)

View File

@ -3,12 +3,12 @@
importer="font_data_dynamic"
type="FontFile"
uid="uid://byyfovm1ha5ya"
path="res://.godot/imported/AtomicMd-3zXDZ.ttf-0d8ee2c5d0b5b97084be121e0cf9710b.fontdata"
path="res://.godot/imported/AtomicMd-3zXDZ.ttf-72972057c8e238d8e668e97b2f9f70c6.fontdata"
[deps]
source_file="res://gui/ressources/fonts/AtomicMd-3zXDZ.ttf"
dest_files=["res://.godot/imported/AtomicMd-3zXDZ.ttf-0d8ee2c5d0b5b97084be121e0cf9710b.fontdata"]
source_file="res://gui/game/ressources/fonts/AtomicMd-3zXDZ.ttf"
dest_files=["res://.godot/imported/AtomicMd-3zXDZ.ttf-72972057c8e238d8e668e97b2f9f70c6.fontdata"]
[params]

View File

@ -3,12 +3,12 @@
importer="font_data_dynamic"
type="FontFile"
uid="uid://c8xf3tfnpufk3"
path="res://.godot/imported/spincycle_3d_ot.otf-f71d33fbaded9da2ba85d0eb20bfd1e1.fontdata"
path="res://.godot/imported/spincycle_3d_ot.otf-21ea869159b3b8db074d7006cdac52ac.fontdata"
[deps]
source_file="res://gui/ressources/fonts/spincycle_3d_ot.otf"
dest_files=["res://.godot/imported/spincycle_3d_ot.otf-f71d33fbaded9da2ba85d0eb20bfd1e1.fontdata"]
source_file="res://gui/game/ressources/fonts/spincycle_3d_ot.otf"
dest_files=["res://.godot/imported/spincycle_3d_ot.otf-21ea869159b3b8db074d7006cdac52ac.fontdata"]
[params]

View File

@ -3,12 +3,12 @@
importer="font_data_dynamic"
type="FontFile"
uid="uid://cpnsnrqhfkj3k"
path="res://.godot/imported/spincycle_ot.otf-be21809daa8fde21c00f1cf664ce2342.fontdata"
path="res://.godot/imported/spincycle_ot.otf-27679d167ed7a37649e3338357150952.fontdata"
[deps]
source_file="res://gui/ressources/fonts/spincycle_ot.otf"
dest_files=["res://.godot/imported/spincycle_ot.otf-be21809daa8fde21c00f1cf664ce2342.fontdata"]
source_file="res://gui/game/ressources/fonts/spincycle_ot.otf"
dest_files=["res://.godot/imported/spincycle_ot.otf-27679d167ed7a37649e3338357150952.fontdata"]
[params]

View File

@ -0,0 +1,55 @@
extends Control
class_name GameGui
signal game_click
signal day_pass_pressed
signal day_pass_proceed
signal day_pass_finished
signal pause_asked
func _on_player_updated(player:Player):
%EnergyCount.text = str(player.energy) + "/" + str(player.max_energy)
%EnergyInfo.modulate = Color.WHITE if player.energy > 0 else Color.RED
%AvailableActions/GetItem.visible = player.closest_interactable is ItemObject and player.inventory.get_item() == null
%AvailableActions/Interact.visible = not player.closest_interactable is ItemObject and player.can_interact
%AvailableActions/SwapItem.visible = player.closest_interactable is ItemObject and player.inventory.get_item() != null
%AvailableActions/DropItem.visible = player.inventory.get_item() != null
%AvailableActions/UseItem.visible = player.inventory.get_item() and player.can_use_item and not player.inventory.get_item() is Seed
%AvailableActions/Plant.visible = player.inventory.get_item() and player.can_use_item and player.inventory.get_item() is Seed
%ItemInfo.visible = player.inventory.get_item() != null
if player.inventory.get_item():
var item : Item = player.inventory.get_item()
%ItemIcon.texture = item.icon
%ItemName.text = item.name
%ItemDesc.text = item.description
func _on_day_pass_pressed():
day_pass_pressed.emit()
$AnimationPlayer.play("recharge_fade_in")
await $AnimationPlayer.animation_finished
day_pass_proceed.emit()
$AnimationPlayer.play("recharge_fade_out")
await $AnimationPlayer.animation_finished
day_pass_finished.emit()
func _on_game_action_button_down():
game_click.emit()
func _on_planet_updated(planet:Planet):
%DayCount.text = "Day " + str(planet.day)
%DecontaminationCoverage.text = str(roundi(planet.decontamination_coverage * 100)) + "%"
func _on_player_action_tried_without_energy():
$AnimationPlayer.play("no_energy_left")
func _on_pause_pressed():
pause_asked.emit()
func _on_player_upgraded():
$AnimationPlayer.play("upgrade")

View File

@ -0,0 +1,19 @@
extends Control
func _ready():
visible = false
func win(decontamination_coverage : float):
visible = true
get_tree().paused = true
%WinTitle.text = "Score : " + str(roundi(decontamination_coverage * 100)) + "%"
func _on_restart_pressed():
get_tree().reload_current_scene()
func _on_quit_pressed():
get_tree().quit()
func _on_planet_day_limit_exceed(planet : Planet):
win(planet.decontamination_coverage)

View File

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

94
gui/game/win/win.tscn Normal file
View File

@ -0,0 +1,94 @@
[gd_scene load_steps=8 format=3 uid="uid://v41hfc7haaye"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/game/ressources/default_theme.tres" id="1_cl67j"]
[ext_resource type="Script" uid="uid://b3wuxv04clyed" path="res://gui/game/win/scripts/win.gd" id="1_sehw2"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/game/ressources/fonts/spincycle_ot.otf" id="2_sehw2"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/game/ressources/default_label_settings.tres" id="3_0b3c6"]
[ext_resource type="Texture2D" uid="uid://bewr0t1wi8pff" path="res://gui/game/pause/assets/icons/rotate.svg" id="4_8p3aj"]
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://gui/game/pause/assets/icons/logout.svg" id="5_j3wid"]
[sub_resource type="LabelSettings" id="LabelSettings_eq457"]
font = ExtResource("2_sehw2")
font_size = 50
[node name="Win" type="Control"]
process_mode = 3
z_index = 101
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_sehw2")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Tutorial" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_cl67j")
[node name="VBoxContainer" type="VBoxContainer" parent="Tutorial"]
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("1_cl67j")
theme_override_constants/separation = 9
alignment = 1
[node name="WinTitle" type="Label" parent="Tutorial/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Score : 2%"
label_settings = SubResource("LabelSettings_eq457")
horizontal_alignment = 1
[node name="ThanksTitle" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "Thanks for playing"
label_settings = ExtResource("3_0b3c6")
horizontal_alignment = 1
[node name="ThanksText" type="Label" parent="Tutorial/VBoxContainer"]
layout_mode = 2
text = "We need your feedback! Give us your thoughts on the game on our Discord or in the comments section of the Itch page."
horizontal_alignment = 1
[node name="HBoxContainer2" type="HBoxContainer" parent="Tutorial/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="LinkButton" type="LinkButton" parent="Tutorial/VBoxContainer/HBoxContainer2"]
layout_mode = 2
theme = ExtResource("1_cl67j")
theme_override_font_sizes/font_size = 24
text = "Join our Discord"
uri = "https://discord.gg/VTFKvEvgfz"
[node name="HBoxContainer" type="HBoxContainer" parent="Tutorial/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Restart" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Restart"
icon = ExtResource("4_8p3aj")
[node name="Quit" type="Button" parent="Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Quit"
icon = ExtResource("5_j3wid")
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Restart" to="." method="_on_restart_pressed"]
[connection signal="pressed" from="Tutorial/VBoxContainer/HBoxContainer/Quit" to="." method="_on_quit_pressed"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://nx4wxpr6mk8l"
path="res://.godot/imported/SeedingPlanetsLogo.png-21df48940674276ef147abcb9b68381d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/menu/assets/texture/SeedingPlanetsLogo.png"
dest_files=["res://.godot/imported/SeedingPlanetsLogo.png-21df48940674276ef147abcb9b68381d.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://03ijmo6xlytu"
path="res://.godot/imported/abre1glow.png-5f3f846ff6582fe5f49aa264265fe9c7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/menu/assets/texture/abre1glow.png"
dest_files=["res://.godot/imported/abre1glow.png-5f3f846ff6582fe5f49aa264265fe9c7.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

6
gui/menu/scripts/menu.gd Normal file
View File

@ -0,0 +1,6 @@
extends Node2D
@export_file var start_scene_path : String
func _on_start_pressed():
get_tree().change_scene_to_file(start_scene_path)

View File

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

View File

@ -1,68 +0,0 @@
[gd_scene load_steps=6 format=3 uid="uid://baqrmhsgqda6v"]
[ext_resource type="Script" uid="uid://bpqh8n0lbluf8" path="res://gui/player_info/scripts/player_info.gd" id="1_ghu0s"]
[ext_resource type="Texture2D" uid="uid://cm3ehinvvj52i" path="res://gui/player_info/assets/texture/Interface sans boutons.png" id="2_cgy6f"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/player_info/assets/icons/bolt.svg" id="3_s4ggy"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="4_cgy6f"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/default_label_settings.tres" id="5_s4ggy"]
[node name="PlayerInfo" type="Control"]
custom_minimum_size = Vector2(337, 160)
layout_mode = 3
anchor_right = 0.293
anchor_bottom = 0.247
offset_right = -0.536011
offset_bottom = -0.0559998
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 0
size_flags_vertical = 0
script = ExtResource("1_ghu0s")
[node name="Background" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_cgy6f")
expand_mode = 2
stretch_mode = 5
[node name="EnergyInfo" type="HBoxContainer" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.281899
anchor_top = 0.384375
anchor_right = 0.281899
anchor_bottom = 0.584375
offset_left = -44.0
offset_top = -12.5
offset_right = 44.0
offset_bottom = 12.5
grow_horizontal = 2
grow_vertical = 2
metadata/_edit_use_anchors_ = true
[node name="Icon" type="TextureRect" parent="EnergyInfo"]
custom_minimum_size = Vector2(36.64, 0)
layout_mode = 2
texture = ExtResource("3_s4ggy")
stretch_mode = 5
[node name="Label" type="Label" parent="EnergyInfo"]
layout_mode = 2
theme = ExtResource("4_cgy6f")
text = "0"
label_settings = ExtResource("5_s4ggy")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Inventory" type="HBoxContainer" parent="."]
layout_mode = 0
offset_left = 157.0
offset_top = 86.0
offset_right = 291.0
offset_bottom = 126.0
alignment = 1

View File

@ -1,4 +0,0 @@
extends Control
func player_update(player: Player):
$EnergyInfo/Label.text = str(player.energy)

View File

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

View File

@ -1,254 +0,0 @@
[gd_scene load_steps=14 format=3 uid="uid://12nak7amd1uq"]
[ext_resource type="PackedScene" uid="uid://baqrmhsgqda6v" path="res://gui/player_info/player_info.tscn" id="1_8kw6x"]
[ext_resource type="Script" uid="uid://cqao7n800qy40" path="res://gui/scripts/root_gui.gd" id="1_udau0"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="2_nq5i2"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/player_info/assets/icons/bolt.svg" id="4_k4juk"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/default_label_settings.tres" id="4_ujg5r"]
[ext_resource type="Texture2D" uid="uid://c2pgaklnj5w3d" path="res://gui/assets/texture/Tablette info.png" id="6_fovlv"]
[ext_resource type="Texture2D" uid="uid://bf6nw4onkhavr" path="res://common/inventory/assets/icons/shovel.svg" id="7_n4kem"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="8_n4kem"]
[sub_resource type="LabelSettings" id="LabelSettings_ek73b"]
font = ExtResource("8_n4kem")
font_size = 20
[sub_resource type="Animation" id="Animation_iyvkh"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("RechargeFade:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0, 0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("RechargeFade:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_k4juk"]
resource_name = "recharge_fade_in"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("RechargeFade:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("RechargeFade:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_fovlv"]
resource_name = "recharge_fade_out"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("RechargeFade:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.166667, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("RechargeFade:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(1),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_n4kem"]
_data = {
&"RESET": SubResource("Animation_iyvkh"),
&"recharge_fade_in": SubResource("Animation_k4juk"),
&"recharge_fade_out": SubResource("Animation_fovlv")
}
[node name="RootGui" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_udau0")
[node name="GameAction" type="TextureButton" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme = ExtResource("2_nq5i2")
[node name="PlayerInfo" parent="MarginContainer" instance=ExtResource("1_8kw6x")]
layout_mode = 2
[node name="DayPass" type="Button" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 8
focus_mode = 0
theme = ExtResource("2_nq5i2")
text = "Recharge"
icon = ExtResource("4_k4juk")
[node name="DayCount" type="Label" parent="MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
label_settings = ExtResource("4_ujg5r")
[node name="ItemInfo" type="TextureRect" parent="MarginContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 300)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 8
theme = ExtResource("2_nq5i2")
texture = ExtResource("6_fovlv")
expand_mode = 3
stretch_mode = 4
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/ItemInfo"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 35
theme_override_constants/margin_top = 35
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 75
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/ItemInfo/MarginContainer"]
layout_mode = 2
theme = ExtResource("2_nq5i2")
[node name="ItemIcon" type="TextureRect" parent="MarginContainer/ItemInfo/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 50)
layout_mode = 2
texture = ExtResource("7_n4kem")
stretch_mode = 3
[node name="ItemName" type="Label" parent="MarginContainer/ItemInfo/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "fdqsd"
label_settings = SubResource("LabelSettings_ek73b")
horizontal_alignment = 1
[node name="ItemDesc" type="Label" parent="MarginContainer/ItemInfo/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
text = "Ceci est une pelle qui sert exclusivement à faire des choses intéressantes. Ceci est une pelle qui sert exclusivement à faire des choses intéressantes. Ceci est une pelle qui sert exclusivement à faire des choses intéressantes. Ceci est une pelle qui sert exclusivement à faire des choses intéressantes. "
autowrap_mode = 3
clip_text = true
[node name="AvailableActions" type="HBoxContainer" parent="MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
theme = ExtResource("2_nq5i2")
[node name="GetItem" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "E - Take Item"
label_settings = ExtResource("4_ujg5r")
[node name="SwapItem" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "E - Swap Item"
label_settings = ExtResource("4_ujg5r")
[node name="DropItem" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "w - Drop Item"
label_settings = ExtResource("4_ujg5r")
[node name="UseItem" type="Label" parent="MarginContainer/AvailableActions"]
visible = false
layout_mode = 2
text = "space/click - Use Item"
label_settings = ExtResource("4_ujg5r")
[node name="RechargeFade" type="ColorRect" parent="."]
physics_interpolation_mode = 0
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 0)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_n4kem")
}
[node name="GridContainer" type="GridContainer" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
[connection signal="button_down" from="GameAction" to="." method="_on_game_action_button_down"]
[connection signal="pressed" from="MarginContainer/DayPass" to="." method="_on_day_pass_pressed"]

View File

@ -1,36 +0,0 @@
extends Control
class_name RootGui
signal game_click
signal day_pass_pressed
signal day_pass_proceed
signal day_pass_finished
func _on_player_updated(player:Player):
$MarginContainer/PlayerInfo.player_update(player)
%AvailableActions/GetItem.visible = player.closest_interactable is ItemObject and player.inventory.lenght() == 0
%AvailableActions/SwapItem.visible = player.closest_interactable is ItemObject and player.inventory.lenght() > 0
%AvailableActions/DropItem.visible = player.inventory.lenght() > 0
%ItemInfo.visible = player.inventory.lenght() > 0
if player.inventory.lenght() > 0:
var item : Item = player.inventory.get_item()
%ItemIcon.texture = item.icon
%ItemName.text = item.name
%ItemDesc.text = item.description
func _on_planet_planet_stats_updated(day:int):
$MarginContainer/DayCount.text = "Day " + str(day)
func _on_day_pass_pressed():
day_pass_pressed.emit()
$AnimationPlayer.play("recharge_fade_in")
await $AnimationPlayer.animation_finished
day_pass_proceed.emit()
$AnimationPlayer.play("recharge_fade_out")
await $AnimationPlayer.animation_finished
day_pass_finished.emit()
func _on_game_action_button_down():
game_click.emit()

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

34
icon.png.import Normal file
View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://df0y0s666ui4h"
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.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

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

Before

Width:  |  Height:  |  Size: 994 B

Some files were not shown because too many files have changed in this diff Show More