Phobos-developers / Phobos

Ares-compatible C&C Red Alert 2: Yuri's Revenge engine extension
GNU Lesser General Public License v3.0
300 stars 95 forks source link

[Minor] Insignia Type #1416

Open Coronia opened 2 weeks ago

Coronia commented 2 weeks ago

This isn't a real logic, but more like an interface to make ini edit easier. Previously we have to define insignia by the techno's veterancy, which requires a lot of tags especially if it's for Gunner or using InsigniaFrame(s). This pull request allows you to define an InsigniaType that stores all these data together, so that you can reuse them in different places with one line of code.

In rulesmd.ini:

[InsigniaTypes]
0=SOMEINSIGNIATYPE

[SOMEINSIGNIATYPE]                       ; InsigniaType
Insignia=                                ; filename - excluding the .shp extension
Insignia.Rookie=                         ; filename - excluding the .shp extension
Insignia.Veteran=                        ; filename - excluding the .shp extension
Insignia.Elite=                          ; filename - excluding the .shp extension
InsigniaFrame=-1                         ; int, frame of insignia shp (zero-based) or -1 for default
InsigniaFrame.Rookie=-1                  ; int, frame of insignia shp (zero-based) or -1 for default
InsigniaFrame.Veteran=-1                 ; int, frame of insignia shp (zero-based) or -1 for default
InsigniaFrame.Elite=-1                   ; int, frame of insignia shp (zero-based) or -1 for default

[SOMETECHNO]                             ; TechnoType
InsigniaType=                            ; InsigniaType
InsigniaType.WeaponN=                    ; InsigniaType

An example:

[InsigniaTypes]
0=InsigniaHero

[InsigniaHero]
Insignia.Rookie=herostcr
Insignia.Veteran=herostbr
Insignia.Elite=herostar

[TANY]
InsigniaType=InsigniaHero
IFVMode=15

[VOLKOV]
InsigniaType=InsigniaHero
IFVMode=35

[FV]
InsigniaType.Weapon15=InsigniaHero
InsigniaType.Weapon35=InsigniaHero
github-actions[bot] commented 2 weeks ago

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.