From 506965b665afeed63d56528cafaf13d154ac5301 Mon Sep 17 00:00:00 2001 From: klorpa <30924131+klorpa@users.noreply.github.com> Date: Sun, 27 Jan 2019 18:20:57 -0600 Subject: [PATCH] EndLines --- artTools/README.md | 34 ++++++++++---------- devNotes/twine CSS | 2 +- fixSpellingMistakes2 | 2 +- src/002-config/start.tw | 1 - src/SpecialForce/SpecialForce.js | 2 +- src/js/datatypeCleanupJS.js | 2 +- src/js/removeActiveSlave.js | 2 +- src/uncategorized/corporationDevelopments.tw | 4 +-- src/uncategorized/milkmaidWorkaround.tw | 1 - src/uncategorized/nurseWorkaround.tw | 1 - src/uncategorized/randomEventSelect.tw | 1 - src/uncategorized/reNoEvent.tw | 2 +- src/uncategorized/rieEligibilityCheck.tw | 8 ++--- src/uncategorized/schoolteacherWorkaround.tw | 1 - src/uncategorized/summaryOptions.tw | 1 - 15 files changed, 28 insertions(+), 36 deletions(-) diff --git a/artTools/README.md b/artTools/README.md index cf7f84f3a9b..920ee501e48 100644 --- a/artTools/README.md +++ b/artTools/README.md @@ -15,15 +15,15 @@ Note: This does not actually describe how to be an artist. ## 1. Be an artist -Make changes to the vector_source.svg. -Inkscape was thoroughly tested. -Adobe Illustrator might work decently, too. +Make changes to the vector_source.svg. +Inkscape was thoroughly tested. +Adobe Illustrator might work decently, too. ## 2. Respect the structure -While editing, keep the Layers in mind. +While editing, keep the Layers in mind. -* In Inkscape, Layers are special "Inkscape groups". +* In Inkscape, Layers are special "Inkscape groups". * In Illustrator, Layers are groups with user-defined IDs. * All Layers should have an ID that is globally unique (not just within their subtree). @@ -31,10 +31,10 @@ While editing, keep the Layers in mind. * Please use anonymous groups only for the ease of editing. Remove all "helper" groups before finally saving the file. * Anonymous groups can be used for continuous scaling (of e.g. boobs). -* Every asset that should go into a separate file needs to be in a labelled group +* Every asset that should go into a separate file needs to be in a labelled group (even if that is a group with only one shape). * There are some globally available styles defined as CSS classes (e.g. skin, hair). - Use them if your asset should be changed upon display. + Use them if your asset should be changed upon display. Do not set the style directly in the object. ## 3. Normalize the document (before committing) @@ -53,13 +53,13 @@ In case your Editor uses another path data style which cannot be changed, please What it does: * Formats the SVG XML according to Pythons lxml module, regardless of editor. -* Adobe Illustrator uses group IDs as layer labels. +* Adobe Illustrator uses group IDs as layer labels. Inkscape however uses layer labels and a separate, auto-generated group ID. - normalize_svg.py overwrites the group ID with the Inkscape layer label + normalize_svg.py overwrites the group ID with the Inkscape layer label so they are synchronized with Inkscape layer labels. * Inkscape copies the global style definition into the object *every time* - the object is edited. If an object references a CSS class AND at the same time - has a local style, the local style is removed + the object is edited. If an object references a CSS class AND at the same time + has a local style, the local style is removed so global dynamic styling is possible later on. Note: Behavior of Adobe Illustrator is untested. @@ -74,8 +74,8 @@ For faraen revamped art (based on NoX original) python3 vector_revamp_layer_split.py vector_revamp_source.svg tw ../src/art/vector_revamp/layers/ -. This application reads all groups in `vector_source.svg`. -Each group is stored in a separate file in the target directory `/src/art/vector/layers/`. +. This application reads all groups in `vector_source.svg`. +Each group is stored in a separate file in the target directory `/src/art/vector/layers/`. The group ID sets the file name. Therefore, the group ID **must not** contain spaces or any other weird characters. Also consider: @@ -85,14 +85,14 @@ Also consider: * The target directory is not emptied. If a file is no longer needed, you should remove it manually. * This procedure removes global definitions. This means, SVG filters are currently not supported. -Available output formats are `svg` and `tw`. -`svg` output exists for debug reasons. +Available output formats are `svg` and `tw`. +`svg` output exists for debug reasons. `tw` embeds the SVG data into Twine files, but removes the global style definitions so they can be set during display. ## 5. Edit the code -`/src/art/` contains Twine code which shows the assets in the story. -There are many helpful comments in `/src/art/artWidgets.tw`. +`/src/art/` contains Twine code which shows the assets in the story. +There are many helpful comments in `/src/art/artWidgets.tw`. The code also generates the previously removed global style definitions on the fly and per display. ## 6. Compile the story diff --git a/devNotes/twine CSS b/devNotes/twine CSS index 32b636e1f1b..b2c2623c986 100644 --- a/devNotes/twine CSS +++ b/devNotes/twine CSS @@ -433,7 +433,7 @@ button.accordion.active:before { font-weight: bold; margin: 0; background: #ffffff88; - border: 2px solid Gold; + border: 2px solid Gold; white-space: nowrap; } diff --git a/fixSpellingMistakes2 b/fixSpellingMistakes2 index 40e4d9aa129..d2f677c94ec 100755 --- a/fixSpellingMistakes2 +++ b/fixSpellingMistakes2 @@ -2,7 +2,7 @@ if [ ! -d ".git" ]; then exit 0 fi -GREP="git grep -lz" +GREP="git grep -lz" $GREP "\babandonned\b" -- src/ | xargs -0 perl -i -pE "BEGIN{ @ARGV = map glob, @ARGV } s/\babandonned\b/abandoned/g" *.tw $GREP "\baberation\b" -- src/ | xargs -0 perl -i -pE "BEGIN{ @ARGV = map glob, @ARGV } s/\baberation\b/aberration/g" *.tw $GREP "\babilityes\b" -- src/ | xargs -0 perl -i -pE "BEGIN{ @ARGV = map glob, @ARGV } s/\babilityes\b/abilities/g" *.tw diff --git a/src/002-config/start.tw b/src/002-config/start.tw index 9f5b5359db3..758c53fd58a 100644 --- a/src/002-config/start.tw +++ b/src/002-config/start.tw @@ -1,6 +1,5 @@ :: Start [nobr] - :: StoryTitle Free Cities \ No newline at end of file diff --git a/src/SpecialForce/SpecialForce.js b/src/SpecialForce/SpecialForce.js index 8c568b715fd..8f1a8d472ca 100644 --- a/src/SpecialForce/SpecialForce.js +++ b/src/SpecialForce/SpecialForce.js @@ -456,7 +456,7 @@ window.Main = function() { } window.Squad = function() { const V = State.variables; - V.SF.Squad = {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:{lv:0, InOrbit:0}, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0}; + V.SF.Squad = {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:{lv:0, InOrbit:0}, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0}; } window.Colonel = function() { const V = State.variables; diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index 17e94be3fb6..e31c45624a2 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -1217,7 +1217,7 @@ window.EconomyDatatypeCleanup = function EconomyDatatypeCleanup() { V.AProsperityCap = Math.max(+V.AProsperityCap, 0) || 0; V.arcologies[0].ownership = Math.clamp(+V.arcologies[0].ownership, 0, 100) || 0; V.arcologies[0].minority = Math.clamp(+V.arcologies[0].minority, 0, 100) || 0; - + V.food = Math.max(+V.food, 0) || 0; V.economy = Math.max(+V.economy, 20) || 100; diff --git a/src/js/removeActiveSlave.js b/src/js/removeActiveSlave.js index 88ff9b9d5dc..e44cd6d346b 100644 --- a/src/js/removeActiveSlave.js +++ b/src/js/removeActiveSlave.js @@ -246,7 +246,7 @@ window.removeActiveSlave = function removeActiveSlave() { window.removeNonNGPSlave = function removeNonNGPSlave(removedSlave) { "use strict"; - + const V = State.variables; const ID = removedSlave.ID; let LENGTH = V.slaves.length; diff --git a/src/uncategorized/corporationDevelopments.tw b/src/uncategorized/corporationDevelopments.tw index 297d35349df..35729a7b10e 100644 --- a/src/uncategorized/corporationDevelopments.tw +++ b/src/uncategorized/corporationDevelopments.tw @@ -506,7 +506,7 @@ _corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>> <<if $corpEasy == 1>> <<set _corpOverhead = Math.trunc(_corpOverhead / 2)>> <</if>> -<</if>> +<</if>> <<set $corpCash -= _corpOverhead, _corpProfitProvisional = $corpRev - $corpAssetsDev - $corpAssetsSlave - _corpOpCost>> <<if _corpProfitProvisional > 0>> @@ -730,5 +730,5 @@ $corpOpCostOld = _corpOpCost, $corpAssetsDevOld = $corpAssetsDev, $corpAssetsDev = 0, $corpAssetsSlaveOld = $corpAssetsSlave, -$corpAssetsSlave = 0, +$corpAssetsSlave = 0, $corpOverheadOld = _corpOverhead>> /*This needs to be at the very end of the financials*/ \ No newline at end of file diff --git a/src/uncategorized/milkmaidWorkaround.tw b/src/uncategorized/milkmaidWorkaround.tw index d61d15e12da..0cfb0267683 100644 --- a/src/uncategorized/milkmaidWorkaround.tw +++ b/src/uncategorized/milkmaidWorkaround.tw @@ -10,4 +10,3 @@ <</if>> <<goto "Dairy">> - diff --git a/src/uncategorized/nurseWorkaround.tw b/src/uncategorized/nurseWorkaround.tw index 503e1bba468..7bca30dedf4 100644 --- a/src/uncategorized/nurseWorkaround.tw +++ b/src/uncategorized/nurseWorkaround.tw @@ -10,4 +10,3 @@ <</if>> <<goto "Clinic">> - diff --git a/src/uncategorized/randomEventSelect.tw b/src/uncategorized/randomEventSelect.tw index 2dfbf84637f..e935ed03b68 100644 --- a/src/uncategorized/randomEventSelect.tw +++ b/src/uncategorized/randomEventSelect.tw @@ -26,4 +26,3 @@ DEBUG: <br> [[RE no event]] | <<print "[[Go back to previous passage: '" + previous() + "'|previous()][$activeSlave = 0, $eventSlave = 0]] | [[Go all the way back to Scheduled Event|Scheduled Event][$activeSlave = 0, $eventSlave = 0]]">> - diff --git a/src/uncategorized/reNoEvent.tw b/src/uncategorized/reNoEvent.tw index b7aa83dd310..37d16e3892a 100644 --- a/src/uncategorized/reNoEvent.tw +++ b/src/uncategorized/reNoEvent.tw @@ -20,4 +20,4 @@ This is a placeholder event. <br><br> -<<EventNameLink $activeSlave>> does not currently qualify for any events, so $he has been given a generic @@.hotpink;devotion@@ and @@.mediumaquamarine;trust@@ boost. /*If you see this event repeatedly for her, please submit a report so the author can write her some events.*/ +<<EventNameLink $activeSlave>> does not currently qualify for any events, so $he has been given a generic @@.hotpink;devotion@@ and @@.mediumaquamarine;trust@@ boost. /*If you see this event repeatedly for $him, please submit a report so the author can write $him some events.*/ diff --git a/src/uncategorized/rieEligibilityCheck.tw b/src/uncategorized/rieEligibilityCheck.tw index b6791290dbb..c4a1ea04810 100644 --- a/src/uncategorized/rieEligibilityCheck.tw +++ b/src/uncategorized/rieEligibilityCheck.tw @@ -6,13 +6,12 @@ <<for $i = 0; $i < $slaves.length; $i++>> <<if $slaves[$i].assignmentVisible == 1 || $slaves[$i].assignment == "serve in the master suite" || $slaves[$i].assignment == "be your Concubine" || $slaves[$i].assignment == "be a servant">> - <<if $slaves[$i].fuckdoll == 0>> - <<set $eligibleSlaves.push($slaves[$i].ID)>> - <</if>> + <<if $slaves[$i].fuckdoll == 0>> + <<set $eligibleSlaves.push($slaves[$i].ID)>> + <</if>> <</if>> <</for>> - <<if $hostageRescued == 1>> <<goto "P hostage acquisition">> <<elseif $eligibleSlaves.length == 0>> @@ -22,4 +21,3 @@ <</if>> <</silently>> - diff --git a/src/uncategorized/schoolteacherWorkaround.tw b/src/uncategorized/schoolteacherWorkaround.tw index fa740c8d575..dba9ce2a900 100644 --- a/src/uncategorized/schoolteacherWorkaround.tw +++ b/src/uncategorized/schoolteacherWorkaround.tw @@ -10,4 +10,3 @@ <</if>> <<goto "Schoolroom">> - diff --git a/src/uncategorized/summaryOptions.tw b/src/uncategorized/summaryOptions.tw index 64ba757bf06..f5fadf4ae76 100644 --- a/src/uncategorized/summaryOptions.tw +++ b/src/uncategorized/summaryOptions.tw @@ -20,7 +20,6 @@ <br> <span id="OptionRulesAssistantMain"><<OptionRulesAssistantMain>></span> - <br><br> <span id="OptionDisplayAssignments"><<OptionDisplayAssignments>></span> -- GitLab