Pocket Plane Group
Friends and Neighbors => Weimer Republic (WeiDU.org) => WeiDU => Topic started by: CamDawg on January 06, 2019, 06:40:00 PM
-
Is it documented anywhere what GAME_IS actually checks?
Every one in a (long) while I'll get some screwy bug report where a GAME_IS apparently flows down the wrong path of the logic check. I'm willing to bet it's typically an error in my code somewhere, but it would be nice to see this delineated somewhere.
-
You can go right to the source code:
https://github.com/WeiDUorg/weidu/blob/b26ebf21541dc722485b4948b5b058b19c8a28c7/src/tppe.ml#L416-L501
-
So technically, nope. :P
-
What GAME_IS checks is a so-called implementation detail and may be subject to change, should a situation arise where some check would need to be altered in order for GAME_IS to function as documented. The contract (subject to documentation) is that GAME_IS says what game it is. How it arrives at that conclusion is not part of the contract.
-
By the way, how did you Mike "search" the GitHub code for the specific code ? Was it that you knew this to be there, or ... asking cause it could help me build off from the weidu's own functionality, as it's sometimes easier to reduce than expand.
-
I had seen it previously so I knew it existed.
I couldn't remember exactly where it was off-hand, so I searched for GAME_IS to track down what it was mapped to (PE_GameIs) and then searched for PE_GameIs and found the implementation in tppe.ml.
You can search a repo by entering text in the textbox in the top left. It doesn't usually let you search within a repo if that repo is a fork, so you have to go to the main repo and search there.
-
So you go into the main repo, push the "Find file" button on the middle top right, which open the "repo path" in the left corner that allows you to search for terms, and find files that contain it. And of course then one can use the browsers own search funtion to find the specific cases, in a long file.
Good, thanks.
-
No, I enter my text in the textbox in the top left, like I said.
Maybe this (https://i.imgur.com/sq71RZJ.png) will help.
-
Maybe this (https://i.imgur.com/sq71RZJ.png) will help.
Uuh, that requires one just to log into the github. Aah... so yes, it did. Thanks much man.