diff --git a/data/entities.yaml b/data/entities.yaml index cb1f03737..d8d165148 100644 --- a/data/entities.yaml +++ b/data/entities.yaml @@ -161,6 +161,33 @@ - An iron vein that can be actively mined to produce iron ore. properties: [] +- name: quartz + display: + attr: quartz + char: 'Q' + description: + - Raw quartz crystals. Useful for creating devices like clocks, and + can be processed to extract silicon. + - It can only be mined by drilling in the mountains. + properties: [portable] + +- name: quartz mine + display: + attr: quartz + char: 'Å' + description: + - An quartz vein that can be actively mined to produce quartz. + properties: [] + +- name: silicon + display: + attr: quartz + char: 'S' + description: + - Extracted by processing quartz at high temperatures, silicon can + be used to construct integrated circuits. + properties: [portable] + - name: furnace display: attr: fire @@ -169,6 +196,15 @@ - A furnace can be used to turn metal ore into various useful products. properties: [portable] +- name: big furnace + display: + attr: fire + char: '#' + description: + - A big furnace can get even hotter than a normal furnace, and can be used + to process quartz into silicon. + properties: [portable] + - name: small motor display: attr: entity @@ -287,6 +323,50 @@ properties: [portable, growable] growth: [1000, 1500] +- name: pixel (R) + display: + attr: red + char: '.' + description: + - A pixel. + properties: [portable, growable] + growth: [1000, 1500] + +- name: pixel (G) + display: + attr: green + char: '.' + description: + - A pixel. + properties: [portable, growable] + growth: [1000, 1500] + +- name: pixel (B) + display: + attr: blue + char: '.' + description: + - A pixel. + properties: [portable, growable] + growth: [1000, 1500] + +- name: camera + display: + attr: device + char: '@' + description: + - A camera. + properties: [portable] + +- name: circuit + display: + attr: plant + char: '#' + description: + - | + A circuit is needed for constructing "smart" devices. + properties: [portable] + - name: drill bit display: attr: entity @@ -311,6 +391,15 @@ - A wooden gear. properties: [portable] +- name: teeter-totter + display: + attr: wood + char: '/' + description: + - A rotating board apparently popular with young aliens. Perhaps it + could also be used as a primitive balance scale. + properties: [portable] + - name: iron gear display: attr: iron @@ -638,4 +727,23 @@ - "Example:" - "turn west; move; turn north" properties: [portable] - capabilities: [orient] \ No newline at end of file + capabilities: [orient] + +- name: clock + display: + attr: device + char: '0' + description: + - A clock is a device for keeping track of time. + properties: [portable] + +- name: comparator + display: + attr: device + char: '>' + description: + - "A comparator allows comparing two values to see whether the first + is less, equal, or greater than the second." + - "Valid comparison operators are <, <=, >, >=, ==, and !=." + properties: [portable] + capabilities: [compare] \ No newline at end of file diff --git a/data/recipes.yaml b/data/recipes.yaml index 9a3976529..1dd6fd5d8 100644 --- a/data/recipes.yaml +++ b/data/recipes.yaml @@ -44,6 +44,18 @@ out: - [1, wooden gear] +- in: + - [1, board] + - [2, wooden gear] + out: + - [1, teeter-totter] + +- in: + - [1, teeter-totter] + - [2, copper wire] + out: + - [1, comparator] + ######################################### ## BITS ## ######################################### @@ -82,6 +94,23 @@ time: 9 weight: 1 +- in: + - [1, boulder] + out: + - [3, rock] + required: + - [1, metal drill] + time: 3 + weight: 3 + +- in: + - [1, boulder] + out: + - [4, rock] + required: + - [1, metal drill] + time: 3 + weight: 3 - in: - [1, mountain] @@ -91,7 +120,7 @@ required: - [1, drill] time: 90 - weight: 8 + weight: 16 - in: - [1, mountain] @@ -101,13 +130,19 @@ required: - [1, metal drill] time: 9 - weight: 8 + weight: 16 - in: - [5, rock] out: - [1, furnace] +- in: + - [10, rock] + - [10, solar panel] + out: + - [1, big furnace] + ######################################### ## METAL ## ######################################### @@ -122,7 +157,7 @@ required: - [1, drill] time: 42 - weight: 1 + weight: 2 - in: - [1, mountain] @@ -132,6 +167,16 @@ required: - [1, drill] time: 64 + weight: 2 + +- in: + - [1, mountain] + out: + - [1, quartz mine] + - [1, quartz] + required: + - [1, drill] + time: 64 weight: 1 - in: @@ -154,6 +199,16 @@ time: 7 weight: 1 +- in: + - [1, mountain] + out: + - [1, quartz mine] + - [1, quartz] + required: + - [1, metal drill] + time: 7 + weight: 1 + ## MINES - in: @@ -174,6 +229,15 @@ - [1, drill] time: 64 +- in: + - [1, quartz mine] + out: + - [1, quartz] + - [1, quartz mine] + required: + - [1, drill] + time: 64 + - in: - [1, copper mine] out: @@ -192,6 +256,15 @@ - [1, metal drill] time: 7 +- in: + - [1, quartz mine] + out: + - [1, quartz] + - [1, quartz mine] + required: + - [1, metal drill] + time: 7 + ## SMELTING - in: @@ -265,6 +338,51 @@ out: - [1, strange loop] +######################################### +## QUARTZ + SILICON ## +######################################### + +- in: + - [4, quartz] + out: + - [1, silicon] + required: + - [1, big furnace] + +- in: + - [1, quartz] + - [32, iron gear] + - [1, glass] + out: + - [1, clock] + +- in: + - [4, silicon] + - [1, strange loop] + - [16, copper wire] + - [8, bit (0)] + - [8, bit (1)] + out: + - [1, circuit] + +######################################### +## PIXELS ## +######################################### + +- in: + - [1, glass] + - [10, pixel (R)] + - [10, pixel (G)] + - [10, pixel (B)] + out: + - [1, camera] + +- in: + - [1, camera] + - [1, circuit] + out: + - [1, scanner] + ######################################### ## SAND ## ######################################### diff --git a/src/Swarm/Game/WorldGen.hs b/src/Swarm/Game/WorldGen.hs index 3c08f24d7..ea6555670 100644 --- a/src/Swarm/Game/WorldGen.hs +++ b/src/Swarm/Game/WorldGen.hs @@ -79,6 +79,7 @@ testWorld2 baseSeed (Coords ix@(r, c)) = | otherwise = (DirtT, Nothing) genBiome Small Hard Artificial | h `mod` 120 == 1 = (StoneT, Just "lambda") + | h `mod` 50 == 0 = (StoneT, Just (T.concat ["pixel (", from ["RGB" !! fromIntegral ((r + c) `mod` 3)], ")"])) | otherwise = (StoneT, Nothing) genBiome Big Hard Artificial | sample ix cl0 > 0.85 = (StoneT, Just "copper ore") diff --git a/src/Swarm/TUI/Attr.hs b/src/Swarm/TUI/Attr.hs index 509e84ade..950fe79b9 100644 --- a/src/Swarm/TUI/Attr.hs +++ b/src/Swarm/TUI/Attr.hs @@ -40,9 +40,13 @@ swarmAttrMap = , (copperAttr', fg (V.rgbColor @Int 78 117 102)) , (ironAttr, fg (V.rgbColor @Int 97 102 106)) , (ironAttr', fg (V.rgbColor @Int 183 65 14)) + , (quartzAttr, fg V.white) , (snowAttr, fg V.white) , (sandAttr, fg (V.rgbColor @Int 194 178 128)) , (fireAttr, fg V.red `V.withStyle` V.bold) + , (redAttr, fg V.red) + , (greenAttr, fg V.green) + , (blueAttr, fg V.blue) , (deviceAttr, fg V.yellow `V.withStyle` V.bold) , -- Terrain attributes (dirtAttr, fg (V.rgbColor @Int 165 42 42)) @@ -70,11 +74,15 @@ robotAttr , copperAttr' , ironAttr , ironAttr' + , quartzAttr , snowAttr , sandAttr , rockAttr , baseAttr , fireAttr + , redAttr + , greenAttr + , blueAttr , woodAttr , deviceAttr , dirtAttr @@ -100,9 +108,13 @@ copperAttr = "copper" copperAttr' = "copper'" ironAttr = "iron" ironAttr' = "iron'" +quartzAttr = "quartz" snowAttr = "snow" sandAttr = "sand" fireAttr = "fire" +redAttr = "red" +greenAttr = "green" +blueAttr = "blue" rockAttr = "rock" woodAttr = "wood" baseAttr = "base"