Skip to content

Commit a38c626

Browse files
committed
Merge branch 'feat-Crusade-Rename' of https://github.com/Blogaugis/Space-Brigade-Master into feat-Crusade-Rename
2 parents 254d1c0 + afee199 commit a38c626

31 files changed

Lines changed: 154 additions & 229 deletions

File tree

objects/obj_controller/Alarm_0.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
instance_activate_object(obj_star);
3-
if (instance_exists(obj_ini)) and (global.load==0){
3+
if (instance_exists(obj_ini)) and (global.load==-1){
44
alarm[1]=2;
55
instance_activate_object(obj_star);
66
instance_activate_all();

objects/obj_controller/Alarm_1.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ for(var i=0; i<100; i++){
495495
}
496496
// End craftworld
497497

498-
if (!instance_exists(obj_saveload)) and (instance_exists(obj_creation)) and (global.load=0){
498+
if (!instance_exists(obj_saveload)) and (instance_exists(obj_creation)) and (global.load==-1){
499499
for(var i=1; i<=10; i++){
500500
if (obj_creation.world[i]!=""){
501501
var _wanted_worlds = [];

objects/obj_controller/Create_0.gml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ music_volume=ini_read_real("Settings","music_volume",1);
335335
large_text=ini_read_real("Settings","large_text",0);
336336
settings_heresy=ini_read_real("Settings","settings_heresy",0);
337337
settings_fullscreen=ini_read_real("Settings","fullscreen",1);
338+
settings_autosave=ini_read_real("Settings","settings_autosave",1);
338339
settings_window_data=ini_read_string("Settings","window_data","fullscreen");
339340
if (is_test_map) then global.cheat_debug=true;
340341
ini_close();
@@ -463,6 +464,7 @@ gene_sold=0;
463464
gene_xeno=0;
464465
gene_tithe=24;
465466
gene_iou=0;
467+
draw_helms = true;
466468

467469
// ** Sets default views and in game values on creation **
468470
managing=0;
@@ -1288,7 +1290,7 @@ other1="";
12881290
// ** Sets up bonuses once chapter is created **
12891291
if (instance_exists(obj_ini)){
12901292
// General setup
1291-
if (global.load==0){
1293+
if (global.load==-1){
12921294
// Tolerant trait
12931295
if (scr_has_disadv("Tolerant")) {
12941296
obj_controller.disposition[6]+=5;
@@ -1389,7 +1391,7 @@ serialize = function(){
13891391

13901392

13911393
// ** Loads the game **
1392-
if (global.load>0){
1394+
if (global.load>=0){
13931395
load_game=global.load;
13941396
successor_chapters=0;
13951397
instance_create(0,0,obj_saveload);
@@ -1548,7 +1550,7 @@ marines+=obj_ini.sixths+obj_ini.sevenths+obj_ini.eighths+obj_ini.ninths+obj_ini.
15481550
command=0;
15491551
command=obj_ini.commands;
15501552
// Removes the command marines from marine count
1551-
if (global.load==0) then marines-=command;
1553+
if (global.load==-1) then marines-=command;
15521554
// **** INTRO SCREEN ****
15531555
temp[30]=string(check_number)+" "+string(year_fraction)+" "+string(year)+".M"+string(millenium);// Date
15541556
temp[31]=string_upper(adept_name);// Adept name

objects/obj_controller/Draw_64.gml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
/// @description Insert description here
22
// You can write your code in this editor
3-
43
// Draws the main UI menu. The function is used to highlight if you selected something in the menu
54
if instance_exists
65
var l_hei=37,l_why=0;
76

87
if (instance_exists(obj_saveload)) then exit;
98
if (instance_exists(obj_ncombat)) then exit;
109
if (instance_exists(obj_fleet)) then exit;
11-
if (global.load>0) then exit;
10+
if (global.load>=0) then exit;
1211
if (invis==true) then exit;
1312

1413
if (is_test_map==true){
@@ -21,7 +20,6 @@ if (is_test_map==true){
2120

2221
var xx = 0;
2322
var yy = 0;
24-
2523
// Main UI
2624
if (!zoomed && !zui){
2725
draw_sprite(spr_new_ui,menu==0,0,0);

objects/obj_controller/Step_0.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ try {
696696
}
697697
}
698698

699-
if (global.load > 0) {
699+
if (global.load >= 0) {
700700
exit;
701701
}
702702
if (menu == 0) {

objects/obj_creation/Create_0.gml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if (nope!=1){
102102
audio_sound_gain(snd_diboz,0.25*master_volume*music_volume,2000);
103103
}
104104

105-
global.load=0;
105+
global.load=-1;
106106
planet_types = ARR_planet_types;
107107
skip=false;
108108
premades=true;
@@ -151,6 +151,8 @@ heheh=0;
151151
icons_top=1;
152152
icons_max=0;
153153
turn_selection_change=false;
154+
draw_helms = true;
155+
154156
buttons = {
155157
home_world_recruit_share : new ToggleButton(),
156158
complex_homeworld : new ToggleButton({

objects/obj_en_fleet/Step_0.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
if (global.load>0) or (instance_exists(obj_saveload)) then exit;
2+
if (global.load>=0) or (instance_exists(obj_saveload)) then exit;
33

44
if (action!="") and (orbiting!=0){
55
if (instance_exists(orbiting)){
@@ -115,7 +115,7 @@ if (owner = eFACTION.Tyranids) and (trade_goods=""){
115115
trade_goods+="|";
116116
}
117117

118-
if (global.load>0){
118+
if (global.load>=0){
119119
if (owner = eFACTION.Imperium) then sprite_index=spr_fleet_imperial;
120120
if (owner = eFACTION.Mechanicus) then sprite_index=spr_fleet_mechanicus;
121121
if (owner = eFACTION.Inquisition) then sprite_index=spr_fleet_inquisition;

objects/obj_garbage_collector/Step_0.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ if (gc_timer > 0) {
22
gc_timer -= 1;
33
// show_debug_message($"obj_garbage_collector: gc_timer = {gc_timer}");
44
} else {
5-
gc_timer = 25; // Default is every frame, so de-facto 1;
5+
gc_timer = 50; // Default is every frame, so de-facto 1;
66
gc_collect();
77

88
wait_and_execute(0, function(){

objects/obj_ingame_menu/Create_0.gml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ effect_volume=ini_read_real("Settings","effect_volume",1);
1313
music_volume=ini_read_real("Settings","music_volume",1);
1414
large_text=ini_read_real("Settings","large_text",0);
1515
settings_heresy=ini_read_real("Settings","settings_heresy",0);
16+
settings_autosave=ini_read_real("Settings", "settings_autosave", 1);
1617
settings_fullscreen=ini_read_real("Settings","fullscreen",1);
1718
settings_window_data=ini_read_string("Settings","window_data","fullscreen");
1819
ini_close();

objects/obj_ingame_menu/Draw_0.gml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ if (settings=1){
2525
draw_text(xx+493,yy+281,string_hash_to_newline("Effects Volume"));
2626
draw_text(xx+493,yy+339,string_hash_to_newline("Music Volume"));
2727
draw_text(xx+493,yy+423,string_hash_to_newline("Full Screen?:"));
28+
draw_text(xx+493,yy+483,string_hash_to_newline("Enable Autosaves?:"));
2829
// draw_text(xx+493,yy+423+59,string_hash_to_newline("Large Text?:"));
29-
// draw_text(xx+493,yy+483+59,string_hash_to_newline("Heresy?:"));
3030

3131
draw_set_color(0);// 264 long
3232
draw_rectangle(xx+710,yy+224,xx+974,yy+254,0);
@@ -58,7 +58,7 @@ if (settings=1){
5858

5959
bar=settings_fullscreen;draw_sprite(spr_creation_check,bar,xx+626,yy+426);
6060
// bar=large_text;draw_sprite(spr_creation_check,bar,xx+622,yy+426+59);
61-
// bar=settings_heresy;draw_sprite(spr_creation_check,bar,xx+590,yy+485+59);
61+
bar=settings_autosave;draw_sprite(spr_creation_check,bar,xx+680,yy+485);
6262

6363

6464
if (cooldown<=0) and (mouse_left=1){var onceh;onceh=0;
@@ -72,6 +72,16 @@ if (settings=1){
7272
if (scr_hit(xx+626,yy+426,xx+626+32,yy+426+32)=true){
7373
if (settings_fullscreen=1) and (onceh=0){onceh=1;cooldown=8000;settings_fullscreen=0;window_set_fullscreen(false);change_volume=2;}
7474
if (settings_fullscreen=0) and (onceh=0){onceh=1;cooldown=8000;settings_fullscreen=1;window_set_fullscreen(true);change_volume=2;}
75+
ini_open("saves.ini");
76+
ini_write_real("Settings", "fullscreen", settings_fullscreen);
77+
ini_close();
78+
}
79+
if (scr_hit(xx+680,yy+485,xx+680+32,yy+485+32)=true){
80+
if (settings_autosave=1) and (onceh=0){onceh=1;cooldown=8000;settings_autosave=0;}
81+
if (settings_autosave=0) and (onceh=0){onceh=1;cooldown=8000;settings_autosave=1;}
82+
ini_open("saves.ini");
83+
ini_write_real("Settings", "settings_autosave", settings_autosave);
84+
ini_close();
7585
}
7686
// if (scr_hit(xx+622,yy+426+59,xx+622+32,yy+426+32+59)=true){
7787
// if (large_text=1) and (onceh=0){onceh=1;cooldown=8000;large_text=0;change_volume=2;}

0 commit comments

Comments
 (0)