Skip to content

Commit

Permalink
move more stuff over to complex system
Browse files Browse the repository at this point in the history
  • Loading branch information
OH296 committed Jan 19, 2025
1 parent f222e1a commit b74908b
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 14 deletions.
1 change: 1 addition & 0 deletions ChapterMaster.yyp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,7 @@
{"id":{"name":"spr_weapon_relic_blade","path":"sprites/spr_weapon_relic_blade/spr_weapon_relic_blade.yy",},},
{"id":{"name":"obj_centerline","path":"objects/obj_centerline/obj_centerline.yy",},},
{"id":{"name":"obj_pnunit","path":"objects/obj_pnunit/obj_pnunit.yy",},},
{"id":{"name":"spr_terminator_laurel","path":"sprites/spr_terminator_laurel/spr_terminator_laurel.yy",},},
{"id":{"name":"obj_enunit","path":"objects/obj_enunit/obj_enunit.yy",},},
{"id":{"name":"scr_log","path":"scripts/scr_log/scr_log.yy",},},
{"id":{"name":"obj_nfort","path":"objects/obj_nfort/obj_nfort.yy",},},
Expand Down
31 changes: 18 additions & 13 deletions scripts/scr_draw_unit_image/scr_draw_unit_image.gml
Original file line number Diff line number Diff line change
Expand Up @@ -953,11 +953,11 @@ function scr_draw_unit_image(_background=false){
armour_draw=[spr_da_chaplain,0];
}
}
} else if (unit_armour="Tartaros"){
} else if (unit_armour=="Tartaros"){
specific_armour_sprite = spr_tartaros_complex;
complex_set = get_complex_set(eARMOUR_SET.Tartaros);
complex_livery = true;
} else if (unit_armour="Terminator Armour"){
} else if (unit_armour=="Terminator Armour"){
specific_armour_sprite = spr_indomitus_complex;
complex_set = get_complex_set(eARMOUR_SET.Indomitus);
complex_livery = true;
Expand All @@ -969,7 +969,18 @@ function scr_draw_unit_image(_background=false){
}
}
}

if (unit_role == _role[eROLE.Champion] || unit_role == _role[eROLE.Captain]){
if (unit_armour=="Terminator Armour" || unit_armour="Tartaros"){
complex_set.add_to_area("crown", spr_terminator_laurel);
} else if (armour_type == ArmourType.Normal){
complex_set.add_to_area("crown", spr_laurel);
if (unit_role == _role[eROLE.Champion]) {
if (unit_armour!="MK3 Iron Armour"){
complex_set.add_to_area("head", spr_special_helm);
}
}
}
}
if (unit_specialization == UnitSpecialization.Techmarine){
if array_contains(["MK5 Heresy", "MK6 Corvus","MK7 Aquila", "MK8 Errant", "Artificer Armour"], unit_armour){
if (has_trait("tinkerer") && complex_livery){
Expand Down Expand Up @@ -1206,6 +1217,10 @@ function scr_draw_unit_image(_background=false){
var choice = get_body_data("variant","right_eye")%sprite_get_number(complex_set.right_eye);
draw_sprite(complex_set.right_eye,choice,x_surface_offset,y_surface_offset);
}
if (struct_exists(complex_set, "crown")){
var choice = get_body_data("crown_variation","head")%sprite_get_number(complex_set.crown);
draw_sprite(complex_set.crown,choice,x_surface_offset,y_surface_offset);
}
if (struct_exists(complex_set, "gorget")){
var choice = get_body_data("variant","throat")%sprite_get_number(complex_set.gorget);
draw_sprite(complex_set.gorget,choice,x_surface_offset,y_surface_offset);
Expand Down Expand Up @@ -1447,15 +1462,8 @@ function scr_draw_unit_image(_background=false){
// Draw Custom Helmets
if (armour_type==ArmourType.Normal && !armour_bypass){
if (unit_role == _role[eROLE.Champion]) {
if (unit_armour!="MK3 Iron Armour"){
draw_sprite(spr_special_helm,0,x_surface_offset,y_surface_offset);
}
draw_sprite(spr_laurel,0,x_surface_offset,y_surface_offset);
draw_sprite(spr_helm_decorations,1,x_surface_offset,y_surface_offset);
}
if (unit_role == _role[eROLE.Captain]) {
draw_sprite(spr_laurel,0,x_surface_offset,y_surface_offset);
}
if (unit_role == _role[eROLE.Sergeant] || unit_role == _role[eROLE.VeteranSergeant]) {
draw_sprite(spr_helm_decorations,1,x_surface_offset,y_surface_offset);
}
Expand All @@ -1465,9 +1473,6 @@ function scr_draw_unit_image(_background=false){
draw_sprite(spr_laurel,0,x_surface_offset,y_surface_offset-8);
draw_sprite(spr_helm_decorations,0,x_surface_offset,y_surface_offset-10);
}
if (unit_role == _role[eROLE.Captain]) {
draw_sprite(spr_laurel,0,x_surface_offset,y_surface_offset-8);
}
if (unit_role == _role[eROLE.Sergeant] || unit_role == _role[eROLE.VeteranSergeant]) {
draw_sprite(spr_helm_decorations,0,x_surface_offset,y_surface_offset-10);
}
Expand Down
4 changes: 3 additions & 1 deletion scripts/scr_marine_struct/scr_marine_struct.gml
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,9 @@ function TTRPG_stats(faction, comp, mar, class = "marine", other_spawn_data={})
},
"head":{
variation:irandom(100),
crest_variation : irandom(100)
crest_variation : irandom(100),
forehead_variation : irandom(100),
crown_variation : irandom(100),
},
"cloak":{
type: spr_none,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions sprites/spr_terminator_laurel/spr_terminator_laurel.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b74908b

Please sign in to comment.