Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix : improve ordering and reduce duplicate line scr_add_man #355

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions scripts/scr_add_man/scr_add_man.gml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption

if (good != -1) {
scr_wipe_unit(target_company,good);
unit = fetch_unit([target_company,good]);
if (other_gear = true) {
// Factions 1-5 are part of Imperial family
// Faction 1 - Space Marine
Expand Down Expand Up @@ -202,9 +203,6 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
}
}

unit.add_exp(spawn_exp);
unit.update_role(man_role);

obj_ini.age[target_company][good] = ((obj_controller.millenium * 1000) + obj_controller.year); // Age here // Note: age for marines is generated later with roll_age(), this is left here as a fallback

if (spawn_name = "") or(spawn_name = "imperial") then obj_ini.name[target_company][good] = global.name_generator.generate_space_marine_name();
Expand All @@ -231,7 +229,6 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
unit = new TTRPG_stats("chapter", target_company, good, "scout", other_data);
unit.corruption = corruption
unit.roll_age(); // Age here
unit.add_exp(spawn_exp);
unit.alter_unit_equipment(_gear);
marines += 1;

Expand All @@ -255,6 +252,7 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
obj_ini.TTRPG[target_company][good] = unit;
unit.add_exp(spawn_exp);
unit.allocate_unit_to_fresh_spawn(home_spot);
unit.update_role(man_role);
with(obj_ini) {
scr_company_order(target_company);
}
Expand Down
Loading