Move files
This commit is contained in:
parent
8563e3c1aa
commit
88f8cf17aa
3 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
[ext_resource type="Theme" uid="uid://bu07nib41exqy" path="res://ui/theme.tres" id="1_jufjt"]
|
||||
[ext_resource type="Script" path="res://script/calendar.gd" id="1_nbpow"]
|
||||
[ext_resource type="PackedScene" uid="uid://x8u7mduga68y" path="res://scene/month.tscn" id="2_g4ut4"]
|
||||
[ext_resource type="Script" path="res://scene/periodmanager.gd" id="3_3jsi6"]
|
||||
[ext_resource type="Script" path="res://script/periodmanager.gd" id="3_3jsi6"]
|
||||
|
||||
[node name="Calendar" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
extends Node
|
||||
|
||||
|
||||
var periods = []
|
||||
var last_period = null
|
||||
|
||||
|
||||
func add(date):
|
||||
if last_period != null:
|
||||
last_period.end = date
|
||||
last_period = null
|
||||
dump()
|
||||
return
|
||||
|
||||
# If no new period has begun
|
||||
var period = Period.new()
|
||||
period.begin = date
|
||||
periods.append(period)
|
||||
last_period = period
|
||||
dump()
|
||||
|
||||
|
||||
func dump():
|
||||
for period in periods:
|
||||
print("%s - %s" % [period.begin, period.end])
|
Loading…
Add table
Add a link
Reference in a new issue