Skip to content

Commit

Permalink
v0.3.2.0 /push, /fasthouse, and opdoor
Browse files Browse the repository at this point in the history
  • Loading branch information
ballock1 committed Apr 1, 2012
1 parent 236c944 commit e83bdf6
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 8 deletions.
12 changes: 10 additions & 2 deletions Block.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public class Block
public const byte op_cobblestone = (byte)104;
public const byte op_air = (byte)105;
public const byte op_water = (byte)106;
public const byte opdoor = (byte)107;


public const byte wood_float = (byte)110;
public const byte door = (byte)111;
Expand Down Expand Up @@ -289,6 +291,7 @@ public static void SetBlocks()
case op_air:
case op_water:
case blackrock:
case opdoor:

case air_flood:
case air_flood_down:
Expand Down Expand Up @@ -662,7 +665,8 @@ public static bool AllowBreak(byte type)
{
case Block.blue_portal:
case Block.orange_portal:


case Block.opdoor:
case Block.MsgWhite:
case Block.MsgBlack:

Expand Down Expand Up @@ -741,6 +745,7 @@ public static bool OPBlocks(byte type)
case Block.op_water:
case Block.opsidian:
case Block.rocketstart:
case Block.opdoor:

case Block.Zero:
return true;
Expand Down Expand Up @@ -996,6 +1001,7 @@ public static bool mb(byte type)
case Block.op_cobblestone:
case Block.op_air:
case Block.op_water:
case Block.opdoor:

case Block.door:
case Block.door2:
Expand Down Expand Up @@ -1119,6 +1125,7 @@ public static string Name(byte type)
case 104: return "op_cobblestone"; //TODO
case 105: return "op_air"; //TODO
case 106: return "op_water"; //TODO
case 107: return "opdoor";

case wood_float: return "wood_float"; //TODO
case door: return "door_wood";
Expand Down Expand Up @@ -1344,7 +1351,7 @@ public static byte Byte(string type)
case "op_cobblestone": return 104; //TODO
case "op_air": return 105; //TODO
case "op_water": return 106; //TODO

case "opdoor": return 107;
case "wood_float": return 110; //TODO
case "lava_fast": return 112;

Expand Down Expand Up @@ -1548,6 +1555,7 @@ public static byte Convert(byte b)
case 104: return (byte)4; //Op_cobblestone
case 105: return (byte)0; //Op_air - Must be cuboided / replaced
case 106: return Block.waterstill; //Op_water
case 107: return trunk;

case 110: return (byte)5; //wood_float
case 112: return (byte)10;
Expand Down
9 changes: 7 additions & 2 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
(3/9/12)-v0.3.1.0:Added Commands
- OpTest

(4/1/12)-v0.3.2.0: Added Commands
- FastHouse
- Push
Added Blocks
- opdoor
(3/31/12)-v0.3.1.0: Added Commands
- OpTest
- AutoC
- Detonate
- Uban
Expand Down
2 changes: 1 addition & 1 deletion Commands/CmdChristmasTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public override void Use(Player p, string message)
try
{
using (WebClient WEB = new WebClient())
WEB.DownloadFile("http://dl.dropbox.com/u/60701738/MCDek/xmas.copy", "extra/copy/christmastree.copy");
WEB.DownloadFile("http://dekemaserv.com/xmas.copy", "extra/copy/christmastree.copy");
}
catch
{
Expand Down
46 changes: 46 additions & 0 deletions Commands/CmdFastHouse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System;
using System.IO;
using System.Net;
using MCDek;


namespace MCLawl
{
public class CmdFastHouse : Command
{
public override string name { get { return "fasthouse"; } }
public override string shortcut { get { return "fh"; } }
public override string type { get { return "other"; } }
public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.AdvBuilder; } }
public override void Use(Player p, string message)
{
if (p == null) { Player.SendMessage(p, "This command can only be used in-game!"); return; }
if (!Directory.Exists("extra/copy"))
Directory.CreateDirectory("extra/copy");

if (!File.Exists("extra/copy/house.copy"))
{
Player.SendMessage(p, "FastHouse copy doesn't exist. Downloading...");
try
{
using (WebClient WEB = new WebClient())
WEB.DownloadFile("http://dekemaserv.com/house.copy", "extra/copy/house.copy");
}
catch
{
Player.SendMessage(p, "Sorry, downloading failed. Please try again later.");
return;
}
}
Command.all.Find("retrieve").Use(p, "fasthouse");
Command.all.Find("paste").Use(p, "");
ushort[] loc = p.getLoc(false);
Command.all.Find("click").Use(p, loc[0] + " " + loc[1] + " " + loc[2]);
}
public override void Help(Player p)
{
Player.SendMessage(p, "/fasthouse - places a premade house at your location!");
}
}
}
2 changes: 0 additions & 2 deletions Commands/CmdHome.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//Copyright 2012 MCDek-DekemaServ, Created by ballock1;

using System;
using MCDek;

Expand Down
2 changes: 1 addition & 1 deletion Commands/CmdInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public override void Use(Player p, string message)
Player.SendMessage(p, upTime);

if (Server.updateTimer.Interval > 1000) Player.SendMessage(p, "Server is currently in &5Low Lag" + Server.DefaultColor + " mode.");
Player.SendMessage(p, "MCDek was created by dekema2 and 303i, forked from MCLawl, and added commands to give you this.");
Player.SendMessage(p, "MCDek is currently Owned and Developed by Dekema2, with minor editing by 303i");
}
}
public override void Help(Player p)
Expand Down
1 change: 1 addition & 0 deletions Commands/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public static void InitAll()
all.Add(new CmdAutoC());
all.Add(new CmdPush());
all.Add(new CmdGriefPatrol());
all.Add(new CmdFastHouse());

core.commands = new List<Command>(all.commands);

Expand Down

0 comments on commit e83bdf6

Please sign in to comment.