Skip to content

Commit e55b3aa

Browse files
committed
style: Format obj_saveload alarm_0
1 parent bd87259 commit e55b3aa

File tree

1 file changed

+119
-79
lines changed

1 file changed

+119
-79
lines changed

objects/obj_saveload/Alarm_0.gml

Lines changed: 119 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,141 @@
1+
if (save_part == 6) {
2+
txt = "Praise to the Machine God";
13

2-
if (save_part=6){txt="Praise to the Machine God";
3-
4-
with(obj_controller){scr_save(5,obj_saveload.save_number);}trickle=50;}
5-
6-
if (save_part=5){txt="Astartes Registry";
7-
8-
with(obj_controller){scr_save(4,obj_saveload.save_number);}trickle=40;save_part=6;}
9-
10-
if (save_part=4){txt="Sacred Anointing of Oil";
11-
12-
with(obj_controller){scr_save(3,obj_saveload.save_number);}trickle=10;save_part=5;}
13-
14-
if (save_part=3){txt="Charting Sector";
15-
16-
with(obj_controller){scr_save(2,obj_saveload.save_number);}trickle=10;save_part=4;
4+
with (obj_controller) {
5+
scr_save(5, obj_saveload.save_number);
6+
}
7+
trickle = 50;
178
}
189

19-
if (save_part=2){txt="Finding Servo Skulls";
10+
if (save_part == 5) {
11+
txt = "Astartes Registry";
2012

21-
with(obj_controller){scr_save(1,obj_saveload.save_number);}trickle=10;save_part=3;}
22-
23-
if (save_part=1){
24-
if (file_exists("save"+string(save_number)+".ini")) then file_delete("save"+string(save_number)+".ini");
25-
if (file_exists("screen"+string(save_number)+".png")) then file_delete("screen"+string(save_number)+".png");
26-
ini_open("saves.ini");
27-
ini_section_delete(string(save_number));
28-
ini_close();
29-
obj_saveload.save[save_number]=0;
30-
save_part+=1;
31-
trickle=10;
32-
txt="Preparing";
13+
with (obj_controller) {
14+
scr_save(4, obj_saveload.save_number);
15+
}
16+
trickle = 40;
17+
save_part = 6;
3318
}
3419

20+
if (save_part == 4) {
21+
txt = "Sacred Anointing of Oil";
3522

23+
with (obj_controller) {
24+
scr_save(3, obj_saveload.save_number);
25+
}
26+
trickle = 10;
27+
save_part = 5;
28+
}
3629

30+
if (save_part == 3) {
31+
txt = "Charting Sector";
3732

38-
39-
40-
41-
42-
if (load_part=6){
43-
txt="Praise to the Machine God";if (global.restart>0) then txt="Praise be to the Emperor";
44-
with(obj_controller){
45-
scr_load(5,global.load);
46-
calculate_research_points();
47-
location_viewer = new UnitQuickFindPanel();
48-
with(obj_controller){
49-
global.star_name_colors[1] = make_color_rgb(body_colour_replace[0],body_colour_replace[1],body_colour_replace[2]);
50-
}
51-
}
52-
trickle=50;
53-
54-
if (instance_exists(obj_cuicons)){
55-
obj_cuicons.alarm[1]=30;
56-
}
57-
33+
with (obj_controller) {
34+
scr_save(2, obj_saveload.save_number);
35+
}
36+
trickle = 10;
37+
save_part = 4;
5838
}
5939

60-
if (load_part=5){txt="Sacred Anointing of Oil";
61-
if (global.restart>0) then txt="Speed Dialing Howling Banshee";
40+
if (save_part == 2) {
41+
txt = "Finding Servo Skulls";
6242

63-
with(obj_controller){
64-
scr_load(4,global.load);
43+
with (obj_controller) {
44+
scr_save(1, obj_saveload.save_number);
45+
}
46+
trickle = 10;
47+
save_part = 3;
6548
}
66-
trickle=10;
67-
load_part=6;}
68-
69-
if (load_part=4){
70-
txt="Astartes Registry";
71-
if (global.restart>0) then txt="Donning Power Armour";
72-
with(obj_controller){
73-
scr_load(3,global.load);
74-
}
75-
trickle=40;
76-
load_part=5;
49+
50+
if (save_part == 1) {
51+
if (file_exists("save" + string(save_number) + ".ini")) {
52+
file_delete("save" + string(save_number) + ".ini");
53+
}
54+
if (file_exists("screen" + string(save_number) + ".png")) {
55+
file_delete("screen" + string(save_number) + ".png");
56+
}
57+
ini_open("saves.ini");
58+
ini_section_delete(string(save_number));
59+
ini_close();
60+
obj_saveload.save[save_number] = 0;
61+
save_part += 1;
62+
trickle = 10;
63+
txt = "Preparing";
7764
}
7865

79-
if (load_part=3){
80-
txt="Charting Sector";
81-
if (global.restart>0) then txt="Rousing the Machine Spirit";
82-
with(obj_controller){
83-
scr_load(2,global.load);
84-
}
85-
trickle=10;
86-
load_part=4;
66+
if (load_part == 6) {
67+
txt = "Praise to the Machine God";
68+
if (global.restart > 0) {
69+
txt = "Praise be to the Emperor";
70+
}
71+
with (obj_controller) {
72+
scr_load(5, global.load);
73+
calculate_research_points();
74+
location_viewer = new UnitQuickFindPanel();
75+
with (obj_controller) {
76+
global.star_name_colors[1] = make_color_rgb(body_colour_replace[0], body_colour_replace[1], body_colour_replace[2]);
77+
}
78+
}
79+
trickle = 50;
80+
81+
if (instance_exists(obj_cuicons)) {
82+
obj_cuicons.alarm[1] = 30;
83+
}
8784
}
8885

89-
if (load_part=2){txt="Finding Servo Skulls";if (global.restart>0) then txt="Turtle Waxing Scalp";
90-
with(obj_controller){scr_load(1,global.load);}trickle=10;load_part=3;}
86+
if (load_part == 5) {
87+
txt = "Sacred Anointing of Oil";
88+
if (global.restart > 0) {
89+
txt = "Speed Dialing Howling Banshee";
90+
}
91+
92+
with (obj_controller) {
93+
scr_load(4, global.load);
94+
}
95+
trickle = 10;
96+
load_part = 6;
97+
}
9198

92-
if (load_part=1){
93-
if (file_exists("save"+string(global.load)+".ini")){
94-
load_part+=1;
95-
trickle=10;
96-
txt="Preparing";
97-
}
99+
if (load_part == 4) {
100+
txt = "Astartes Registry";
101+
if (global.restart > 0) {
102+
txt = "Donning Power Armour";
103+
}
104+
with (obj_controller) {
105+
scr_load(3, global.load);
106+
}
107+
trickle = 40;
108+
load_part = 5;
98109
}
99110

111+
if (load_part == 3) {
112+
txt = "Charting Sector";
113+
if (global.restart > 0) {
114+
txt = "Rousing the Machine Spirit";
115+
}
116+
with (obj_controller) {
117+
scr_load(2, global.load);
118+
}
119+
trickle = 10;
120+
load_part = 4;
121+
}
100122

123+
if (load_part == 2) {
124+
txt = "Finding Servo Skulls";
125+
if (global.restart > 0) {
126+
txt = "Turtle Waxing Scalp";
127+
}
128+
with (obj_controller) {
129+
scr_load(1, global.load);
130+
}
131+
trickle = 10;
132+
load_part = 3;
133+
}
101134

135+
if (load_part == 1) {
136+
if (file_exists("save" + string(global.load) + ".ini")) {
137+
load_part += 1;
138+
trickle = 10;
139+
txt = "Preparing";
140+
}
141+
}

0 commit comments

Comments
 (0)