Skip to content

Commit e7acb7b

Browse files
author
hamstar0
committed
v2.1.7.2
* Updated to MH v4.2.2 * Corrected info for on/off commands
1 parent 9706a59 commit e7acb7b

4 files changed

Lines changed: 7 additions & 29 deletions

File tree

Commands/NihilismOnCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public override void Action( CommandCaller caller, string input, string[] args )
2626
var myworld = this.mod.GetModWorld<NihilismWorld>();
2727

2828
if( NihilismAPI.NihilateCurrentWorld() ) {
29-
caller.Reply( "Current world is nihilated. Type /nihoff to revert.", Color.YellowGreen );
29+
caller.Reply( "Current world is nihilated. Type /nih-off to revert.", Color.YellowGreen );
3030
} else {
3131
caller.Reply( "Current world is already nihilated.", Color.Yellow );
3232
}

Logic/WorldLogic.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ internal void PostFiltersLoad() {
5656
if( !myworld.Logic.DataAccess.IsActive() ) {
5757
string msg;
5858
if( Main.netMode == 0 ) {
59-
msg = "Enter the /nihon command to active Nihilism restrictions for the current world. Enter /help for a list of other commands.";
59+
msg = "Enter the /nih-on command to active Nihilism restrictions for the current world. Enter /help for a list of other commands.";
6060
} else {
61-
msg = "Enter nihon in the server's command console to activate Nihilism restrictions for the current world. Enter help for a list of other commands.";
61+
msg = "Enter nih-on in the server's command console to activate Nihilism restrictions for the current world. Enter help for a list of other commands.";
6262
}
6363

6464
InboxMessages.SetMessage( "nihilism_init", msg, false );

NihilismMod.cs

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using HamstarHelpers.Components.Errors;
33
using HamstarHelpers.Helpers.DebugHelpers;
44
using HamstarHelpers.Helpers.DotNetHelpers;
5+
using HamstarHelpers.Helpers.TmlHelpers.ModHelpers;
56
using HamstarHelpers.Services.EntityGroups;
67
using HamstarHelpers.Services.Messages;
78
using Microsoft.Xna.Framework.Graphics;
@@ -93,30 +94,7 @@ public override void PostAddRecipes() {
9394
////////////////
9495

9596
public override object Call( params object[] args ) {
96-
//return ModBoilerplateHelpers.HandleModCall( typeof( BetterPaintAPI ), args );
97-
if( args == null || args.Length == 0 ) { throw new HamstarException( "Undefined call." ); }
98-
99-
string callType = args[0] as string;
100-
if( callType == null ) {
101-
LogHelpers.Alert( "Invalid call binding: " + args[0] );
102-
return null;
103-
}
104-
105-
var methodInfo = typeof( NihilismAPI ).GetMethod( callType );
106-
if( methodInfo == null ) {
107-
LogHelpers.Alert( "Unrecognized call binding " + callType + " with args:\n"
108-
+ string.Join( ",\n ", args.SafeSelect( a => a.GetType().Name + ": " + a == null ? "null" : a.ToString() ) ) );
109-
return null;
110-
}
111-
112-
var newArgs = new object[args.Length - 1];
113-
Array.Copy( args, 1, newArgs, 0, args.Length - 1 );
114-
115-
try {
116-
return ReflectionHelpers.SafeCall( methodInfo, null, newArgs );
117-
} catch( Exception e ) {
118-
throw new HamstarException( "Bad API call.", e );
119-
}
97+
return ModBoilerplateHelpers.HandleModCall( typeof( NihilismAPI ), args );
12098
}
12199
}
122100
}

build.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
author = hamstar
2-
version = 2.1.7.1
2+
version = 2.1.7.2
33
displayName = Nihilism
4-
modReferences = HamstarHelpers@4.2.1
4+
modReferences = HamstarHelpers@4.2.2
55
buildIgnore = *.csproj, *.user, *.bat, obj\*, bin\*, .vs\*, .git\*
66
languageVersion = 6
77
homepage = https://forums.terraria.org/index.php?threads/nihilism-empties-the-game.60333/

0 commit comments

Comments
 (0)