Sfoglia il codice sorgente

Merge branch 'master' of https://github.com/Civ13/Civ14

Taislin 5 mesi fa
parent
commit
23f8ed5772

+ 9 - 3
Content.Server/Civ14/Dirt/DiggingSystem.cs

@@ -23,7 +23,8 @@ public sealed partial class DiggingSystem : EntitySystem
     {
         { "FloorDirt", "FloorDirtDigged_1" },
         { "FloorDirtDigged_1", "FloorDirtDigged_2" },
-        { "FloorDirtDigged_2", "FloorDirtDigged_3" }
+        { "FloorDirtDigged_2", "FloorDirtDigged_3" },
+        { "FloorSand", "FloorSand" }
     };
 
     public override void Initialize()
@@ -98,9 +99,14 @@ private void OnDoAfter(Entity<DiggingComponent> ent, ref DigDoAfterEvent args)
         _map.SetTile(gridUid, grid, snapPos, new Tile(nextTile.TileId));
 
         var coordinates = grid.GridTileToLocal(snapPos);
-        Spawn("MaterialDirt1", coordinates);
+        var result = "MaterialDirt1";
+        if (tileDef.ID == "FloorSand")
+        {
+            result = "MaterialSand1";
+        }
+        Spawn(result, coordinates);
 
         _popup.PopupEntity("You finish digging the soil.", ent, args.User);
         args.Handled = true;
     }
-}
+}

+ 1 - 0
Resources/Locale/en-US/materials/materials.ftl

@@ -41,6 +41,7 @@ materials-raw-silver = raw silver
 materials-raw-plasma = raw plasma
 materials-raw-uranium = raw uranium
 materials-raw-copper = raw copper
+materials-raw-sand = sand
 materials-raw-tin = raw tin
 materials-raw-bananium = raw bananium
 materials-raw-salt = raw salt

+ 9 - 1
Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml

@@ -45,6 +45,7 @@
     - IngotSilver
     - IngotGold
     - IngotBronze
+    - Glass
 
 - type: latheRecipe
   id: IngotGold
@@ -139,4 +140,11 @@
   completetime: 2
   materials:
     RawIron: 100
-# forge
+
+- type: latheRecipe
+  id: Glass
+  result: SheetGlass1
+  icon: { sprite: "/Textures/Objects/Materials/Sheets/glass.rsi", state: glass }
+  completetime: 2
+  materials:
+    RawSand: 100

+ 2 - 2
Resources/Prototypes/Civ14/Recipes/Chemical/brewing.yml

@@ -63,8 +63,8 @@
           completed:
             - !type:SnapToGrid
           steps:
-            - material: WoodPlank
-              amount: 3
+            - material: Glass
+              amount: 2
               doAfter: 6
     - node: end
       entity: StarterJar

+ 43 - 0
Resources/Prototypes/Entities/Objects/Materials/ore.yml

@@ -309,6 +309,49 @@
     - type: Stack
       count: 1
 
+- type: entity
+  parent: OreBase
+  id: MaterialSand
+  name: sand
+  suffix: Full
+  components:
+    - type: Sprite
+      sprite: Objects/Materials/materials.rsi
+      state: sheet-sand
+      layers:
+        - state: sheet-sand
+          map: ["base"]
+    - type: Stack
+      stackType: Sand
+      baseLayer: base
+      layerStates:
+        - sheet-sand
+        - sheet-sand_2
+        - sheet-sand_3
+    - type: Material
+    - type: Appearance
+    - type: Item
+      sprite: Objects/Materials/materials.rsi
+      heldPrefix: sand
+    - type: PhysicalComposition
+      materialComposition:
+        RawSand: 100
+- type: entity
+  parent: MaterialSand
+  id: MaterialSand10
+  suffix: 10
+  components:
+    - type: Stack
+      count: 10
+
+- type: entity
+  parent: MaterialSand
+  id: MaterialSand1
+  suffix: Single
+  components:
+    - type: Stack
+      count: 1
+
 - type: entity
   parent: OreBase
   id: Coal

+ 8 - 0
Resources/Prototypes/Reagents/Materials/ores.yml

@@ -85,3 +85,11 @@
   unit: materials-unit-chunk
   icon: { sprite: Civ14/Objects/mining.rsi, state: ore_copper }
   price: 0.05
+
+- type: material
+  id: RawSand
+  stackEntity: MaterialSand1
+  name: materials-raw-sand
+  unit: materials-unit-chunk
+  icon: { sprite: Objects/Materials/materials.rsi, state: sheet-sand }
+  price: 0.01

+ 7 - 0
Resources/Prototypes/Stacks/Materials/Civ14/materials.yml

@@ -47,6 +47,13 @@
   spawn: MaterialSandstone1
   maxCount: 20
 
+- type: stack
+  id: Sand
+  name: sand
+  icon: { sprite: /Textures/Objects/Materials/materials.rsi, state: sheet-sand }
+  spawn: MaterialSand1
+  maxCount: 20
+
 - type: stack
   id: Rope
   name: rope

+ 9 - 0
Resources/Textures/Objects/Materials/materials.rsi/meta.json

@@ -381,6 +381,15 @@
         {
             "name": "sheet-sandstone_3"
         },
+        {
+            "name": "sheet-sand"
+        },
+        {
+            "name": "sheet-sand_2"
+        },
+        {
+            "name": "sheet-sand_3"
+        },
         {
             "name": "logs"
         },

BIN
Resources/Textures/Objects/Materials/materials.rsi/sheet-sand.png


BIN
Resources/Textures/Objects/Materials/materials.rsi/sheet-sand_2.png


BIN
Resources/Textures/Objects/Materials/materials.rsi/sheet-sand_3.png