* changements des objectifs, donnent juste des graines, sprite moins gros et objectifs plus nombreux * changement de la probabilité de mutation * refactor du code terrain et planet
26 lines
515 B
GDScript
26 lines
515 B
GDScript
extends ObjectiveReward
|
|
class_name LootItemReward
|
|
|
|
const REWARD_ITEM_RANDOM_DISPLACEMENT_FACTOR = 100
|
|
|
|
@export var item : Item
|
|
|
|
func _init(i : Item):
|
|
item = i
|
|
|
|
func get_icon() -> Texture:
|
|
return preload("res://common/icons/package.svg")
|
|
|
|
func get_text() -> String:
|
|
return ""
|
|
|
|
func get_description() -> String:
|
|
return "Loot the following item: " + item.name + "."
|
|
|
|
func reward(objective : Objective):
|
|
objective.terrain.drop_item(
|
|
item,
|
|
objective.global_position,
|
|
REWARD_ITEM_RANDOM_DISPLACEMENT_FACTOR
|
|
)
|