From 6cfbeea9bdce90d31e9eb3ba229ef89d064a7e94 Mon Sep 17 00:00:00 2001 From: janavarro95 Date: Sun, 6 Mar 2016 02:38:19 -0800 Subject: [PATCH] Added files via upload --- AutoSpeed/AutoSpeed.cs | 119 +++++++++++++++++++++++++++++++++ AutoSpeed/AutoSpeed.dll | Bin 0 -> 6656 bytes AutoSpeed/AutoSpeed.txt | 1 + AutoSpeed/README.md | 9 +++ MoreRain/Class1.cs | 144 ++++++++++++++++++++++++++++++++++++++++ MoreRain/MoreRain.dll | Bin 0 -> 7168 bytes MoreRain/MoreRain.txt | 2 + MoreRain/README.md | 4 ++ 8 files changed, 279 insertions(+) create mode 100644 AutoSpeed/AutoSpeed.cs create mode 100644 AutoSpeed/AutoSpeed.dll create mode 100644 AutoSpeed/AutoSpeed.txt create mode 100644 AutoSpeed/README.md create mode 100644 MoreRain/Class1.cs create mode 100644 MoreRain/MoreRain.dll create mode 100644 MoreRain/MoreRain.txt create mode 100644 MoreRain/README.md diff --git a/AutoSpeed/AutoSpeed.cs b/AutoSpeed/AutoSpeed.cs new file mode 100644 index 00000000..badb4cf5 --- /dev/null +++ b/AutoSpeed/AutoSpeed.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using StardewModdingAPI; +using System.IO; +using System.Net.Mime; +using StardewModdingAPI.Inheritance; +using StardewValley; +using StardewValley.Tools; +using Microsoft.Xna.Framework; +using StardewValley.Objects; + +using Microsoft.Xna.Framework.Input; +using System.Threading; + +namespace ClassLibrary1 +{ + + public class AutoSpeed : Mod + { + + string speedstring = "player_setspeed 5"; + bool auto_update = false; + string mypath = ""; + public override string Name + { + get { return "AutoSpeed"; } + } + + public override string Authour + { + get { return "Alpha_Omegasis"; } + } + + public override string Version + { + get { return "0.0.3a"; } + } + + public override string Description + { + get { return "Makes the player move faster upon gameloading and new days."; } + } + + public override void Entry(params object[] objects) + { + //NOTE ALL COMMANDS MUST BE WRITTEN IN FUNCTIONS NOW LIKE HOW THIS PROGRAM DOCUMENTS IT. OTHERWISE NOTHING WILL WORK + set_up(); + // StardewModdingAPI.Events.TimeEvents.TimeOfDayChanged += Events_UpdateTick; + finish(); + StardewModdingAPI.Events.GameEvents.UpdateTick += Events_UpdateTick; + // StardewModdingAPI.Events.GameEvents.UpdateTick+=Events_UpdateTick; + } + + + public void finish() + { + Console.WriteLine("FINISHED LOADING"); + } + + public void set_up() + { + mypath = Path.GetFullPath("Mods/AutoSpeed.txt"); + //mypath = Path.GetFullPath("Mods/SpeedMod.txt"); + Console.WriteLine("Found SpeedFile.txt at " + mypath); + // Open the text file using a stream reader. + using (StreamReader sr = new StreamReader(mypath)) + { + // Read the stream to a string + String funstring = sr.ReadToEnd(); + Console.WriteLine(funstring); + speedstring = funstring; + } + Console.WriteLine("AutoSpeed mod has started."); + Program.LogColour(ConsoleColor.Magenta, "SpeedMod makes the player move faster upon loading and new days."); + Program.LogColour(ConsoleColor.Cyan, "This has been update for SMAPI 0.0.7"); + + //GameEvents.UpdateTick += Events_UpdateTick; + + } + + public void Events_UpdateTick(object sender, EventArgs e) + { + + //Console.WriteLine("In DA LOOP"); + + if (StardewModdingAPI.Inheritance.SGame.newDay) + { + auto_update = false; + //New_day_Update(); + } + if (StardewModdingAPI.Inheritance.SGame.hasLoadedGame) //makes sure a game file is loaded up + { + + // Console.WriteLine("LOADED"); + if (StardewModdingAPI.Inheritance.SGame.player.isMoving()) //waits for the character to move to update speed + { + //Console.WriteLine("MOVING"); + if (auto_update == false) + { + New_day_Update(); + } + } + } + //Console.WriteLine("Leaving da loop"); + } + + void New_day_Update() //updates all info whenever I call this. + { + StardewModdingAPI.Command.CallCommand(speedstring); + Console.WriteLine("AutoSpeed has updated player's speed"); //super hacky way of doing this; + auto_update = true; + } + + // public EventArgs e { get; set; } + } +} \ No newline at end of file diff --git a/AutoSpeed/AutoSpeed.dll b/AutoSpeed/AutoSpeed.dll new file mode 100644 index 0000000000000000000000000000000000000000..0384f1bf80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_CqZ*If)*^BgRFob$2@~JN+-u#fVFqMY2?&B1Rd_J01I!H zAMTqYrPNXl4Wq(+Xc8Tdl?7S{hkZ#BwGZRsa8UfuP!{qr&>0#b>duJGIrwWyB-K1{ zjvcYfv%o=Iu(M;SHqQz6=`CB`y0lf0aZh^S8O1qYp|?y{MwzEE=e6o#(3*SZI89`E z7Om|t<11R4|9oI77#>a|PahuSX_(=9Y4<#7tCPMqzzS|cJT+K9aGmLuCd@Dfl=Z3; z%!3xMI_^7|9BiiqP98K*BP96dF<>kWCe7l2mZ8a0oR^slXIEyL=&-Q zQ;pU)&)cTexi zrMmle_x5z>dU|(vr*`bz*{4rW=Xdtt&2Y6s4Jo`R;)hQ|AjB>ZybYpU&u=VQwe_g0 zmqr|W@2R{YH?!<4c4AL-tKY~}sBZ-4Iead84&Oe;#?#}EPG|nK>->cSk3H4)>V+4x zPw_XH{B4s*JlyvtojKcZC(};8T*O7ro5by)tXtZ+UoMyq2hux<6G(1klgm@E5)1dY zNjc|N5GG5797ptDQDVJ|Zd}i}wn*1v)$d?LQ-hA1wya^ko6AMm2rlfb{l<-GFJBXD z+y3w1{LV~-uUYd~$Ha4!aH=oov)+C@$NB++4-7yU?*o{iaoiCma9oT5%iy*!0-BGD zA>dptM*nyvc-P_{xCAx6_(|c{DW31OB@IG>RUP~05cW6=J6Q%h9q+(gw&1Ofa5(W% z!q*5s^7)A63qeqxjvj|m1wQ%E3iig8|`f$J_2Q*48Xj|1!qjwKGFWV_y z)el=|ANlZ{L)_IJc?w5nPWE&|-08sg|2W^Hu*+AIGIH(LMElRh%W?Kep0BpEG}}vay-V5*U_3nJr-*U0 gxd!vFvP literal 0 HcmV?d00001 diff --git a/MoreRain/MoreRain.txt b/MoreRain/MoreRain.txt new file mode 100644 index 00000000..fd127576 --- /dev/null +++ b/MoreRain/MoreRain.txt @@ -0,0 +1,2 @@ +30 +10 \ No newline at end of file diff --git a/MoreRain/README.md b/MoreRain/README.md new file mode 100644 index 00000000..3a991973 --- /dev/null +++ b/MoreRain/README.md @@ -0,0 +1,4 @@ +# MoreRain +This is the MoreRain mod, which can increase or decrease how much it rains in your game. It will not rain on days where a weather effect besides raining and sunny weather would occur such as a holiday or a festival. It will also ignore if it would snow, or have a thunderstorm as well. +The check for tomorrow's forcast takes place upon loading, and upon each new day. +The % chance for it to rain the next day is stored in MoreRain.txt