-
-
Save MattUV/b482777ebaa6a8dc545eaffc4e247972 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum {J1_M, J1_A, J2_M, J2_A} | |
enum {MATIN, APREM} | |
enum {PVL, SOL, ALOC, LOC, ADEP, DEP, ITM, INI, COO, SQR, CS, CDT} | |
enum {H6, H7, H8, H9, H10, H11, H12, H13, H14, H15, H16, H17, H18} | |
const VIGIE = [PVL, SOL, ALOC, LOC] | |
const IFR = [ADEP, DEP, ITM, INI, COO, SQR, CS] | |
var activité := { | |
"vacation" : int, | |
"heure" : int, | |
"position" : int, | |
"is_armed" : bool, | |
"is_instruction" : bool, | |
"controleur" : String, | |
"stagiaire" : String | |
func _create_base_grid() -> void: | |
var case_scene := load(CASE_SCENE_PATH) | |
var info_scene := load(INFO_SCENE_PATH) | |
var rmq_scene := load(RMQ_SCENE_PATH) | |
for h in range(13): | |
var info : Node = info_scene.instance() | |
info.text = str(h + 6, " - ", h + 7) | |
add_child(info) | |
for pos in range(11, -1, -1): | |
var case : Node = case_scene.instance() | |
add_child(case) | |
Case_list.append(case) | |
case.connect("mouse_in", self, "_on_case_mouse_in", [case]) | |
case.connect("mouse_out", self, "_on_case_mouse_out", [case]) | |
case.heure = h | |
case.position = pos | |
case.is_armed = true | |
if pos == CS or pos == SQR: | |
case.is_armed = false | |
if h == H6: | |
case.vacation = J1_M | |
if !(pos in [CDT, INI, LOC, SOL, PVL]): | |
case.is_armed = false | |
if h >= H7 and h < H10: | |
case.vacation = J1_M | |
if h == H10: | |
if pos in [CDT, COO, INI, ADEP, ALOC]: | |
case.vacation = J2_M | |
else: | |
case.vacation = J1_M | |
if h >= H11 and h < H13: | |
case.vacation = J2_M | |
if h >= H13 and h < H15: | |
case.vacation = J1_A | |
if h == H15: | |
if pos in [COO, ITM, ADEP, LOC, SOL, PVL]: | |
case.vacation = J1_A | |
else: | |
case.vacation = J2_A | |
if h >= H16: | |
case.vacation = J2_A | |
case.is_instruction = false | |
var rmq : Node = rmq_scene.instance() | |
add_child(rmq) | |
rmq.remarque = "" | |
RMQ_list.append(rmq) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment