• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

First Machine Age's Mods (Combined repo.)


Commit MetaInfo

Révision02a4d1e659ec67f0c5308a65e2a24bc38a629e5a (tree)
l'heure2021-08-04 08:38:28
Auteurmelchior <melchior@user...>
Commitermelchior

Message de Log

Defensive Stuff VS compat update

V.S. 1.15 update for 'Defensive Stuff'

Change Summary

Modification

--- a/Assorted/Assorted.csproj
+++ b/Assorted/Assorted.csproj
@@ -7,7 +7,7 @@
77 <OutputType>Library</OutputType>
88 <RootNamespace>FirstMachineAge</RootNamespace>
99 <AssemblyName>Assorted</AssemblyName>
10- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
10+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1111 </PropertyGroup>
1212 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1313 <DebugSymbols>true</DebugSymbols>
--- a/Assorted/BlockBehaviors/BlockBehaviorFreeReinforcement.cs
+++ b/Assorted/BlockBehaviors/BlockBehaviorFreeReinforcement.cs
@@ -7,6 +7,7 @@ using System.Threading.Tasks;
77 using Vintagestory.API;
88 using Vintagestory.API.Common;
99 using Vintagestory.API.Config;
10+using Vintagestory.API.Datastructures;
1011 using Vintagestory.API.MathTools;
1112 using Vintagestory.API.Server;
1213 using Vintagestory.GameContent;
--- a/Assorted/BlockBehaviors/BlockBehaviorNeedSides.cs
+++ b/Assorted/BlockBehaviors/BlockBehaviorNeedSides.cs
@@ -5,12 +5,14 @@ using System.Linq;
55
66 using Vintagestory.API;
77 using Vintagestory.API.Common;
8+using Vintagestory.API.Datastructures;
89 using Vintagestory.API.MathTools;
910
1011 namespace FirstMachineAge
1112 {
1213 public class BlockBehaviorNeedSides : BlockBehavior
1314 {
15+ private const string _applicableMatKey = @"applicableMaterials";
1416 public EnumBlockMaterial[ ] ApplicableMaterials { get; private set; }
1517
1618 public BlockBehaviorNeedSides(Block block) : base(block)
@@ -47,7 +49,7 @@ namespace FirstMachineAge
4749 {
4850 base.Initialize(properties);
4951
50- this.ApplicableMaterials = properties[@"applicableMaterials"].FromEnumStrings<EnumBlockMaterial>();
52+ this.ApplicableMaterials = properties[_applicableMatKey].FromEnumStrings<EnumBlockMaterial>();
5153
5254 }
5355
--- a/Assorted/BlockClasses/CollapsingBlock.cs
+++ b/Assorted/BlockClasses/CollapsingBlock.cs
@@ -142,23 +142,30 @@ namespace FirstMachineAge
142142 {
143143 if (api.Side.IsClient( )) {
144144 var capi = api as ICoreClientAPI;
145+
146+ //int color = capi.BlockTextureAtlas.GetRandomColor(this.TextureSubIdForBlockColor);
147+
145148 //Bits of broken block
149+ var particleProps = new SimpleParticleProperties
150+ (7, 12,
151+ 0x808080,
152+ pos.ToVec3d().Add(0.1, 0.75, 0.1),
153+ pos.ToVec3d().Add(0.7, 0.0, 0.7),
154+ Vec3f.Zero,
155+ Vec3f.Zero,
156+ 5, //life length
157+ 0.8f, //gravity effect
158+ 0.25f, 0.7f, //min size, max size
159+ EnumParticleModel.Cube); // quad or cube
146160
147- var particleProps = new SimpleParticleProperties(9, 12, this.GetRandomColor(api as ICoreClientAPI, pos.Copy( ), BlockFacing.UP), pos.ToVec3d( ),pos.ToVec3d( ), Vec3f.Zero, Vec3f.Zero);
148161
149- particleProps.MinQuantity = 9;
150- particleProps.MinVelocity.Set(-0.05f, 0, -0.05f);
151- particleProps.AddVelocity.Set(0.5f, 0, 0.5f);
152- particleProps.WithTerrainCollision = true;
153- particleProps.ParticleModel = EnumParticleModel.Cube;
154- particleProps.LifeLength = 1.5f;
155- particleProps.GravityEffect = 2.5f;
156- particleProps.MinSize = 0.75f;
157- particleProps.MaxSize = 1.0f;
162+ particleProps.ShouldSwimOnLiquid = true;
158163 particleProps.WithTerrainCollision = true;
164+ particleProps.WindAffected = false;
165+
159166
160167 capi.World.SpawnParticles(particleProps);
161- //TODO: Sound
168+ //TODO: Sound ?
162169
163170 }
164171
--- a/Assorted/Helpers.cs
+++ b/Assorted/Helpers.cs
@@ -5,6 +5,7 @@ using EnumsNET;
55 using Newtonsoft.Json.Linq;
66
77 using Vintagestory.API;
8+using Vintagestory.API.Datastructures;
89 using Vintagestory.API.MathTools;
910
1011
--- a/Assorted/modinfo.json
+++ b/Assorted/modinfo.json
@@ -3,10 +3,10 @@
33 "name": "Defensive Structures",
44 "description" : "Defensive structures and emplacements, ideal for stone castles...",
55 "authors": ["Melchior"],
6- "version": "0.1.4",
6+ "version": "0.1.5",
77 "ModID":"defensive",
88 "dependencies": {
9- "game": "1.14.0",
9+ "game": "1.15.3",
1010 "survival": ""
1111 },
1212 "website": "http://noname.nope"