Forráskód Böngészése

Playtest fixes (#114)

* stone stack, sprite fix for braziers

* deepwater in mapgeneration

* anvil and kiln recipes, fuel burn (attempted) fix
Taislin 7 hónapja
szülő
commit
a78d088869

+ 7 - 15
Content.Server/Civ14/Kitchen/GrillFuelBurnSystem.cs

@@ -26,8 +26,6 @@ public sealed class GrillFuelBurnSystem : EntitySystem
 
     [Dependency] private readonly SharedPointLightSystem _pointLightSystem = default!;
 
-    private readonly Dictionary<EntityUid, float> _remainingBurnTime = new();
-
     public override void Initialize()
     {
         base.Initialize();
@@ -39,7 +37,6 @@ public override void Initialize()
 
     private void OnMapInit(EntityUid uid, GrillFuelBurnComponent component, MapInitEvent args)
     {
-        _remainingBurnTime[uid] = component.Fuel * 2f * 60f;
         component.IsLit = false;
     }
 
@@ -52,7 +49,7 @@ private void OnInteractUsing(EntityUid uid, GrillFuelBurnComponent comp, Interac
     {
         if (_entityManager.TryGetComponent<IgnitionSourceComponent>(args.Used, out var ignitionSource))
         {
-            if (!comp.IsLit && ignitionSource.Ignited && _remainingBurnTime[uid] > 0)
+            if (!comp.IsLit && ignitionSource.Ignited && comp.Fuel > 0)
             {
                 comp.IsLit = true;
                 AdjustHeaterSetting(uid, comp);
@@ -77,10 +74,8 @@ private void OnInteractUsing(EntityUid uid, GrillFuelBurnComponent comp, Interac
 
             if (fuelToAdd > 0)
             {
-                comp.Fuel += fuelToAdd;
-                _remainingBurnTime[uid] += fuelToAdd * burnFuel.BurnTime * 60f;
+                comp.Fuel += fuelToAdd * burnFuel.BurnTime;
                 _stackSystem.SetCount(args.Used, stackComp.Count - (int)fuelToAdd, stackComp);
-
                 if (stackComp.Count <= 0)
                 {
                     QueueDel(args.Used);
@@ -94,8 +89,7 @@ private void OnInteractUsing(EntityUid uid, GrillFuelBurnComponent comp, Interac
         {
             if (comp.Fuel < comp.MaxFuel)
             {
-                comp.Fuel++;
-                _remainingBurnTime[uid] += burnFuel.BurnTime * 60f;
+                comp.Fuel += burnFuel.BurnTime;
                 QueueDel(args.Used);
                 AdjustHeaterSetting(uid, comp);
                 args.Handled = true;
@@ -110,9 +104,8 @@ public override void Update(float deltaTime)
         {
             if (comp.IsLit)
             {
-                if (comp.Fuel <= 0 || _remainingBurnTime.GetValueOrDefault(uid) <= 0)
+                if (comp.Fuel <= 0)
                 {
-                    _remainingBurnTime.Remove(uid);
                     comp.IsLit = false;
                     AdjustHeaterSetting(uid, comp);
                     if (comp.Expends == true)
@@ -124,8 +117,7 @@ public override void Update(float deltaTime)
                     continue;
                 }
 
-                _remainingBurnTime[uid] -= deltaTime;
-                comp.Fuel -= deltaTime/60f;
+                comp.Fuel -= deltaTime / 60f;
                 AdjustHeaterSetting(uid, comp);
 
                 if (comp.Setting != EntityHeaterSetting.Off)
@@ -145,7 +137,7 @@ private void OnExamined(EntityUid uid, GrillFuelBurnComponent comp, ExaminedEven
         if (!args.IsInDetailsRange)
             return;
 
-        var remainingTime = _remainingBurnTime.GetValueOrDefault(uid) / 60f;
+        var remainingTime = comp.Fuel;
         args.PushMarkup($"Has approximately {remainingTime:F1} minutes of fuel remaining.");
     }
 
@@ -198,7 +190,7 @@ private void AdjustHeaterSetting(EntityUid uid, GrillFuelBurnComponent comp)
             return;
         }
 
-        var remainingTimeSeconds = _remainingBurnTime.GetValueOrDefault(uid);
+        var remainingTimeSeconds = comp.Fuel * 60f;
         EntityHeaterSetting newSetting;
 
         if (remainingTimeSeconds > 600f) // > 10 minutes

+ 1 - 1
Content.Shared/CCVar/CCVars.Admin.Rules.cs

@@ -8,7 +8,7 @@ public sealed partial class CCVars
     ///     Time that players have to wait before rules can be accepted.
     /// </summary>
     public static readonly CVarDef<float> RulesWaitTime =
-        CVarDef.Create("rules.time", 45f, CVar.SERVER | CVar.REPLICATED);
+        CVarDef.Create("rules.time", 20f, CVar.SERVER | CVar.REPLICATED);
 
     /// <summary>
     ///     Don't show rules to localhost/loopback interface.

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
Resources/Maps/civ/nomads_classic.yml


+ 3 - 0
Resources/Prototypes/Civ14/Entities/Structures/Craft/anvil.yml

@@ -27,6 +27,9 @@
         tags:
           - Sheet
           - Ingot
+    - type: Construction
+      graph: AnvilStone
+      node: end
 
 - type: latheCategory
   id: AnvilBronze

+ 3 - 0
Resources/Prototypes/Civ14/Entities/Structures/Craft/fletchers.yml

@@ -27,6 +27,9 @@
           - Sheet
           - RawMaterial
           - Ingot
+    - type: Construction
+      graph: FletchersWorkstation
+      node: end
 
 - type: latheCategory
   id: Fletcher

+ 6 - 0
Resources/Prototypes/Civ14/Entities/Structures/Craft/metallurgy.yml

@@ -33,6 +33,9 @@
       runningState: stone_kiln_on
       staticPacks:
         - StoneKiln
+    - type: Construction
+      graph: StoneKiln
+      node: end
 
 - type: latheRecipePack
   id: StoneKiln
@@ -120,6 +123,9 @@
       runningState: bloomery_on
       staticPacks:
         - Bloomery
+    - type: Construction
+      graph: Bloomery
+      node: end
 
 - type: latheRecipePack
   id: Bloomery

+ 31 - 2
Resources/Prototypes/Civ14/Recipes/Construction/metallurgy.yml

@@ -9,7 +9,6 @@
             - material: Stone
               amount: 25
               doAfter: 15
-
     - node: end
       entity: StoneKiln
 
@@ -41,7 +40,6 @@
             - material: Stone
               amount: 25
               doAfter: 15
-
     - node: end
       entity: Bloomery
 
@@ -61,3 +59,34 @@
   canBuildInImpassable: false
   conditions:
     - !type:TileNotBlocked
+
+- type: constructionGraph
+  id: StoneAnvil
+  start: start
+  graph:
+    - node: start
+      edges:
+        - to: end
+          steps:
+            - material: Stone
+              amount: 20
+              doAfter: 15
+    - node: end
+      entity: StoneAnvil
+
+- type: construction
+  name: stone anvil
+  id: AnvilStone
+  graph: AnvilStone
+  startNode: start
+  targetNode: end
+  category: construction-category-production
+  description: A metalworking tool to produce weapons and armours.
+  icon: { sprite: Civ14/Objects/metallurgy.rsi, state: stone_anvil }
+  objectType: Structure
+  agemin: 0
+  agemax: 8
+  placementMode: SnapgridCenter
+  canBuildInImpassable: false
+  conditions:
+    - !type:TileNotBlocked

+ 2 - 2
Resources/Prototypes/Entities/Tiles/water.yml

@@ -72,10 +72,10 @@
   description: Freshwater. Looks quite deep.
   components:
     - type: Sprite
-      sprite: Tiles/Planet/water.rsi
+      sprite: Tiles/Planet/water_deep.rsi
       drawdepth: BelowFloor
       layers:
-        - state: jungle1
+        - state: full
     - type: Fixtures
       fixtures:
         fix1:

+ 1 - 1
Resources/Prototypes/Stacks/Materials/Civ14/materials.yml

@@ -38,7 +38,7 @@
   name: stone
   icon: { sprite: /Textures/Objects/Materials/materials.rsi, state: stone }
   spawn: MaterialStone1
-  maxCount: 20
+  maxCount: 25
 
 - type: stack
   id: Sandstone

BIN
Resources/Textures/Civ14/Objects/structures.rsi/s_brazier2.png


BIN
Resources/Textures/Tiles/Planet/water_deep.rsi/full.png


+ 46 - 0
Resources/Textures/Tiles/Planet/water_deep.rsi/meta.json

@@ -0,0 +1,46 @@
+{
+    "version": 1,
+    "license": "CC-BY-SA-3.0",
+    "copyright": "Created by Valithor for Space Station 14",
+    "size": {
+    "x": 32,
+    "y": 32
+    },
+    "states": [
+    {
+        "name": "full"
+    },
+    {
+        "name": "water0",
+        "directions": 4
+    },
+    {
+        "name": "water1",
+        "directions": 4
+    },
+    {
+        "name": "water2",
+        "directions": 4
+    },
+    {
+        "name": "water3",
+        "directions": 4
+    },
+    {
+        "name": "water4",
+        "directions": 4
+    },
+    {
+        "name": "water5",
+        "directions": 4
+    },
+    {
+        "name": "water6",
+        "directions": 4
+    },
+    {
+        "name": "water7",
+        "directions": 4
+    }
+    ]
+}

BIN
Resources/Textures/Tiles/Planet/water_deep.rsi/water0.png


BIN
Resources/Textures/Tiles/Planet/water_deep.rsi/water1.png


BIN
Resources/Textures/Tiles/Planet/water_deep.rsi/water2.png


BIN
Resources/Textures/Tiles/Planet/water_deep.rsi/water3.png


BIN
Resources/Textures/Tiles/Planet/water_deep.rsi/water4.png


BIN
Resources/Textures/Tiles/Planet/water_deep.rsi/water5.png


BIN
Resources/Textures/Tiles/Planet/water_deep.rsi/water6.png


BIN
Resources/Textures/Tiles/Planet/water_deep.rsi/water7.png


+ 13 - 0
mapGeneration.py

@@ -869,6 +869,19 @@ MAP_CONFIG = [
         "priority": 10,
         "seed_key": "river_noise",
     },
+    {  # Deep River Water (in the middle)
+        "type": "BiomeEntityLayer",
+        "entity_protos": "FloorWaterDeepEntity",  # The deep water entity
+        "noise_type": NoiseType.NoiseType_OpenSimplex2,  # Same noise type as river
+        "octaves": 1,  # Same octaves as river
+        "fractal_lacunarity": 1.50,  # Same lacunarity as river
+        "frequency": 0.003,  # Same frequency as river
+        "fractal_type": FractalType.FractalType_Ridged,  # Same fractal type as river
+        "threshold": 0.975,  # HIGHER threshold than river (adjust if needed)
+        "tile_condition": lambda tile: True,  # Place wherever noise is high enough
+        "priority": 11,  # HIGHER priority than river (to overwrite)
+        "seed_key": "river_noise",  # MUST use the same noise seed as river
+    },
     {  # River sand
         "type": "BiomeTileLayer",
         "tile_type": "FloorSand",

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott