FAForever / nomads

This project is about bringing Nomads back as playable faction via featured mod and make a serious attempt to integrate them into the main game.
12 stars 26 forks source link

Update UnitView to be compatible with future faf patch #582

Closed Exotic-Retard closed 3 years ago

Exotic-Retard commented 3 years ago

Future faf patch is incompatible with some of the changes Nomads makes, so we need to update the code to match.

speed2CZ commented 3 years ago
WARNING: Error running HandleEvent script in CScriptObject at 590af140: ...a\documents\github\fa\lua\ui\game\unitviewdetail.lua(834): access to nonexistent global variable "GetYield"
         stack traceback:
            [C]: in function `error'
            ...alliance\gamedata\mohodata.scd\lua\system\config.lua(53): in function <...alliance\gamedata\mohodata.scd\lua\system\config.lua:52>
            ...a\documents\github\fa\lua\ui\game\unitviewdetail.lua(834): in function `GetUpkeep'
            ...a\documents\github\fa\lua\ui\game\unitviewdetail.lua(743): in function `DisplayResources'
            ...a\documents\github\fa\lua\ui\game\unitviewdetail.lua(701): in function <...a\documents\github\fa\lua\ui\game\unitviewdetail.lua:652>
            ...a\documents\github\fa\lua\ui\game\unitviewdetail.lua(897): in function `Show'
            ...dia\documents\github\fa\lua\ui\game\construction.lua(1158): in function <...dia\documents\github\fa\lua\ui\game\construction.lua:1076>
            ...dia\documents\github\fa\lua\ui\game\construction.lua(2986): in function `OnRolloverEvent'
            ...s\multimedia\documents\github\fa\lua\maui\button.lua(62): in function <...s\multimedia\documents\github\fa\lua\maui\button.lua:50>

I didnt find any related change in the FA repo that would cause this.

speed2CZ commented 3 years ago

Actually this one :S https://github.com/FAForever/fa/commit/4be1f8a85ded0ef21e086d72bc0933426368e445#diff-231aeae30dc4931f29ab0dad2ce29bb5

Exotic-Retard commented 3 years ago

fixed here c89b0071668ee47b55ca88c946432415831b7da3 and c25cc3d95c607e0e2d2bb1b3f05e45ee61df8b96

Second one is alright, first one is ultramegacursed though, fuck me xD Can get uncursed later i suppose. But yeah due to Retarded magic got it to work both now and in the future.

Good luck to any other mods that touch this i suppose.