Corp to object
This MR attempts to add support for the corporation by moving it's variables into a single object, $corp
, and thus shielding it from the BC. This will allow it to leave pieces unset if doing so is needed for proper function.
Merge request reports
Activity
A couple of problems at the moment, but a main one is a recursion error in
App.Update.cleanUp()
, likelyfindNaN()
. No idea what's causing it, but working on that now.Secondarily
TypeError: App.Corporate.Backcompat is not a function
andsetUpvars.tw
runs before I can set$corp = {}
, but I'm hoping a second bc will clear it once the recursion issue is solved.edit: found the recursion, lol.
Edited by lowercasedonkeyFull stop.
I am getting nonstop error reports over slaveInteract. Practically everything is not working properly and I'm out of patience.
We may have to consider rolling back to the SC version, unless we can link the problems to the addition of the tab system, which may be the case. Either way, things are at the point where a revert must be considered.
Stuck between a rock and a hard place to say the least. Some things are just flat out not working out of slaveInteract, instead of the prior failure to stick problems.
Very well, carry on. Though the slaveInteract issues must be sorted out ASAP.
Edited by PregmodderWorking on it. This is almost done, I just can't figure out why
Backcompat
disappears fromApp.Corporate
.I can see it on master in console, but not this mr and so an error is thrown.
Help?
Edited by lowercasedonkeyApp.Corporate.Backcompat is created by App.Corporate.Init, so setupVars needs to run (successfully) first.
Edited by svornostHow do I do that with
this
and classes. I agree in principle I just have no idea where to stuff the damn thing.Edited by lowercasedonkeyApp.Corporate.Init isn't in a class, it's just a normal function. Just scroll down a ways until you're past the ledger and the rest of it. Look for the call to App.Corporate.InitConstants...at that point you can just stick a
if (!V.corp) { V.corp = {}; }
or similar in.I think it just needs to be done before the property loop (around line 480). If it needs to be done before the divisions are initialized, just move it up before App.Corporate.Init_DivisionBase.
Edited by svornost
mentioned in commit c9abbc42