système de sauvegarde, scène 3D de test sur la base astra et passage en forward+
This commit is contained in:
@@ -121,6 +121,8 @@ func mature():
|
||||
func die():
|
||||
for m in data.mutations:
|
||||
m._start_dead_effect(self)
|
||||
for i in range(data.get_random_seed_income()):
|
||||
produce_seed()
|
||||
disappear()
|
||||
|
||||
func disappear():
|
||||
@@ -132,52 +134,36 @@ func save() -> EntityData:
|
||||
|
||||
func card_info() -> CardInfo:
|
||||
var info = CardInfo.new(
|
||||
pointer_text()
|
||||
data.plant_name,
|
||||
data.archetype.archetype_name
|
||||
)
|
||||
|
||||
var state = data.get_state()
|
||||
|
||||
info.important_stat_icon = PLANT_POINT_ICON
|
||||
info.important_stat_text = "%d" % calculate_plant_score()
|
||||
info.texture = null #TODO
|
||||
info.type_icon = PLANT_TYPE_ICON
|
||||
|
||||
var state_text = tr("MATURE")
|
||||
if state != PlantData.State.MATURE:
|
||||
state_text = tr("GROWING")
|
||||
|
||||
info.stats.append(CardStatInfo.new(
|
||||
tr("DAY_%d") % data.day,
|
||||
LIFETIME_ICON
|
||||
))
|
||||
|
||||
info.stats.append(CardStatInfo.new(
|
||||
state_text,
|
||||
PLANT_TYPE_ICON
|
||||
))
|
||||
|
||||
if state != PlantData.State.MATURE:
|
||||
info.stats.append(CardStatInfo.new(
|
||||
tr("MATURE_ON_DAY_%d") % data.get_growing_time(),
|
||||
GROWING_ICON
|
||||
))
|
||||
|
||||
info.stats.append(CardStatInfo.new(
|
||||
tr("%d_SCORE_WHEN_MATURE") % data.get_score(PlantData.State.MATURE),
|
||||
PLANT_POINT_ICON
|
||||
))
|
||||
|
||||
info.stats.append(CardStatInfo.new(
|
||||
tr("DIE_ON_DAY_%d") % (data.get_lifetime()),
|
||||
DEATH_ICON
|
||||
))
|
||||
|
||||
info.stats.append_array([
|
||||
CardStatInfo.new(
|
||||
str(data.day),
|
||||
LIFETIME_ICON
|
||||
),
|
||||
CardStatInfo.new(
|
||||
str(data.get_growing_time()),
|
||||
GROWING_ICON
|
||||
),
|
||||
CardStatInfo.new(
|
||||
str(data.get_lifetime()),
|
||||
DEATH_ICON
|
||||
),
|
||||
])
|
||||
|
||||
if len(data.mutations) != 0:
|
||||
var rarest : int = data.mutations.map(
|
||||
func(m : PlantMutation) : return m.get_rarity()
|
||||
).max()
|
||||
info.bg_color = PlantMutation.get_rarity_color(rarest)
|
||||
for m in data.mutations:
|
||||
info.sections.append(m.card_section())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user