gros dev pre proto

* Changement de l'UI, ajouts de l'inspecteur par carte et changement de police
* Ajout d'un semblant d'exploration
* Ajout de la sauvegarde des entités
* Restructuration mineure de l'arborescence
* Fix divers et réécriture des textes
This commit is contained in:
2025-10-31 13:52:45 +01:00
parent ceae7af589
commit ed7a8bcb6e
167 changed files with 2665 additions and 1201 deletions

View File

@@ -12,15 +12,13 @@ const SPRITE_SCENE : PackedScene = preload("res://entities/underground_loot/unde
@onready var collision_shape: CollisionShape2D = generate_collision_shape()
func _init(_loot : Array[Item] = []):
loot = _loot
default_info_desc = "Contain some random seeds. [b]Dig it with a shovel.[/b]"
func pointer_text() -> String:
return "Buried Loot"
func inspector_info() -> Inspector.Info:
return Inspector.Info.new(
"Buried Loot",
"Can contain some seeds from the past... Dig it with a shovel."
)
func generate_sprite() -> Node2D:
var object = SPRITE_SCENE.instantiate()
@@ -42,3 +40,6 @@ func dig():
for item in loot:
planet.drop_item(item, global_position, LOOTED_ITEM_RANDOM_RANGE)
queue_free()
func save() -> UndergroundLootData:
return UndergroundLootData.new(self)

View File

@@ -0,0 +1,11 @@
extends EntityData
class_name UndergroundLootData
@export var loot : Array[Item]
func _init(e : UndergroundLoot):
position = e.global_position
loot = e.loot
func load() -> Entity:
return UndergroundLoot.new(loot)

View File

@@ -0,0 +1 @@
uid://68plwch6h4f7