Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • PantyNabber/fc-pregmod
  • pregmodfan/fc-pregmod
  • Alice.Grant/fc-pregmod
  • powerfful/fc-pregmod
  • elstumpo/fc-pregmod
  • Y/fc-pregmod
  • floer/fc-pregmod
  • oidocrop/fc-pregmod
  • hawk5005/fc-pregmod
  • nn/fc-pregmod
  • latios298/fc-pregmod
  • brpregmodfan/fc-pregmod
  • SomeoneTookMyUserName/fc-pregmod
  • 000-250-006/fc-pregmod
  • rewrica/fc-pregmod
  • Stuffedgame/fc-pregmod
  • wisepants314/fc-pregmod
  • fcanon/fc-pregmod
  • randomanon1/pregmod-mod-cyberfurry
  • teddy.buckland/fc-pregmod
  • farsinian_591b7a2d8b49d/fc-pregmod
  • FCShotadev/fc-pregmod
  • uselessartifact/fc-pregmod
  • irina_90/fc-pregmod
  • thaumx/fc-pregmod
  • MouseOfLight/fc-pregmod
  • empresssela/fc-pregmod
  • MasterAaran/fc-pregmod
  • ishy/fc-pregmod
  • psychofox/fc-pregmod
  • shadomancer/fc-pregmod
  • tycrakgg/fc-pregmod
  • azktaawc/fc-pregmod
  • andonno07/fc-pregmod
  • Onithyr/fc-pregmod
  • redneck987.jl/fc-pregmod
  • Farseeker/fc-pregmod
  • milliarc/fc-pregmod
  • BeefimusMaximus/fc-pregmod
  • magicknight79/fc-pregmod
  • hexall90/fc-pregmod
  • cantworkforever/fc-pregmod
  • jc052005/fc-pregmod
  • klorpa/fc-pregmod
  • doku/fc-pregmod
  • samhradh/fc-pregmod
  • scientist/fc-pregmod
  • albania420/fc-pregmod
  • Editoranon/fc-pregmod
  • Anony/fc-pregmod
  • deimios666/fc-pregmod
  • IvoHoe/fc-pregmod
  • bitty/fc-pregmod
  • RealAnon1800/fc-pregmod
  • brankirk/fc-pregmod
  • Amygdalan/fc-pregmod
  • DankWolf/fc-pregmod
  • Supot1951/fc-pregmod
  • bcy603/fc-pregmod
  • pwfxjpuv/fc-pregmod
  • ThreadAnon/fc-pregmod
  • Anon1800/fc-pregmod
  • Echoart/fc-pregmod
  • Dingotush/fc-pregmod
  • anonman/fc-pregmod
  • Arkerthan/fc-pregmod
  • svornost/fc-pregmod
  • wierdwierdos/fc-pregmod
  • wetwareAnon/fc-pregmod
  • QuartzHat/fc-pregmod
  • IchthysdeKilt/fc-pregmod
  • AnonAnonFC/fc-pregmod
  • Alexsis/fc-pregmod
  • LoyalTreeWP/fc-pregmod
  • aerialace/fc-pregmod
  • NurseryAnon/fc-pregmod
  • drakeashordcataclysm/fc-pregmod
  • AshVaris/fc-pregmod
  • purely0nothing/fc-pregmod
  • alex2011/fc-pregmod
  • Lindontree/fc-pregmod
  • FCaa/fc-pregmod
  • TR-8R/fc-pregmod
  • Jones/fc-pregmod
  • brr99/fc-pregmod
  • WriteAnon101/fc-pregmod
  • Drosil/fc-pregmod
  • Bob1221/fc-pregmod
  • vas/fc-pregmod
  • gitgud.user.937/fc-pregmod
  • D-K/fc-pregmod
  • AnonDev/fc-pregmod
  • madman23456/fc-pregmod
  • InarusLynx/fc-pregmod
  • Sonofrevvan/fc-pregmod
  • Randoisrando/fc-pregmod
  • cheez94/fc-pregmod
  • dldldl/fc-pregmod
  • alice321/fc-pregmod
  • Alexei91/fc-pregmod
  • darkcy/fc-pregmod
  • MapleMAD/fc-pregmod
  • pillarofsalt/fc-pregmod
  • vultureangels/fc-pregmod
  • kernel/fc-pregmod
  • nooneman/fc-pregmod
  • deepmurk/fc-pregmod
  • uglybead/fc-pregmod
  • lemongrab/fc-pregmod
  • temperence-chan/fc-pregmod
  • hcommenter/fc-pregmod
  • SpedeMemerson/fc-pregmod
  • qwijqwsf/fc-pregmod
  • BuDClow/fc-pregmod
  • HiveBro/fc-pregmod
  • shoku/fc-pregmod
  • ezsh/fc-pregmod
  • Blank/fc-pregmod
  • randoralcissian/fc-pregmod
  • benito92/fc-pregmod
  • balakart/fc-pregmod
  • wedonotsaw/fc-pregmod
  • Cayleth/fc-pregmod
  • Khip/fc-pregmod
  • Zfair/fc-pregmod
  • promethium/fc-pregmod
  • scyne/fc-pregmod
  • ZZC/fc-pregmod
  • SilverJanine/fc-pregmod
  • joxosix654email-9.co/fc-pregmod
  • Littlefootlittleguy/fc-pregmod
  • FelipeBA/fc-pregmod
  • bigtiddygothbf/fc-pregmod
  • Qotsafan/fc-pregmod
  • Zachpocalypse/fc-pregmod
  • milkanon66/fc-pregmod
  • GreGGoZZ/fc-pregmod
  • drsnarf86/fc-pregmod
  • valen102938/fc-pregmod
  • pregspammer/fc-pregmod
  • ponderin94/fc-pregmod
  • nook/fc-pregmod
  • carnifex34/fc-pregmod-mod-carni
  • SyntheticHigh/fc-pregmod
  • bob112211/fc-pregmod
  • amomynous0/fc-pregmod
  • oxone/fc-pregmod
  • MaxEuwe/fc-pregmod
  • nekoanon/fc-pregmod
  • preglocke/fc-pregmod
  • valen10293847/fc-pregmod
  • 2hu4u/fc-pregmod
  • mayibrad/fc-pregmod
  • Screm/fc-pregmod
  • Ansopedi/fc-pregmod
  • mrchaosbones/fc-pregmod
  • putrid/fc-pregmod
  • Kinnerman/fc-pregmod
  • gungrave1155/fc-pregmod
  • prndev/fc-pregmod
  • weresmilodon/fc-pregmod
  • auxxigobin/fc-pregmod
  • alice-chan/fc-pregmod
  • wigglie/fc-pregmod
  • jrliltfgb/fc-pregmod
  • Lord.alek.shade/fc-pregmod
  • truetailthesquire/fc-pregmod
  • lowercasedonkey/fc-pregmod
  • alice-chan9/fc-pregmod
  • eroglyphics/fc-pregmod
  • taliyent/fc-pregmod
  • zenzombie90/fc-pregmod
  • kjarik/fc-pregmod
  • wriggler/fc-pregmod
  • midnightblue/fc-pregmod
  • faraen/fc-pregmod
  • sigurd.cole/fc-pregmod
  • FCbuganon/fc-pregmod
  • kidkinster/fc-pregmod
  • Kar_Dragon/fc-pregmod
  • Zhafier/fc-pregmod
  • crcaretti/fc-pregmod
  • anond/fc-pregmod
  • tempmania/fc-pregmod
  • Dhanze/fc-pregmod
  • EstaUnCachucha/fc-pregmod
  • oniAnon/fc-pregmod
  • plebian/fc-pregmod
  • maxd569/fc-pregmod
  • Levarn/fc-pregmod
  • pumpkinspice/fc-pregmod
  • GammaXai/fc-pregmod
  • DanBackslide/fc-pregmod
  • i107760/fc-pregmod
  • Absimiliard/fc-pregmod
  • AmbrosiaCheesecake/fc-pregmod
  • fuguer/fc-pregmod
  • Azurel/fc-pregmod
  • Fake_Dev/fc-pregmod
  • ddongsanda/fc-pregmod
  • Combine456/fc-pregmod
  • UnwrappedGodiva/fc-pregmod
  • toyRuberDucky/fc-pregmod
  • zmobie/fc-pregmod
  • chuongk/fc-pregmod
  • BigWalnuts/fc-pregmod
  • Birdstrike/fc-pregmod
  • r3d/fc-pregmod
  • mawspa/fc-pregmod
  • sushila/fc-pregmod
  • DeathShip/fc-pregmod
  • eggrollsandwich/fc-pregmod
  • krayken/fc-pregmod
  • Reman/fc-pregmod
  • dwiafgts/fc-pregmod
  • jort93/fc-pregmod
  • teruterubouzu/fc-pregmod
  • flut/fc-pregmod
  • john-normal/fc-pregmod
  • Jonathan2405/fc-pregmod
  • Tyrgalon/fc-pregmod
  • NovX/fc-pregmod
  • Star1/fc-pregmod
  • Transhumanist01/fc-pregmod
  • m1017242/fc-pregmod
  • Rizal98798/fc-pregmod
  • jamezu369/fc-pregmod
  • thisisawittyname/fc-pregmod
  • KnightBoulegard/fc-pregmod
  • jblack/fc-pregmod
  • Souldrainr/fc-pregmod
  • torbjornhub/fc-pregmod
  • turnop/fc-pregmod
  • breadedpigeon/fc-pregmod
  • fire.maker/fc-pregmod
  • Inahaze/fc-pregmod
  • Waerjak/fc-pregmod
  • Trashman1138/fc-pregmod
  • supanintendo/fc-pregmod
  • _no0neman/fc-pregmod
  • Weslo/fc-pregmod
  • qw89/fc-pregmod
  • EvilDruid/fc-pregmod
  • dt25/fc-pregmod
  • Raou/fc-pregmod
  • DDouFu/fc-pregmod
  • Mauno/fc-pregmod
  • PandemoniumPenguin/fc-pregmod
  • AngelPuppet/fc-pregmod
  • DasUser79/fc-pregmod
  • Keaeag3s/fc-pregmod
  • HazeHazeHaze/fc-pregmod
  • hpotato/fc-pregmod
  • owouchthatbloodyhurt/fc-pregmod
  • v7Silent/fc-pregmod
  • nickylass/fc-pregmod
  • ThePrimer/fc-pregmod
  • PineCone/fc-pregmod
  • bruhmomentum17/fc-pregmod
  • CheatDude/fc-pregmod
  • synnove/fc-pregmod
  • en_bees/fc-pregmod
  • seronis/fc-pregmod
  • Nepidinepnep/fc-pregmod
  • Titanninja/fc-pregmod
  • Elohiem/fc-pregmod
  • cocoajazz/fc-pregmod
  • tfwncagf/fc-pregmod
  • ChunkyMonke/fc-pregmod
  • Dracoman671/fc-pregmod
  • jgl/fc-pregmod
  • Inev/fc-pregmod
  • jbige/fc-pregmod
  • MonsterMate/fc-pregmod
  • Konstantin6961/fc-pregmod
  • darth_ashi/fc-pregmod
  • shinx/fc-pregmod
  • Anu/fc-pregmod
  • Greytide/fc-pregmod
  • Bonafidemetal/fc-pregmod
  • Peje/fc-pregmod
  • Hexfy98/fc-pregmod
  • TooSlow/fc-pregmod
  • SoGu/fc-pregmod
  • CloudyCoffee/fc-pregmod
  • Welptard/fc-pregmod
  • Ploc/fc-pregmod-ploc
  • rain-/fc-pregmod
  • Pecanus/fc-pregmod
  • Jhortrax/fc-pregmod
  • valleytwo/fc-pregmod
  • QCmd/fc-pregmod
  • kung-wada/fc-pregmod
  • LolGaye/fc-pregmod
  • Exspiravit1/fc-pregmod
  • jadeddog/fc-pregmod
  • buster-scruggs/fs-antebellum-revivalism
  • policia123/fc-pregmod
  • evrgentesee/fc-pregmod
  • rko127/fc-pregmod
  • ExcalGrip12/fc-pregmod
  • BlackAion/fc-pregmod
  • Boss2020/fc-pregmod
  • Lawled/fc-pregmod
  • shiro/fc-pregmod
  • Skavenkeri/fc-pregmod
  • PooPooDooDooHead/fc-pregmod
  • Dugee/fc-pregmod
  • Portal124/fc-pregmod-vore
  • Fekenol/fc-pregmod
  • elGuapo/fc-pregmod
  • KelioSteel/fc-pregmod
  • sldlddk/fc-pregmod
  • lumepanter/fc-pregmod
  • ryuhana/fc-pregmod
  • Nene1009yb/fc-pregmod
  • DontAskDontTell/fc-pregmod-extra-events
  • Dulgi/fc-pregmod
  • Jate/fc-pregmod
  • percy365/fc-pregmod
  • franklygeorge/fc-pregmod
  • Dragneel117/fc-pregmod
  • vl96/fc-pregmod
  • Gorlom/fc-economicmod
  • NotAlive/fc-pregmod
  • Heretek/fc-pregmod
  • joeshmo828282/fc-pregmod
  • deswes/fc-pregmod
  • Nanana21/fc-pregmod
  • Gbr6/fc-pregmod
  • RandomNecro/fc-pregmod
  • Trinidad/fc-pregmod
  • anonymousey/fc-pregmod
  • macaronideath/fc-pregmod
  • fcbleh/fc-pregmod
  • jk3000/fc-pregmod
  • Akane/fc-pregmod
  • TheBoi/fc-pregmod
  • Sheenariel/fc-pregmod
  • Metapod/multi-custom
  • Banyanael/fc-pregmod
  • frogge/fc-pregmod
  • idkkk12385/fc-pregmod
  • Mirarara/fc-pregmod
  • DeaDa/fc-pregmod-thedeal
  • CobraCommander/fc-pregmod
  • bicobus/fc-pregmod
  • CardcaptorRLH85/fc-pregmod
  • temp-ui-start/fc-pregmod
  • PresidentConvert/fc-pregmod
  • delizious/fc-pregmod
  • Ducati/fc-pregmod
  • DerangedLoner/fc-pregmod-development-fork
  • ProjectVictory/fc-pregmod
  • forecastle/fc-pregmod
  • Apathy/fc-pregmod
  • indf/fc-pregmod-dev
  • GavAndAlt/fc-pregmod
  • hagamablabla/fc-pregmod
  • Alaco/fc-pregmod
  • DCoded/fc-pregmod
  • LittlePlague/fc-pregmod
  • MissOnahole/fc-pregmod
  • ishy2317/fc-pregmod
  • nielkazama/fc-pregmod
  • Phobos/fc-pregmod
  • kraster/fc-pregmod
  • JasWS/fc-pregmod
  • FelixJS/fc-pregmod
  • NCherfaoui/fc-pregmod
  • MidnightMoose/fc-pregmod
  • jjjjjj/fc-pregmod
  • Cl0ver/fc-pregmod
  • Pythoniqus/fc-pregmod
  • JohnMolotov/fc-pregmod
  • Bluecoffee/fc-pregmod
  • anonymouspregmodder/fc-pregmod-anonymouspregmodder
  • Fanatey/fc-pregmod
  • Mizako/fc-pregmod
  • Nithhogg/fc-pregmod
380 results
Show changes
Commits on Source (9609)
Showing
with 2413 additions and 1728 deletions
**/Jquery.js
**/mousetrap.js **/mousetrap.js
**/pako.js
**/sugarCubeConfig.js **/sugarCubeConfig.js
**/format.js **/format.js
**/displayVariables.js **/displayVariables.js
...@@ -7,3 +7,8 @@ ...@@ -7,3 +7,8 @@
**/optionsMacro.js **/optionsMacro.js
temp.** temp.**
**.temp **.temp
**/001-lib
/build/**/*
/devNotes/legacy files/**/*
bin/*
/FCHost/**/*
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"env": { "env": {
"browser": true, "browser": true,
"es6": true, "es6": true,
"es2022": true,
"jquery": true "jquery": true
}, },
"extends": ["eslint:recommended"], "extends": ["eslint:recommended"],
...@@ -25,12 +26,23 @@ ...@@ -25,12 +26,23 @@
"postdisplay": true "postdisplay": true
}, },
"parserOptions": { "parserOptions": {
"ecmaVersion": 2019, "ecmaVersion": 2022,
"sourceType": "script", "sourceType": "script",
"ecmaFeatures": { "ecmaFeatures": {
"impliedStrict": true "impliedStrict": true
} }
}, },
"overrides": [
{
// overrides for helper scripts that are written
// using imports and/or exports
"files": ["gulpfile.js", "devTools/scripts/**/*.js"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2022
}
}
],
"settings": { "settings": {
"jsdoc": { "jsdoc": {
"mode": "typescript" "mode": "typescript"
...@@ -109,6 +121,9 @@ ...@@ -109,6 +121,9 @@
} }
], ],
"one-var": ["warn", "never"], "one-var": ["warn", "never"],
"keyword-spacing": "warn",
"no-template-curly-in-string": "error",
"operator-linebreak": ["warn", "after", { "overrides": { "?": "before", ":": "before" }}],
"jsdoc/check-alignment": 1, "jsdoc/check-alignment": 1,
"jsdoc/check-examples": 0, // interferes with SugarCube examples "jsdoc/check-examples": 0, // interferes with SugarCube examples
"jsdoc/check-indentation": 0, "jsdoc/check-indentation": 0,
...@@ -122,12 +137,28 @@ ...@@ -122,12 +137,28 @@
"jsdoc/newline-after-description": 0, "jsdoc/newline-after-description": 0,
"jsdoc/no-types": 0, "jsdoc/no-types": 0,
"jsdoc/no-undefined-types": 0, "jsdoc/no-undefined-types": 0,
"jsdoc/require-jsdoc": 0, "jsdoc/require-jsdoc": [
"jsdoc/require-param": 0, "warn",
{
"enableFixer": false,
"require": {
"ArrowFunctionExpression": false,
"ClassDeclaration": false,
"ClassExpression": false,
"FunctionDeclaration": true,
"FunctionExpression": true,
"MethodDefinition": false
},
"exemptEmptyFunctions": true,
"checkGetters": false,
"checkSetters": false
}
],
"jsdoc/require-param": ["warn"],
"jsdoc/require-param-description": 0, "jsdoc/require-param-description": 0,
"jsdoc/require-param-name": 1, "jsdoc/require-param-name": 1,
"jsdoc/require-param-type": 1, "jsdoc/require-param-type": 1,
"jsdoc/require-returns": 0, "jsdoc/require-returns": ["off"],
"jsdoc/require-returns-check": 1, "jsdoc/require-returns-check": 1,
"jsdoc/require-returns-description": 0, "jsdoc/require-returns-description": 0,
"jsdoc/require-returns-type": 1, "jsdoc/require-returns-type": 1,
......
...@@ -33,16 +33,19 @@ ENV/ ...@@ -33,16 +33,19 @@ ENV/
.ropeproject .ropeproject
# Start.tw # Start.tw
src/config/start.tw src/002-config/start.tw
# eslint # eslint
node_modules node_modules
package-lock.json package-lock.json
yarn.lock yarn.lock
pnpm-lock.yaml
# Visual Studio Code # Visual Studio Code
.vscode/settings.json .vscode/settings.json
.vscode/tasks.json .vscode/tasks.json
# .vscode/bookmarks.json is created by the amazing https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks VSCode extension
.vscode/bookmarks.json
*.code-workspace *.code-workspace
# WebStorm # WebStorm
...@@ -63,10 +66,26 @@ fc-pregmod ...@@ -63,10 +66,26 @@ fc-pregmod
bin/* bin/*
*.outline *.outline
*.todo *.todo
/TODO.*
TODO.txt TODO.txt
temp.* temp.*
*.temp *.temp
src/002-config/fc-version.js.commitHash.js src/002-config/fc-version.js.commitHash.js
devTools/scripts/.package.json.diff
/settings.json
.eslintcache
/sanityCheck.log
/.tsbuildinfo
# macOS devices # macOS devices
*.icloud *.icloud
# legacy
devNotes/legacy files/*
/.vs
# mod development
/mods/dev/
# cSpell
.cspellcache
...@@ -18,27 +18,32 @@ variables: ...@@ -18,27 +18,32 @@ variables:
# precompiled / assets # precompiled / assets
# the URLs are the same as inside the game, change both if updating # the URLs are the same as inside the game, change both if updating
WEBGL_NAME: "WebGL art assets" WEBGL_NAME: "WebGL art assets"
WEBGL_URL: "https://mega.nz/folder/rtAzEYTS#5a5KO_rqq_BB8eqtOuhEow" WEBGL_URL: "https://mega.nz/folder/CgRiQaxS#Cjok57jXZwQt-jP7zkRh2Q"
RENDER_NAME: "Rendered imagepack (outdated)" RENDER_NAME: "Rendered imagepack (outdated)"
RENDER_URL: "https://mega.nz/file/upoAlBaZ#EbZ5wCixxZxBhMN_ireJTXt0SIPOywO2JW9XzTIPhe0" RENDER_URL: "https://mega.nz/file/upoAlBaZ#EbZ5wCixxZxBhMN_ireJTXt0SIPOywO2JW9XzTIPhe0"
build: build:
stage: build stage: build
image: debian:latest image: ggcr.io/pregmodfan/fc-pregmod/build
cache:
paths:
- node_modules/
rules: rules:
# official release # official release
- if: $CI_COMMIT_TAG =~ /\A\d+\.\d+\.\d+/ - if: $CI_COMMIT_TAG =~ /\A\d+\.\d+\.\d+/
# latest # latest
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
before_script:
- npm update --no-audit --no-fund --omit=dev
script: script:
- ./compile.sh --ci --minify - npx gulp html --minify --release --ci
artifacts: artifacts:
paths: paths:
- bin/FC_pregmod.html - bin/FC_pregmod.html
upload: upload:
stage: upload stage: upload
image: gitgud.io:5050/pregmodfan/fc-pregmod:megacmd image: ggcr.io/pregmodfan/fc-pregmod:megacmd
extends: .official-releases extends: .official-releases
script: script:
- mega-login $MEGA_MAIL $MEGA_PWD - mega-login $MEGA_MAIL $MEGA_PWD
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--- If you're describing a bug, tell us what should happen --> <!--- If you're describing a bug, tell us what should happen -->
## Current Behavior ## Current Behavior
<!-- If describing a bug, tell us what happens instead of the expected behavior. Provide a Screenshots if possible. --> <!-- If describing a bug, tell us what happened instead of the expected behavior. Provide screenshots of the problem if possible. -->
## Steps to Reproduce ## Steps to Reproduce
<!-- Provide an unambiguous sequence of steps to reproduce the bug. --> <!-- Provide an unambiguous sequence of steps to reproduce the bug. -->
......
<!-- If you have any questions about anything don't hesitate to ask in this merge request or by creating a new issue -->
#### Description and notes
<!-- Describe what you have done and why. -->
<details><summary>Merge Checklist</summary>
<!---
Check all that apply by replacing the space inside the square brackets with an x ([x] for example)
This is to help us streamline the merging process
It is not a list of requirements
-->
- [ ] I have read [CONTRIBUTING.md](https://gitgud.io/pregmodfan/fc-pregmod/-/blob/pregmod-master/CONTRIBUTING.md)
- and
- my code editor has
- [ ] ESLint support enabled
- [ ] TypeScript support enabled
- [ ] some form of spell checker
- We suggest using a spell checker compatible with cSpell if possible
- [ ] my changes compile successfully and seem to work properly
- [ ] I am using the simple compiler (`simple-compiler.[bat or sh]`)
- [ ] I am using the normal compiler (`compile.[bat or sh]`)
- [ ] this is my first merge request
- [ ] the changes in this merge request comply with the [coding style defined in CONTRIBUTING.md](https://gitgud.io/pregmodfan/fc-pregmod/-/blob/pregmod-master/CONTRIBUTING.md#code-style)
</details>
<details><summary>Changes made</summary>
- Some change
- Another change
</details>
#### Things left to do
<!-- A todo list of things that you think still need done before merging -->
- [ ] code review (this is done by one or more people other than you)
- [ ] final tests
- [ ] let Pregmodder know that this is ready for merging
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"naumovs.color-highlight",
"usernamehw.errorlens",
"dbaeumer.vscode-eslint",
"waderyan.gitblame",
"donjayamanne.git-extension-pack",
"eamodio.gitlens",
"visualstudioexptteam.vscodeintellicode",
"davidanson.vscode-markdownlint",
"christian-kohler.path-intellisense",
"esbenp.prettier-vscode",
"gruntfuggly.todo-tree",
"wayou.vscode-todo-highlight",
"cyrusfirheir.twee3-language-tools"
]
}
\ No newline at end of file
{
// This is our suggested VSCode settings. To use them as is just copy this file and name the copy settings.json
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features",
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true
},
"cSpell.enabledFileTypes": {
"*": true
},
"editor.inlineSuggest.enabled": true,
"editor.rulers": [
{
"column": 80,
"color": "#1f8300"
},
{
"column": 120,
"color": "#ff7700"
}
],
"editor.semanticHighlighting.enabled": true,
"eslint.format.enable": true,
"eslint.probe": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"vue",
"markdown",
"twee3-sugarcube-2"
],
"files.associations": {
"*.tw": "twee3-sugarcube-2"
},
"todo-tree.regex.regex": "(//|#|--|<!--|;|/\\*|^|^[ \\t]*(-|\\d+.))\\s*($TAGS)",
"twee3LanguageTools.storyformat.current": "sugarcube-2"
}
\ No newline at end of file
This diff is collapsed.
...@@ -2,57 +2,82 @@ ...@@ -2,57 +2,82 @@
First off, thanks for taking the time to contribute! First off, thanks for taking the time to contribute!
If there is anything you don't understand feel free to ask. Many of the more advanced tools are also not required for If there is anything you don't understand please ask us about it. The advanced tooling is not required for
fixing small typos or simple bugs. fixing small typos or simple bugs, but it is suggested.
## Environment ## Environment
### Requirements ### Requirements
To effectively work on the project the following tools are required: To effectively work on the project the following tools are needed:
* `Git` * [Git](https://git-scm.com)
* `Node.js` or another npm client * [Node.js](https://nodejs.org/en/) or another npm client
* an IDE capable of working with JavaScript, TypeScript and CSS. `VS Code` is one option. * a code editor/IDE
* Java Runtime Environment, minimum JRE8 * [VSCode](https://code.visualstudio.com/) is a popular option and is what we recommend if you don't already have a preference
These tools are not required, but are suggested and will make working on FC easier.
### Setting everything up ### Setting everything up
0. Clone the project from GitGud.io ([Detailed Git setup and work cycle](devNotes/gitSetup.md)) 1. Clone the project from GitGud.io ([Detailed Git setup and work cycle](devNotes/gitSetup.md))
1. Open a terminal (Linux) / cmd window (Windows) and navigate to the `fc-pregmod` root directory. 2. Navigate to the `fc-pregmod` root directory.
2. Run `npm install` * Windows: Run `Windows Powershell` or `Command Prompt` and execute `cd C:\path\to\project\fc-pregmod`
3. Open the directory in your preferred IDE * Mac/Linux: Open a terminal and execute `cd /path/to/project/fc-pregmod/`
4. Configure your IDE to use ESLint and the type checking capabilities of the TypeScript compiler. 3. Run `setup.bat` (Windows) or `setup.sh` (Mac/Linux) in your terminal
4. Follow the install steps until you get to the `Welcome to FC development!...` menu and then select `Exit`
5. Open the directory in your preferred editor/IDE
## Compiling **Make sure you have ESLint, TypeScript, and spell checking (preferably with cSpell compatiblity) support installed and enabled (if avaliable) in your preferred editor/IDE to catch formatting, type def, and spelling errors**
While you can compile it like usual (`compile.bat`/`compile.sh`/`make`), there is also a `Gulp script` that creates <details><summary>Recommended editor/IDE plugins/extensions</summary>
source maps for easier debugging. Other than that there are no differences between compiling for development or
compiling for playing the game.
# Code The list below is for VSCode. If you are not using VSCode but want some of these extensions functionality, then do some research. Many of these extensions exist or have alternatives in most common editors/IDEs.
## Code style * [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
* Catches formatting problems and lets you know when your code doesn't conform to our standards
* TypeScript/TSC
* Built into VSCode. Catches discrepancies between your code and the existing TypeScript type defs
* [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
* Catches most spelling issues
* [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens)
* Highlights lines that ESLint, TSC, or Code Spell Checker have marked as having problems
* [Git Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack)
* Adds a few tools that make working with git easier
* [IntelliCode](https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode)
* Will make your day easier by suggesting functions and properties for autocompletion
* Will also show you documentation for those suggested functions and properties
* [TODO Highlight](https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight)
* Makes TODO comments stand out better
* [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree)
* Adds a tab to the left sidebar that lists all TODO comments in the current project
Generally the code style is based on our `.eslintrc.json`. If your IDE has an auto format feature it can often read the </details>
rules from `.eslintrc.json`.
### Important Rules If you are using VSCode we also suggest copying `.vscode/settings.template.jsonc` to `.vscode/settings.json` to use our recommended VSCode settings.
* use spaces after commas ### Compiling
* do not omit semicolons
* no empty blocks Use either the simple or advanced compiler. See the `Compile the game yourself` section in the [readme](README.md) for more information. We suggest using the advanced compiler when possible.
* don't pad blocks with blank lines
* prefer strict equality/inequality ## Code style
* etc.
The coding style is based on our [`.eslintrc.json`](/.eslintrc.json) file. If your editor/IDE has ESLint support it will let you know when your coding style doesn't conform to our standards.
* Most editors/IDEs don't have native ESLint support and will need you to install an ESLint plugin/extension.
### Documentation ### Documentation
It's a good idea to provide meaningful documentation for new functions and classes where possible. We follow It's a good idea to provide meaningful documentation for new functions and classes where possible.
Typescript's [JSDoc](https://jsdoc.app) type dialect for the most part (and we provide a Typescript configuration and We follow [JSDoc's](https://jsdoc.app) type dialect for the most part with some TypeScript definitions thrown in.
auxiliary type definition files if you'd like to use it yourself – it's pretty nifty). Don't worry too much about We provide a [TypeScript configuration](/tsconfig.json) (for TSC support).
specific type syntax if you can't make TS work or don't understand it, someone else will probably fix it for you as long More complex type definitions are usually stored in our [TypeScript type definition files](https://gitgud.io/pregmodfan/fc-pregmod/-/tree/pregmod-master/devTools/types?ref_type=heads).
as you've made the intent clear in some form of JSDoc. Don't worry too much about specific type syntax if you can't make TS work or don't understand it,
someone else will probably fix it for you as long as you've made the intent clear in some combination of Comments, JSDoc, and/or TypeScript type def.
Here are some links that are may be helpful in regards to TypeScript, jsdoc, and documentation.
* Getting started with JSDoc: https://jsdoc.app/about-getting-started.html
* JSDoc's website: https://jsdoc.app/
* The `human.d.ts` file where the bulk of our commonly used type defs are stored: https://gitgud.io/pregmodfan/fc-pregmod/-/blob/pregmod-master/devTools/types/FC/human.d.ts
### Naming conventions ### Naming conventions
...@@ -81,10 +106,26 @@ class FOO {} ...@@ -81,10 +106,26 @@ class FOO {}
App.foo.bar(); App.foo.bar();
``` ```
* Enum members should be `ALLCAPS`. * TypeScript type defs should be `PascalCase`.
```ts ```ts
// good // good
export type Foo = "bar" | "car";
export interface Foo {
bar: boolean,
}
// bad
export type foo = "bar" | "car";
export interface FOO {
bar: boolean,
}
```
* Enum members should be `ALLCAPS`.
```js
// good
enum Foo { enum Foo {
BAR = 'bar', BAR = 'bar',
BAZ = 'baz', BAZ = 'baz',
...@@ -133,79 +174,84 @@ const foo = { ...@@ -133,79 +174,84 @@ const foo = {
.FOO-BAR {} .FOO-BAR {}
``` ```
New code should generally get organized into the `App` namespace. See `js/002-config/fc-init-js.js` for a rough outline. ### JavaScript Features
## JavaScript Features
* Avoid using very new JavaScript features
* Generally, we're currently targeting ECMAScript 2018, though we use a few widely-implemented ECMAScript 2019
features, like `globalThis`.
* Conversely, do use modern features, it's not 2010 anymore and we don't try to support Internet Explorer or anything
stupid like that.
* use `let`/`const` rather than `var`
* prefer fat arrow functions to inline long-form functions
* etc.
## Code quality
There are three main tools used to ensure good code quality, `ESLint`, `TypeScript Compiler (tsc)` and a custom sanity Use modern JavaScript features when possible. We are currently targeting ECMAScript 2022, and aren't trying to support Internet Explorer or anything stupid like that (it isn't 2010 anymore). For example, use [`let`/`const` rather than `var`](https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/), prefer [`Arrow function expressions`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) to inline long-form functions, use [`nullish coalescing`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing) and [`optional chaining`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining), etc.
check.
`ESLint` and `tsc` can be setup in most IDEs aimed at web development to show errors while editing the file. ### Code quality
Contributions should generally not add any new sanity check errors, and it's especially important to check this if Contributions should generally not add any new ESLint, TSC, or spelling errors. You can check for errors by running `sanityCheck.bat` (Windows)/`sanityCheck.sh` (Mac/Linux) and/or by using a code editor that supports ESLint, TSC, and cSpell.
you're making changes to .tw files. * With the default settings running `sanityCheck.bat` (Windows) or `sanityCheck.sh` (Mac/Linux) will (mostly) show you just the errors that were caused by your changes.
Use `./compile.sh --dry --sanity` or the short hand `./compile.sh -d -s` on linux or mac. * If you are not using the advanced tooling then use `legacySanityCheck.bat` or `legacySanityCheck.sh` instead.
On Windows run `compile_debug+sanityCheck.bat`.
It searches for common spelling errors and syntax errors in the twine files. Don't worry about preexisting
errors, it's not totally clean as is and there are a few false positives.
## Project Structure ## Project Structure
### Source files ### Source files
* `src/` is the main directory for source code. It also contains the embedded art files. Since it is inside an `eval()` statement debugging and minification is more complicated than for `js/`. * `src/` is the main directory for source code. It also contains the embedded art files. Since it is inside an `eval()` statement debugging and minification is more complicated than for `js/`.
* `js/` is loaded before SugarCube and therefore outside SugarCube's eval which `src/` is contained in. This means accessing SugarCube features (like `SugarCube.Engine`) is more complicated however it other than `src/` it can be minified and is easier to debug. Currently contains mainly static data, however new code not relying on SC2 should be sorted in here too. * `js/` is loaded before SugarCube and therefore outside SugarCube's eval which `src/` is contained in. This means accessing SugarCube features (like `SugarCube.Engine`) is more complicated however it other than `src/` it can be minified and is easier to debug. Currently, contains mainly static data, however new code not relying on SC2 should be sorted in here too.
* `css/` contains all CSS files. The internal structure is explained [here](css/css.md). * `css/` contains all CSS files. The internal structure is explained [here](css/css.md).
* `themes/` contains [custom themes](themes/themes.md) which are built separately. * `themes/` contains [custom themes](themes/themes.md) which are built separately.
### Dev Files ### Developer Files
* `devNotes/` contains various wiki files and other potentially interesting files. * `devNotes/` contains various wiki files and other potentially interesting files.
* `devTools/` contains various scripts and executables needed for working with the project or compiling. TypeScript typing files are stored here as well. * Note that many of these files have outdated info. Your best bet is to double check the actual code before utilizing the info found in these files
* `submodules/` contains git submodules. Only the custom version of SugarCube2 right now. * `devTools/` contains various scripts and executables needed for working with the project or compiling.
* TypeScript typing files are stored here as well in the `devTools/types/` directory.
* `submodules/` contains Git submodules
* currently only a custom version of SugarCube 2
### Art files ### Art files
* `artTools/`contains files for creating and updating [vector art](artTools/README.md). * `artTools/`contains files for creating and updating [vector art](artTools/README.md)
* `resources/` contains various [art related files](resources/ReadmeBeforeAddingArt.md). * `resources/` contains various [art related files](resources/ReadmeBeforeAddingArt.md)
### External Programs ### External Programs
* `docker/` contains Docker files from which the docker containers for GitLabs CI are created.
* `FCHost/` contains the sources for [FCHost](FCHost/documentation_FCHost.md).
* `saveTools/` contains tools for [editing save files](saveTools/README.md).
# Further Reading * `docker/` contains Docker files from which the docker containers for GitLabs CI are created
* `FCHost/` contains the sources for [FCHost](FCHost/README.md)
* `saveTools/` contains tools for [editing save files](saveTools/README.md)
## Wiki Files ## Further Reading
### Notes and things that it is useful to know
* I highly recommend reading https://javascript.info/comments
* Whenever you add, remove or change the type of a property that is stored when saving the game you need to create a patch for your changes. Instructions for this can be found at the top of https://gitgud.io/pregmodfan/fc-pregmod/-/blob/pregmod-master/src/data/patches/patch.js
* If you have any suggestions, changes, or additions to this document that would have been helpful to you you please create a new issue or create a merge request with your changes.
### New to JavaScript and/or web development?
Here are some links to tutorials and reference material that should help you on your journey.
* https://www.w3schools.com/Js/
* https://www.geeksforgeeks.org/javascript/
* https://www.freecodecamp.org/news/learn-javascript-for-beginners/
* https://developer.mozilla.org/en-US/docs/Web#web_technology_references
### Wiki Files
* Event Writing Guides * Event Writing Guides
* [Twine](devNotes/scene-guide.txt) (Twine is being phased out of the project however the concepts are still relevant) * [Twine<sup>1</sup>](devNotes/sceneGuide.md)
* [JavaScript](devNotes/jsEventCreationGuide.md) * [JavaScript](devNotes/jsEventCreationGuide.md)
* [Exception handling](devNotes/exceptions.md) * [Exception handling](devNotes/exceptions.md)
* [Sanity check](devNotes/sanityCheck.md) * [Sanity check<sup>2</sup>](devNotes/sanityCheck.md)
* [Slave List](devNotes/slaveListing.md) * [Slave List](devNotes/slaveListing.md)
* [Pronouns](devNotes/Pronouns.md) * [Pronouns](devNotes/Pronouns.md)
* External function documentation * External function documentation
* [Eyes](devNotes/eye functions.md) * [Eyes](devNotes/eyeFunctions.md)
* [Limbs](devNotes/limb functions.md) * [Limbs](devNotes/limbFunctions.md)
* [Standalone functions](devNotes/standaloneFunctions.md) * [Some potentially useful JS functions](devNotes/usefulJSFunctionDocumentation.md)
* [Some potentially useful JS functions](devNotes/usefulJSFunctionDocumentation.txt) * [Content embedding chart](devNotes/contentEmbeddingChart.png) (for more details refer to [this issue](https://gitgud.io/pregmodfan/fc-pregmod/-/merge_requests/7453#note_118616))
* [Content embedding chart](devNotes/contentEmbeddingChart.png) (for more details refer to https://gitgud.io/pregmodfan/fc-pregmod/-/merge_requests/7453#note_118616)
<sup>1. Twine is being phased out of the project and should not be used in new code, but the basic concepts found here still apply.</sup>
<sup>2. Only applies to the legacy sanity checks.</sup>
## Useful issues ### Useful issues
* [Setting up VS Code](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/2448) * [Setting up VS Code](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/2448)
* [Classes in Game State](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/696) * [Classes in Game State](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/696)
* [Self executing functions](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/2325) * [Self executing functions](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/2325)
* [Sort a map](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/2642) * [Sort a map](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/2642)
* [How to create a Merge Request (MR)](https://gitgud.io/pregmodfan/fc-pregmod/-/issues/3903)
@ECHO off
:: Free Cities FCHost Launcher - Windows
:: run dependencyCheck.bat
CALL .\devTools\scripts\dependencyCheck.bat
SET CODE=%ERRORLEVEL%
IF %CODE% EQU 69 (
:: if exit code is 69, then we don't have all the dependencies we need
ECHO.
ECHO Dependencies not met.
ECHO.
EXIT /b 0
) ELSE IF %CODE% EQU 0 (
:: if exit code is 0, run FCHostInstallAndRun.js
CALL node devTools\scripts\FCHostInstallAndRun.js
EXIT /b 0
) ELSE (
:: if exit code is not 0, print error message
ECHO.
ECHO dependencyCheck.bat exited with code: %CODE%
ECHO Dependency check failed unexpectedly.
ECHO.
EXIT /b 0
)
#!/bin/bash
# Free Cities FCHost Launcher - Unix
# run dependencyCheck.sh
./devTools/scripts/dependencyCheck.sh
exitCode=$?
# exit code is now stored in $exitCode
# if exit code is 69, then we don't have all the dependencies we need
if [[ $exitCode -eq 69 ]]; then
echo "Dependencies not met."
echo ""
exit 0
# if exit code is not 0, print error message
elif [[ $exitCode -ne 0 ]]; then
echo "dependencyCheck.sh exited with code: $exitCode"
echo "Dependency check failed unexpectedly."
echo ""
exit 0
# if exit code is 0, run FCHostInstallAndRun.js
else
node devTools/scripts/FCHostInstallAndRun.js
fi
CMakeCache.txt CMakeCache.txt
CMakeFiles CMakeFiles/
Debug Debug/
Release Release/
fchost/Release_*
Release.file
x64 x64
*.sln *.sln
*.vcxproj *.vcxproj
*.vcxproj.filters *.vcxproj.filters
*.vcxproj.user *.vcxproj.user
libcef_dll_wrapper libcef_dll_wrapper/
libs/
.vs .vs
cmake_install.cmake cmake_install.cmake
*.VC.db *.VC.db
GPUCache GPUCache
\ No newline at end of file PreCompiledFCHost.zip
Makefile
.ninja_deps
.ninja_log
build.ninja
BUILD REQUIREMENTS
The below requirements must be met to build this project.
- Chromium Embedded Framework (CEF) 76.1.5 or newer. The windows build is
currently configured to operate with the X64 binary distribution of CEF.
- CMake version 2.8.12.1 or newer.
- Linux/MacOS requirements:
I haven't tested these platforms, and there is platform-specific code missing.
Shouldn't be too hard to add, check the CEF distribution and treat FCHost
as a derivative of tests/cefsimple.
- Have the environment variable CEF_ROOT set to the root of your CEF distribution.
- Have the CMake binary folder added to your path e.g. for Windows C:\Program Files\CMake\bin.
- Windows requirements:
Visual Studio 2019 (the community edition will work fine) or newer with the "Desktop development with C++" workload installed.
BUILD STEPS
If you are running Windows and meet the above requirements then within the root of FCHost/,
execute cmake_vs2019.bat which will generate FCHost.sln in the same location.
Now open FCHost.sln in Visual Studio 2019
and build from there via tool bar -> Build -> Build Solution or Ctrl + Shift + B.
The resulting binary and supporting files will be in
FCHost/fchost/Debug, or FCHost/fchost/Release depending on the configuration
selected in Visual Studio via the drop down found under the Build and Debug tool bar headers.
You should be able to zip up the contents of the
Release folder and distribute them to another machine or user if desired.
Due to space and privacy concerns it is suggested that you remove *.html and fchost.ilk prior to distribution.
If you are not running Windows or you need something else special, please
familiarize yourself with CMake and see the detailed information in CMakeLists.txt.
\ No newline at end of file
...@@ -105,45 +105,73 @@ set_property(GLOBAL PROPERTY OS_FOLDERS ON) ...@@ -105,45 +105,73 @@ set_property(GLOBAL PROPERTY OS_FOLDERS ON)
# #
# CEF_ROOT setup. # CEF configuration.
# This variable must be set to locate the binary distribution. #
#
# Specify the CEF distribution version.
# Visit https://cef-builds.spotifycdn.com/index.html for the list of
# supported platforms and versions.
set(CEF_VERSION "126.2.11+gb281f7a+chromium-126.0.6478.127")
# Determine the platform.
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
if("${PROJECT_ARCH}" STREQUAL "arm64")
set(CEF_PLATFORM "macosarm64")
elseif("${PROJECT_ARCH}" STREQUAL "x86_64")
set(CEF_PLATFORM "macosx64")
elseif("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(PROJECT_ARCH "arm64")
set(CEF_PLATFORM "macosarm64")
else()
set(PROJECT_ARCH "x86_64")
set(CEF_PLATFORM "macosx64")
endif()
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm")
set(CEF_PLATFORM "linuxarm")
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(CEF_PLATFORM "linuxarm64")
elseif(CMAKE_SIZEOF_VOID_P MATCHES 8)
set(CEF_PLATFORM "linux64")
else()
message(FATAL_ERROR "Linux x86 32-bit builds are discontinued.")
endif()
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
if("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM64")
set(CEF_PLATFORM "windowsarm64")
elseif(CMAKE_SIZEOF_VOID_P MATCHES 8)
set(CEF_PLATFORM "windows64")
else()
set(CEF_PLATFORM "windows32")
endif()
endif()
# The binary distribution is in a separate directory from your # Add this project's cmake/ directory to the module path.
# project. Locate the binary distribution using the CEF_ROOT set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# environment variable.
#
# Set the CEF_ROOT environment variable before executing CMake. For example:
# > set CEF_ROOT=c:\path\to\cef_binary_3.2704.xxxx.gyyyyyyy_windows32
#
# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Download and extract the CEF binary distribution (executes DownloadCEF.cmake).
include(DownloadCEF)
DownloadCEF("${CEF_PLATFORM}" "${CEF_VERSION}" "${CMAKE_SOURCE_DIR}/libs")
# # Add the CEF binary distribution's cmake/ directory to the module path.
# Load the CEF configuration. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CEF_ROOT}/cmake")
#
# try to find system installation # Load the CEF configuration (executes FindCEF.cmake).
find_package(CEF QUIET) find_package(CEF REQUIRED)
if(NOT DEFINED _CEF_ROOT_EXPLICIT) # if that fails, try the standard way
include("${CMAKE_CURRENT_LIST_DIR}/cmake/FindCEF.cmake")
endif()
# #
# Define CEF-based targets. # Define CEF-based targets.
# #
# Include the libcef_dll_wrapper target. # Include the libcef_dll_wrapper target.
# Comes from the libcef_dll/CMakeLists.txt file in the binary distribution
# directory.
add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper) add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper)
# Allow includes relative to the current source directory.
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# Include application targets. # Include application targets.
# Comes from the <target>/CMakeLists.txt file in the current directory. add_subdirectory(fchost)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/fchost")
add_subdirectory(fchost)
endif()
# Display configuration settings. # Display configuration settings.
PRINT_CEF_CONFIG() PRINT_CEF_CONFIG()
# How to Build
## BUILD REQUIREMENTS
The below requirements must be met to build this project.
- CMake version 2.8.12.1 or newer
- Ensure the CMake binary folder is added to your path (e.g. for Windows `C:\Program Files\CMake\bin`)
- Chromium Embedded Framework (CEF) 126.1 or newer
- Running CMake will automatically download this so there is no need to configure it yourself
### Windows
Visual Studio 2019 (the community edition will work fine) or newer with the "Desktop development with C++" workload installed.
### Linux
Ensure you have a C++ compiler installed. On Debian/Ubuntu this can be installed with:
```bash
sudo apt install build-essential
```
## BUILD STEPS
### Windows
Assuming that Visual Studio 2019/2022 is being used, run the following command:
```bash
# For Visual Studio 2019
# Alternatively run `cmake_vs2019.bat`
cmake -G "Visual Studio 16" .
# For Visual Studio 2022
# Alternatively run `cmake_vs2022.bat`
cmake -G "Visual Studio 17" .
```
Open the generated `fchost.sln` file in Visual Studio. Then build the project by either:
- Selecting **Build > Build Solution** on the menu bar
- Pressing **Ctrl + Shift + B**
### Linux
Run the following commands:
```bash
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .
make -j4
```
### Output
The resulting binary and supporting files will be in `FCHost/fchost/Debug` or `FCHost/fchost/Release` depending on the configuration selected in Visual Studio via the drop down found under the Build and Debug tool bar headers.
You should be able to zip up the contents of the Release folder and distribute them to another machine or user if desired. Due to space and privacy concerns it is suggested that you remove `*.html` and `fchost.ilk` files (if present) prior to distribution.
<!-- cSpell:ignore fchost, Shokusku's -->
# FCHost # FCHost
FCHost is an alternative HTML renderer for playing Pregmod based on Chromium. It has multiple advantages compared to normal browsers: FCHost is an alternative HTML renderer for playing Pregmod based on Chromium. It has multiple advantages compared to normal browsers:
* No browser cache limits, allowing arbitrarily large save files. - No browser cache limits, allowing arbitrarily large save files.
* Saves are stored in an easily accessible way on disk, allowing for easy manual editing. - Saves are stored in an easily accessible way on disk, allowing for easy manual editing.
* No lost saves due to accidentally cleared cookies. - No lost saves due to accidentally cleared cookies.
* Can be noticeable faster. - Can be noticeable faster.
A Windows build is available for [download](https://mega.nz/file/kY5GmLRa#jwwgshNuKz0yAQDDeSs-jbPOOGX4Ap1ha_EKlWp-9-M).
A precompiled version for Windows is available [here](https://mega.nz/folder/vzxgwKwL#L4V4JEk1YfWcvC7EG76TMg) If you are developing FC using the advanced tooling then you can run `FCHost.bat` (Windows) or `FCHost.sh` (Mac/Linux) to download and setup FCHost automatically.
## Initial setup ## Initial setup
### HTML files ### HTML files
Place FC_pregmod.html next to the FCHost executable. On Windows, this is `fchost.exe` Place `FC_pregmod.html` next to the FCHost executable. This is usually `fchost.exe`, but it may be a file named `fchost` on Mac/Linux.
### Art resources ### Art resources
...@@ -23,9 +27,9 @@ the art resources have to be placed in a `resources` directory next to the HTML ...@@ -23,9 +27,9 @@ the art resources have to be placed in a `resources` directory next to the HTML
Elohiem's interactive WebGL: Elohiem's interactive WebGL:
- fchost.exe - fchost.exe
- resources/ - resources/
- webgl - webgl
Shokusku's rendered image pack Shokusku's rendered image pack
- fchost.exe - fchost.exe
...@@ -37,17 +41,19 @@ If making changes while the game is open make sure to refresh or restart FCHost ...@@ -37,17 +41,19 @@ If making changes while the game is open make sure to refresh or restart FCHost
## Keybinds ## Keybinds
| Action | Key Kombination | | Action | Key Combination |
| --------- | ---------------- | | --------- | ---------------- |
| Zoom In | Ctrl + Plus | | Zoom In | Ctrl + Plus |
| Zoom Out | Ctrl + Minus | | Zoom Out | Ctrl + Minus |
| Dev Tools | Ctrl + Shift + J | | Dev Tools | Ctrl + Shift + J |
## Save file locations ## Save file locations
On Windows saves are stored in `%User%\Documents\FreeCities_Pregmod\FCHostPersistentStorage\` | Platform | Location |
| -------- | -------------------------------------------------------------- |
| Windows | `%User%\Documents\FreeCities_Pregmod\FCHostPersistentStorage\` |
| Linux | `~/.local/share/FreeCities_Pregmod/FCHostPersistentStorage/` |
## Building FCHost ## Building FCHost
If you want to build FCHost yourself please refer to [FCHost/Building_FCHost.txt](FCHost/Building_FCHost.txt). If you want to build FCHost yourself please refer to [FCHost/HowToBuild.md](FCHost/HowToBuild.md).
# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
# Download the CEF binary distribution for |platform| and |version| to
# |download_dir|. The |CEF_ROOT| variable will be set in global scope pointing
# to the extracted location.
# Visit https://cef-builds.spotifycdn.com/index.html for the list of
# supported platforms and versions.
function(DownloadCEF platform version download_dir)
# Specify the binary distribution type and download directory.
set(CEF_DISTRIBUTION "cef_binary_${version}_${platform}")
set(CEF_DOWNLOAD_DIR "${download_dir}")
# The location where we expect the extracted binary distribution.
set(CEF_ROOT "${CEF_DOWNLOAD_DIR}/${CEF_DISTRIBUTION}" CACHE INTERNAL "CEF_ROOT")
# Download and/or extract the binary distribution if necessary.
if(NOT IS_DIRECTORY "${CEF_ROOT}")
set(CEF_DOWNLOAD_FILENAME "${CEF_DISTRIBUTION}.tar.bz2")
set(CEF_DOWNLOAD_PATH "${CEF_DOWNLOAD_DIR}/${CEF_DOWNLOAD_FILENAME}")
if(NOT EXISTS "${CEF_DOWNLOAD_PATH}")
set(CEF_DOWNLOAD_URL "https://cef-builds.spotifycdn.com/${CEF_DOWNLOAD_FILENAME}")
string(REPLACE "+" "%2B" CEF_DOWNLOAD_URL_ESCAPED ${CEF_DOWNLOAD_URL})
# Download the SHA1 hash for the binary distribution.
message(STATUS "Downloading ${CEF_DOWNLOAD_PATH}.sha1 from ${CEF_DOWNLOAD_URL_ESCAPED}...")
file(DOWNLOAD "${CEF_DOWNLOAD_URL_ESCAPED}.sha1" "${CEF_DOWNLOAD_PATH}.sha1")
file(READ "${CEF_DOWNLOAD_PATH}.sha1" CEF_SHA1)
# Download the binary distribution and verify the hash.
message(STATUS "Downloading ${CEF_DOWNLOAD_PATH}...")
file(
DOWNLOAD "${CEF_DOWNLOAD_URL_ESCAPED}" "${CEF_DOWNLOAD_PATH}"
EXPECTED_HASH SHA1=${CEF_SHA1}
SHOW_PROGRESS
)
endif()
# Extract the binary distribution.
message(STATUS "Extracting ${CEF_DOWNLOAD_PATH}...")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzf "${CEF_DOWNLOAD_DIR}/${CEF_DOWNLOAD_FILENAME}"
WORKING_DIRECTORY ${CEF_DOWNLOAD_DIR}
)
endif()
endfunction()
\ No newline at end of file
# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
#
# This file is the CEF CMake configuration entry point and should be loaded
# using `find_package(CEF REQUIRED)`. See the top-level CMakeLists.txt file
# included with the CEF binary distribution for usage information.
#
# Find the CEF binary distribution root directory.
set(_CEF_ROOT "")
if(CEF_ROOT AND IS_DIRECTORY "${CEF_ROOT}")
set(_CEF_ROOT "${CEF_ROOT}")
set(_CEF_ROOT_EXPLICIT 1)
else()
set(_ENV_CEF_ROOT "")
if(DEFINED ENV{CEF_ROOT})
file(TO_CMAKE_PATH "$ENV{CEF_ROOT}" _ENV_CEF_ROOT)
endif()
if(_ENV_CEF_ROOT AND IS_DIRECTORY "${_ENV_CEF_ROOT}")
set(_CEF_ROOT "${_ENV_CEF_ROOT}")
set(_CEF_ROOT_EXPLICIT 1)
endif()
unset(_ENV_CEF_ROOT)
endif()
if(NOT DEFINED _CEF_ROOT_EXPLICIT)
message(FATAL_ERROR "Must specify a CEF_ROOT value via CMake or environment variable.")
endif()
if(NOT IS_DIRECTORY "${_CEF_ROOT}/cmake")
message(FATAL_ERROR "No CMake bootstrap found for CEF binary distribution at: ${CEF_ROOT}.")
endif()
# Execute additional cmake files from the CEF binary distribution.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_CEF_ROOT}/cmake")
include("cef_variables")
include("cef_macros")
@ECHO OFF
REM Quickly rebuild 64-bit VS2022 solution/project files from the CMake files.
cmake -G "Visual Studio 17" -A x64
pause
\ No newline at end of file