From 6ce61d1a6fd912c99284875a9052475e06fba432 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 3 Aug 2014 11:57:05 +0200 Subject: Fixed a ToLua warning - operator = not supported. --- src/BlockID.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/BlockID.cpp') diff --git a/src/BlockID.cpp b/src/BlockID.cpp index d145a2e5b..07a1fc9e5 100644 --- a/src/BlockID.cpp +++ b/src/BlockID.cpp @@ -17,7 +17,7 @@ class cBlockIDMap // Making the map case-insensitive: struct Comparator { - bool operator()(const AString & a_Item1, const AString & a_Item2) const + bool operator ()(const AString & a_Item1, const AString & a_Item2) const { return (NoCaseCompare(a_Item1, a_Item2) > 0); } -- cgit v1.2.3 From 6e7c0e33b5dd6d86d66ac2eb1a07a33652a708fd Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 17 Sep 2014 18:40:10 +0100 Subject: Added first test to show the object can be created --- src/BlockID.cpp | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'src/BlockID.cpp') diff --git a/src/BlockID.cpp b/src/BlockID.cpp index 07a1fc9e5..9026d81f2 100644 --- a/src/BlockID.cpp +++ b/src/BlockID.cpp @@ -261,34 +261,34 @@ int StringToMobType(const AString & a_MobString) const char * m_String; } MobMap [] = { - {cMonster::mtCreeper, "Creeper"}, - {cMonster::mtSkeleton, "Skeleton"}, - {cMonster::mtSpider, "Spider"}, - {cMonster::mtGiant, "Giant"}, - {cMonster::mtZombie, "Zombie"}, - {cMonster::mtSlime, "Slime"}, - {cMonster::mtGhast, "Ghast"}, - {cMonster::mtZombiePigman, "ZombiePigman"}, - {cMonster::mtEnderman, "Enderman"}, - {cMonster::mtCaveSpider, "CaveSpider"}, - {cMonster::mtSilverfish, "SilverFish"}, - {cMonster::mtBlaze, "Blaze"}, - {cMonster::mtMagmaCube, "MagmaCube"}, - {cMonster::mtEnderDragon, "EnderDragon"}, - {cMonster::mtWither, "Wither"}, - {cMonster::mtBat, "Bat"}, - {cMonster::mtWitch, "Witch"}, - {cMonster::mtPig, "Pig"}, - {cMonster::mtSheep, "Sheep"}, - {cMonster::mtCow, "Cow"}, - {cMonster::mtChicken, "Chicken"}, - {cMonster::mtSquid, "Squid"}, - {cMonster::mtWolf, "Wolf"}, - {cMonster::mtMooshroom, "Mooshroom"}, - {cMonster::mtSnowGolem, "SnowGolem"}, - {cMonster::mtOcelot, "Ocelot"}, - {cMonster::mtIronGolem, "IronGolem"}, - {cMonster::mtVillager, "Villager"}, + {mtCreeper, "Creeper"}, + {mtSkeleton, "Skeleton"}, + {mtSpider, "Spider"}, + {mtGiant, "Giant"}, + {mtZombie, "Zombie"}, + {mtSlime, "Slime"}, + {mtGhast, "Ghast"}, + {mtZombiePigman, "ZombiePigman"}, + {mtEnderman, "Enderman"}, + {mtCaveSpider, "CaveSpider"}, + {mtSilverfish, "SilverFish"}, + {mtBlaze, "Blaze"}, + {mtMagmaCube, "MagmaCube"}, + {mtEnderDragon, "EnderDragon"}, + {mtWither, "Wither"}, + {mtBat, "Bat"}, + {mtWitch, "Witch"}, + {mtPig, "Pig"}, + {mtSheep, "Sheep"}, + {mtCow, "Cow"}, + {mtChicken, "Chicken"}, + {mtSquid, "Squid"}, + {mtWolf, "Wolf"}, + {mtMooshroom, "Mooshroom"}, + {mtSnowGolem, "SnowGolem"}, + {mtOcelot, "Ocelot"}, + {mtIronGolem, "IronGolem"}, + {mtVillager, "Villager"}, }; for (size_t i = 0; i < ARRAYCOUNT(MobMap); i++) { -- cgit v1.2.3 From 77c5b410e653433a17c7cf25b115dae4c25bdbd2 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 5 Oct 2014 22:09:19 +0200 Subject: Fixed eMonsterType Lua API mismatch. --- src/BlockID.cpp | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'src/BlockID.cpp') diff --git a/src/BlockID.cpp b/src/BlockID.cpp index 9026d81f2..755c721db 100644 --- a/src/BlockID.cpp +++ b/src/BlockID.cpp @@ -253,57 +253,6 @@ AString ItemToFullString(const cItem & a_Item) -int StringToMobType(const AString & a_MobString) -{ - static struct - { - int m_MobType; - const char * m_String; - } MobMap [] = - { - {mtCreeper, "Creeper"}, - {mtSkeleton, "Skeleton"}, - {mtSpider, "Spider"}, - {mtGiant, "Giant"}, - {mtZombie, "Zombie"}, - {mtSlime, "Slime"}, - {mtGhast, "Ghast"}, - {mtZombiePigman, "ZombiePigman"}, - {mtEnderman, "Enderman"}, - {mtCaveSpider, "CaveSpider"}, - {mtSilverfish, "SilverFish"}, - {mtBlaze, "Blaze"}, - {mtMagmaCube, "MagmaCube"}, - {mtEnderDragon, "EnderDragon"}, - {mtWither, "Wither"}, - {mtBat, "Bat"}, - {mtWitch, "Witch"}, - {mtPig, "Pig"}, - {mtSheep, "Sheep"}, - {mtCow, "Cow"}, - {mtChicken, "Chicken"}, - {mtSquid, "Squid"}, - {mtWolf, "Wolf"}, - {mtMooshroom, "Mooshroom"}, - {mtSnowGolem, "SnowGolem"}, - {mtOcelot, "Ocelot"}, - {mtIronGolem, "IronGolem"}, - {mtVillager, "Villager"}, - }; - for (size_t i = 0; i < ARRAYCOUNT(MobMap); i++) - { - if (NoCaseCompare(MobMap[i].m_String, a_MobString) == 0) - { - return MobMap[i].m_MobType; - } - } // for i - MobMap[] - return -1; -} - - - - - eDimension StringToDimension(const AString & a_DimensionString) { // First try decoding as a number -- cgit v1.2.3