diff options
| author | troido <troido@protonmail.com> | 2020-02-07 20:47:31 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-07 20:47:31 +0100 |
| commit | dba0dc6fec712568dd89ea467780fee7c06997c8 (patch) | |
| tree | 29d8c2d3c049491c47a94ecf8578b807d2165375 /src/main.rs | |
| parent | 8675ea5ad1b9bd5ea727c0c8cd6eaf485ca28c05 (diff) | |
added more game objects
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 127 |
1 files changed, 105 insertions, 22 deletions
diff --git a/src/main.rs b/src/main.rs index 77b6ca2..65d744a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -74,32 +74,40 @@ fn gen_room<'a, 'b>() -> Room<'a, 'b> { "height": 22, "spawn": [5, 15], "field": [ - "##########################################", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "# ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#", - "#####,,,##################################" + "XXXXXXXXXXXXXXXXX~~~XXXXXXXXXXXXXXXXXXXXXX", + "X,,,,,,,,,,,,,,,,~~~,,,,,,,,,,,,,,,,,,,,,X", + "X,,,,,,,,,,,,,,,,~~~,,,,,,,,,,,,,,,,,,,,,X", + "X,,,,,,,,,,,,,,,,~~~~,,,,,,,,,,,,,,,,,,,,X", + "X,,,,,,,,,,,,,,,,,~~~,,,,,,,,,,,,,,,,,,,,X", + "X,,,,,,,,,,,,,,,,,~~~,,,,,,,,,,,,,,,,,,,,X", + "X,,,,,,,,,,,,,,,,,~~~,,,,,,,,,,,,,,,,,,,,X", + "X,,,,,,,,,,,,,,,,,~~~,,,,,,,,,,,,,,,,,,,,X", + "X,,,,,,,,,,,,,,,,,~~~~,,,,,,T,,,,,,,,,,,,X", + "X,,,,,,,,,,,,,,,,,,~~~,,,,,,,,,,,,,,,,,,,X", + "X,,,,,,,,,,,,,,,,,,~~~,,,,,T,,,,######,,,X", + "X,,,,,,,,,,,,,,,,,,bbb,,,,,,,,,,#++++#,,,X", + "X,,,,,.............bbb...........++++#,,,X", + "X,,,,,.,,,,,,,,,,,,bbb,,,,,,,,,,#++++#,,,X", + "X,,,,,.,,,,,,,,,,,,~~~,,,T,,,T,,#++++#,,,X", + "X,,,,,.,,,, ,,,,,~~~,,,,,,,,,,######,,,X", + "X,,,,,.,,,, ,,,,~~~~,,,,,,,,,,f,,,,f,,,X", + "X,,,,,.,,,, ,,,,~~~''''''''''''''''f'''X", + "X,,,,,.,,,,,,,,,,,~~~'''''''''''f''''f'''X", + "X,,,,,.,,,,,,,,,,,~~~'''''''''''ffffff'''X", + "X,,,,,.,,,,,,,,,,,~~~''''''''''''''''''''X", + "XXXXX,.,XXXXXXXXXX~~~XXXXXXXXXXXXXXXXXXXXX" ], "mapping": { "#": "wall", ",": "grass", + ".": "ground", + "~": "water", + "b": "bridge", + "+": "floor", + "'": "greengrass", + "T": ["grass", "tree"], + "f": ["grass", "fence"], + "X": "rock", " ": [] } })).unwrap(); @@ -118,6 +126,33 @@ fn default_assemblages() -> Encyclopedia { }] ] }, + "rock": { + "components": [ + ["Blocking", {}], + ["Visible", { + "sprite": ["string", "rock"], + "height": ["float", 10.0] + }] + ] + }, + "tree": { + "components": [ + ["Blocking", {}], + ["Visible", { + "sprite": ["string", "tree"], + "height": ["float", 3.0] + }] + ] + }, + "fence": { + "components": [ + ["Blocking", {}], + ["Visible", { + "sprite": ["string", "fence"], + "height": ["float", 1.0] + }] + ] + }, "grass": { "components": [ ["Visible", { @@ -135,6 +170,54 @@ fn default_assemblages() -> Encyclopedia { ["Floor", {}] ] }, + "greengrass": { + "components": [ + ["Visible", { + "sprite": ["random", [ + ["string", "grass1"], + ["string", "grass2"], + ["string", "grass3"] + ]], + "height": ["float", 0.1] + }], + ["Floor", {}] + ] + }, + "ground": { + "components": [ + ["Visible", { + "sprite": ["string", "ground"], + "height": ["float", 0.1] + }], + ["Floor", {}] + ] + }, + "floor": { + "components": [ + ["Visible", { + "sprite": ["string", "floor"], + "height": ["float", 0.1] + }], + ["Floor", {}] + ] + }, + "bridge": { + "components": [ + ["Visible", { + "sprite": ["string", "bridge"], + "height": ["float", 0.1] + }], + ["Floor", {}] + ] + }, + "water": { + "components": [ + ["Visible", { + "sprite": ["string", "water"], + "height": ["float", 0.1] + }] + ] + }, "player": { "arguments": [["name", "string", null]], "components": [ |
