From c9e0c4cc31cc6e751eff3d7dd8c11e491ca29c13 Mon Sep 17 00:00:00 2001 From: kopareigns <kopareigns@gmail.com> Date: Sun, 16 Dec 2018 20:46:41 -0500 Subject: [PATCH] Fixes --- src/init/setupVars.tw | 2 +- src/uncategorized/BackwardsCompatibility.tw | 3 + src/uncategorized/corporationDevelopments.tw | 59 -------------------- 3 files changed, 4 insertions(+), 60 deletions(-) diff --git a/src/init/setupVars.tw b/src/init/setupVars.tw index 4100f8cd479..3df88d9b0aa 100644 --- a/src/init/setupVars.tw +++ b/src/init/setupVars.tw @@ -1974,7 +1974,7 @@ Then pick _namePool.random(), or display those names as possible choices, or do "Roman Revivalist": setup.romanMaleSurnames }>> -<<set setup.FutureSocieties = ["FSSupremacist", "FSSubjugationist", "FSRepopulationFocus", "FSRestart", "FSSubjugationist", "FSGenderRadicalist", "FSGenderFundamentalist", "FSPaternalist", "FSDegradationist", "FSBodyPurist", "FSTransformationFetishist", "FSYouthPreferentialist", "FSMaturityPreferentialist", "FSSlimnessEnthusiast", "FSAssetExpansionist", "FSPastoralist", "FSPhysicalIdealist", "FSHedonisticDecadence", "FSChattelReligionist", "FSRomanRevivalist", "FSAztecRevivalist", "FSEgyptianRevivalist", "FSEdoRevivalist", "FSArabianRevivalist", "FSChineseRevivalist", "FSNull"]>> +<<set setup.FutureSocieties = ["FSSupremacist", "FSSubjugationist", "FSRepopulationFocus", "FSRestart", "FSGenderRadicalist", "FSGenderFundamentalist", "FSPaternalist", "FSDegradationist", "FSBodyPurist", "FSTransformationFetishist", "FSYouthPreferentialist", "FSMaturityPreferentialist", "FSSlimnessEnthusiast", "FSAssetExpansionist", "FSPastoralist", "FSPhysicalIdealist", "FSHedonisticDecadence", "FSChattelReligionist", "FSRomanRevivalist", "FSAztecRevivalist", "FSEgyptianRevivalist", "FSEdoRevivalist", "FSArabianRevivalist", "FSChineseRevivalist", "FSNull"]>> <<set setup.ArcologyNamesSupremacistAmerindian = ["Akilineq", "Amerindia", "Aquadoctan", "Cahokia", "Caral", "Chicora", "Cusco", "Indigenismo", "Norumbega", "Paititi", "Porcupine", "Red Power", "Saguenay", "The Confederated Tribes"]>> <<set setup.ArcologyNamesSupremacistAsian = ["Eastern Sun", "Jade Empire", "Kalapa", "Mahoroba", "Penglai", "Shambhala", "Shangri-La", "Sinosphere", "The Celestial Temple", "Tian", "Zhonghua Minzu"]>> diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 9d50eb673d1..6715646e5b6 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -212,6 +212,9 @@ <<if def $minimumChildAge>> <<unset $minimumChildAge>> <</if>> +<<if def $customValue>> + <<unset $customValue>> +<</if>> /* pregmod stuff */ diff --git a/src/uncategorized/corporationDevelopments.tw b/src/uncategorized/corporationDevelopments.tw index 46bcab1e9af..ea5fc7730a9 100644 --- a/src/uncategorized/corporationDevelopments.tw +++ b/src/uncategorized/corporationDevelopments.tw @@ -166,13 +166,6 @@ You hold <<print commaNum($personalShares)>> shares valued at @@.yellowgreen;<<p <<set _PrivateOwnershipPercentage = Math.trunc(($personalShares/_totalShares)*100)>> <<set _PublicOwnershipPercentage = Math.trunc(($publicShares/_totalShares)*100)>> -<<if $personalShares-20000 > $publicShares || $personalShares-20000 > $publicShares || $cash > $sharePrice*20000 || ($publicShares > 20000 && $cash >= $sharePrice*20000)>> - <<if ndef $customValue>> - <<set $customValue = 21000>> - <</if>> - <br><br>Custom amount:<<textbox "$customValue" $customValue "Corporation Developments">> <<print commaNum($customValue)>> -<</if>> - <span id="CorpAction"> <br><br> <<if _PrivateOwnershipPercentage < 51>>//You cannot give up majority control.// @@ -233,17 +226,6 @@ You hold <<print commaNum($personalShares)>> shares valued at @@.yellowgreen;<<p <</replace>> <</link>> <</if>> - <<if $personalShares-$customValue > $publicShares>> - | <<link "<<print commaNum($customValue)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>@@">> - <<set $personalShares -= $customValue>> - <<set $publicShares += $customValue>> - <<set $cash += Math.ceil(($sharePrice*$customValue)*$customValue/100)>> - <<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>> - <<replace "#CorpAction">> - <br>You sold <<print commaNum($customValue)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>,@@ driving the share price down significantly. - <</replace>> - <</link>> - <</if>> <<else>> //You cannot give up majority control.// <</if>> @@ -298,16 +280,6 @@ You hold <<print commaNum($personalShares)>> shares valued at @@.yellowgreen;<<p <</replace>> <</link>> <</if>> - <<if $personalShares-$customValue > $publicShares>> - | <<link "<<print commaNum($customValue)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>@@">> - <<set $publicShares += $customValue>> - <<set $corpCash += Math.ceil(($sharePrice*$customValue)*$customValue/100)>> - <<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>> - <<replace "#CorpAction">> - <br>The corporation issued <<print commaNum($customValue)>> new shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>@@ driving the share price down significantly. - <</replace>> - <</link>> - <</if>> <<else>> //You cannot give up majority control.// <</if>> @@ -371,17 +343,6 @@ You hold <<print commaNum($personalShares)>> shares valued at @@.yellowgreen;<<p <</replace>> <</link>> <</if>> - <<if $cash > $sharePrice*$customValue>> - | <<link "<<print commaNum($customValue)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>@@">> - <<set $personalShares += $customValue>> - <<set $cash -= Math.ceil(($sharePrice*$customValue)*$customValue/100)>> - <<set $corpCash += Math.ceil(($sharePrice*20000)*$customValue/10)>> - <<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>> - <<replace "#CorpAction">> - <br>You purchased <<print commaNum($customValue)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>,@@ from the corporation driving the share price down significantly. - <</replace>> - <</link>> - <</if>> <<else>> //You are unable to purchase <<print commaNum(1000)>> shares at the current share price, valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@.// <</if>> @@ -437,16 +398,6 @@ You hold <<print commaNum($personalShares)>> shares valued at @@.yellowgreen;<<p <</replace>> <</link>> <</if>> - <<if $publicShares > $customValue && $cash >= $sharePrice*$customValue>> - | <<link "<<print commaNum($customValue)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>@@">> <<set $personalShares += $customValue>> - <<set $publicShares -= $customValue>> - <<set $cash -= Math.ceil(($sharePrice*$customValue)*$customValue/100)>> - <<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>> - <<replace "#CorpAction">> - <br>You bought <<print commaNum($customValue)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>,@@ driving the share price up significantly. - <</replace>> - <</link>> - <</if>> <<elseif $publicShares > 1000>> //You are unable to purchase <<print commaNum(1000)>> shares at the current share price, valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@.// <<else>> @@ -503,16 +454,6 @@ You hold <<print commaNum($personalShares)>> shares valued at @@.yellowgreen;<<p <</replace>> <</link>> <</if>> - <<if $publicShares > $customValue && $corpCash >= $sharePrice*$customValue>> - | <<link "<<print commaNum($customValue)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>@@">> - <<set $publicShares -= $customValue>> - <<set $corpCash -= Math.ceil(($sharePrice*$customValue)*$customValue/100)>> - <<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>> - <<replace "#CorpAction">> - <br>The corporation bought back <<print commaNum($customValue)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil(($sharePrice*$customValue)*$customValue/100))>>,@@ driving the share price up significantly. - <</replace>> - <</link>> - <</if>> <<elseif $publicShares > 1000>> //The corporation is unable to purchase <<print commaNum(1000)>> shares at the current share price, valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@.// <<else>> -- GitLab