• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

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

VS plugin mod for Basic Armour


Commit MetaInfo

Revision2bd9552a7bf848f28deca99f374fc64ad0572781 (tree)
Zeit2019-05-18 08:58:18
Autormelchior <melchior@user...>
Commitermelchior

Log Message

Re-release cleanup of messages
attempt to fix item names / desc.
Version incriment

Ändern Zusammenfassung

Diff

--- a/ArmourMod/Armour/ArmourModHookin.cs
+++ b/ArmourMod/Armour/ArmourModHookin.cs
@@ -189,10 +189,11 @@ namespace ArmourMod
189189
190190 //BRUTE FORCE SEARCH!
191191 var armourItemsBrute = ClientApi.World.Items.Where( itm => itm.Code != null && itm.Code.BeginsWith( _domain, "clothes" ));
192+ #if DEBUG
192193 ClientApi.Logger.VerboseDebug( "****************************************************** " );
193194 ClientApi.Logger.VerboseDebug( "Known Armour variants: {0}", armourItemsBrute.Count() );
194195 ClientApi.Logger.VerboseDebug( "****************************************************** " );
195-
196+ #endif
196197
197198 foreach(var armourItem in armourItemsBrute)
198199 {
@@ -240,7 +241,9 @@ namespace ArmourMod
240241
241242 ModelTransform configuredTransform = new JsonObject( tpJsonNode ).AsObject<ModelTransform>( );
242243 fudge_transform = configuredTransform;
244+ #if DEBUG
243245 ClientApi.Logger.VerboseDebug( "[{0}] Using JSON Transform parameters = {1}", armourItem.Code.ToShortString( ),configuredTransform.Translation.ToString() );
246+ #endif
244247 }
245248
246249 } else {
@@ -248,7 +251,9 @@ namespace ArmourMod
248251 }
249252
250253 Armoury.Add(armourItem.Code,new ArmourModelData(armourMeshRef, textureId, fudge_transform, fudge_transform.Origin));
254+ #if DEBUG
251255 ClientApi.Logger.VerboseDebug( "Add Armoury entry: {0}", armourItem.Code.ToShortString() );
256+ #endif
252257 }
253258
254259 return Armoury;
--- a/ArmourMod/Armour/EntityArmourPlayer.cs
+++ b/ArmourMod/Armour/EntityArmourPlayer.cs
@@ -63,9 +63,11 @@ namespace ArmourMod
6363 public override void OnEntityLoaded()
6464 {
6565 base.OnEntityLoaded();
66+ #if DEBUG
6667 Logger.VerboseDebug( "OnEntityLoaded - EntityArmourPlayer" );
6768
6869 Logger.VerboseDebug( "Side:{0}, gearInv == null?{1}", CoreAPI.Side.ToString( ), base.GearInventory == null );
70+ #endif
6971
7072 if ( CoreAPI.Side.IsClient() ) {
7173
@@ -83,8 +85,9 @@ namespace ArmourMod
8385 public override void OnEntitySpawn()
8486 {
8587 base.OnEntitySpawn();
86-
88+ #if DEBUG
8789 Logger.VerboseDebug( "OnEntitySpawn - EntityArmourPlayer" );
90+ #endif
8891
8992 if ( CoreAPI.Side.IsServer() ) {
9093 //Attach to Inventory events
@@ -138,7 +141,10 @@ namespace ArmourMod
138141 public override void Revive()
139142 {
140143 base.Revive();
144+ #if DEBUG
141145 Logger.VerboseDebug( "Respawned, alive again..." );
146+ #endif
147+
142148 }
143149
144150 /// <summary>
@@ -248,9 +254,9 @@ namespace ArmourMod
248254
249255 protected void ClientDelayHook(IClientPlayer byPlayer)
250256 {
251- #if DEBUG
257+#if DEBUG
252258 Logger.Debug("ClientDelayHook: Checking gearInv is null? {0}", base.GearInventory == null);
253- #endif
259+#endif
254260
255261 //CoreAPI.Event.UnregisterCallback(client_callback);
256262 base.GearInventory.SlotModified += ClientWatchSlotModified;
@@ -260,29 +266,32 @@ namespace ArmourMod
260266 private void ServerWatchSlotModified (int slotId)
261267 {
262268 var watchedSlot = base.GearInventory[slotId];
263-
269+ #if DEBUG
264270 Logger.VerboseDebug( "WatchSlotModified:{0}", slotId );
265-
271+ #endif
266272 if ( !watchedSlot.Empty ) {
267273
268274 if ( watchedSlot.StorageType == EnumItemStorageFlags.Outfit && watchedSlot.Itemstack.Class == EnumItemClass.Item ) {
269-
275+ #if DEBUG
270276 Logger.VerboseDebug( "Equiped a clothing item:{0}", watchedSlot.Itemstack.Item.Code.ToString() );
277+ #endif
271278 //replace / add damage filter when applicable armor item in slot (which ever that is?)
272279
273280 if (CheckIfClothesIsArmour(watchedSlot))
274- {
281+ {
275282 DamageFilter dmgFilt = DamageFilter.ConstructFilter( watchedSlot );
276-
283+ #if DEBUG
277284 Logger.VerboseDebug( "Armour Filter Props: B{0} P{1} S{2} C{3} F{4}", dmgFilt.bluntPercent, dmgFilt.piercingPercent, dmgFilt.slashingPercent, dmgFilt.crushingPercent, dmgFilt.firePercent );
278-
285+ #endif
279286 DamageFilters[(EnumCharacterDressType)slotId] = dmgFilt;
280287 RecomputeDamageFilterPercents( );
281288 }
282289 }
283290 } else if (watchedSlot.StorageType == EnumItemStorageFlags.Outfit){
284291 //Clear out filters for what was in slot# X here - if applicable
292+ #if DEBUG
285293 Logger.VerboseDebug( "Removed a clothing item from SlotId:{0}",slotId );
294+ #endif
286295 DamageFilters.Remove((EnumCharacterDressType)slotId);
287296 RecomputeDamageFilterPercents( );
288297 }
@@ -290,7 +299,9 @@ namespace ArmourMod
290299
291300 private void ClientWatchSlotModified (int slotId)
292301 {
302+ #if DEBUG
293303 Logger.VerboseDebug( "(Client) WatchSlotModified:{0}", slotId );
304+ #endif
294305 var watchedSlot = base.GearInventory[slotId];
295306
296307 if ( !watchedSlot.Empty ) {
@@ -332,15 +343,15 @@ namespace ArmourMod
332343
333344 if ( CheckIfClothesIsArmour(itemSlot) )
334345 {
335- #if DEBUG
346+#if DEBUG
336347 CoreAPI.World.Logger.VerboseDebug( "DF: Consider clothing item:{0}", itemSlot.Itemstack.Item.Code.ToString( ) );
337- #endif
348+#endif
338349
339350 DamageFilter dmgFilt = DamageFilter.ConstructFilter( itemSlot);
340351
341- #if DEBUG
352+#if DEBUG
342353 CoreAPI.World.Logger.VerboseDebug( "Armour Filter Props: B{0} P{1} S{2} C{3} F{4}", dmgFilt.bluntPercent, dmgFilt.piercingPercent, dmgFilt.slashingPercent, dmgFilt.crushingPercent, dmgFilt.firePercent );
343- #endif
354+#endif
344355
345356 DamageFilters.Add(slotId,dmgFilt);
346357 }
@@ -383,14 +394,14 @@ namespace ArmourMod
383394 private void WearArmorModel(int slotId, Item wornArmour)
384395 {
385396 if ( !RenderableWornArmours.ContainsKey( (EnumCharacterDressType)slotId ) ) {
386- #if DEBUG
397+#if DEBUG
387398 Logger.VerboseDebug( "Wearing: {0}", wornArmour.Code.ToString( ) );
388- #endif
399+#endif
389400 RenderableWornArmours.Add( (EnumCharacterDressType)slotId, wornArmour );
390401 } else {
391- #if DEBUG
402+#if DEBUG
392403 Logger.VerboseDebug( "Duplicate of SlotId {0} worn Armour: {1}",slotId ,wornArmour.Code.ToString( ) );
393- #endif
404+#endif
394405 }
395406 }
396407
@@ -398,14 +409,14 @@ namespace ArmourMod
398409 {
399410 if ( RenderableWornArmours.ContainsKey( (EnumCharacterDressType)slotId ) ) {
400411 var armourItem = RenderableWornArmours[(EnumCharacterDressType)slotId];
401- #if DEBUG
412+#if DEBUG
402413 Logger.VerboseDebug( "UN-Wearing: {0}", armourItem.Code.ToString( ) );
403- #endif
414+#endif
404415 RenderableWornArmours.Remove( (EnumCharacterDressType)slotId );
405416 } else {
406- #if DEBUG
417+#if DEBUG
407418 Logger.VerboseDebug( "Non-armour removed, slotID{0}", slotId );
408- #endif
419+#endif
409420 }
410421 }
411422
@@ -425,9 +436,9 @@ namespace ArmourMod
425436
426437 if ( CheckIfClothesIsArmour(itemSlot) )
427438 {
428- #if DEBUG
439+#if DEBUG
429440 Logger.VerboseDebug( "Now wearing armour:{0}", itemSlot.Itemstack.Item.Code.ToString( ) );
430- #endif
441+#endif
431442
432443 if (RenderableWornArmours.ContainsKey(( EnumCharacterDressType )slotId)) {
433444 Logger.Warning("DUPLICATE assignment; Armour in slot: {0} named: {1}", slotId, itemSlot.Itemstack.Item.Code.ToString( ));
--- a/ArmourMod/ArmourMod.csproj
+++ b/ArmourMod/ArmourMod.csproj
@@ -28,12 +28,19 @@
2828 </CustomCommands>
2929 </PropertyGroup>
3030 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
31- <DebugType>full</DebugType>
31+ <DebugType></DebugType>
3232 <Optimize>true</Optimize>
3333 <OutputPath>bin\Release</OutputPath>
34+ <DefineConstants>RELEASE</DefineConstants>
3435 <ErrorReport>prompt</ErrorReport>
3536 <WarningLevel>4</WarningLevel>
3637 <ConsolePause>false</ConsolePause>
38+ <CustomCommands>
39+ <CustomCommands>
40+ <Command type="AfterBuild" command="7z -tzip a Armour_${ProjectConfig}.zip" workingdir="${TargetDir}" />
41+ <Command type="AfterClean" command="rm -f *.zip" workingdir="${TargetDir}" />
42+ </CustomCommands>
43+ </CustomCommands>
3744 </PropertyGroup>
3845 <ItemGroup>
3946 <Reference Include="System" />
@@ -133,10 +140,12 @@
133140 <None Include="assets\armourmod\recipes\grid\vests.json">
134141 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
135142 </None>
136- <None Include="assets\armourmod\lang\en.json" />
137143 <None Include="assets\armourmod\recipes\grid\helmets.json">
138144 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
139145 </None>
146+ <None Include="assets\armourmod\lang\en.json">
147+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
148+ </None>
140149 </ItemGroup>
141150 <ItemGroup>
142151 <Folder Include="assets\armourmod\" />
--- a/ArmourMod/assets/armourmod/lang/en.json
+++ b/ArmourMod/assets/armourmod/lang/en.json
@@ -1,15 +1,10 @@
1-{
2- "item:clothes-head-potmetal": "Metal Pot Helm",
3- "item:clothes-upperbodyover-vest-studdedleather": "Studded Leather Vest",
4- "item:clothes-upperbodyover-vest-scale": "Scale Mail Vest",
5- "item:clothes-upperbodyover-vest-platechest": "Plate Armour Vest",
6- "item:clothes-upperbodyover-vest-leather": "Leather Vest",
7- "item:clothes-upperbodyover-vest-lamellar": "Lamellar Armour Vest",
8- "item:clothes-upperbodyover-vest-coatofplates": "Coat'o'Plates Armour Vest",
9- "item:clothes-upperbodyover-vest-chain": "Chainmail" ,
10-
11- "armourmod:item-clothes-upperbodyover-vest-leather": "2Leather Vest",
12- "armourmod:clothes-upperbodyover-vest-leather": "3Leather Vest",
13- "armourmod:item-upperbodyover-vest-leather": "4Leather Vest",
14-
1+{
2+ "item-armourmod:clothes-head-potmetal": "Metal Pot Helm",
3+ "item-armourmod:clothes-upperbodyover-vest-studdedleather": "Studded Leather Vest",
4+ "item-armourmod:clothes-upperbodyover-vest-scale": "Scale Mail Vest",
5+ "item-armourmod:clothes-upperbodyover-vest-platechest": "Plate Armour Vest",
6+ "item-armourmod:clothes-upperbodyover-vest-leather": "Leather Vest",
7+ "item-armourmod:clothes-upperbodyover-vest-lamellar": "Lamellar Armour Vest",
8+ "item-armourmod:clothes-upperbodyover-vest-coatofplates": "Coat'o'Plates Armour Vest",
9+ "item-armourmod:clothes-upperbodyover-vest-chain": "Chainmail",
1510 }
\ No newline at end of file
--- a/ArmourMod/modinfo.json
+++ b/ArmourMod/modinfo.json
@@ -3,7 +3,7 @@
33 "name": "Basic Armour Mod",
44 "description" : "Leather, Plate, Scale & More",
55 "authors": ["Melchior", "Bunnyviking"],
6- "version": "0.1.2",
6+ "version": "0.1.3",
77 "dependencies": {
88 "game": "1.9.3",
99 "survival": ""