Skip to content

Commit

Permalink
Feature request #9328 (#10416)
Browse files Browse the repository at this point in the history
* Added support resource columns

Feature request #9328.

* Filling support columns in Resource table

Feature request #9328
  • Loading branch information
adaneslavo authored Nov 2, 2023
1 parent 604f113 commit 74cb1b9
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,12 @@ ALTER TABLE Resources ADD COLUMN 'MonopolyHealBonus' INTEGER DEFAULT 0;
ALTER TABLE Resources ADD COLUMN 'MonopolyXPBonus' INTEGER DEFAULT 0;
ALTER TABLE Resources ADD COLUMN 'IsMonopoly' BOOLEAN DEFAULT 0;

-- Support column for SQL querries (they do nothing in the DLL, used mostly by modmods)
ALTER TABLE Resources ADD COLUMN 'SeaResource' BOOLEAN DEFAULT 0;
ALTER TABLE Resources ADD COLUMN 'AnimalResource' BOOLEAN DEFAULT 0;
ALTER TABLE Resources ADD COLUMN 'PlantResource' BOOLEAN DEFAULT 0;
ALTER TABLE Resources ADD COLUMN 'RockResource' BOOLEAN DEFAULT 0;

-- Cooldowns for Units/Buildings
ALTER TABLE Units ADD COLUMN 'PurchaseCooldown' INTEGER DEFAULT 0;
-- Affects only the city the unit is purchased from (works like PurchaseCooldown for faith purchases)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,72 @@ UPDATE Resources
SET PolicyReveal = 'POLICY_AESTHETICS_FINISHER'
WHERE Type = 'RESOURCE_HIDDEN_ARTIFACTS';

-- Setting resource types in support columns
-- Sea resources:
UPDATE Resources SET SeaResource = 1 WHERE Type = 'RESOURCE_CORAL';
UPDATE Resources SET SeaResource = 1 WHERE Type = 'RESOURCE_CRAB';
UPDATE Resources SET SeaResource = 1 WHERE Type = 'RESOURCE_FISH';
UPDATE Resources SET SeaResource = 1 WHERE Type = 'RESOURCE_PEARLS';
UPDATE Resources SET SeaResource = 1 WHERE Type = 'RESOURCE_WHALE';

-- Animal resources:
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_CORAL';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_BISON';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_COW';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_CRAB';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_DEER';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_FISH';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_HORSE';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_PEARLS';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_FUR';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_IVORY';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_SHEEP';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_SILK';
UPDATE Resources SET AnimalResource = 1 WHERE Type = 'RESOURCE_WHALE';

-- Plant resources:
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_BANANA';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_CITRUS';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_CLOVES';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_COCOA';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_NUTMEG';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_COTTON';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_PEPPER';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_SPICES';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_SUGAR';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_TRUFFLES';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_WHEAT';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_WINE';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_AMBER';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_BRAZILWOOD';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_COFFEE';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_MAIZE';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_OLIVE';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_RICE';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_TEA';
UPDATE Resources SET PlantResource = 1 WHERE Type = 'RESOURCE_TOBACCO';

-- Rock resources:
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_COAL';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_ALUMINUM';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_COPPER';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_GEMS';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_GOLD';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_IRON';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_MARBLE';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_SALT';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_SILVER';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_STONE';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_URANIUM';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_JADE';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_LAPIS';
UPDATE Resources SET RockResource = 1 WHERE Type = 'RESOURCE_AMBER';

-- Unassigned:
-- RESOURCE_OIL
-- RESOURCE_DYE, RESOURCE_INCENSE, RESOURCE_PERFUME
-- RESOURCE_JEWELRY, RESOURCE_PORCELAIN, RESOURCE_GLASS

--------------------------------------------------------------------------------------------
-- Resource building boosts (putting it here since it makes more sense tied to resources)
-- Using BuildingClass, uniques may update it again later
Expand Down

0 comments on commit 74cb1b9

Please sign in to comment.