Skip to content

Commit

Permalink
v1.2.0 - Added check for wire mode to view emitters/holograms
Browse files Browse the repository at this point in the history
  • Loading branch information
hamstar0 committed May 24, 2020
1 parent 2769d65 commit 077ced1
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 48 deletions.
2 changes: 1 addition & 1 deletion Emitters todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ v1.3
- Add hologram modes (NPC, item, projectile)
- Add shader modes
- Add tabs

v1.2
- Show all emitter/holograms while in wire mode

- Re-implement color and alpha for CRT fx
- Add hologram CRT fx dialog field (imported from Chloe)
- Fix wire activations
Expand Down
36 changes: 0 additions & 36 deletions Emitters/Effects/ScanlinesWaves.fx

This file was deleted.

Binary file removed Emitters/Effects/ScanlinesWaves.xnb
Binary file not shown.
8 changes: 5 additions & 3 deletions Emitters/Items/EmitterItem_Interactivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.GameContent.UI;
using HamstarHelpers.Services.Timers;
using HamstarHelpers.Helpers.Items;
using HamstarHelpers.Helpers.Players;
Expand All @@ -22,9 +23,10 @@ public static void OpenUI( Item emitterItem ) {
////////////////

public static bool CanViewEmitters( Player plr ) {
return plr.HeldItem != null
&& !plr.HeldItem.IsAir
&& plr.HeldItem.type == ModContent.ItemType<EmitterItem>();
return WiresUI.Settings.DrawWires || (
plr.HeldItem != null
&& !plr.HeldItem.IsAir
&& plr.HeldItem.type == ModContent.ItemType<EmitterItem>() );
}


Expand Down
8 changes: 5 additions & 3 deletions Emitters/Items/HologramItem_Interactivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.GameContent.UI;
using static Terraria.ModLoader.ModContent;
using HamstarHelpers.Services.Timers;
using HamstarHelpers.Helpers.Items;
Expand All @@ -23,9 +24,10 @@ public static void OpenUI( Item HologramItem ) {
////////////////

public static bool CanViewHolograms( Player plr ) {
return plr.HeldItem != null
&& !plr.HeldItem.IsAir
&& plr.HeldItem.type == ModContent.ItemType<HologramItem>();
return WiresUI.Settings.DrawWires || (
plr.HeldItem != null
&& !plr.HeldItem.IsAir
&& plr.HeldItem.type == ModContent.ItemType<HologramItem>() );
}


Expand Down
8 changes: 5 additions & 3 deletions Emitters/Items/SoundEmitterItem_Interactivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.GameContent.UI;
using HamstarHelpers.Helpers.Items;
using HamstarHelpers.Helpers.Players;
using HamstarHelpers.Services.Timers;
Expand Down Expand Up @@ -34,9 +35,10 @@ public static void OpenUI( Item soundEmitterItem ) {
////////////////

public static bool CanViewSoundEmitters( Player plr ) {
return plr.HeldItem != null
&& !plr.HeldItem.IsAir
&& plr.HeldItem.type == ModContent.ItemType<SoundEmitterItem>();
return WiresUI.Settings.DrawWires || (
plr.HeldItem != null
&& !plr.HeldItem.IsAir
&& plr.HeldItem.type == ModContent.ItemType<SoundEmitterItem>() );
}


Expand Down
3 changes: 1 addition & 2 deletions Emitters/MyMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public override void Unload() {
////

public override void PostSetupContent() {
if( !Main.dedServ ) {
if( !Main.dedServ && Main.netMode != 2 ) {
this.EmitterTex = this.GetTexture( "Definitions/Emitter" );
this.SoundEmitterTex = this.GetTexture( "Definitions/SoundEmitter" );
this.HologramTex = this.GetTexture( "Definitions/Hologram" );
Expand All @@ -81,7 +81,6 @@ public override void PostSetupContent() {
// },
// InterfaceScaleType.UI)
// );

//}
}
}

0 comments on commit 077ced1

Please sign in to comment.