1 #include "editor_events.h" 2 3 #include "scenario/data.h" 4 scenario_editor_earthquake_severity(void)5int scenario_editor_earthquake_severity(void) 6 { 7 return scenario.earthquake.severity; 8 } 9 scenario_editor_earthquake_year(void)10int scenario_editor_earthquake_year(void) 11 { 12 return scenario.earthquake.year; 13 } 14 scenario_editor_earthquake_cycle_severity(void)15void scenario_editor_earthquake_cycle_severity(void) 16 { 17 scenario.earthquake.severity++; 18 if (scenario.earthquake.severity > EARTHQUAKE_LARGE) { 19 scenario.earthquake.severity = EARTHQUAKE_NONE; 20 } 21 scenario.is_saved = 0; 22 } 23 scenario_editor_earthquake_set_year(int year)24void scenario_editor_earthquake_set_year(int year) 25 { 26 scenario.earthquake.year = year; 27 scenario.is_saved = 0; 28 } 29 scenario_editor_gladiator_revolt_enabled(void)30int scenario_editor_gladiator_revolt_enabled(void) 31 { 32 return scenario.gladiator_revolt.enabled; 33 } 34 scenario_editor_gladiator_revolt_year(void)35int scenario_editor_gladiator_revolt_year(void) 36 { 37 return scenario.gladiator_revolt.year; 38 } 39 scenario_editor_gladiator_revolt_toggle_enabled(void)40void scenario_editor_gladiator_revolt_toggle_enabled(void) 41 { 42 scenario.gladiator_revolt.enabled = !scenario.gladiator_revolt.enabled; 43 scenario.is_saved = 0; 44 } 45 scenario_editor_gladiator_revolt_set_year(int year)46void scenario_editor_gladiator_revolt_set_year(int year) 47 { 48 scenario.gladiator_revolt.year = year; 49 scenario.is_saved = 0; 50 } 51 scenario_editor_emperor_change_enabled(void)52int scenario_editor_emperor_change_enabled(void) 53 { 54 return scenario.emperor_change.enabled; 55 } 56 scenario_editor_emperor_change_year(void)57int scenario_editor_emperor_change_year(void) 58 { 59 return scenario.emperor_change.year; 60 } 61 scenario_editor_emperor_change_toggle_enabled(void)62void scenario_editor_emperor_change_toggle_enabled(void) 63 { 64 scenario.emperor_change.enabled = !scenario.emperor_change.enabled; 65 scenario.is_saved = 0; 66 } 67 scenario_editor_emperor_change_set_year(int year)68void scenario_editor_emperor_change_set_year(int year) 69 { 70 scenario.emperor_change.year = year; 71 scenario.is_saved = 0; 72 } 73 scenario_editor_sea_trade_problem_enabled(void)74int scenario_editor_sea_trade_problem_enabled(void) 75 { 76 return scenario.random_events.sea_trade_problem; 77 } 78 scenario_editor_sea_trade_problem_toggle_enabled(void)79void scenario_editor_sea_trade_problem_toggle_enabled(void) 80 { 81 scenario.random_events.sea_trade_problem = !scenario.random_events.sea_trade_problem; 82 scenario.is_saved = 0; 83 } 84 scenario_editor_land_trade_problem_enabled(void)85int scenario_editor_land_trade_problem_enabled(void) 86 { 87 return scenario.random_events.land_trade_problem; 88 } 89 scenario_editor_land_trade_problem_toggle_enabled(void)90void scenario_editor_land_trade_problem_toggle_enabled(void) 91 { 92 scenario.random_events.land_trade_problem = !scenario.random_events.land_trade_problem; 93 scenario.is_saved = 0; 94 } 95 scenario_editor_raise_wages_enabled(void)96int scenario_editor_raise_wages_enabled(void) 97 { 98 return scenario.random_events.raise_wages; 99 } 100 scenario_editor_raise_wages_toggle_enabled(void)101void scenario_editor_raise_wages_toggle_enabled(void) 102 { 103 scenario.random_events.raise_wages = !scenario.random_events.raise_wages; 104 scenario.is_saved = 0; 105 } 106 scenario_editor_lower_wages_enabled(void)107int scenario_editor_lower_wages_enabled(void) 108 { 109 return scenario.random_events.lower_wages; 110 } 111 scenario_editor_lower_wages_toggle_enabled(void)112void scenario_editor_lower_wages_toggle_enabled(void) 113 { 114 scenario.random_events.lower_wages = !scenario.random_events.lower_wages; 115 scenario.is_saved = 0; 116 } 117 scenario_editor_contaminated_water_enabled(void)118int scenario_editor_contaminated_water_enabled(void) 119 { 120 return scenario.random_events.contaminated_water; 121 } 122 scenario_editor_contaminated_water_toggle_enabled(void)123void scenario_editor_contaminated_water_toggle_enabled(void) 124 { 125 scenario.random_events.contaminated_water = !scenario.random_events.contaminated_water; 126 scenario.is_saved = 0; 127 } 128 scenario_editor_iron_mine_collapse_enabled(void)129int scenario_editor_iron_mine_collapse_enabled(void) 130 { 131 return scenario.random_events.iron_mine_collapse; 132 } 133 scenario_editor_iron_mine_collapse_toggle_enabled(void)134void scenario_editor_iron_mine_collapse_toggle_enabled(void) 135 { 136 scenario.random_events.iron_mine_collapse = !scenario.random_events.iron_mine_collapse; 137 scenario.is_saved = 0; 138 } 139 scenario_editor_clay_pit_flooded_enabled(void)140int scenario_editor_clay_pit_flooded_enabled(void) 141 { 142 return scenario.random_events.clay_pit_flooded; 143 } 144 scenario_editor_clay_pit_flooded_toggle_enabled(void)145void scenario_editor_clay_pit_flooded_toggle_enabled(void) 146 { 147 scenario.random_events.clay_pit_flooded = !scenario.random_events.clay_pit_flooded; 148 scenario.is_saved = 0; 149 } 150