Artefact2 / centralcasting

Generate random character (PCs or NPCs) backgrounds using the "Central Casting: Heroes of Legend" book
Do What The F*ck You Want To Public License
9 stars 3 forks source link

Full-time + Part-time Occupation Indentation #9

Closed Warhaven closed 12 months ago

Warhaven commented 12 months ago

In 114A.php, starting line 7, the following is used:

"13-14" => [ "Head of household has one full-time occupation and another part-time occupation", Combiner(
        LineAdder("Full-time occupation:"),
        Invoker("420-423"),
        LineAdder("Part-time occupation:"),
        ModifierIncreaser("CuMod", -2),
        Invoker("420-423"),
        ModifierIncreaser("CuMod", 2)
    )],

Which outputs:

+ Occupation: Head of household has one full-time occupation and another part-time occupation               (114A )
|   |   |             Full-time occupation:                                                                                
|   |   |             Part-time occupation:                                                                                
|   |   |   Barbarian Occupation: Hunter                                                                            (422A )
|   |   |   + Occupation Performance:                                                                               (426  )
|   |   |   |   Work Attitude: Unhappy                                                                              (426A )
|   |   |   |   Work Attitude: Patient                                                                              (426A )
|   |   |   |   Achievement Level (NPCs Only): Skilled Tradesman                                                    (426B )
|   |   |   Nomad Occupation: Hunter                                                                                (421A )
|   |   |   + Occupation Performance:                                                                               (426  )
|   |   |   |   Work Attitude: Uncreative                                                                           (426A )
|   |   |   |   Work Attitude: Inefficient                                                                          (426A )
|   |   |   |   Work Attitude: Generous                                                                             (426A )
|   |   |   |   Achievement Level (NPCs Only): Journeyman

I believe it should be:

    "13-14" => [ "Head of household has one full-time occupation and another part-time occupation", Combiner(
        SubentryCreator("114A", "Full-time occupation", null, Invoker("420-423")),
        ModifierIncreaser("CuMod", -2),
        SubentryCreator("114A", "Part-time occupation", null, Invoker("420-423")),
        ModifierIncreaser("CuMod", 2)
    )],

Which properly outputs:

|   |   + Occupation: Head of household has one full-time occupation and another part-time occupation                                                   (114A )
|   |   |   + Full-time occupation:                                                                                                                     (114A )
|   |   |   |   Barbarian Occupation: Farmer                                                                                                            (422A )
|   |   |   |   + Occupation Performance:                                                                                                               (426  )
|   |   |   |   |   Work Attitude: Humble                                                                                                               (426A )
|   |   |   |   |   Work Attitude: Jealous                                                                                                              (426A )
|   |   |   |   |   Achievement Level (NPCs Only): Journeyman                                                                                           (426B )
|   |   |   + Part-time occupation:                                                                                                                     (114A )
|   |   |   |   + Nomad Occupation: Craftsman                                                                                                           (421A )
|   |   |   |   |   Craft I: Weaver                                                                                                                     (424A )
|   |   |   |   + Occupation Performance:                                                                                                               (426  )
|   |   |   |   |   Work Attitude: Ambitious                                                                                                            (426A )
|   |   |   |   |   Work Attitude: Hard worker                                                                                                          (426A )
|   |   |   |   |   Achievement Level (NPCs Only): Skilled Tradesman
Artefact2 commented 12 months ago

Thanks for the report, and welcome to Github! The issue has been fixed in 570821c.