X Tutup
Skip to content
This repository was archived by the owner on Nov 17, 2024. It is now read-only.
/ ct-js-old Public archive

✨ Catmod Game Distribution#394

Merged
CosmoMyzrailGorynych merged 5 commits intoct-js:developfrom
UlisesFreitas:develop
Nov 21, 2022
Merged

✨ Catmod Game Distribution#394
CosmoMyzrailGorynych merged 5 commits intoct-js:developfrom
UlisesFreitas:develop

Conversation

@UlisesFreitas
Copy link
Contributor

  • gulp build runs without issues.
  • if you develop a catmod, a test project and docs are also present. Put a test project into a catmod's directory.
  • if it is a work-in-progress, explicitly mark it as such in the title with the WIP: prefix.
  • The title of the pull request has a suitable emoji from the Comigoji guide. The title will look broken on GitHub, but it streamlines further merging and makes writing a pretty changelog easier.

Changes proposed in this pull request:

Add a new catmod for the useers to use the Game Distribution SDK to display Ads in their games.

  • Added a new Catmod for Game Distribution Ads in the ct.libs -
  • Added a new Example in the Examples folder

Ping @CosmoMyzrailGorynych

# Added a new Catmod for Game Distribution Ads in the ct.libs
# Added a new Example in the Examples folder
Removed .vscode\settings.json
Removed empty files and folder injections
Updated docs
Changed al the if statements of true from
this  if(ct.gamedistribution.isFinished == true)
to this if(ct.gamedistribution.isFinished)
Copy link
Collaborator

@CosmoMyzrailGorynych CosmoMyzrailGorynych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well,
There is misleading stuff here and there, typos, and just improper newbie JS code that must not be taught to others. And ideally — not used in code, too.

General advice: use either "Ad" or "Banner", not both.
One event is useless.

Removed all boolean compare == to if(something) or if(!something)
Removed the useless event that mislead the use of pointer
Remvved unnecesary parts in Generall use.md
Changed showBanner to showAd
Game example updated to remove the event showadonclick_thisOnStep.
In General use.md fixed som typos and added Catmods' settings instead of Catmod settings
Copy link
Collaborator

@CosmoMyzrailGorynych CosmoMyzrailGorynych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 3 new comments. Awaiting for previous fixes, too.

Inside a `Click` event add this code:

```js
if (ct.gamedistribution.adPlaying) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it if (!ct.gamedistribution.adPlaying) {?

Comment on lines +75 to +79
setTimeout(
function() {
ct.gamedistribution.isFinished = false;
},
0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this method should change the value ct.gamedistribution.isFinished. It is counterintuitive.

@@ -0,0 +1,77 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if this module was in another PR. I can still merge it if it is not a mistake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I messed up with the pull request the ct.ulid it's a different Catmod, not related at all with the GameDistribution, sorry for that, just let me finish with the GD, then I'm going to create another pull for the ct.ulid.

Removed from index.js and from types.d.ts the function isAdFinished since there is an event to manage if the Ad has finished.
In General use.md: Replaced if (ct.gamedistribution.adPlaying) { to if (!ct.gamedistribution.adPlaying) {
In module.js Replaced :
"name": "Ad is finished",
"parameterizedName": "Check if an Ad is finished.",
to
"name": "Ad has finished",
"parameterizedName": "Check if an Ad has finished.",

Removed the parametrizedName sin I didn't know there is no need to use it if there is no parameters to display.

Added .vscode to .gitignore so is not included the pull.
@UlisesFreitas UlisesFreitas changed the title ✨ Catmot Game Distribution ✨ Catmod Game Distribution Nov 11, 2022
@CosmoMyzrailGorynych
Copy link
Collaborator

@UlisesFreitas should I merge ct.ulid with this, or wait for you to remove it from this PR?

@UlisesFreitas
Copy link
Contributor Author

Hi sure merge ct.ulid from here, in the future I'll make sure to just push catmods in differents PR.
Thanks.

@CosmoMyzrailGorynych CosmoMyzrailGorynych merged commit 5d3cdff into ct-js:develop Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup