Merge branch 'master' into saplingsandleaves
Conflicts: src/Bindings/DeprecatedBindings.cpp src/Blocks/BlockSapling.h
This commit is contained in:
commit
d0e7b2f18b
@ -28,5 +28,6 @@ UltraCoderRU
|
|||||||
worktycho
|
worktycho
|
||||||
xoft
|
xoft
|
||||||
Yeeeeezus (Donated AlchemistVillage prefabs)
|
Yeeeeezus (Donated AlchemistVillage prefabs)
|
||||||
|
Howaner
|
||||||
|
|
||||||
Please add yourself to this list if you contribute to MCServer.
|
Please add yourself to this list if you contribute to MCServer.
|
||||||
|
@ -1155,6 +1155,7 @@ These ItemGrids are available in the API and can be manipulated by the plugins,
|
|||||||
HasItems = { Params = "{{cItem|cItem}}", Return = "bool", Notes = "Returns true if there are at least as many items of the specified type as in the parameter" },
|
HasItems = { Params = "{{cItem|cItem}}", Return = "bool", Notes = "Returns true if there are at least as many items of the specified type as in the parameter" },
|
||||||
HowManyCanFit = { Params = "{{cItem|cItem}}", Return = "number", Notes = "Returns the number of the specified items that can fit in the storage, including empty slots" },
|
HowManyCanFit = { Params = "{{cItem|cItem}}", Return = "number", Notes = "Returns the number of the specified items that can fit in the storage, including empty slots" },
|
||||||
HowManyItems = { Params = "{{cItem|cItem}}", Return = "number", Notes = "Returns the number of the specified items that are currently stored" },
|
HowManyItems = { Params = "{{cItem|cItem}}", Return = "number", Notes = "Returns the number of the specified items that are currently stored" },
|
||||||
|
RemoveItem = { Params = "{{cItem}}", Return = "number", Notes = "Removes the specified item from the inventory, as many as possible, up to the item's m_ItemCount. Returns the number of items that were removed." },
|
||||||
RemoveOneEquippedItem = { Params = "", Return = "", Notes = "Removes one item from the hotbar's currently selected slot" },
|
RemoveOneEquippedItem = { Params = "", Return = "", Notes = "Removes one item from the hotbar's currently selected slot" },
|
||||||
SetArmorSlot = { Params = "ArmorSlotNum, {{cItem|cItem}}", Return = "", Notes = "Sets the specified armor slot contents" },
|
SetArmorSlot = { Params = "ArmorSlotNum, {{cItem|cItem}}", Return = "", Notes = "Sets the specified armor slot contents" },
|
||||||
SetEquippedSlotNum = { Params = "EquippedSlotNum", Return = "", Notes = "Sets the currently selected hotbar slot number" },
|
SetEquippedSlotNum = { Params = "EquippedSlotNum", Return = "", Notes = "Sets the currently selected hotbar slot number" },
|
||||||
@ -1384,6 +1385,7 @@ local Item5 = cItem(E_ITEM_DIAMOND_CHESTPLATE, 1, 0, "thorns=1;unbreaking=3");
|
|||||||
{ Params = "SlotNum", Return = "bool", Notes = "Returns true if the specified slot is empty, or an invalid slot is specified" },
|
{ Params = "SlotNum", Return = "bool", Notes = "Returns true if the specified slot is empty, or an invalid slot is specified" },
|
||||||
{ Params = "X, Y", Return = "bool", Notes = "Returns true if the specified slot is empty, or an invalid slot is specified" },
|
{ Params = "X, Y", Return = "bool", Notes = "Returns true if the specified slot is empty, or an invalid slot is specified" },
|
||||||
},
|
},
|
||||||
|
RemoveItem = { Params = "{{cItem}}", Return = "number", Notes = "Removes the specified item from the grid, as many as possible, up to the item's m_ItemCount. Returns the number of items that were removed." },
|
||||||
RemoveOneItem =
|
RemoveOneItem =
|
||||||
{
|
{
|
||||||
{ Params = "SlotNum", Return = "{{cItem|cItem}}", Notes = "Removes one item from the stack in the specified slot and returns it as a single cItem. Empty slots are skipped and an empty item is returned" },
|
{ Params = "SlotNum", Return = "{{cItem|cItem}}", Notes = "Removes one item from the stack in the specified slot and returns it as a single cItem. Empty slots are skipped and an empty item is returned" },
|
||||||
|
@ -2,7 +2,7 @@ return
|
|||||||
{
|
{
|
||||||
HOOK_PLAYER_USED_BLOCK =
|
HOOK_PLAYER_USED_BLOCK =
|
||||||
{
|
{
|
||||||
CalledWhen = "A player has just used a block (chest, furnace…). Notification only.",
|
CalledWhen = "A player has just used a block (chest, furnace...). Notification only.",
|
||||||
DefaultFnName = "OnPlayerUsedBlock", -- also used as pagename
|
DefaultFnName = "OnPlayerUsedBlock", -- also used as pagename
|
||||||
Desc = [[
|
Desc = [[
|
||||||
This hook is called after a {{cPlayer|player}} has right-clicked a block that can be used, such as a
|
This hook is called after a {{cPlayer|player}} has right-clicked a block that can be used, such as a
|
||||||
|
@ -60,9 +60,10 @@ function Initialize(Plugin)
|
|||||||
PM:BindCommand("/ff", "debuggers", HandleFurnaceFuel, "- Shows how long the currently held item would burn in a furnace");
|
PM:BindCommand("/ff", "debuggers", HandleFurnaceFuel, "- Shows how long the currently held item would burn in a furnace");
|
||||||
PM:BindCommand("/sched", "debuggers", HandleSched, "- Schedules a simple countdown using cWorld:ScheduleTask()");
|
PM:BindCommand("/sched", "debuggers", HandleSched, "- Schedules a simple countdown using cWorld:ScheduleTask()");
|
||||||
PM:BindCommand("/cs", "debuggers", HandleChunkStay, "- Tests the ChunkStay Lua integration for the specified chunk coords");
|
PM:BindCommand("/cs", "debuggers", HandleChunkStay, "- Tests the ChunkStay Lua integration for the specified chunk coords");
|
||||||
PM:BindCommand("/compo", "debuggers", HandleCompo, "- Tests the cCompositeChat bindings")
|
PM:BindCommand("/compo", "debuggers", HandleCompo, "- Tests the cCompositeChat bindings");
|
||||||
PM:BindCommand("/sb", "debuggers", HandleSetBiome, "- Sets the biome around you to the specified one")
|
PM:BindCommand("/sb", "debuggers", HandleSetBiome, "- Sets the biome around you to the specified one");
|
||||||
PM:BindCommand("/wesel", "debuggers", HandleWESel, "- Expands the current WE selection by 1 block in X/Z")
|
PM:BindCommand("/wesel", "debuggers", HandleWESel, "- Expands the current WE selection by 1 block in X/Z");
|
||||||
|
PM:BindCommand("/rmitem", "debuggers", HandleRMItem, "- Remove the specified item from the inventory.");
|
||||||
|
|
||||||
Plugin:AddWebTab("Debuggers", HandleRequest_Debuggers)
|
Plugin:AddWebTab("Debuggers", HandleRequest_Debuggers)
|
||||||
Plugin:AddWebTab("StressTest", HandleRequest_StressTest)
|
Plugin:AddWebTab("StressTest", HandleRequest_StressTest)
|
||||||
@ -533,7 +534,7 @@ function OnTakeDamage(Receiver, TDI)
|
|||||||
-- Receiver is cPawn
|
-- Receiver is cPawn
|
||||||
-- TDI is TakeDamageInfo
|
-- TDI is TakeDamageInfo
|
||||||
|
|
||||||
LOG(Receiver:GetClass() .. " was dealt " .. DamageTypeToString(TDI.DamageType) .. " damage: Raw " .. TDI.RawDamage .. ", Final " .. TDI.FinalDamage .. " (" .. (TDI.RawDamage - TDI.FinalDamage) .. " covered by armor)");
|
-- LOG(Receiver:GetClass() .. " was dealt " .. DamageTypeToString(TDI.DamageType) .. " damage: Raw " .. TDI.RawDamage .. ", Final " .. TDI.FinalDamage .. " (" .. (TDI.RawDamage - TDI.FinalDamage) .. " covered by armor)");
|
||||||
return false;
|
return false;
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1105,6 +1106,41 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function HandleRMItem(a_Split, a_Player)
|
||||||
|
-- Check params:
|
||||||
|
if (a_Split[2] == nil) then
|
||||||
|
a_Player:SendMessage("Usage: /rmitem <Item> [Count]")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Parse the item type:
|
||||||
|
local Item = cItem()
|
||||||
|
if (not StringToItem(a_Split[2], Item)) then
|
||||||
|
a_Player:SendMessageFailure(a_Split[2] .. " isn't a valid item")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Parse the optional item count
|
||||||
|
if (a_Split[3] ~= nil) then
|
||||||
|
local Count = tonumber(a_Split[3])
|
||||||
|
if (Count == nil) then
|
||||||
|
a_Player:SendMessageFailure(a_Split[3] .. " isn't a valid number")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
Item.m_ItemCount = Count
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Remove the item:
|
||||||
|
local NumRemovedItems = a_Player:GetInventory():RemoveItem(Item)
|
||||||
|
a_Player:SendMessageSuccess("Removed " .. NumRemovedItems .. " Items!")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function HandleRequest_Debuggers(a_Request)
|
function HandleRequest_Debuggers(a_Request)
|
||||||
local FolderContents = cFile:GetFolderContents("./");
|
local FolderContents = cFile:GetFolderContents("./");
|
||||||
return "<p>The following objects have been returned by cFile:GetFolderContents():<ul><li>" .. table.concat(FolderContents, "</li><li>") .. "</li></ul></p>";
|
return "<p>The following objects have been returned by cFile:GetFolderContents():<ul><li>" .. table.concat(FolderContents, "</li><li>") .. "</li></ul></p>";
|
||||||
|
@ -5,7 +5,7 @@ MCServer is a Minecraft server that is written in C++ and designed to be efficie
|
|||||||
|
|
||||||
MCServer can run on PCs, Macs, and *nix. This includes android phones and tablets as well as Raspberry Pis.
|
MCServer can run on PCs, Macs, and *nix. This includes android phones and tablets as well as Raspberry Pis.
|
||||||
|
|
||||||
We currently support the protocol from Minecraft 1.2 all the way up to Minecraft 1.7.9.
|
We currently support the protocol from Minecraft 1.2 all the way up to Minecraft 1.7.10.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 784b04ff9afd5faeaeb15c3fa159ff98adf55182
|
Subproject commit 1ed82759c68f92c4acc7e3f33b850cf9f01c8aba
|
@ -107,3 +107,7 @@ class cListAllocationPool : public cAllocationPool<T>
|
|||||||
std::list<void *> m_FreeList;
|
std::list<void *> m_FreeList;
|
||||||
std::auto_ptr<typename cAllocationPool<T>::cStarvationCallbacks> m_Callbacks;
|
std::auto_ptr<typename cAllocationPool<T>::cStarvationCallbacks> m_Callbacks;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
135
src/Bindings/CMakeLists.txt
Normal file
135
src/Bindings/CMakeLists.txt
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
cmake_minimum_required (VERSION 2.6)
|
||||||
|
project (MCServer)
|
||||||
|
|
||||||
|
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
||||||
|
include_directories (".")
|
||||||
|
|
||||||
|
SET (SRCS
|
||||||
|
Bindings.cpp
|
||||||
|
DeprecatedBindings.cpp
|
||||||
|
LuaChunkStay.cpp
|
||||||
|
LuaState.cpp
|
||||||
|
LuaWindow.cpp
|
||||||
|
ManualBindings.cpp
|
||||||
|
Plugin.cpp
|
||||||
|
PluginLua.cpp
|
||||||
|
PluginManager.cpp
|
||||||
|
WebPlugin.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
SET (HDRS
|
||||||
|
Bindings.h
|
||||||
|
DeprecatedBindings.h
|
||||||
|
LuaChunkStay.h
|
||||||
|
LuaFunctions.h
|
||||||
|
LuaState.h
|
||||||
|
LuaWindow.h
|
||||||
|
ManualBindings.h
|
||||||
|
Plugin.h
|
||||||
|
PluginLua.h
|
||||||
|
PluginManager.h
|
||||||
|
WebPlugin.h
|
||||||
|
tolua++.h
|
||||||
|
)
|
||||||
|
|
||||||
|
# List all the files that are generated as part of the Bindings build process
|
||||||
|
set (BINDING_OUTPUTS
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Bindings.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Bindings.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/LuaState_Call.inc
|
||||||
|
)
|
||||||
|
|
||||||
|
set(BINDING_DEPENDECIES
|
||||||
|
tolua
|
||||||
|
../Bindings/virtual_method_hooks.lua
|
||||||
|
../Bindings/AllToLua.pkg
|
||||||
|
../Bindings/gen_LuaState_Call.lua
|
||||||
|
../Bindings/LuaFunctions.h
|
||||||
|
../Bindings/LuaState_Call.inc
|
||||||
|
../Bindings/LuaWindow.h
|
||||||
|
../Bindings/Plugin.h
|
||||||
|
../Bindings/PluginLua.h
|
||||||
|
../Bindings/PluginManager.h
|
||||||
|
../Bindings/WebPlugin.h
|
||||||
|
../BiomeDef.h
|
||||||
|
../BlockArea.h
|
||||||
|
../BlockEntities/BlockEntity.h
|
||||||
|
../BlockEntities/BlockEntityWithItems.h
|
||||||
|
../BlockEntities/ChestEntity.h
|
||||||
|
../BlockEntities/DispenserEntity.h
|
||||||
|
../BlockEntities/DropSpenserEntity.h
|
||||||
|
../BlockEntities/DropperEntity.h
|
||||||
|
../BlockEntities/FurnaceEntity.h
|
||||||
|
../BlockEntities/HopperEntity.h
|
||||||
|
../BlockEntities/JukeboxEntity.h
|
||||||
|
../BlockEntities/NoteEntity.h
|
||||||
|
../BlockEntities/SignEntity.h
|
||||||
|
../BlockEntities/MobHeadEntity.h
|
||||||
|
../BlockEntities/FlowerPotEntity.h
|
||||||
|
../BlockID.h
|
||||||
|
../BoundingBox.h
|
||||||
|
../ChatColor.h
|
||||||
|
../ChunkDef.h
|
||||||
|
../ClientHandle.h
|
||||||
|
../CraftingRecipes.h
|
||||||
|
../Cuboid.h
|
||||||
|
../Defines.h
|
||||||
|
../Enchantments.h
|
||||||
|
../Entities/EntityEffect.h
|
||||||
|
../Entities/Entity.h
|
||||||
|
../Entities/Floater.h
|
||||||
|
../Entities/Pawn.h
|
||||||
|
../Entities/Painting.h
|
||||||
|
../Entities/Pickup.h
|
||||||
|
../Entities/Player.h
|
||||||
|
../Entities/ProjectileEntity.h
|
||||||
|
../Entities/ArrowEntity.h
|
||||||
|
../Entities/ThrownEggEntity.h
|
||||||
|
../Entities/ThrownEnderPearlEntity.h
|
||||||
|
../Entities/ExpBottleEntity.h
|
||||||
|
../Entities/ThrownSnowballEntity.h
|
||||||
|
../Entities/FireChargeEntity.h
|
||||||
|
../Entities/FireworkEntity.h
|
||||||
|
../Entities/GhastFireballEntity.h
|
||||||
|
../Entities/TNTEntity.h
|
||||||
|
../Entities/ExpOrb.h
|
||||||
|
../Entities/HangingEntity.h
|
||||||
|
../Entities/ItemFrame.h
|
||||||
|
../Generating/ChunkDesc.h
|
||||||
|
../Group.h
|
||||||
|
../Inventory.h
|
||||||
|
../Item.h
|
||||||
|
../ItemGrid.h
|
||||||
|
../Mobs/Monster.h
|
||||||
|
../OSSupport/File.h
|
||||||
|
../Root.h
|
||||||
|
../Server.h
|
||||||
|
../StringUtils.h
|
||||||
|
../Tracer.h
|
||||||
|
../UI/Window.h
|
||||||
|
../Vector3.h
|
||||||
|
../WebAdmin.h
|
||||||
|
../World.h
|
||||||
|
)
|
||||||
|
|
||||||
|
if (NOT MSVC)
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
# add any new generated bindings here
|
||||||
|
OUTPUT ${BINDING_OUTPUTS}
|
||||||
|
|
||||||
|
# Regenerate bindings:
|
||||||
|
COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
|
||||||
|
# add any new generation dependencies here
|
||||||
|
DEPENDS ${BINDING_DEPENDECIES}
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
set_source_files_properties(Bindings/Bindings.cpp PROPERTIES GENERATED TRUE)
|
||||||
|
set_source_files_properties(Bindings/Bindings.h PROPERTIES GENERATED TRUE)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
add_library(Bindings ${SRCS} ${HDRS})
|
||||||
|
|
||||||
|
target_link_libraries(Bindings lua sqlite tolualib polarssl)
|
||||||
|
endif()
|
@ -40,7 +40,7 @@ const cLuaState::cRet cLuaState::Return = {};
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cLuaState:
|
// cLuaState:
|
||||||
|
|
||||||
cLuaState::cLuaState(const AString & a_SubsystemName) :
|
cLuaState::cLuaState(const AString & a_SubsystemName) :
|
||||||
@ -1336,7 +1336,6 @@ void cLuaState::LogStack(lua_State * a_LuaState, const char * a_Header)
|
|||||||
{
|
{
|
||||||
UNUSED(a_Header); // The param seems unused when compiling for release, so the compiler warns
|
UNUSED(a_Header); // The param seems unused when compiling for release, so the compiler warns
|
||||||
|
|
||||||
|
|
||||||
// Format string consisting only of %s is used to appease the compiler
|
// Format string consisting only of %s is used to appease the compiler
|
||||||
LOGD("%s", (a_Header != NULL) ? a_Header : "Lua C API Stack contents:");
|
LOGD("%s", (a_Header != NULL) ? a_Header : "Lua C API Stack contents:");
|
||||||
for (int i = lua_gettop(a_LuaState); i > 0; i--)
|
for (int i = lua_gettop(a_LuaState); i > 0; i--)
|
||||||
@ -1371,7 +1370,7 @@ int cLuaState::ReportFnCallErrors(lua_State * a_LuaState)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cLuaState::cRef:
|
// cLuaState::cRef:
|
||||||
|
|
||||||
cLuaState::cRef::cRef(void) :
|
cLuaState::cRef::cRef(void) :
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cLuaWindow:
|
// cLuaWindow:
|
||||||
|
|
||||||
cLuaWindow::cLuaWindow(cWindow::WindowType a_WindowType, int a_SlotsX, int a_SlotsY, const AString & a_Title) :
|
cLuaWindow::cLuaWindow(cWindow::WindowType a_WindowType, int a_SlotsX, int a_SlotsY, const AString & a_Title) :
|
||||||
|
@ -33,9 +33,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/****************************
|
// Better error reporting for Lua
|
||||||
* Better error reporting for Lua
|
|
||||||
**/
|
|
||||||
static int tolua_do_error(lua_State* L, const char * a_pMsg, tolua_Error * a_pToLuaError)
|
static int tolua_do_error(lua_State* L, const char * a_pMsg, tolua_Error * a_pToLuaError)
|
||||||
{
|
{
|
||||||
// Retrieve current function name
|
// Retrieve current function name
|
||||||
@ -81,10 +79,7 @@ static int lua_do_error(lua_State* L, const char * a_pFormat, ...)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/****************************
|
// Lua bound functions with special return types
|
||||||
* Lua bound functions with special return types
|
|
||||||
**/
|
|
||||||
|
|
||||||
static int tolua_StringSplit(lua_State * tolua_S)
|
static int tolua_StringSplit(lua_State * tolua_S)
|
||||||
{
|
{
|
||||||
cLuaState LuaState(tolua_S);
|
cLuaState LuaState(tolua_S);
|
||||||
@ -557,9 +552,11 @@ static int tolua_DoWithXYZ(lua_State* tolua_S)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
template< class Ty1,
|
template<
|
||||||
|
class Ty1,
|
||||||
class Ty2,
|
class Ty2,
|
||||||
bool (Ty1::*Func1)(int, int, cItemCallback<Ty2> &) >
|
bool (Ty1::*Func1)(int, int, cItemCallback<Ty2> &)
|
||||||
|
>
|
||||||
static int tolua_ForEachInChunk(lua_State * tolua_S)
|
static int tolua_ForEachInChunk(lua_State * tolua_S)
|
||||||
{
|
{
|
||||||
int NumArgs = lua_gettop(tolua_S) - 1; /* This includes 'self' */
|
int NumArgs = lua_gettop(tolua_S) - 1; /* This includes 'self' */
|
||||||
@ -651,9 +648,11 @@ static int tolua_ForEachInChunk(lua_State* tolua_S)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
template< class Ty1,
|
template<
|
||||||
|
class Ty1,
|
||||||
class Ty2,
|
class Ty2,
|
||||||
bool (Ty1::*Func1)(cItemCallback<Ty2> &) >
|
bool (Ty1::*Func1)(cItemCallback<Ty2> &)
|
||||||
|
>
|
||||||
static int tolua_ForEach(lua_State * tolua_S)
|
static int tolua_ForEach(lua_State * tolua_S)
|
||||||
{
|
{
|
||||||
int NumArgs = lua_gettop(tolua_S) - 1; /* This includes 'self' */
|
int NumArgs = lua_gettop(tolua_S) - 1; /* This includes 'self' */
|
||||||
@ -959,7 +958,7 @@ tolua_lerror:
|
|||||||
static int tolua_cWorld_TryGetHeight(lua_State * tolua_S)
|
static int tolua_cWorld_TryGetHeight(lua_State * tolua_S)
|
||||||
{
|
{
|
||||||
// Exported manually, because tolua would require the out-only param a_Height to be used when calling
|
// Exported manually, because tolua would require the out-only param a_Height to be used when calling
|
||||||
// Takes (a_World,) a_BlockX, a_BlockZ
|
// Takes a_World, a_BlockX, a_BlockZ
|
||||||
// Returns Height, IsValid
|
// Returns Height, IsValid
|
||||||
#ifndef TOLUA_RELEASE
|
#ifndef TOLUA_RELEASE
|
||||||
tolua_Error tolua_err;
|
tolua_Error tolua_err;
|
||||||
|
@ -42,10 +42,7 @@ public:
|
|||||||
// Called each tick
|
// Called each tick
|
||||||
virtual void Tick(float a_Dt) = 0;
|
virtual void Tick(float a_Dt) = 0;
|
||||||
|
|
||||||
/**
|
/** Calls the specified hook with the params given. Returns the bool that the hook callback returns.*/
|
||||||
* On all these functions, return true if you want to override default behavior and not call other plugins on that callback.
|
|
||||||
* You can also return false, so default behavior is used.
|
|
||||||
**/
|
|
||||||
virtual bool OnBlockSpread (cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, eSpreadSource a_Source) = 0;
|
virtual bool OnBlockSpread (cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, eSpreadSource a_Source) = 0;
|
||||||
virtual bool OnBlockToPickups (cWorld * a_World, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cItems & a_Pickups) = 0;
|
virtual bool OnBlockToPickups (cWorld * a_World, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cItems & a_Pickups) = 0;
|
||||||
virtual bool OnChat (cPlayer * a_Player, AString & a_Message) = 0;
|
virtual bool OnChat (cPlayer * a_Player, AString & a_Message) = 0;
|
||||||
|
@ -25,7 +25,7 @@ extern "C"
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cPluginLua:
|
// cPluginLua:
|
||||||
|
|
||||||
cPluginLua::cPluginLua(const AString & a_PluginDirectory) :
|
cPluginLua::cPluginLua(const AString & a_PluginDirectory) :
|
||||||
|
@ -51,9 +51,11 @@ class cBlockEntityWithItems;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cPluginManager // tolua_export
|
// tolua_begin
|
||||||
{ // tolua_export
|
class cPluginManager
|
||||||
public: // tolua_export
|
{
|
||||||
|
public:
|
||||||
|
// tolua_end
|
||||||
|
|
||||||
// Called each tick
|
// Called each tick
|
||||||
virtual void Tick(float a_Dt);
|
virtual void Tick(float a_Dt);
|
||||||
@ -164,8 +166,10 @@ public: // tolua_export
|
|||||||
cPlugin * GetPlugin( const AString & a_Plugin ) const; // tolua_export
|
cPlugin * GetPlugin( const AString & a_Plugin ) const; // tolua_export
|
||||||
const PluginMap & GetAllPlugins() const; // >> EXPORTED IN MANUALBINDINGS <<
|
const PluginMap & GetAllPlugins() const; // >> EXPORTED IN MANUALBINDINGS <<
|
||||||
|
|
||||||
void FindPlugins(); // tolua_export
|
// tolua_begin
|
||||||
void ReloadPlugins(); // tolua_export
|
void FindPlugins();
|
||||||
|
void ReloadPlugins();
|
||||||
|
// tolua_end
|
||||||
|
|
||||||
/** Adds the plugin to the list of plugins called for the specified hook type. Handles multiple adds as a single add */
|
/** Adds the plugin to the list of plugins called for the specified hook type. Handles multiple adds as a single add */
|
||||||
void AddHook(cPlugin * a_Plugin, int a_HookType);
|
void AddHook(cPlugin * a_Plugin, int a_HookType);
|
||||||
|
@ -66,12 +66,12 @@ std::pair< AString, AString > cWebPlugin::GetTabNameForRequest(const HTTPRequest
|
|||||||
|
|
||||||
if (Split.size() > 1)
|
if (Split.size() > 1)
|
||||||
{
|
{
|
||||||
sWebPluginTab* Tab = 0;
|
sWebPluginTab * Tab = NULL;
|
||||||
if (Split.size() > 2) // If we got the tab name, show that page
|
if (Split.size() > 2) // If we got the tab name, show that page
|
||||||
{
|
{
|
||||||
for( TabList::iterator itr = GetTabs().begin(); itr != GetTabs().end(); ++itr )
|
for( TabList::iterator itr = GetTabs().begin(); itr != GetTabs().end(); ++itr )
|
||||||
{
|
{
|
||||||
if( (*itr)->SafeTitle.compare( Split[2] ) == 0 ) // This is the one! Rawr
|
if ((*itr)->SafeTitle.compare(Split[2]) == 0) // This is the one!
|
||||||
{
|
{
|
||||||
Tab = *itr;
|
Tab = *itr;
|
||||||
break;
|
break;
|
||||||
@ -84,7 +84,7 @@ std::pair< AString, AString > cWebPlugin::GetTabNameForRequest(const HTTPRequest
|
|||||||
Tab = *GetTabs().begin();
|
Tab = *GetTabs().begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Tab )
|
if (Tab != NULL)
|
||||||
{
|
{
|
||||||
Names.first = Tab->Title;
|
Names.first = Tab->Title;
|
||||||
Names.second = Tab->SafeTitle;
|
Names.second = Tab->SafeTitle;
|
||||||
@ -111,3 +111,7 @@ AString cWebPlugin::SafeString( const AString & a_String )
|
|||||||
}
|
}
|
||||||
return RetVal;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
|
|
||||||
// The "map" used for biome <-> string conversions:
|
// The "map" used for biome <-> string conversions:
|
||||||
static struct {
|
static struct
|
||||||
|
{
|
||||||
EMCSBiome m_Biome;
|
EMCSBiome m_Biome;
|
||||||
const char * m_String;
|
const char * m_String;
|
||||||
} g_BiomeMap[] =
|
} g_BiomeMap[] =
|
||||||
|
@ -269,7 +269,7 @@ void MergeCombinatorMask(BLOCKTYPE & a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBlockArea:
|
// cBlockArea:
|
||||||
|
|
||||||
cBlockArea::cBlockArea(void) :
|
cBlockArea::cBlockArea(void) :
|
||||||
@ -1759,7 +1759,7 @@ NIBBLETYPE cBlockArea::GetNibble(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBL
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBlockArea::cChunkReader:
|
// cBlockArea::cChunkReader:
|
||||||
|
|
||||||
cBlockArea::cChunkReader::cChunkReader(cBlockArea & a_Area) :
|
cBlockArea::cChunkReader::cChunkReader(cBlockArea & a_Area) :
|
||||||
|
@ -4,9 +4,41 @@ project (MCServer)
|
|||||||
|
|
||||||
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
||||||
|
|
||||||
file(GLOB SOURCE
|
SET (SRCS
|
||||||
"*.cpp"
|
BeaconEntity.cpp
|
||||||
"*.h"
|
BlockEntity.cpp
|
||||||
)
|
ChestEntity.cpp
|
||||||
|
CommandBlockEntity.cpp
|
||||||
|
DispenserEntity.cpp
|
||||||
|
DropSpenserEntity.cpp
|
||||||
|
DropperEntity.cpp
|
||||||
|
EnderChestEntity.cpp
|
||||||
|
FlowerPotEntity.cpp
|
||||||
|
FurnaceEntity.cpp
|
||||||
|
HopperEntity.cpp
|
||||||
|
JukeboxEntity.cpp
|
||||||
|
MobHeadEntity.cpp
|
||||||
|
NoteEntity.cpp
|
||||||
|
SignEntity.cpp)
|
||||||
|
|
||||||
add_library(BlockEntities ${SOURCE})
|
SET (HDRS
|
||||||
|
BeaconEntity.h
|
||||||
|
BlockEntity.h
|
||||||
|
BlockEntityWithItems.h
|
||||||
|
ChestEntity.h
|
||||||
|
CommandBlockEntity.h
|
||||||
|
DispenserEntity.h
|
||||||
|
DropSpenserEntity.h
|
||||||
|
DropperEntity.h
|
||||||
|
EnderChestEntity.h
|
||||||
|
FlowerPotEntity.h
|
||||||
|
FurnaceEntity.h
|
||||||
|
HopperEntity.h
|
||||||
|
JukeboxEntity.h
|
||||||
|
MobHeadEntity.h
|
||||||
|
NoteEntity.h
|
||||||
|
SignEntity.h)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
add_library(BlockEntities ${SRCS} ${HDRS})
|
||||||
|
endif()
|
||||||
|
@ -27,7 +27,8 @@ class cChestEntity :
|
|||||||
typedef cBlockEntityWithItems super;
|
typedef cBlockEntityWithItems super;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ContentsHeight = 3,
|
ContentsHeight = 3,
|
||||||
ContentsWidth = 9,
|
ContentsWidth = 9,
|
||||||
} ;
|
} ;
|
||||||
|
@ -35,7 +35,8 @@ class cDropSpenserEntity :
|
|||||||
typedef cBlockEntityWithItems super;
|
typedef cBlockEntityWithItems super;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ContentsHeight = 3,
|
ContentsHeight = 3,
|
||||||
ContentsWidth = 3,
|
ContentsWidth = 3,
|
||||||
} ;
|
} ;
|
||||||
|
@ -22,7 +22,8 @@ class cHopperEntity :
|
|||||||
typedef cBlockEntityWithItems super;
|
typedef cBlockEntityWithItems super;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ContentsHeight = 1,
|
ContentsHeight = 1,
|
||||||
ContentsWidth = 5,
|
ContentsWidth = 5,
|
||||||
TICKS_PER_TRANSFER = 8, ///< How many ticks at minimum between two item transfers to or from the hopper
|
TICKS_PER_TRANSFER = 8, ///< How many ticks at minimum between two item transfers to or from the hopper
|
||||||
|
@ -255,7 +255,8 @@ AString ItemToFullString(const cItem & a_Item)
|
|||||||
|
|
||||||
int StringToMobType(const AString & a_MobString)
|
int StringToMobType(const AString & a_MobString)
|
||||||
{
|
{
|
||||||
static struct {
|
static struct
|
||||||
|
{
|
||||||
int m_MobType;
|
int m_MobType;
|
||||||
const char * m_String;
|
const char * m_String;
|
||||||
} MobMap [] =
|
} MobMap [] =
|
||||||
|
@ -399,7 +399,7 @@ enum
|
|||||||
// Please keep this list alpha-sorted by the blocktype / itemtype part
|
// Please keep this list alpha-sorted by the blocktype / itemtype part
|
||||||
// then number-sorted for the same block / item
|
// then number-sorted for the same block / item
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Block metas:
|
// Block metas:
|
||||||
|
|
||||||
// E_BLOCK_BIG_FLOWER metas
|
// E_BLOCK_BIG_FLOWER metas
|
||||||
@ -678,7 +678,7 @@ enum
|
|||||||
E_META_WOOL_RED = 14,
|
E_META_WOOL_RED = 14,
|
||||||
E_META_WOOL_BLACK = 15,
|
E_META_WOOL_BLACK = 15,
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Item metas:
|
// Item metas:
|
||||||
|
|
||||||
// E_ITEM_COAL metas:
|
// E_ITEM_COAL metas:
|
||||||
|
@ -450,9 +450,6 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
|
|||||||
a_Info[E_BLOCK_CROPS ].m_IsSolid = false;
|
a_Info[E_BLOCK_CROPS ].m_IsSolid = false;
|
||||||
a_Info[E_BLOCK_DANDELION ].m_IsSolid = false;
|
a_Info[E_BLOCK_DANDELION ].m_IsSolid = false;
|
||||||
a_Info[E_BLOCK_DETECTOR_RAIL ].m_IsSolid = false;
|
a_Info[E_BLOCK_DETECTOR_RAIL ].m_IsSolid = false;
|
||||||
a_Info[E_BLOCK_END_PORTAL ].m_IsSolid = false;
|
|
||||||
a_Info[E_BLOCK_FENCE ].m_IsSolid = false;
|
|
||||||
a_Info[E_BLOCK_FENCE_GATE ].m_IsSolid = false;
|
|
||||||
a_Info[E_BLOCK_FIRE ].m_IsSolid = false;
|
a_Info[E_BLOCK_FIRE ].m_IsSolid = false;
|
||||||
a_Info[E_BLOCK_FLOWER ].m_IsSolid = false;
|
a_Info[E_BLOCK_FLOWER ].m_IsSolid = false;
|
||||||
a_Info[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE].m_IsSolid = false;
|
a_Info[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE].m_IsSolid = false;
|
||||||
@ -484,7 +481,6 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
|
|||||||
a_Info[E_BLOCK_WATER ].m_IsSolid = false;
|
a_Info[E_BLOCK_WATER ].m_IsSolid = false;
|
||||||
a_Info[E_BLOCK_WOODEN_BUTTON ].m_IsSolid = false;
|
a_Info[E_BLOCK_WOODEN_BUTTON ].m_IsSolid = false;
|
||||||
a_Info[E_BLOCK_WOODEN_PRESSURE_PLATE].m_IsSolid = false;
|
a_Info[E_BLOCK_WOODEN_PRESSURE_PLATE].m_IsSolid = false;
|
||||||
a_Info[E_BLOCK_WOODEN_SLAB ].m_IsSolid = false;
|
|
||||||
|
|
||||||
|
|
||||||
// Blocks that fully occupy their voxel - used as a guide for torch placeable blocks, amongst other things:
|
// Blocks that fully occupy their voxel - used as a guide for torch placeable blocks, amongst other things:
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
#include "BlockSand.h"
|
#include "BlockSand.h"
|
||||||
#include "BlockSapling.h"
|
#include "BlockSapling.h"
|
||||||
#include "BlockSideways.h"
|
#include "BlockSideways.h"
|
||||||
#include "BlockSign.h"
|
#include "BlockSignPost.h"
|
||||||
#include "BlockSlab.h"
|
#include "BlockSlab.h"
|
||||||
#include "BlockSnow.h"
|
#include "BlockSnow.h"
|
||||||
#include "BlockStairs.h"
|
#include "BlockStairs.h"
|
||||||
@ -81,6 +81,7 @@
|
|||||||
#include "BlockTorch.h"
|
#include "BlockTorch.h"
|
||||||
#include "BlockTrapdoor.h"
|
#include "BlockTrapdoor.h"
|
||||||
#include "BlockVine.h"
|
#include "BlockVine.h"
|
||||||
|
#include "BlockWallSign.h"
|
||||||
#include "BlockWorkbench.h"
|
#include "BlockWorkbench.h"
|
||||||
|
|
||||||
|
|
||||||
@ -275,7 +276,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
|
|||||||
case E_BLOCK_SAND: return new cBlockSandHandler (a_BlockType);
|
case E_BLOCK_SAND: return new cBlockSandHandler (a_BlockType);
|
||||||
case E_BLOCK_SANDSTONE_STAIRS: return new cBlockStairsHandler (a_BlockType);
|
case E_BLOCK_SANDSTONE_STAIRS: return new cBlockStairsHandler (a_BlockType);
|
||||||
case E_BLOCK_SAPLING: return new cBlockSaplingHandler (a_BlockType);
|
case E_BLOCK_SAPLING: return new cBlockSaplingHandler (a_BlockType);
|
||||||
case E_BLOCK_SIGN_POST: return new cBlockSignHandler (a_BlockType);
|
case E_BLOCK_SIGN_POST: return new cBlockSignPostHandler (a_BlockType);
|
||||||
case E_BLOCK_SNOW: return new cBlockSnowHandler (a_BlockType);
|
case E_BLOCK_SNOW: return new cBlockSnowHandler (a_BlockType);
|
||||||
case E_BLOCK_SPRUCE_WOOD_STAIRS: return new cBlockStairsHandler (a_BlockType);
|
case E_BLOCK_SPRUCE_WOOD_STAIRS: return new cBlockStairsHandler (a_BlockType);
|
||||||
case E_BLOCK_STAINED_GLASS: return new cBlockGlassHandler (a_BlockType);
|
case E_BLOCK_STAINED_GLASS: return new cBlockGlassHandler (a_BlockType);
|
||||||
@ -297,7 +298,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
|
|||||||
case E_BLOCK_TRIPWIRE: return new cBlockTripwireHandler (a_BlockType);
|
case E_BLOCK_TRIPWIRE: return new cBlockTripwireHandler (a_BlockType);
|
||||||
case E_BLOCK_TRIPWIRE_HOOK: return new cBlockTripwireHookHandler (a_BlockType);
|
case E_BLOCK_TRIPWIRE_HOOK: return new cBlockTripwireHookHandler (a_BlockType);
|
||||||
case E_BLOCK_VINES: return new cBlockVineHandler (a_BlockType);
|
case E_BLOCK_VINES: return new cBlockVineHandler (a_BlockType);
|
||||||
case E_BLOCK_WALLSIGN: return new cBlockSignHandler (a_BlockType); // TODO: This needs a special handler
|
case E_BLOCK_WALLSIGN: return new cBlockWallSignHandler (a_BlockType);
|
||||||
case E_BLOCK_WATER: return new cBlockFluidHandler (a_BlockType);
|
case E_BLOCK_WATER: return new cBlockFluidHandler (a_BlockType);
|
||||||
case E_BLOCK_WOODEN_BUTTON: return new cBlockButtonHandler (a_BlockType);
|
case E_BLOCK_WOODEN_BUTTON: return new cBlockButtonHandler (a_BlockType);
|
||||||
case E_BLOCK_WOODEN_DOOR: return new cBlockDoorHandler (a_BlockType);
|
case E_BLOCK_WOODEN_DOOR: return new cBlockDoorHandler (a_BlockType);
|
||||||
|
@ -235,7 +235,7 @@ void cBlockPistonHandler::RetractPiston(int a_BlockX, int a_BlockY, int a_BlockZ
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBlockPistonHeadHandler:
|
// cBlockPistonHeadHandler:
|
||||||
|
|
||||||
cBlockPistonHeadHandler::cBlockPistonHeadHandler(void) :
|
cBlockPistonHeadHandler::cBlockPistonHeadHandler(void) :
|
||||||
|
@ -9,12 +9,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSignHandler :
|
class cBlockSignPostHandler :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
|
typedef cBlockHandler super;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cBlockSignHandler(BLOCKTYPE a_BlockType)
|
cBlockSignPostHandler(BLOCKTYPE a_BlockType) :
|
||||||
: cBlockHandler(a_BlockType)
|
super(a_BlockType)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,6 +33,17 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
|
||||||
|
{
|
||||||
|
if (a_RelY <= 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (cBlockInfo::IsSolid(a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static NIBBLETYPE RotationToMetaData(double a_Rotation)
|
static NIBBLETYPE RotationToMetaData(double a_Rotation)
|
||||||
{
|
{
|
||||||
a_Rotation += 180 + (180 / 16); // So it's not aligned with axis
|
a_Rotation += 180 + (180 / 16); // So it's not aligned with axis
|
||||||
@ -45,23 +58,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static NIBBLETYPE DirectionToMetaData(eBlockFace a_Direction)
|
|
||||||
{
|
|
||||||
switch (a_Direction)
|
|
||||||
{
|
|
||||||
case 0x2: return 0x2;
|
|
||||||
case 0x3: return 0x3;
|
|
||||||
case 0x4: return 0x4;
|
|
||||||
case 0x5: return 0x5;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0x2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
virtual void OnPlacedByPlayer(
|
virtual void OnPlacedByPlayer(
|
||||||
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player,
|
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player,
|
||||||
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
||||||
@ -84,6 +80,7 @@ public:
|
|||||||
return (a_Meta + 12) & 0x0f;
|
return (a_Meta + 12) & 0x0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override
|
virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override
|
||||||
{
|
{
|
||||||
// Mirrors signs over the XY plane (North-South Mirroring)
|
// Mirrors signs over the XY plane (North-South Mirroring)
|
@ -33,8 +33,8 @@ public:
|
|||||||
if ((BlockBeforePlacement == E_BLOCK_SNOW) && (MetaBeforePlacement < 7))
|
if ((BlockBeforePlacement == E_BLOCK_SNOW) && (MetaBeforePlacement < 7))
|
||||||
{
|
{
|
||||||
// Only increment if:
|
// Only increment if:
|
||||||
// A snow block was already there (not first time placement) AND
|
// - A snow block was already there (not first time placement) AND
|
||||||
// Height is smaller than 7, the maximum possible height
|
// - Height is smaller than 7, the maximum possible height
|
||||||
MetaBeforePlacement++;
|
MetaBeforePlacement++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
89
src/Blocks/BlockWallSign.h
Normal file
89
src/Blocks/BlockWallSign.h
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "BlockHandler.h"
|
||||||
|
#include "../Entities/Player.h"
|
||||||
|
#include "Chunk.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class cBlockWallSignHandler :
|
||||||
|
public cBlockHandler
|
||||||
|
{
|
||||||
|
typedef cBlockHandler super;
|
||||||
|
|
||||||
|
public:
|
||||||
|
cBlockWallSignHandler(BLOCKTYPE a_BlockType) :
|
||||||
|
super(a_BlockType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
|
||||||
|
{
|
||||||
|
a_Pickups.push_back(cItem(E_ITEM_SIGN, 1, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
virtual const char * GetStepSound(void) override
|
||||||
|
{
|
||||||
|
return "step.wood";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
virtual void OnPlacedByPlayer(
|
||||||
|
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player,
|
||||||
|
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
||||||
|
int a_CursorX, int a_CursorY, int a_CursorZ,
|
||||||
|
BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta
|
||||||
|
) override
|
||||||
|
{
|
||||||
|
a_Player->GetClientHandle()->SendEditSign(a_BlockX, a_BlockY, a_BlockZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
|
||||||
|
{
|
||||||
|
int BlockX = (a_Chunk.GetPosX() * cChunkDef::Width) + a_RelX;
|
||||||
|
int BlockZ = (a_Chunk.GetPosZ() * cChunkDef::Width) + a_RelZ;
|
||||||
|
GetBlockCoordsBehindTheSign(a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ), BlockX, BlockZ);
|
||||||
|
|
||||||
|
return (cBlockInfo::IsSolid(a_ChunkInterface.GetBlock(BlockX, a_RelY, BlockZ)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void GetBlockCoordsBehindTheSign(NIBBLETYPE a_BlockMeta, int & a_BlockX, int & a_BlockZ)
|
||||||
|
{
|
||||||
|
switch (a_BlockMeta)
|
||||||
|
{
|
||||||
|
case 2: a_BlockZ++; break;
|
||||||
|
case 3: a_BlockZ--; break;
|
||||||
|
case 4: a_BlockX++; break;
|
||||||
|
case 5: a_BlockX--; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static NIBBLETYPE DirectionToMetaData(eBlockFace a_Direction)
|
||||||
|
{
|
||||||
|
switch (a_Direction)
|
||||||
|
{
|
||||||
|
case 0x2: return 0x2;
|
||||||
|
case 0x3: return 0x3;
|
||||||
|
case 0x4: return 0x4;
|
||||||
|
case 0x5: return 0x5;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0x2;
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -4,9 +4,99 @@ project (MCServer)
|
|||||||
|
|
||||||
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
||||||
|
|
||||||
file(GLOB SOURCE
|
SET (SRCS
|
||||||
"*.cpp"
|
BlockBed.cpp
|
||||||
"*.h"
|
BlockDoor.cpp
|
||||||
)
|
BlockHandler.cpp
|
||||||
|
BlockPiston.cpp
|
||||||
|
ChunkInterface.cpp)
|
||||||
|
|
||||||
add_library(Blocks ${SOURCE})
|
SET (HDRS
|
||||||
|
BlockAnvil.h
|
||||||
|
BlockBed.h
|
||||||
|
BlockBigFlower.h
|
||||||
|
BlockBrewingStand.h
|
||||||
|
BlockButton.h
|
||||||
|
BlockCactus.h
|
||||||
|
BlockCake.h
|
||||||
|
BlockCarpet.h
|
||||||
|
BlockCauldron.h
|
||||||
|
BlockChest.h
|
||||||
|
BlockCloth.h
|
||||||
|
BlockCobWeb.h
|
||||||
|
BlockCommandBlock.h
|
||||||
|
BlockComparator.h
|
||||||
|
BlockCrops.h
|
||||||
|
BlockDeadBush.h
|
||||||
|
BlockDirt.h
|
||||||
|
BlockDoor.h
|
||||||
|
BlockDropSpenser.h
|
||||||
|
BlockEnchantmentTable.h
|
||||||
|
BlockEnderchest.h
|
||||||
|
BlockEntity.h
|
||||||
|
BlockFarmland.h
|
||||||
|
BlockFenceGate.h
|
||||||
|
BlockFire.h
|
||||||
|
BlockFlower.h
|
||||||
|
BlockFlowerPot.h
|
||||||
|
BlockFluid.h
|
||||||
|
BlockFurnace.h
|
||||||
|
BlockGlass.h
|
||||||
|
BlockGlowstone.h
|
||||||
|
BlockGravel.h
|
||||||
|
BlockHandler.h
|
||||||
|
BlockHayBale.h
|
||||||
|
BlockHopper.h
|
||||||
|
BlockIce.h
|
||||||
|
BlockLadder.h
|
||||||
|
BlockLeaves.h
|
||||||
|
BlockLever.h
|
||||||
|
BlockLilypad.h
|
||||||
|
BlockMelon.h
|
||||||
|
BlockMobHead.h
|
||||||
|
BlockMushroom.h
|
||||||
|
BlockMycelium.h
|
||||||
|
BlockNetherWart.h
|
||||||
|
BlockNewLeaves.h
|
||||||
|
BlockNote.h
|
||||||
|
BlockOre.h
|
||||||
|
BlockPiston.h
|
||||||
|
BlockPlanks.h
|
||||||
|
BlockPluginInterface.h
|
||||||
|
BlockPortal.h
|
||||||
|
BlockPressurePlate.h
|
||||||
|
BlockPumpkin.h
|
||||||
|
BlockQuartz.h
|
||||||
|
BlockRail.h
|
||||||
|
BlockRedstone.h
|
||||||
|
BlockRedstoneLamp.h
|
||||||
|
BlockRedstoneRepeater.h
|
||||||
|
BlockRedstoneTorch.h
|
||||||
|
BlockSand.h
|
||||||
|
BlockSapling.h
|
||||||
|
BlockSideways.h
|
||||||
|
BlockSignPost.h
|
||||||
|
BlockSlab.h
|
||||||
|
BlockSnow.h
|
||||||
|
BlockStairs.h
|
||||||
|
BlockStems.h
|
||||||
|
BlockStone.h
|
||||||
|
BlockSugarcane.h
|
||||||
|
BlockTNT.h
|
||||||
|
BlockTallGrass.h
|
||||||
|
BlockTorch.h
|
||||||
|
BlockTrapdoor.h
|
||||||
|
BlockTripwire.h
|
||||||
|
BlockTripwireHook.h
|
||||||
|
BlockVine.h
|
||||||
|
BlockWallSign.h
|
||||||
|
BlockWorkbench.h
|
||||||
|
BroadcastInterface.h
|
||||||
|
ChunkInterface.h
|
||||||
|
ClearMetaOnDrop.h
|
||||||
|
MetaRotator.h
|
||||||
|
WorldInterface.h)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
add_library(Blocks ${SRCS} ${HDRS})
|
||||||
|
endif()
|
||||||
|
@ -140,7 +140,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cByteBuffer:
|
// cByteBuffer:
|
||||||
|
|
||||||
cByteBuffer::cByteBuffer(size_t a_BufferSize) :
|
cByteBuffer::cByteBuffer(size_t a_BufferSize) :
|
||||||
|
@ -5,144 +5,148 @@ include_directories (SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/../lib/")
|
|||||||
include_directories (SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/../lib/jsoncpp/include")
|
include_directories (SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/../lib/jsoncpp/include")
|
||||||
include_directories (SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/../lib/polarssl/include")
|
include_directories (SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/../lib/polarssl/include")
|
||||||
|
|
||||||
set(FOLDERS OSSupport HTTPServer Items Blocks Protocol Generating PolarSSL++)
|
set(FOLDERS
|
||||||
set(FOLDERS ${FOLDERS} WorldStorage Mobs Entities Simulator UI BlockEntities Generating/Prefabs)
|
OSSupport HTTPServer Items Blocks Protocol Generating PolarSSL++ Bindings
|
||||||
|
WorldStorage Mobs Entities Simulator UI BlockEntities Generating/Prefabs
|
||||||
|
)
|
||||||
|
|
||||||
set(BINDING_DEPENDECIES
|
SET (SRCS
|
||||||
tolua
|
BiomeDef.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/virtual_method_hooks.lua
|
BlockArea.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/AllToLua.pkg
|
BlockID.cpp
|
||||||
Bindings/gen_LuaState_Call.lua
|
BlockInfo.cpp
|
||||||
Bindings/LuaFunctions.h
|
BoundingBox.cpp
|
||||||
Bindings/LuaWindow.h
|
ByteBuffer.cpp
|
||||||
Bindings/Plugin.h
|
ChatColor.cpp
|
||||||
Bindings/PluginLua.h
|
Chunk.cpp
|
||||||
Bindings/PluginManager.h
|
ChunkData.cpp
|
||||||
Bindings/WebPlugin.h
|
ChunkMap.cpp
|
||||||
|
ChunkSender.cpp
|
||||||
|
ChunkStay.cpp
|
||||||
|
ClientHandle.cpp
|
||||||
|
CommandOutput.cpp
|
||||||
|
CompositeChat.cpp
|
||||||
|
CraftingRecipes.cpp
|
||||||
|
Cuboid.cpp
|
||||||
|
DeadlockDetect.cpp
|
||||||
|
Enchantments.cpp
|
||||||
|
FastRandom.cpp
|
||||||
|
FurnaceRecipe.cpp
|
||||||
|
Globals.cpp
|
||||||
|
Group.cpp
|
||||||
|
GroupManager.cpp
|
||||||
|
Inventory.cpp
|
||||||
|
Item.cpp
|
||||||
|
ItemGrid.cpp
|
||||||
|
LightingThread.cpp
|
||||||
|
LineBlockTracer.cpp
|
||||||
|
LinearInterpolation.cpp
|
||||||
|
Log.cpp
|
||||||
|
MCLogger.cpp
|
||||||
|
Map.cpp
|
||||||
|
MapManager.cpp
|
||||||
|
MobCensus.cpp
|
||||||
|
MobFamilyCollecter.cpp
|
||||||
|
MobProximityCounter.cpp
|
||||||
|
MobSpawner.cpp
|
||||||
|
MonsterConfig.cpp
|
||||||
|
Noise.cpp
|
||||||
|
ProbabDistrib.cpp
|
||||||
|
RCONServer.cpp
|
||||||
|
Root.cpp
|
||||||
|
Scoreboard.cpp
|
||||||
|
Server.cpp
|
||||||
|
Statistics.cpp
|
||||||
|
StringCompression.cpp
|
||||||
|
StringUtils.cpp
|
||||||
|
Tracer.cpp
|
||||||
|
VoronoiMap.cpp
|
||||||
|
WebAdmin.cpp
|
||||||
|
World.cpp
|
||||||
|
main.cpp)
|
||||||
|
|
||||||
|
SET (HDRS
|
||||||
|
AllocationPool.h
|
||||||
BiomeDef.h
|
BiomeDef.h
|
||||||
BlockArea.h
|
BlockArea.h
|
||||||
BlockEntities/BlockEntity.h
|
|
||||||
BlockEntities/BlockEntityWithItems.h
|
|
||||||
BlockEntities/ChestEntity.h
|
|
||||||
BlockEntities/DispenserEntity.h
|
|
||||||
BlockEntities/DropSpenserEntity.h
|
|
||||||
BlockEntities/DropperEntity.h
|
|
||||||
BlockEntities/FurnaceEntity.h
|
|
||||||
BlockEntities/HopperEntity.h
|
|
||||||
BlockEntities/JukeboxEntity.h
|
|
||||||
BlockEntities/NoteEntity.h
|
|
||||||
BlockEntities/SignEntity.h
|
|
||||||
BlockEntities/MobHeadEntity.h
|
|
||||||
BlockEntities/FlowerPotEntity.h
|
|
||||||
BlockID.h
|
BlockID.h
|
||||||
|
BlockInServerPluginInterface.h
|
||||||
|
BlockInfo.h
|
||||||
|
BlockTracer.h
|
||||||
BoundingBox.h
|
BoundingBox.h
|
||||||
|
ByteBuffer.h
|
||||||
ChatColor.h
|
ChatColor.h
|
||||||
|
Chunk.h
|
||||||
|
ChunkData.h
|
||||||
|
ChunkDataCallback.h
|
||||||
ChunkDef.h
|
ChunkDef.h
|
||||||
|
ChunkMap.h
|
||||||
|
ChunkSender.h
|
||||||
|
ChunkStay.h
|
||||||
ClientHandle.h
|
ClientHandle.h
|
||||||
|
CommandOutput.h
|
||||||
|
CompositeChat.h
|
||||||
CraftingRecipes.h
|
CraftingRecipes.h
|
||||||
Cuboid.h
|
Cuboid.h
|
||||||
|
DeadlockDetect.h
|
||||||
Defines.h
|
Defines.h
|
||||||
Enchantments.h
|
Enchantments.h
|
||||||
Entities/EntityEffect.h
|
Endianness.h
|
||||||
Entities/Entity.h
|
FastRandom.h
|
||||||
Entities/Floater.h
|
ForEachChunkProvider.h
|
||||||
Entities/Pawn.h
|
FurnaceRecipe.h
|
||||||
Entities/Painting.h
|
Globals.h
|
||||||
Entities/Pickup.h
|
|
||||||
Entities/Player.h
|
|
||||||
Entities/ProjectileEntity.h
|
|
||||||
Entities/ArrowEntity.h
|
|
||||||
Entities/ThrownEggEntity.h
|
|
||||||
Entities/ThrownEnderPearlEntity.h
|
|
||||||
Entities/ExpBottleEntity.h
|
|
||||||
Entities/ThrownSnowballEntity.h
|
|
||||||
Entities/FireChargeEntity.h
|
|
||||||
Entities/FireworkEntity.h
|
|
||||||
Entities/GhastFireballEntity.h
|
|
||||||
Entities/TNTEntity.h
|
|
||||||
Entities/ExpOrb.h
|
|
||||||
Entities/HangingEntity.h
|
|
||||||
Entities/ItemFrame.h
|
|
||||||
Generating/ChunkDesc.h
|
|
||||||
Group.h
|
Group.h
|
||||||
|
GroupManager.h
|
||||||
Inventory.h
|
Inventory.h
|
||||||
Item.h
|
Item.h
|
||||||
ItemGrid.h
|
ItemGrid.h
|
||||||
Mobs/Monster.h
|
LeakFinder.h
|
||||||
OSSupport/File.h
|
LightingThread.h
|
||||||
|
LineBlockTracer.h
|
||||||
|
LinearInterpolation.h
|
||||||
|
LinearUpscale.h
|
||||||
|
Log.h
|
||||||
|
MCLogger.h
|
||||||
|
Map.h
|
||||||
|
MapManager.h
|
||||||
|
Matrix4.h
|
||||||
|
MemoryLeak.h
|
||||||
|
MersenneTwister.h
|
||||||
|
MobCensus.h
|
||||||
|
MobFamilyCollecter.h
|
||||||
|
MobProximityCounter.h
|
||||||
|
MobSpawner.h
|
||||||
|
MonsterConfig.h
|
||||||
|
Noise.h
|
||||||
|
ProbabDistrib.h
|
||||||
|
RCONServer.h
|
||||||
Root.h
|
Root.h
|
||||||
|
Scoreboard.h
|
||||||
Server.h
|
Server.h
|
||||||
|
StackWalker.h
|
||||||
|
Statistics.h
|
||||||
|
StringCompression.h
|
||||||
StringUtils.h
|
StringUtils.h
|
||||||
Tracer.h
|
Tracer.h
|
||||||
UI/Window.h
|
|
||||||
Vector3.h
|
Vector3.h
|
||||||
|
VoronoiMap.h
|
||||||
WebAdmin.h
|
WebAdmin.h
|
||||||
World.h
|
World.h
|
||||||
)
|
XMLParser.h)
|
||||||
|
|
||||||
# List all the files that are generated as part of the Bindings build process
|
include_directories(".")
|
||||||
set (BINDING_OUTPUTS
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/LuaState_Call.inc
|
|
||||||
)
|
|
||||||
|
|
||||||
include_directories(Bindings)
|
|
||||||
include_directories(.)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
ADD_CUSTOM_COMMAND(
|
|
||||||
OUTPUT ${BINDING_OUTPUTS}
|
|
||||||
|
|
||||||
# Copy the Lua DLL into the Bindings folder, so that tolua can run from there:
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ../../MCServer/lua51.dll ./lua51.dll
|
|
||||||
|
|
||||||
# Regenerate bindings:
|
|
||||||
COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/
|
|
||||||
|
|
||||||
# add any new generation dependencies here
|
|
||||||
DEPENDS ${BINDING_DEPENDECIES}
|
|
||||||
)
|
|
||||||
else ()
|
|
||||||
ADD_CUSTOM_COMMAND(
|
|
||||||
# add any new generated bindings here
|
|
||||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.h
|
|
||||||
|
|
||||||
# Regenerate bindings:
|
|
||||||
COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/
|
|
||||||
|
|
||||||
# add any new generation dependencies here
|
|
||||||
DEPENDS ${BINDING_DEPENDECIES}
|
|
||||||
)
|
|
||||||
endif ()
|
|
||||||
set_source_files_properties(Bindings/Bindings.cpp PROPERTIES GENERATED TRUE)
|
|
||||||
set_source_files_properties(Bindings/Bindings.h PROPERTIES GENERATED TRUE)
|
|
||||||
|
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
|
|
||||||
# Bindings need to reference other folders, so they are done here instead
|
# Bindings need to reference other folders, so they are done here instead
|
||||||
|
|
||||||
# lib dependencies are not included
|
# lib dependencies are not included
|
||||||
|
|
||||||
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../lib/polarssl/include")
|
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../lib/polarssl/include")
|
||||||
|
|
||||||
#add cpp files here
|
foreach(folder ${FOLDERS})
|
||||||
add_library(Bindings
|
add_subdirectory(${folder})
|
||||||
Bindings/Bindings
|
endforeach(folder)
|
||||||
Bindings/DeprecatedBindings
|
|
||||||
Bindings/LuaChunkStay
|
|
||||||
Bindings/LuaState
|
|
||||||
Bindings/LuaWindow
|
|
||||||
Bindings/ManualBindings
|
|
||||||
Bindings/Plugin
|
|
||||||
Bindings/PluginLua
|
|
||||||
Bindings/PluginManager
|
|
||||||
Bindings/WebPlugin
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(Bindings lua sqlite tolualib polarssl)
|
get_directory_property(BINDING_DEPENDENCIES DIRECTORY "Bindings" DEFINITION BINDING_DEPENDENCIES)
|
||||||
|
|
||||||
#clear file
|
#clear file
|
||||||
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/BindingDependecies.txt)
|
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/BindingDependecies.txt)
|
||||||
@ -153,43 +157,19 @@ if (NOT MSVC)
|
|||||||
|
|
||||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "Bindings.cpp Bindings.h")
|
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "Bindings.cpp Bindings.h")
|
||||||
|
|
||||||
foreach(folder ${FOLDERS})
|
list(APPEND SOURCE "${SRCS}")
|
||||||
add_subdirectory(${folder})
|
list(APPEND SOURCE "${HDRS}")
|
||||||
endforeach(folder)
|
|
||||||
|
|
||||||
file(GLOB SOURCE
|
|
||||||
"*.cpp"
|
|
||||||
"*.h"
|
|
||||||
)
|
|
||||||
|
|
||||||
list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/StackWalker.cpp" "${PROJECT_SOURCE_DIR}/LeakFinder.cpp")
|
|
||||||
|
|
||||||
# If building a windows version, but not using MSVC, add the resources directly to the makefile:
|
# If building a windows version, but not using MSVC, add the resources directly to the makefile:
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
FILE(GLOB ResourceFiles
|
list(APPEND SOURCE "Resources/MCServer.rc")
|
||||||
"Resources/*.rc"
|
|
||||||
)
|
|
||||||
list(APPEND SOURCE "${ResourceFiles}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
else ()
|
else ()
|
||||||
# MSVC-specific handling: Put all files into one project, separate by the folders:
|
# MSVC-specific handling: Put all files into one project, separate by the folders:
|
||||||
|
|
||||||
# Get all files in this folder:
|
|
||||||
file(GLOB_RECURSE SOURCE
|
|
||||||
"*.cpp"
|
|
||||||
"*.h"
|
|
||||||
"*.pkg"
|
|
||||||
)
|
|
||||||
source_group("" FILES ${SOURCE})
|
|
||||||
|
|
||||||
LIST(APPEND SOURCE "Bindings/Bindings.cpp" "Bindings/Bindings.h")
|
|
||||||
source_group(Bindings FILES "Bindings/Bindings.cpp" "Bindings/Bindings.h")
|
source_group(Bindings FILES "Bindings/Bindings.cpp" "Bindings/Bindings.h")
|
||||||
|
|
||||||
# Add all subfolders as solution-folders:
|
# Add all subfolders as solution-folders:
|
||||||
list(APPEND FOLDERS "Resources")
|
|
||||||
list(APPEND FOLDERS "Bindings")
|
|
||||||
function(includefolder PATH)
|
function(includefolder PATH)
|
||||||
FILE(GLOB FOLDER_FILES
|
FILE(GLOB FOLDER_FILES
|
||||||
"${PATH}/*.cpp"
|
"${PATH}/*.cpp"
|
||||||
@ -202,9 +182,29 @@ else ()
|
|||||||
endfunction(includefolder)
|
endfunction(includefolder)
|
||||||
|
|
||||||
foreach(folder ${FOLDERS})
|
foreach(folder ${FOLDERS})
|
||||||
|
add_subdirectory(${folder})
|
||||||
includefolder(${folder})
|
includefolder(${folder})
|
||||||
|
|
||||||
|
# Get all source files in this folder:
|
||||||
|
get_directory_property(FOLDER_SRCS DIRECTORY ${folder} DEFINITION SRCS)
|
||||||
|
foreach (src ${FOLDER_SRCS})
|
||||||
|
list(APPEND SOURCE "${folder}/${src}")
|
||||||
|
endforeach(src)
|
||||||
|
|
||||||
|
# Get all headers in this folder:
|
||||||
|
get_directory_property(FOLDER_HDRS DIRECTORY ${folder} DEFINITION HDRS)
|
||||||
|
foreach (hdr ${FOLDER_HDRS})
|
||||||
|
list(APPEND SOURCE "${folder}/${hdr}")
|
||||||
|
endforeach(hdr)
|
||||||
endforeach(folder)
|
endforeach(folder)
|
||||||
|
|
||||||
|
list(APPEND SOURCE "${SRCS}")
|
||||||
|
list(APPEND SOURCE "${HDRS}")
|
||||||
|
list(APPEND SOURCE "Bindings/AllToLua.pkg")
|
||||||
|
|
||||||
|
includefolder("Resources")
|
||||||
|
source_group("" FILES ${SOURCE})
|
||||||
|
|
||||||
include_directories("${PROJECT_SOURCE_DIR}")
|
include_directories("${PROJECT_SOURCE_DIR}")
|
||||||
|
|
||||||
# Precompiled headers (1st part)
|
# Precompiled headers (1st part)
|
||||||
@ -230,6 +230,25 @@ endif()
|
|||||||
|
|
||||||
set(EXECUTABLE MCServer)
|
set(EXECUTABLE MCServer)
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
get_directory_property(BINDING_OUTPUTS DIRECTORY "Bindings" DEFINITION BINDING_OUTPUTS)
|
||||||
|
get_directory_property(BINDING_DEPENDENCIES DIRECTORY "Bindings" DEFINITION BINDING_DEPENDENCIES)
|
||||||
|
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
OUTPUT ${BINDING_OUTPUTS}
|
||||||
|
|
||||||
|
# Copy the Lua DLL into the Bindings folder, so that tolua can run from there:
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/MCServer/lua51.dll ./lua51.dll
|
||||||
|
|
||||||
|
# Regenerate bindings:
|
||||||
|
COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/
|
||||||
|
|
||||||
|
# add any new generation dependencies here
|
||||||
|
DEPENDS ${BINDING_DEPENDECIES}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(${EXECUTABLE} ${SOURCE})
|
add_executable(${EXECUTABLE} ${SOURCE})
|
||||||
|
|
||||||
|
|
||||||
@ -261,9 +280,11 @@ endif ()
|
|||||||
|
|
||||||
|
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
target_link_libraries(${EXECUTABLE} OSSupport HTTPServer Bindings Items Blocks)
|
target_link_libraries(${EXECUTABLE}
|
||||||
target_link_libraries(${EXECUTABLE} Protocol Generating Generating_Prefabs WorldStorage)
|
OSSupport HTTPServer Bindings Items Blocks
|
||||||
target_link_libraries(${EXECUTABLE} Mobs Entities Simulator UI BlockEntities PolarSSL++)
|
Protocol Generating Generating_Prefabs WorldStorage
|
||||||
|
Mobs Entities Simulator UI BlockEntities PolarSSL++
|
||||||
|
)
|
||||||
endif ()
|
endif ()
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
|
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
|
||||||
|
219
src/CheckBasicStyle.lua
Normal file
219
src/CheckBasicStyle.lua
Normal file
@ -0,0 +1,219 @@
|
|||||||
|
|
||||||
|
-- CheckBasicStyle.lua
|
||||||
|
|
||||||
|
--[[
|
||||||
|
Checks that all source files (*.cpp, *.h) use the basic style requirements of the project:
|
||||||
|
- Tabs for indentation, spaces for alignment
|
||||||
|
- Trailing whitespace on non-empty lines
|
||||||
|
- Two spaces between code and line-end comment ("//")
|
||||||
|
- Spaces after comma, not before
|
||||||
|
- Opening braces not at the end of a code line
|
||||||
|
- (TODO) Spaces after if, for, while
|
||||||
|
- (TODO) Spaces before *, /, &
|
||||||
|
- (TODO) Hex numbers with even digit length
|
||||||
|
- (TODO) Hex numbers in lowercase
|
||||||
|
- (TODO) Line dividers (////...) exactly 80 slashes
|
||||||
|
- (TODO) Not using "* "-style doxy comment continuation lines
|
||||||
|
|
||||||
|
Violations that cannot be checked easily:
|
||||||
|
- Spaces around "+" (there are things like "a++", "++a", "a += 1", "X+", "stack +1" and ascii-drawn tables)
|
||||||
|
|
||||||
|
Reports all violations on stdout in a form that is readable by Visual Studio's parser, so that dblclicking
|
||||||
|
the line brings the editor directly to the violation.
|
||||||
|
|
||||||
|
Returns 0 on success, 1 on internal failure, 2 if any violations found
|
||||||
|
|
||||||
|
This script requires LuaFileSystem to be available in the current Lua interpreter.
|
||||||
|
--]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Check that LFS is installed:
|
||||||
|
local hasLfs = pcall(require, "lfs")
|
||||||
|
if not(hasLfs) then
|
||||||
|
print("This script requires LuaFileSystem to be installed")
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
local lfs = require("lfs")
|
||||||
|
assert(lfs ~= nil)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- The list of file extensions that are processed:
|
||||||
|
local g_ShouldProcessExt =
|
||||||
|
{
|
||||||
|
["h"] = true,
|
||||||
|
["cpp"] = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
--- The list of files not to be processed:
|
||||||
|
local g_IgnoredFiles =
|
||||||
|
{
|
||||||
|
"./Bindings/Bindings.cpp",
|
||||||
|
"./Bindings/DeprecatedBindings.cpp",
|
||||||
|
"./LeakFinder.cpp",
|
||||||
|
"./LeakFinder.h",
|
||||||
|
"./MersenneTwister.h",
|
||||||
|
"./StackWalker.cpp",
|
||||||
|
"./StackWalker.h",
|
||||||
|
}
|
||||||
|
|
||||||
|
--- The list of files not to be processed, as a dictionary (filename => true), built from g_IgnoredFiles
|
||||||
|
local g_ShouldIgnoreFile = {}
|
||||||
|
|
||||||
|
-- Initialize the g_ShouldIgnoreFile map:
|
||||||
|
for _, fnam in ipairs(g_IgnoredFiles) do
|
||||||
|
g_ShouldIgnoreFile[fnam] = true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Keeps track of the number of violations for this folder
|
||||||
|
local g_NumViolations = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--- Reports one violation
|
||||||
|
-- Pretty-prints the message
|
||||||
|
-- Also increments g_NumViolations
|
||||||
|
local function ReportViolation(a_FileName, a_LineNumber, a_PatStart, a_PatEnd, a_Message)
|
||||||
|
print(a_FileName .. "(" .. a_LineNumber .. "): " .. a_PatStart .. " .. " .. a_PatEnd .. ": " .. a_Message)
|
||||||
|
g_NumViolations = g_NumViolations + 1
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--- Searches for the specified pattern, if found, reports it as a violation with the given message
|
||||||
|
local function ReportViolationIfFound(a_Line, a_FileName, a_LineNum, a_Pattern, a_Message)
|
||||||
|
local patStart, patEnd = a_Line:find(a_Pattern)
|
||||||
|
if not(patStart) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
ReportViolation(a_FileName, a_LineNum, patStart, patEnd, a_Message)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local g_ViolationPatterns =
|
||||||
|
{
|
||||||
|
-- Check against indenting using spaces:
|
||||||
|
{"^\t* +", "Indenting with a space"},
|
||||||
|
|
||||||
|
-- Check against alignment using tabs:
|
||||||
|
{"[^%s]\t+[^%s]", "Aligning with a tab"},
|
||||||
|
|
||||||
|
-- Check against trailing whitespace:
|
||||||
|
{"[^%s]%s+\n", "Trailing whitespace"},
|
||||||
|
|
||||||
|
-- Check that all "//"-style comments have at least two spaces in front (unless alone on line):
|
||||||
|
{"[^%s] //", "Needs at least two spaces in front of a \"//\"-style comment"},
|
||||||
|
|
||||||
|
-- Check that all "//"-style comments have at least one spaces after:
|
||||||
|
{"%s//[^%s/*<]", "Needs a space after a \"//\"-style comment"},
|
||||||
|
|
||||||
|
-- Check that all commas have spaces after them and not in front of them:
|
||||||
|
{" ,", "Extra space before a \",\""},
|
||||||
|
{",[^%s\"%%]", "Needs a space after a \",\""}, -- Report all except >> "," << needed for splitting and >>,%s<< needed for formatting
|
||||||
|
|
||||||
|
-- Check that opening braces are not at the end of a code line:
|
||||||
|
{"[^%s].-{\n?$", "Brace should be on a separate line"},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--- Processes one file
|
||||||
|
local function ProcessFile(a_FileName)
|
||||||
|
assert(type(a_FileName) == "string")
|
||||||
|
|
||||||
|
-- Read the whole file:
|
||||||
|
local f, err = io.open(a_FileName, "r")
|
||||||
|
if (f == nil) then
|
||||||
|
print("Cannot open file \"" .. a_FileName .. "\": " .. err)
|
||||||
|
print("Aborting")
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
local all = f:read("*all")
|
||||||
|
|
||||||
|
-- Check that the last line is empty - otherwise processing won't work properly:
|
||||||
|
local lastChar = string.byte(all, string.len(all))
|
||||||
|
if ((lastChar ~= 13) and (lastChar ~= 10)) then
|
||||||
|
local numLines = 1
|
||||||
|
string.gsub(all, "\n", function() numLines = numLines + 1 end) -- Count the number of line-ends
|
||||||
|
ReportViolation(a_FileName, numLines, 1, 1, "Missing empty line at file end")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Process each line separately:
|
||||||
|
-- Ref.: http://stackoverflow.com/questions/10416869/iterate-over-possibly-empty-lines-in-a-way-that-matches-the-expectations-of-exis
|
||||||
|
local lineCounter = 1
|
||||||
|
all:gsub("\r\n", "\n") -- normalize CRLF into LF-only
|
||||||
|
string.gsub(all .. "\n", "[^\n]*\n", -- Iterate over each line, while preserving empty lines
|
||||||
|
function(a_Line)
|
||||||
|
-- Check against each violation pattern:
|
||||||
|
for _, pat in ipairs(g_ViolationPatterns) do
|
||||||
|
ReportViolationIfFound(a_Line, a_FileName, lineCounter, pat[1], pat[2])
|
||||||
|
end
|
||||||
|
|
||||||
|
lineCounter = lineCounter + 1
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--- Processes one item - a file or a folder
|
||||||
|
local function ProcessItem(a_ItemName)
|
||||||
|
assert(type(a_ItemName) == "string")
|
||||||
|
|
||||||
|
-- Skip files / folders that should be ignored
|
||||||
|
if (g_ShouldIgnoreFile[a_ItemName]) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- If the item is a folder, recurse:
|
||||||
|
local attrs = lfs.attributes(a_ItemName)
|
||||||
|
if (attrs and (attrs.mode == "directory")) then
|
||||||
|
for fnam in lfs.dir(a_ItemName) do
|
||||||
|
if ((fnam ~= ".") and (fnam ~= "..")) then
|
||||||
|
ProcessItem(a_ItemName .. "/" .. fnam)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local ext = a_ItemName:match("%.([^/%.]-)$")
|
||||||
|
if (g_ShouldProcessExt[ext]) then
|
||||||
|
ProcessFile(a_ItemName)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Process the entire current folder:
|
||||||
|
ProcessItem(".")
|
||||||
|
|
||||||
|
-- Report final verdict:
|
||||||
|
print("Number of violations found: " .. g_NumViolations)
|
||||||
|
if (g_NumViolations > 0) then
|
||||||
|
os.exit(2)
|
||||||
|
else
|
||||||
|
os.exit(0)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// sSetBlock:
|
// sSetBlock:
|
||||||
|
|
||||||
sSetBlock::sSetBlock( int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta ) // absolute block position
|
sSetBlock::sSetBlock( int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta ) // absolute block position
|
||||||
@ -58,7 +58,7 @@ sSetBlock::sSetBlock( int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_Bloc
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cChunk:
|
// cChunk:
|
||||||
|
|
||||||
cChunk::cChunk(
|
cChunk::cChunk(
|
||||||
@ -1727,7 +1727,7 @@ void cChunk::CollectPickupsByPlayer(cPlayer * a_Player)
|
|||||||
{
|
{
|
||||||
if ((!(*itr)->IsPickup()) && (!(*itr)->IsProjectile()))
|
if ((!(*itr)->IsPickup()) && (!(*itr)->IsProjectile()))
|
||||||
{
|
{
|
||||||
continue; // Only pickups and projectiles
|
continue; // Only pickups and projectiles can be picked up
|
||||||
}
|
}
|
||||||
float DiffX = (float)((*itr)->GetPosX() - PosX );
|
float DiffX = (float)((*itr)->GetPosX() - PosX );
|
||||||
float DiffY = (float)((*itr)->GetPosY() - PosY );
|
float DiffY = (float)((*itr)->GetPosY() - PosY );
|
||||||
@ -2326,7 +2326,7 @@ bool cChunk::DoWithNoteBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cNoteBl
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The correct block entity is here,
|
// The correct block entity is here
|
||||||
if (a_Callback.Item((cNoteEntity *)*itr))
|
if (a_Callback.Item((cNoteEntity *)*itr))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -2422,7 +2422,7 @@ bool cChunk::DoWithFlowerPotAt(int a_BlockX, int a_BlockY, int a_BlockZ, cFlower
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The correct block entity is here,
|
// The correct block entity is here
|
||||||
if (a_Callback.Item((cFlowerPotEntity *)*itr))
|
if (a_Callback.Item((cFlowerPotEntity *)*itr))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -274,7 +274,6 @@ public:
|
|||||||
|
|
||||||
void UseBlockEntity(cPlayer * a_Player, int a_X, int a_Y, int a_Z); // [x, y, z] in world block coords
|
void UseBlockEntity(cPlayer * a_Player, int a_X, int a_Y, int a_Z); // [x, y, z] in world block coords
|
||||||
|
|
||||||
void CalculateLighting(); // Recalculate right now
|
|
||||||
void CalculateHeightmap(const BLOCKTYPE * a_BlockTypes);
|
void CalculateHeightmap(const BLOCKTYPE * a_BlockTypes);
|
||||||
|
|
||||||
// Broadcast various packets to all clients of this chunk:
|
// Broadcast various packets to all clients of this chunk:
|
||||||
|
@ -138,9 +138,9 @@ public:
|
|||||||
{
|
{
|
||||||
#if AXIS_ORDER == AXIS_ORDER_XZY
|
#if AXIS_ORDER == AXIS_ORDER_XZY
|
||||||
// For some reason, NOT using the Horner schema is faster. Weird.
|
// For some reason, NOT using the Horner schema is faster. Weird.
|
||||||
return x + (z * cChunkDef::Width) + (y * cChunkDef::Width * cChunkDef::Width); // 1.2 is XZY
|
return x + (z * cChunkDef::Width) + (y * cChunkDef::Width * cChunkDef::Width); // 1.2 uses XZY
|
||||||
#elif AXIS_ORDER == AXIS_ORDER_YZX
|
#elif AXIS_ORDER == AXIS_ORDER_YZX
|
||||||
return y + (z * cChunkDef::Width) + (x * cChunkDef::Height * cChunkDef::Width); // 1.1 is YZX
|
return y + (z * cChunkDef::Width) + (x * cChunkDef::Height * cChunkDef::Width); // 1.1 uses YZX
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,12 +33,13 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cChunkMap:
|
// cChunkMap:
|
||||||
|
|
||||||
cChunkMap::cChunkMap(cWorld * a_World )
|
cChunkMap::cChunkMap(cWorld * a_World) :
|
||||||
: m_World( a_World ),
|
m_World(a_World),
|
||||||
m_Pool(
|
m_Pool(
|
||||||
new cListAllocationPool<cChunkData::sChunkSection, 1600>(
|
new cListAllocationPool<cChunkData::sChunkSection, 1600>(
|
||||||
std::auto_ptr<cAllocationPool<cChunkData::sChunkSection>::cStarvationCallbacks>(
|
std::auto_ptr<cAllocationPool<cChunkData::sChunkSection>::cStarvationCallbacks>(
|
||||||
new cStarvationCallbacks())
|
new cStarvationCallbacks()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -1950,10 +1951,7 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
|
|||||||
double FinalDamage = (((1 / AbsoluteEntityPos.x) + (1 / AbsoluteEntityPos.y) + (1 / AbsoluteEntityPos.z)) * 2) * m_ExplosionSize;
|
double FinalDamage = (((1 / AbsoluteEntityPos.x) + (1 / AbsoluteEntityPos.y) + (1 / AbsoluteEntityPos.z)) * 2) * m_ExplosionSize;
|
||||||
|
|
||||||
// Clip damage values
|
// Clip damage values
|
||||||
if (FinalDamage > a_Entity->GetMaxHealth())
|
FinalDamage = Clamp(FinalDamage, 0.0, (double)a_Entity->GetMaxHealth());
|
||||||
FinalDamage = a_Entity->GetMaxHealth();
|
|
||||||
else if (FinalDamage < 0)
|
|
||||||
FinalDamage = 0;
|
|
||||||
|
|
||||||
if (!a_Entity->IsTNT() && !a_Entity->IsFallingBlock()) // Don't apply damage to other TNT entities and falling blocks, they should be invincible
|
if (!a_Entity->IsTNT() && !a_Entity->IsFallingBlock()) // Don't apply damage to other TNT entities and falling blocks, they should be invincible
|
||||||
{
|
{
|
||||||
@ -2735,7 +2733,7 @@ cChunkMap::cChunkLayer::~cChunkLayer()
|
|||||||
for (size_t i = 0; i < ARRAYCOUNT(m_Chunks); ++i)
|
for (size_t i = 0; i < ARRAYCOUNT(m_Chunks); ++i)
|
||||||
{
|
{
|
||||||
delete m_Chunks[i];
|
delete m_Chunks[i];
|
||||||
m_Chunks[i] = NULL; // // Must zero out, because further chunk deletions query the chunkmap for entities and that would touch deleted data
|
m_Chunks[i] = NULL; // Must zero out, because further chunk deletions query the chunkmap for entities and that would touch deleted data
|
||||||
} // for i - m_Chunks[]
|
} // for i - m_Chunks[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cNotifyChunkSender:
|
// cNotifyChunkSender:
|
||||||
|
|
||||||
void cNotifyChunkSender::Call(int a_ChunkX, int a_ChunkZ)
|
void cNotifyChunkSender::Call(int a_ChunkX, int a_ChunkZ)
|
||||||
@ -29,7 +29,7 @@ void cNotifyChunkSender::Call(int a_ChunkX, int a_ChunkZ)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cChunkSender:
|
// cChunkSender:
|
||||||
|
|
||||||
cChunkSender::cChunkSender(void) :
|
cChunkSender::cChunkSender(void) :
|
||||||
|
@ -60,7 +60,7 @@ int cClientHandle::s_ClientCount = 0;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cClientHandle:
|
// cClientHandle:
|
||||||
|
|
||||||
cClientHandle::cClientHandle(const cSocket * a_Socket, int a_ViewDistance) :
|
cClientHandle::cClientHandle(const cSocket * a_Socket, int a_ViewDistance) :
|
||||||
@ -1209,11 +1209,12 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e
|
|||||||
{
|
{
|
||||||
HandlePlaceBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, *ItemHandler);
|
HandlePlaceBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, *ItemHandler);
|
||||||
}
|
}
|
||||||
else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable(EquippedDamage)) && !m_Player->IsGameModeCreative())
|
else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable(EquippedDamage)))
|
||||||
{
|
{
|
||||||
if (m_Player->IsSatiated() && !ItemHandler->IsDrinkable(EquippedDamage))
|
if ((m_Player->IsSatiated() || m_Player->IsGameModeCreative()) &&
|
||||||
|
ItemHandler->IsFood())
|
||||||
{
|
{
|
||||||
// The player is satiated, they cannot eat
|
// The player is satiated or in creative, and trying to eat
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_Player->StartEating();
|
m_Player->StartEating();
|
||||||
@ -1457,8 +1458,10 @@ void cClientHandle::HandleAnimation(char a_Animation)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: // Anything else is the same
|
default: // Anything else is the same
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_Player->GetWorld()->BroadcastEntityAnimation(*m_Player, a_Animation, this);
|
m_Player->GetWorld()->BroadcastEntityAnimation(*m_Player, a_Animation, this);
|
||||||
}
|
}
|
||||||
|
@ -271,15 +271,14 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/** Handles the block placing packet when it is a real block placement (not block-using, item-using or eating) */
|
|
||||||
void HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, cItemHandler & a_ItemHandler);
|
|
||||||
|
|
||||||
/** The type used for storing the names of registered plugin channels. */
|
/** The type used for storing the names of registered plugin channels. */
|
||||||
typedef std::set<AString> cChannels;
|
typedef std::set<AString> cChannels;
|
||||||
|
|
||||||
int m_ViewDistance; // Number of chunks the player can see in each direction; 4 is the minimum ( http://wiki.vg/Protocol_FAQ#.E2.80.A6all_connecting_clients_spasm_and_jerk_uncontrollably.21 )
|
/** Number of chunks the player can see in each direction; 4 is the minimum ( http://wiki.vg/Protocol_FAQ#.E2.80.A6all_connecting_clients_spasm_and_jerk_uncontrollably.21 ) */
|
||||||
|
int m_ViewDistance;
|
||||||
|
|
||||||
static const int GENERATEDISTANCE = 2; // Server generates this many chunks AHEAD of player sight. 2 is the minimum, since foliage is generated 1 step behind chunk terrain generation
|
/** Server generates this many chunks AHEAD of player sight. */
|
||||||
|
static const int GENERATEDISTANCE = 2;
|
||||||
|
|
||||||
AString m_IPString;
|
AString m_IPString;
|
||||||
|
|
||||||
@ -317,7 +316,7 @@ private:
|
|||||||
int m_PingID;
|
int m_PingID;
|
||||||
long long m_PingStartTime;
|
long long m_PingStartTime;
|
||||||
long long m_LastPingTime;
|
long long m_LastPingTime;
|
||||||
static const unsigned short PING_TIME_MS = 1000; //minecraft sends 1 per 20 ticks (1 second or every 1000 ms)
|
static const unsigned short PING_TIME_MS = 1000; // Vanilla sends 1 per 20 ticks (1 second or every 1000 ms)
|
||||||
|
|
||||||
// Values required for block dig animation
|
// Values required for block dig animation
|
||||||
int m_BlockDigAnimStage; // Current stage of the animation; -1 if not digging
|
int m_BlockDigAnimStage; // Current stage of the animation; -1 if not digging
|
||||||
@ -374,6 +373,9 @@ private:
|
|||||||
cChannels m_PluginChannels;
|
cChannels m_PluginChannels;
|
||||||
|
|
||||||
|
|
||||||
|
/** Handles the block placing packet when it is a real block placement (not block-using, item-using or eating) */
|
||||||
|
void HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, cItemHandler & a_ItemHandler);
|
||||||
|
|
||||||
/** Returns true if the rate block interactions is within a reasonable limit (bot protection) */
|
/** Returns true if the rate block interactions is within a reasonable limit (bot protection) */
|
||||||
bool CheckBlockInteractionsRate(void);
|
bool CheckBlockInteractionsRate(void);
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCommandOutputCallback:
|
// cCommandOutputCallback:
|
||||||
|
|
||||||
void cCommandOutputCallback::Out(const char * a_Fmt, ...)
|
void cCommandOutputCallback::Out(const char * a_Fmt, ...)
|
||||||
@ -28,7 +28,7 @@ void cCommandOutputCallback::Out(const char * a_Fmt, ...)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cLogCommandOutputCallback:
|
// cLogCommandOutputCallback:
|
||||||
|
|
||||||
void cLogCommandOutputCallback::Out(const AString & a_Text)
|
void cLogCommandOutputCallback::Out(const AString & a_Text)
|
||||||
|
@ -100,7 +100,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompositeChat:
|
// cCompositeChat:
|
||||||
|
|
||||||
cCompositeChat::cCompositeChat(void) :
|
cCompositeChat::cCompositeChat(void) :
|
||||||
@ -399,7 +399,7 @@ void cCompositeChat::AddStyle(AString & a_Style, const AString & a_AddStyle)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompositeChat::cBasePart:
|
// cCompositeChat::cBasePart:
|
||||||
|
|
||||||
cCompositeChat::cBasePart::cBasePart(cCompositeChat::ePartType a_PartType, const AString & a_Text, const AString & a_Style) :
|
cCompositeChat::cBasePart::cBasePart(cCompositeChat::ePartType a_PartType, const AString & a_Text, const AString & a_Style) :
|
||||||
@ -413,7 +413,7 @@ cCompositeChat::cBasePart::cBasePart(cCompositeChat::ePartType a_PartType, const
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompositeChat::cTextPart:
|
// cCompositeChat::cTextPart:
|
||||||
|
|
||||||
cCompositeChat::cTextPart::cTextPart(const AString & a_Text, const AString &a_Style) :
|
cCompositeChat::cTextPart::cTextPart(const AString & a_Text, const AString &a_Style) :
|
||||||
@ -425,7 +425,7 @@ cCompositeChat::cTextPart::cTextPart(const AString & a_Text, const AString &a_St
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompositeChat::cClientTranslatedPart:
|
// cCompositeChat::cClientTranslatedPart:
|
||||||
|
|
||||||
cCompositeChat::cClientTranslatedPart::cClientTranslatedPart(const AString & a_TranslationID, const AStringVector & a_Parameters, const AString & a_Style) :
|
cCompositeChat::cClientTranslatedPart::cClientTranslatedPart(const AString & a_TranslationID, const AStringVector & a_Parameters, const AString & a_Style) :
|
||||||
@ -438,7 +438,7 @@ cCompositeChat::cClientTranslatedPart::cClientTranslatedPart(const AString & a_T
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompositeChat::cUrlPart:
|
// cCompositeChat::cUrlPart:
|
||||||
|
|
||||||
cCompositeChat::cUrlPart::cUrlPart(const AString & a_Text, const AString & a_Url, const AString & a_Style) :
|
cCompositeChat::cUrlPart::cUrlPart(const AString & a_Text, const AString & a_Url, const AString & a_Style) :
|
||||||
@ -451,7 +451,7 @@ cCompositeChat::cUrlPart::cUrlPart(const AString & a_Text, const AString & a_Url
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompositeChat::cCommandPart:
|
// cCompositeChat::cCommandPart:
|
||||||
|
|
||||||
cCompositeChat::cCommandPart::cCommandPart(ePartType a_PartType, const AString & a_Text, const AString & a_Command, const AString & a_Style) :
|
cCompositeChat::cCommandPart::cCommandPart(ePartType a_PartType, const AString & a_Text, const AString & a_Command, const AString & a_Style) :
|
||||||
@ -464,7 +464,7 @@ cCompositeChat::cCommandPart::cCommandPart(ePartType a_PartType, const AString &
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompositeChat::cRunCommandPart:
|
// cCompositeChat::cRunCommandPart:
|
||||||
|
|
||||||
cCompositeChat::cRunCommandPart::cRunCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style) :
|
cCompositeChat::cRunCommandPart::cRunCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style) :
|
||||||
@ -475,7 +475,7 @@ cCompositeChat::cRunCommandPart::cRunCommandPart(const AString & a_Text, const A
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompositeChat::cSuggestCommandPart:
|
// cCompositeChat::cSuggestCommandPart:
|
||||||
|
|
||||||
cCompositeChat::cSuggestCommandPart::cSuggestCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style) :
|
cCompositeChat::cSuggestCommandPart::cSuggestCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style) :
|
||||||
@ -487,7 +487,7 @@ cCompositeChat::cSuggestCommandPart::cSuggestCommandPart(const AString & a_Text,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompositeChat::cShowAchievementPart:
|
// cCompositeChat::cShowAchievementPart:
|
||||||
|
|
||||||
cCompositeChat::cShowAchievementPart::cShowAchievementPart(const AString & a_PlayerName, const AString & a_Achievement, const AString & a_Style) :
|
cCompositeChat::cShowAchievementPart::cShowAchievementPart(const AString & a_PlayerName, const AString & a_Achievement, const AString & a_Style) :
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCraftingGrid:
|
// cCraftingGrid:
|
||||||
|
|
||||||
cCraftingGrid::cCraftingGrid(int a_Width, int a_Height) :
|
cCraftingGrid::cCraftingGrid(int a_Width, int a_Height) :
|
||||||
@ -206,7 +206,7 @@ void cCraftingGrid::Dump(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCraftingRecipe:
|
// cCraftingRecipe:
|
||||||
|
|
||||||
cCraftingRecipe::cCraftingRecipe(const cCraftingGrid & a_CraftingGrid) :
|
cCraftingRecipe::cCraftingRecipe(const cCraftingGrid & a_CraftingGrid) :
|
||||||
@ -259,7 +259,7 @@ void cCraftingRecipe::Dump(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCraftingRecipes:
|
// cCraftingRecipes:
|
||||||
|
|
||||||
cCraftingRecipes::cCraftingRecipes(void)
|
cCraftingRecipes::cCraftingRecipes(void)
|
||||||
|
@ -21,7 +21,7 @@ static bool DoIntervalsIntersect(int a_Min1, int a_Max1, int a_Min2, int a_Max2)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCuboid:
|
// cCuboid:
|
||||||
|
|
||||||
void cCuboid::Assign(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2)
|
void cCuboid::Assign(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ChatColor.h"
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
@ -22,7 +21,7 @@ typedef std::vector<int> cSlotNums;
|
|||||||
/// Experience Orb setup
|
/// Experience Orb setup
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
//open to suggestion on naming convention here :)
|
// Open to suggestion on naming convention here :)
|
||||||
MAX_EXPERIENCE_ORB_SIZE = 2000
|
MAX_EXPERIENCE_ORB_SIZE = 2000
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@ -471,18 +470,7 @@ inline void AddFaceDirection(int & a_BlockX, unsigned char & a_BlockY, int & a_B
|
|||||||
{
|
{
|
||||||
int Y = a_BlockY;
|
int Y = a_BlockY;
|
||||||
AddFaceDirection(a_BlockX, Y, a_BlockZ, a_BlockFace, a_bInverse);
|
AddFaceDirection(a_BlockX, Y, a_BlockZ, a_BlockFace, a_bInverse);
|
||||||
if (Y < 0)
|
a_BlockY = Clamp<unsigned char>(Y, 0, 255);
|
||||||
{
|
|
||||||
a_BlockY = 0;
|
|
||||||
}
|
|
||||||
else if (Y > 255)
|
|
||||||
{
|
|
||||||
a_BlockY = 255;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
a_BlockY = (unsigned char)Y;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,11 +4,64 @@ project (MCServer)
|
|||||||
|
|
||||||
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
||||||
|
|
||||||
file(GLOB SOURCE
|
SET (SRCS
|
||||||
"*.cpp"
|
ArrowEntity.cpp
|
||||||
"*.h"
|
Boat.cpp
|
||||||
)
|
EnderCrystal.cpp
|
||||||
|
Entity.cpp
|
||||||
|
EntityEffect.cpp
|
||||||
|
ExpBottleEntity.cpp
|
||||||
|
ExpOrb.cpp
|
||||||
|
FallingBlock.cpp
|
||||||
|
FireChargeEntity.cpp
|
||||||
|
FireworkEntity.cpp
|
||||||
|
Floater.cpp
|
||||||
|
GhastFireballEntity.cpp
|
||||||
|
HangingEntity.cpp
|
||||||
|
ItemFrame.cpp
|
||||||
|
Minecart.cpp
|
||||||
|
Painting.cpp
|
||||||
|
Pawn.cpp
|
||||||
|
Pickup.cpp
|
||||||
|
Player.cpp
|
||||||
|
ProjectileEntity.cpp
|
||||||
|
SplashPotionEntity.cpp
|
||||||
|
TNTEntity.cpp
|
||||||
|
ThrownEggEntity.cpp
|
||||||
|
ThrownEnderPearlEntity.cpp
|
||||||
|
ThrownSnowballEntity.cpp
|
||||||
|
WitherSkullEntity.cpp)
|
||||||
|
|
||||||
add_library(Entities ${SOURCE})
|
SET (HDRS
|
||||||
|
ArrowEntity.h
|
||||||
|
Boat.h
|
||||||
|
EnderCrystal.h
|
||||||
|
Entity.h
|
||||||
|
EntityEffect.h
|
||||||
|
ExpBottleEntity.h
|
||||||
|
ExpOrb.h
|
||||||
|
FallingBlock.h
|
||||||
|
FireChargeEntity.h
|
||||||
|
FireworkEntity.h
|
||||||
|
Floater.h
|
||||||
|
GhastFireballEntity.h
|
||||||
|
HangingEntity.h
|
||||||
|
ItemFrame.h
|
||||||
|
Minecart.h
|
||||||
|
Painting.h
|
||||||
|
Pawn.h
|
||||||
|
Pickup.h
|
||||||
|
Player.h
|
||||||
|
ProjectileEntity.h
|
||||||
|
SplashPotionEntity.h
|
||||||
|
TNTEntity.h
|
||||||
|
ThrownEggEntity.h
|
||||||
|
ThrownEnderPearlEntity.h
|
||||||
|
ThrownSnowballEntity.h
|
||||||
|
WitherSkullEntity.h)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
add_library(Entities ${SRCS} ${HDRS})
|
||||||
|
|
||||||
target_link_libraries(Entities WorldStorage)
|
target_link_libraries(Entities WorldStorage)
|
||||||
|
endif()
|
||||||
|
@ -49,6 +49,7 @@ cEntity::cEntity(eEntityType a_EntityType, double a_X, double a_Y, double a_Z, d
|
|||||||
, m_IsSubmerged(false)
|
, m_IsSubmerged(false)
|
||||||
, m_AirLevel(0)
|
, m_AirLevel(0)
|
||||||
, m_AirTickTimer(0)
|
, m_AirTickTimer(0)
|
||||||
|
, m_TicksAlive(0)
|
||||||
, m_HeadYaw(0.0)
|
, m_HeadYaw(0.0)
|
||||||
, m_Rot(0.0, 0.0, 0.0)
|
, m_Rot(0.0, 0.0, 0.0)
|
||||||
, m_Pos(a_X, a_Y, a_Z)
|
, m_Pos(a_X, a_Y, a_Z)
|
||||||
@ -327,10 +328,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
|
|||||||
|
|
||||||
// TODO: Apply damage to armor
|
// TODO: Apply damage to armor
|
||||||
|
|
||||||
if (m_Health < 0)
|
m_Health = std::max(m_Health, 0);
|
||||||
{
|
|
||||||
m_Health = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((IsMob() || IsPlayer()) && (a_TDI.Attacker != NULL)) // Knockback for only players and mobs
|
if ((IsMob() || IsPlayer()) && (a_TDI.Attacker != NULL)) // Knockback for only players and mobs
|
||||||
{
|
{
|
||||||
@ -562,6 +560,8 @@ void cEntity::SetHealth(int a_Health)
|
|||||||
|
|
||||||
void cEntity::Tick(float a_Dt, cChunk & a_Chunk)
|
void cEntity::Tick(float a_Dt, cChunk & a_Chunk)
|
||||||
{
|
{
|
||||||
|
m_TicksAlive++;
|
||||||
|
|
||||||
if (m_InvulnerableTicks > 0)
|
if (m_InvulnerableTicks > 0)
|
||||||
{
|
{
|
||||||
m_InvulnerableTicks--;
|
m_InvulnerableTicks--;
|
||||||
@ -1146,10 +1146,7 @@ void cEntity::SetMaxHealth(int a_MaxHealth)
|
|||||||
m_MaxHealth = a_MaxHealth;
|
m_MaxHealth = a_MaxHealth;
|
||||||
|
|
||||||
// Reset health, if too high:
|
// Reset health, if too high:
|
||||||
if (m_Health > a_MaxHealth)
|
m_Health = std::min(m_Health, a_MaxHealth);
|
||||||
{
|
|
||||||
m_Health = a_MaxHealth;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1572,7 +1569,7 @@ void cEntity::SteerVehicle(float a_Forward, float a_Sideways)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Get look vector (this is NOT a rotation!)
|
// Get look vector (this is NOT a rotation!)
|
||||||
Vector3d cEntity::GetLookVector(void) const
|
Vector3d cEntity::GetLookVector(void) const
|
||||||
{
|
{
|
||||||
@ -1586,7 +1583,7 @@ Vector3d cEntity::GetLookVector(void) const
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Set position
|
// Set position
|
||||||
void cEntity::SetPosition(double a_PosX, double a_PosY, double a_PosZ)
|
void cEntity::SetPosition(double a_PosX, double a_PosY, double a_PosZ)
|
||||||
{
|
{
|
||||||
|
@ -416,6 +416,9 @@ public:
|
|||||||
/** Gets remaining air of a monster */
|
/** Gets remaining air of a monster */
|
||||||
int GetAirLevel(void) const { return m_AirLevel; }
|
int GetAirLevel(void) const { return m_AirLevel; }
|
||||||
|
|
||||||
|
/** Gets number of ticks this entity has existed for */
|
||||||
|
long int GetTicksAlive(void) const { return m_TicksAlive; }
|
||||||
|
|
||||||
/** Gets the invulnerable ticks from the entity */
|
/** Gets the invulnerable ticks from the entity */
|
||||||
int GetInvulnerableTicks(void) const { return m_InvulnerableTicks; }
|
int GetInvulnerableTicks(void) const { return m_InvulnerableTicks; }
|
||||||
|
|
||||||
@ -521,6 +524,9 @@ protected:
|
|||||||
int m_AirLevel;
|
int m_AirLevel;
|
||||||
int m_AirTickTimer;
|
int m_AirTickTimer;
|
||||||
|
|
||||||
|
/** The number of ticks this entity has been alive for */
|
||||||
|
long int m_TicksAlive;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Measured in degrees, [-180, +180) */
|
/** Measured in degrees, [-180, +180) */
|
||||||
double m_HeadYaw;
|
double m_HeadYaw;
|
||||||
|
@ -108,7 +108,7 @@ void cEntityEffect::OnTick(cPawn & a_Target)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEntityEffectInstantHealth:
|
// cEntityEffectInstantHealth:
|
||||||
|
|
||||||
void cEntityEffectInstantHealth::OnActivate(cPawn & a_Target)
|
void cEntityEffectInstantHealth::OnActivate(cPawn & a_Target)
|
||||||
@ -128,7 +128,7 @@ void cEntityEffectInstantHealth::OnActivate(cPawn & a_Target)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEntityEffectInstantDamage:
|
// cEntityEffectInstantDamage:
|
||||||
|
|
||||||
void cEntityEffectInstantDamage::OnActivate(cPawn & a_Target)
|
void cEntityEffectInstantDamage::OnActivate(cPawn & a_Target)
|
||||||
@ -148,7 +148,7 @@ void cEntityEffectInstantDamage::OnActivate(cPawn & a_Target)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEntityEffectRegeneration:
|
// cEntityEffectRegeneration:
|
||||||
|
|
||||||
void cEntityEffectRegeneration::OnTick(cPawn & a_Target)
|
void cEntityEffectRegeneration::OnTick(cPawn & a_Target)
|
||||||
@ -175,7 +175,7 @@ void cEntityEffectRegeneration::OnTick(cPawn & a_Target)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEntityEffectHunger:
|
// cEntityEffectHunger:
|
||||||
|
|
||||||
void cEntityEffectHunger::OnTick(cPawn & a_Target)
|
void cEntityEffectHunger::OnTick(cPawn & a_Target)
|
||||||
@ -193,7 +193,7 @@ void cEntityEffectHunger::OnTick(cPawn & a_Target)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEntityEffectWeakness:
|
// cEntityEffectWeakness:
|
||||||
|
|
||||||
void cEntityEffectWeakness::OnTick(cPawn & a_Target)
|
void cEntityEffectWeakness::OnTick(cPawn & a_Target)
|
||||||
@ -211,7 +211,7 @@ void cEntityEffectWeakness::OnTick(cPawn & a_Target)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEntityEffectPoison:
|
// cEntityEffectPoison:
|
||||||
|
|
||||||
void cEntityEffectPoison::OnTick(cPawn & a_Target)
|
void cEntityEffectPoison::OnTick(cPawn & a_Target)
|
||||||
@ -250,7 +250,7 @@ void cEntityEffectPoison::OnTick(cPawn & a_Target)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEntityEffectWither:
|
// cEntityEffectWither:
|
||||||
|
|
||||||
void cEntityEffectWither::OnTick(cPawn & a_Target)
|
void cEntityEffectWither::OnTick(cPawn & a_Target)
|
||||||
@ -270,7 +270,7 @@ void cEntityEffectWither::OnTick(cPawn & a_Target)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEntityEffectSaturation:
|
// cEntityEffectSaturation:
|
||||||
|
|
||||||
void cEntityEffectSaturation::OnTick(cPawn & a_Target)
|
void cEntityEffectSaturation::OnTick(cPawn & a_Target)
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFloaterEntityCollisionCallback
|
// cFloaterEntityCollisionCallback
|
||||||
class cFloaterEntityCollisionCallback :
|
class cFloaterEntityCollisionCallback :
|
||||||
public cEntityCallback
|
public cEntityCallback
|
||||||
@ -75,7 +75,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFloaterCheckEntityExist
|
// cFloaterCheckEntityExist
|
||||||
class cFloaterCheckEntityExist :
|
class cFloaterCheckEntityExist :
|
||||||
public cEntityCallback
|
public cEntityCallback
|
||||||
|
@ -103,21 +103,7 @@ cMinecart::cMinecart(ePayload a_Payload, double a_X, double a_Y, double a_Z) :
|
|||||||
|
|
||||||
void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
|
void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
|
||||||
{
|
{
|
||||||
char SubType = 0;
|
a_ClientHandle.SendSpawnVehicle(*this, 10, (char)m_Payload); // 10 = Minecarts
|
||||||
switch (m_Payload)
|
|
||||||
{
|
|
||||||
case mpNone: SubType = 0; break;
|
|
||||||
case mpChest: SubType = 1; break;
|
|
||||||
case mpFurnace: SubType = 2; break;
|
|
||||||
case mpTNT: SubType = 3; break;
|
|
||||||
case mpHopper: SubType = 5; break;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
ASSERT(!"Unknown payload, cannot spawn on client");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
a_ClientHandle.SendSpawnVehicle(*this, 10, SubType); // 10 = Minecarts, SubType = What type of Minecart
|
|
||||||
a_ClientHandle.SendEntityMetadata(*this);
|
a_ClientHandle.SendEntityMetadata(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -980,7 +966,7 @@ void cMinecart::Destroyed()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cRideableMinecart:
|
// cRideableMinecart:
|
||||||
|
|
||||||
cRideableMinecart::cRideableMinecart(double a_X, double a_Y, double a_Z, const cItem & a_Content, int a_Height) :
|
cRideableMinecart::cRideableMinecart(double a_X, double a_Y, double a_Z, const cItem & a_Content, int a_Height) :
|
||||||
@ -1023,7 +1009,7 @@ void cRideableMinecart::OnRightClicked(cPlayer & a_Player)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMinecartWithChest:
|
// cMinecartWithChest:
|
||||||
|
|
||||||
cMinecartWithChest::cMinecartWithChest(double a_X, double a_Y, double a_Z) :
|
cMinecartWithChest::cMinecartWithChest(double a_X, double a_Y, double a_Z) :
|
||||||
@ -1056,7 +1042,7 @@ void cMinecartWithChest::OnRightClicked(cPlayer & a_Player)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMinecartWithFurnace:
|
// cMinecartWithFurnace:
|
||||||
|
|
||||||
cMinecartWithFurnace::cMinecartWithFurnace(double a_X, double a_Y, double a_Z) :
|
cMinecartWithFurnace::cMinecartWithFurnace(double a_X, double a_Y, double a_Z) :
|
||||||
@ -1118,7 +1104,7 @@ void cMinecartWithFurnace::Tick(float a_Dt, cChunk & a_Chunk)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMinecartWithTNT:
|
// cMinecartWithTNT:
|
||||||
|
|
||||||
cMinecartWithTNT::cMinecartWithTNT(double a_X, double a_Y, double a_Z) :
|
cMinecartWithTNT::cMinecartWithTNT(double a_X, double a_Y, double a_Z) :
|
||||||
@ -1132,7 +1118,7 @@ cMinecartWithTNT::cMinecartWithTNT(double a_X, double a_Y, double a_Z) :
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMinecartWithHopper:
|
// cMinecartWithHopper:
|
||||||
|
|
||||||
cMinecartWithHopper::cMinecartWithHopper(double a_X, double a_Y, double a_Z) :
|
cMinecartWithHopper::cMinecartWithHopper(double a_X, double a_Y, double a_Z) :
|
||||||
|
@ -23,13 +23,14 @@ class cMinecart :
|
|||||||
public:
|
public:
|
||||||
CLASS_PROTODEF(cMinecart);
|
CLASS_PROTODEF(cMinecart);
|
||||||
|
|
||||||
|
/** Minecart payload, values correspond to packet subtype */
|
||||||
enum ePayload
|
enum ePayload
|
||||||
{
|
{
|
||||||
mpNone, // Empty minecart, ridable by player or mobs
|
mpNone = 0, // Empty minecart, ridable by player or mobs
|
||||||
mpChest, // Minecart-with-chest, can store a grid of 3*8 items
|
mpChest = 1, // Minecart-with-chest, can store a grid of 3*8 items
|
||||||
mpFurnace, // Minecart-with-furnace, can be powered
|
mpFurnace = 2, // Minecart-with-furnace, can be powered
|
||||||
mpTNT, // Minecart-with-TNT, can be blown up with activator rail
|
mpTNT = 3, // Minecart-with-TNT, can be blown up with activator rail
|
||||||
mpHopper, // Minecart-with-hopper, can be hopper
|
mpHopper = 5, // Minecart-with-hopper, can be hopper
|
||||||
// TODO: Spawner minecarts, (and possibly any block in a minecart with NBT editing)
|
// TODO: Spawner minecarts, (and possibly any block in a minecart with NBT editing)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
|
#include "../ChatColor.h"
|
||||||
#include "../Server.h"
|
#include "../Server.h"
|
||||||
#include "../UI/Window.h"
|
#include "../UI/Window.h"
|
||||||
#include "../UI/WindowOwner.h"
|
#include "../UI/WindowOwner.h"
|
||||||
@ -381,10 +382,7 @@ short cPlayer::DeltaExperience(short a_Xp_delta)
|
|||||||
m_CurrentXp += a_Xp_delta;
|
m_CurrentXp += a_Xp_delta;
|
||||||
|
|
||||||
// Make sure they didn't subtract too much
|
// Make sure they didn't subtract too much
|
||||||
if (m_CurrentXp < 0)
|
m_CurrentXp = std::max<short int>(m_CurrentXp, 0);
|
||||||
{
|
|
||||||
m_CurrentXp = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update total for score calculation
|
// Update total for score calculation
|
||||||
if (a_Xp_delta > 0)
|
if (a_Xp_delta > 0)
|
||||||
@ -580,7 +578,7 @@ bool cPlayer::Feed(int a_Food, double a_Saturation)
|
|||||||
|
|
||||||
void cPlayer::FoodPoison(int a_NumTicks)
|
void cPlayer::FoodPoison(int a_NumTicks)
|
||||||
{
|
{
|
||||||
AddEntityEffect(cEntityEffect::effHunger, a_NumTicks, 0, NULL);
|
AddEntityEffect(cEntityEffect::effHunger, a_NumTicks, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -624,7 +622,8 @@ void cPlayer::FinishEating(void)
|
|||||||
GetInventory().RemoveOneEquippedItem();
|
GetInventory().RemoveOneEquippedItem();
|
||||||
|
|
||||||
// if the food is mushroom soup, return a bowl to the inventory
|
// if the food is mushroom soup, return a bowl to the inventory
|
||||||
if( Item.m_ItemType == E_ITEM_MUSHROOM_SOUP ) {
|
if (Item.m_ItemType == E_ITEM_MUSHROOM_SOUP)
|
||||||
|
{
|
||||||
cItem emptyBowl(E_ITEM_BOWL, 1, 0, "");
|
cItem emptyBowl(E_ITEM_BOWL, 1, 0, "");
|
||||||
GetInventory().AddItem(emptyBowl, true, true);
|
GetInventory().AddItem(emptyBowl, true, true);
|
||||||
}
|
}
|
||||||
@ -905,6 +904,7 @@ void cPlayer::KilledBy(TakeDamageInfo & a_TDI)
|
|||||||
case dtCactusContact: DamageText = "was impaled on a cactus"; break;
|
case dtCactusContact: DamageText = "was impaled on a cactus"; break;
|
||||||
case dtLavaContact: DamageText = "was melted by lava"; break;
|
case dtLavaContact: DamageText = "was melted by lava"; break;
|
||||||
case dtPoisoning: DamageText = "died from septicaemia"; break;
|
case dtPoisoning: DamageText = "died from septicaemia"; break;
|
||||||
|
case dtWithering: DamageText = "is a husk of their former selves"; break;
|
||||||
case dtOnFire: DamageText = "forgot to stop, drop, and roll"; break;
|
case dtOnFire: DamageText = "forgot to stop, drop, and roll"; break;
|
||||||
case dtFireContact: DamageText = "burnt themselves to death"; break;
|
case dtFireContact: DamageText = "burnt themselves to death"; break;
|
||||||
case dtInVoid: DamageText = "somehow fell out of the world"; break;
|
case dtInVoid: DamageText = "somehow fell out of the world"; break;
|
||||||
@ -1454,7 +1454,7 @@ bool cPlayer::IsInGroup( const AString & a_Group )
|
|||||||
|
|
||||||
void cPlayer::ResolvePermissions()
|
void cPlayer::ResolvePermissions()
|
||||||
{
|
{
|
||||||
m_ResolvedPermissions.clear(); // Start with an empty map yo~
|
m_ResolvedPermissions.clear(); // Start with an empty map
|
||||||
|
|
||||||
// Copy all player specific permissions into the resolved permissions map
|
// Copy all player specific permissions into the resolved permissions map
|
||||||
for( PermissionMap::iterator itr = m_Permissions.begin(); itr != m_Permissions.end(); ++itr )
|
for( PermissionMap::iterator itr = m_Permissions.begin(); itr != m_Permissions.end(); ++itr )
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cProjectileTracerCallback:
|
// cProjectileTracerCallback:
|
||||||
|
|
||||||
class cProjectileTracerCallback :
|
class cProjectileTracerCallback :
|
||||||
@ -122,7 +122,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cProjectileEntityCollisionCallback:
|
// cProjectileEntityCollisionCallback:
|
||||||
|
|
||||||
class cProjectileEntityCollisionCallback :
|
class cProjectileEntityCollisionCallback :
|
||||||
@ -146,10 +146,12 @@ public:
|
|||||||
(a_Entity->GetUniqueID() == m_Projectile->GetCreatorUniqueID()) // Do not check whoever shot the projectile
|
(a_Entity->GetUniqueID() == m_Projectile->GetCreatorUniqueID()) // Do not check whoever shot the projectile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// TODO: Don't check creator only for the first 5 ticks
|
// Don't check creator only for the first 5 ticks so that projectiles can collide with the creator
|
||||||
// so that arrows stuck in ground and dug up can hurt the player
|
if (m_Projectile->GetTicksAlive() <= 5)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cBoundingBox EntBox(a_Entity->GetPosition(), a_Entity->GetWidth() / 2, a_Entity->GetHeight());
|
cBoundingBox EntBox(a_Entity->GetPosition(), a_Entity->GetWidth() / 2, a_Entity->GetHeight());
|
||||||
|
|
||||||
@ -211,7 +213,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cProjectileEntity:
|
// cProjectileEntity:
|
||||||
|
|
||||||
cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, double a_X, double a_Y, double a_Z, double a_Width, double a_Height) :
|
cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, double a_X, double a_Y, double a_Z, double a_Width, double a_Height) :
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
|
|
||||||
#include "SplashPotionEntity.h"
|
#include "SplashPotionEntity.h"
|
||||||
#include "Pawn.h"
|
#include "Pawn.h"
|
||||||
|
#include "../ClientHandle.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/// Converts an angle in radians into a byte representation used by the network protocol
|
||||||
|
#define ANGLE_TO_PROTO(X) (Byte)(X * 255 / 360)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cSplashPotionEntityCallback:
|
// cSplashPotionEntityCallback:
|
||||||
|
|
||||||
/** Used to distribute the splashed potion effect among nearby entities */
|
/** Used to distribute the splashed potion effect among nearby entities */
|
||||||
@ -44,10 +48,7 @@ public:
|
|||||||
// y = -0.25x + 1, where x is the distance from the player. Approximation for potion splash.
|
// y = -0.25x + 1, where x is the distance from the player. Approximation for potion splash.
|
||||||
// TODO: better equation
|
// TODO: better equation
|
||||||
double Reduction = -0.25 * SplashDistance + 1.0;
|
double Reduction = -0.25 * SplashDistance + 1.0;
|
||||||
if (Reduction < 0)
|
Reduction = std::max(Reduction, 0.0);
|
||||||
{
|
|
||||||
Reduction = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
((cPawn *) a_Entity)->AddEntityEffect(m_EntityEffectType, m_EntityEffect.GetDuration(), m_EntityEffect.GetIntensity(), Reduction);
|
((cPawn *) a_Entity)->AddEntityEffect(m_EntityEffectType, m_EntityEffect.GetDuration(), m_EntityEffect.GetIntensity(), Reduction);
|
||||||
return false;
|
return false;
|
||||||
@ -63,7 +64,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cSplashPotionEntity:
|
// cSplashPotionEntity:
|
||||||
|
|
||||||
cSplashPotionEntity::cSplashPotionEntity(
|
cSplashPotionEntity::cSplashPotionEntity(
|
||||||
@ -72,12 +73,13 @@ cSplashPotionEntity::cSplashPotionEntity(
|
|||||||
const Vector3d & a_Speed,
|
const Vector3d & a_Speed,
|
||||||
cEntityEffect::eType a_EntityEffectType,
|
cEntityEffect::eType a_EntityEffectType,
|
||||||
cEntityEffect a_EntityEffect,
|
cEntityEffect a_EntityEffect,
|
||||||
int a_PotionParticleType
|
int a_PotionColor
|
||||||
) :
|
) :
|
||||||
super(pkSplashPotion, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25),
|
super(pkSplashPotion, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25),
|
||||||
m_EntityEffectType(a_EntityEffectType),
|
m_EntityEffectType(a_EntityEffectType),
|
||||||
m_EntityEffect(a_EntityEffect),
|
m_EntityEffect(a_EntityEffect),
|
||||||
m_PotionParticleType(a_PotionParticleType)
|
m_PotionColor(a_PotionColor),
|
||||||
|
m_DestroyTimer(-1)
|
||||||
{
|
{
|
||||||
SetSpeed(a_Speed);
|
SetSpeed(a_Speed);
|
||||||
}
|
}
|
||||||
@ -89,7 +91,7 @@ cSplashPotionEntity::cSplashPotionEntity(
|
|||||||
void cSplashPotionEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace)
|
void cSplashPotionEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace)
|
||||||
{
|
{
|
||||||
Splash(a_HitPos);
|
Splash(a_HitPos);
|
||||||
Destroy();
|
m_DestroyTimer = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -100,7 +102,7 @@ void cSplashPotionEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_
|
|||||||
{
|
{
|
||||||
a_EntityHit.TakeDamage(dtRangedAttack, this, 0, 1);
|
a_EntityHit.TakeDamage(dtRangedAttack, this, 0, 1);
|
||||||
Splash(a_HitPos);
|
Splash(a_HitPos);
|
||||||
Destroy(true);
|
m_DestroyTimer = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -112,7 +114,17 @@ void cSplashPotionEntity::Splash(const Vector3d & a_HitPos)
|
|||||||
cSplashPotionCallback Callback(a_HitPos, m_EntityEffectType, m_EntityEffect);
|
cSplashPotionCallback Callback(a_HitPos, m_EntityEffectType, m_EntityEffect);
|
||||||
m_World->ForEachEntity(Callback);
|
m_World->ForEachEntity(Callback);
|
||||||
|
|
||||||
m_World->BroadcastSoundParticleEffect(2002, (int)a_HitPos.x, (int)a_HitPos.y, (int)a_HitPos.z, m_PotionParticleType);
|
m_World->BroadcastSoundParticleEffect(2002, (int)a_HitPos.x, (int)a_HitPos.y, (int)a_HitPos.z, m_PotionColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cSplashPotionEntity::SpawnOn(cClientHandle & a_Client)
|
||||||
|
{
|
||||||
|
a_Client.SendSpawnObject(*this, 73, m_PotionColor, ANGLE_TO_PROTO(GetYaw()), ANGLE_TO_PROTO(GetPitch()));
|
||||||
|
a_Client.SendEntityMetadata(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,29 +31,51 @@ public:
|
|||||||
const Vector3d & a_Speed,
|
const Vector3d & a_Speed,
|
||||||
cEntityEffect::eType a_EntityEffectType,
|
cEntityEffect::eType a_EntityEffectType,
|
||||||
cEntityEffect a_EntityEffect,
|
cEntityEffect a_EntityEffect,
|
||||||
int a_PotionParticleType
|
int a_PotionColor
|
||||||
);
|
);
|
||||||
|
|
||||||
cEntityEffect::eType GetEntityEffectType(void) const { return m_EntityEffectType; }
|
cEntityEffect::eType GetEntityEffectType(void) const { return m_EntityEffectType; }
|
||||||
cEntityEffect GetEntityEffect(void) const { return m_EntityEffect; }
|
cEntityEffect GetEntityEffect(void) const { return m_EntityEffect; }
|
||||||
int GetPotionParticleType(void) const { return m_PotionParticleType; }
|
int GetPotionColor(void) const { return m_PotionColor; }
|
||||||
|
|
||||||
void SetEntityEffectType(cEntityEffect::eType a_EntityEffectType) { m_EntityEffectType = a_EntityEffectType; }
|
void SetEntityEffectType(cEntityEffect::eType a_EntityEffectType) { m_EntityEffectType = a_EntityEffectType; }
|
||||||
void SetEntityEffect(cEntityEffect a_EntityEffect) { m_EntityEffect = a_EntityEffect; }
|
void SetEntityEffect(cEntityEffect a_EntityEffect) { m_EntityEffect = a_EntityEffect; }
|
||||||
void SetPotionParticleType(int a_PotionParticleType) { m_PotionParticleType = a_PotionParticleType; }
|
void SetPotionColor(int a_PotionColor) { m_PotionColor = a_PotionColor; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
cEntityEffect::eType m_EntityEffectType;
|
cEntityEffect::eType m_EntityEffectType;
|
||||||
cEntityEffect m_EntityEffect;
|
cEntityEffect m_EntityEffect;
|
||||||
int m_PotionParticleType;
|
int m_PotionColor;
|
||||||
|
|
||||||
|
|
||||||
// cProjectileEntity overrides:
|
// cProjectileEntity overrides:
|
||||||
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) override;
|
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) override;
|
||||||
virtual void OnHitEntity (cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
|
virtual void OnHitEntity (cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
|
||||||
|
virtual void Tick (float a_Dt, cChunk & a_Chunk) override
|
||||||
|
{
|
||||||
|
if (m_DestroyTimer > 0)
|
||||||
|
{
|
||||||
|
m_DestroyTimer--;
|
||||||
|
if (m_DestroyTimer == 0)
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
super::Tick(a_Dt, a_Chunk);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Splashes the potion, fires its particle effects and sounds
|
/** Splashes the potion, fires its particle effects and sounds
|
||||||
@param a_HitPos The position where the potion will splash */
|
@param a_HitPos The position where the potion will splash */
|
||||||
void Splash(const Vector3d & a_HitPos);
|
void Splash(const Vector3d & a_HitPos);
|
||||||
|
|
||||||
|
virtual void SpawnOn(cClientHandle & a_Client) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
/** Time in ticks to wait for the hit animation to begin before destroying */
|
||||||
|
int m_DestroyTimer;
|
||||||
} ; // tolua_export
|
} ; // tolua_export
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBiomeGen:
|
// cBiomeGen:
|
||||||
|
|
||||||
cBiomeGen * cBiomeGen::CreateBiomeGen(cIniFile & a_IniFile, int a_Seed, bool & a_CacheOffByDefault)
|
cBiomeGen * cBiomeGen::CreateBiomeGen(cIniFile & a_IniFile, int a_Seed, bool & a_CacheOffByDefault)
|
||||||
@ -78,7 +78,7 @@ cBiomeGen * cBiomeGen::CreateBiomeGen(cIniFile & a_IniFile, int a_Seed, bool & a
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBioGenConstant:
|
// cBioGenConstant:
|
||||||
|
|
||||||
void cBioGenConstant::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
|
void cBioGenConstant::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
|
||||||
@ -108,7 +108,7 @@ void cBioGenConstant::InitializeBiomeGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBioGenCache:
|
// cBioGenCache:
|
||||||
|
|
||||||
cBioGenCache::cBioGenCache(cBiomeGen * a_BioGenToCache, int a_CacheSize) :
|
cBioGenCache::cBioGenCache(cBiomeGen * a_BioGenToCache, int a_CacheSize) :
|
||||||
@ -209,7 +209,7 @@ void cBioGenCache::InitializeBiomeGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBiomeGenList:
|
// cBiomeGenList:
|
||||||
|
|
||||||
void cBiomeGenList::InitializeBiomes(const AString & a_Biomes)
|
void cBiomeGenList::InitializeBiomes(const AString & a_Biomes)
|
||||||
@ -290,7 +290,7 @@ void cBiomeGenList::InitializeBiomes(const AString & a_Biomes)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBioGenCheckerboard:
|
// cBioGenCheckerboard:
|
||||||
|
|
||||||
void cBioGenCheckerboard::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
|
void cBioGenCheckerboard::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
|
||||||
@ -324,7 +324,7 @@ void cBioGenCheckerboard::InitializeBiomeGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBioGenVoronoi :
|
// cBioGenVoronoi :
|
||||||
|
|
||||||
void cBioGenVoronoi::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
|
void cBioGenVoronoi::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
|
||||||
@ -357,7 +357,7 @@ void cBioGenVoronoi::InitializeBiomeGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBioGenDistortedVoronoi:
|
// cBioGenDistortedVoronoi:
|
||||||
|
|
||||||
void cBioGenDistortedVoronoi::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
|
void cBioGenDistortedVoronoi::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
|
||||||
@ -418,7 +418,7 @@ void cBioGenDistortedVoronoi::Distort(int a_BlockX, int a_BlockZ, int & a_Distor
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBioGenMultiStepMap :
|
// cBioGenMultiStepMap :
|
||||||
|
|
||||||
cBioGenMultiStepMap::cBioGenMultiStepMap(int a_Seed) :
|
cBioGenMultiStepMap::cBioGenMultiStepMap(int a_Seed) :
|
||||||
@ -739,7 +739,7 @@ void cBioGenMultiStepMap::FreezeWaterBiomes(cChunkDef::BiomeMap & a_BiomeMap, co
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBioGenTwoLevel:
|
// cBioGenTwoLevel:
|
||||||
|
|
||||||
cBioGenTwoLevel::cBioGenTwoLevel(int a_Seed) :
|
cBioGenTwoLevel::cBioGenTwoLevel(int a_Seed) :
|
||||||
|
@ -4,11 +4,62 @@ project (MCServer)
|
|||||||
|
|
||||||
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
||||||
|
|
||||||
file(GLOB SOURCE
|
SET (SRCS
|
||||||
"*.cpp"
|
BioGen.cpp
|
||||||
"*.h"
|
Caves.cpp
|
||||||
)
|
ChunkDesc.cpp
|
||||||
|
ChunkGenerator.cpp
|
||||||
|
CompoGen.cpp
|
||||||
|
ComposableGenerator.cpp
|
||||||
|
DistortedHeightmap.cpp
|
||||||
|
EndGen.cpp
|
||||||
|
FinishGen.cpp
|
||||||
|
GridStructGen.cpp
|
||||||
|
HeiGen.cpp
|
||||||
|
MineShafts.cpp
|
||||||
|
NetherFortGen.cpp
|
||||||
|
Noise3DGenerator.cpp
|
||||||
|
POCPieceGenerator.cpp
|
||||||
|
PieceGenerator.cpp
|
||||||
|
Prefab.cpp
|
||||||
|
PrefabPiecePool.cpp
|
||||||
|
RainbowRoadsGen.cpp
|
||||||
|
Ravines.cpp
|
||||||
|
StructGen.cpp
|
||||||
|
TestRailsGen.cpp
|
||||||
|
Trees.cpp
|
||||||
|
UnderwaterBaseGen.cpp
|
||||||
|
VillageGen.cpp)
|
||||||
|
|
||||||
add_library(Generating ${SOURCE})
|
SET (HDRS
|
||||||
|
BioGen.h
|
||||||
|
Caves.h
|
||||||
|
ChunkDesc.h
|
||||||
|
ChunkGenerator.h
|
||||||
|
CompoGen.h
|
||||||
|
ComposableGenerator.h
|
||||||
|
DistortedHeightmap.h
|
||||||
|
EndGen.h
|
||||||
|
FinishGen.h
|
||||||
|
GridStructGen.h
|
||||||
|
HeiGen.h
|
||||||
|
MineShafts.h
|
||||||
|
NetherFortGen.h
|
||||||
|
Noise3DGenerator.h
|
||||||
|
POCPieceGenerator.h
|
||||||
|
PieceGenerator.h
|
||||||
|
Prefab.h
|
||||||
|
PrefabPiecePool.h
|
||||||
|
RainbowRoadsGen.h
|
||||||
|
Ravines.h
|
||||||
|
StructGen.h
|
||||||
|
TestRailsGen.h
|
||||||
|
Trees.h
|
||||||
|
UnderwaterBaseGen.h
|
||||||
|
VillageGen.h)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
add_library(Generating ${SRCS} ${HDRS})
|
||||||
|
|
||||||
target_link_libraries(Generating OSSupport iniFile Blocks)
|
target_link_libraries(Generating OSSupport iniFile Blocks)
|
||||||
|
endif()
|
||||||
|
@ -151,7 +151,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCaveTunnel:
|
// cCaveTunnel:
|
||||||
|
|
||||||
cCaveTunnel::cCaveTunnel(
|
cCaveTunnel::cCaveTunnel(
|
||||||
@ -571,7 +571,7 @@ AString cCaveTunnel::ExportAsSVG(int a_Color, int a_OffsetX, int a_OffsetZ) cons
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenWormNestCaves::cCaveSystem:
|
// cStructGenWormNestCaves::cCaveSystem:
|
||||||
|
|
||||||
cStructGenWormNestCaves::cCaveSystem::cCaveSystem(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_MaxOffset, int a_Size, cNoise & a_Noise) :
|
cStructGenWormNestCaves::cCaveSystem::cCaveSystem(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_MaxOffset, int a_Size, cNoise & a_Noise) :
|
||||||
@ -687,7 +687,7 @@ int cStructGenWormNestCaves::cCaveSystem::GetRadius(cNoise & a_Noise, int a_Orig
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenWormNestCaves:
|
// cStructGenWormNestCaves:
|
||||||
|
|
||||||
cGridStructGen::cStructurePtr cStructGenWormNestCaves::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
|
cGridStructGen::cStructurePtr cStructGenWormNestCaves::CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ)
|
||||||
@ -700,7 +700,7 @@ cGridStructGen::cStructurePtr cStructGenWormNestCaves::CreateStructure(int a_Gri
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenMarbleCaves:
|
// cStructGenMarbleCaves:
|
||||||
|
|
||||||
static float GetMarbleNoise( float x, float y, float z, cNoise & a_Noise )
|
static float GetMarbleNoise( float x, float y, float z, cNoise & a_Noise )
|
||||||
@ -752,7 +752,7 @@ void cStructGenMarbleCaves::GenFinish(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenDualRidgeCaves:
|
// cStructGenDualRidgeCaves:
|
||||||
|
|
||||||
void cStructGenDualRidgeCaves::GenFinish(cChunkDesc & a_ChunkDesc)
|
void cStructGenDualRidgeCaves::GenFinish(cChunkDesc & a_ChunkDesc)
|
||||||
|
@ -22,7 +22,7 @@ const unsigned int QUEUE_SKIP_LIMIT = 500;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cChunkGenerator:
|
// cChunkGenerator:
|
||||||
|
|
||||||
cChunkGenerator::cChunkGenerator(void) :
|
cChunkGenerator::cChunkGenerator(void) :
|
||||||
@ -290,7 +290,7 @@ void cChunkGenerator::DoGenerate(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cChunkGenerator::cGenerator:
|
// cChunkGenerator::cGenerator:
|
||||||
|
|
||||||
cChunkGenerator::cGenerator::cGenerator(cChunkGenerator & a_ChunkGenerator) :
|
cChunkGenerator::cGenerator::cGenerator(cChunkGenerator & a_ChunkGenerator) :
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompoGenSameBlock:
|
// cCompoGenSameBlock:
|
||||||
|
|
||||||
void cCompoGenSameBlock::ComposeTerrain(cChunkDesc & a_ChunkDesc)
|
void cCompoGenSameBlock::ComposeTerrain(cChunkDesc & a_ChunkDesc)
|
||||||
@ -60,7 +60,7 @@ void cCompoGenSameBlock::InitializeCompoGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompoGenDebugBiomes:
|
// cCompoGenDebugBiomes:
|
||||||
|
|
||||||
void cCompoGenDebugBiomes::ComposeTerrain(cChunkDesc & a_ChunkDesc)
|
void cCompoGenDebugBiomes::ComposeTerrain(cChunkDesc & a_ChunkDesc)
|
||||||
@ -111,7 +111,7 @@ void cCompoGenDebugBiomes::ComposeTerrain(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompoGenClassic:
|
// cCompoGenClassic:
|
||||||
|
|
||||||
cCompoGenClassic::cCompoGenClassic(void) :
|
cCompoGenClassic::cCompoGenClassic(void) :
|
||||||
@ -209,7 +209,7 @@ void cCompoGenClassic::InitializeCompoGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompoGenBiomal:
|
// cCompoGenBiomal:
|
||||||
|
|
||||||
void cCompoGenBiomal::ComposeTerrain(cChunkDesc & a_ChunkDesc)
|
void cCompoGenBiomal::ComposeTerrain(cChunkDesc & a_ChunkDesc)
|
||||||
@ -526,7 +526,7 @@ void cCompoGenBiomal::FillColumnPattern(int a_RelX, int a_RelZ, int a_Height, cC
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompoGenNether:
|
// cCompoGenNether:
|
||||||
|
|
||||||
cCompoGenNether::cCompoGenNether(int a_Seed) :
|
cCompoGenNether::cCompoGenNether(int a_Seed) :
|
||||||
@ -645,7 +645,7 @@ void cCompoGenNether::InitializeCompoGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cCompoGenCache:
|
// cCompoGenCache:
|
||||||
|
|
||||||
cCompoGenCache::cCompoGenCache(cTerrainCompositionGen & a_Underlying, int a_CacheSize) :
|
cCompoGenCache::cCompoGenCache(cTerrainCompositionGen & a_Underlying, int a_CacheSize) :
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cTerrainCompositionGen:
|
// cTerrainCompositionGen:
|
||||||
|
|
||||||
cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile & a_IniFile, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen, int a_Seed)
|
cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile & a_IniFile, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen, int a_Seed)
|
||||||
@ -114,7 +114,7 @@ cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile &
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cComposableGenerator:
|
// cComposableGenerator:
|
||||||
|
|
||||||
cComposableGenerator::cComposableGenerator(cChunkGenerator & a_ChunkGenerator) :
|
cComposableGenerator::cComposableGenerator(cChunkGenerator & a_ChunkGenerator) :
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cPattern:
|
// cPattern:
|
||||||
|
|
||||||
/// This class is used to store a column pattern initialized at runtime,
|
/// This class is used to store a column pattern initialized at runtime,
|
||||||
@ -50,7 +50,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// The arrays to use for the top block pattern definitions:
|
// The arrays to use for the top block pattern definitions:
|
||||||
|
|
||||||
static cDistortedHeightmap::sBlockInfo tbGrass[] =
|
static cDistortedHeightmap::sBlockInfo tbGrass[] =
|
||||||
@ -119,7 +119,7 @@ static cDistortedHeightmap::sBlockInfo tbStone[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Ocean floor pattern top-block definitions:
|
// Ocean floor pattern top-block definitions:
|
||||||
|
|
||||||
static cDistortedHeightmap::sBlockInfo tbOFSand[] =
|
static cDistortedHeightmap::sBlockInfo tbOFSand[] =
|
||||||
@ -151,7 +151,7 @@ static cDistortedHeightmap::sBlockInfo tbOFRedSand[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Individual patterns to use:
|
// Individual patterns to use:
|
||||||
|
|
||||||
static cPattern patGrass (tbGrass, ARRAYCOUNT(tbGrass));
|
static cPattern patGrass (tbGrass, ARRAYCOUNT(tbGrass));
|
||||||
@ -171,7 +171,7 @@ static cPattern patOFRedSand(tbOFRedSand, ARRAYCOUNT(tbOFRedSand));
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cDistortedHeightmap:
|
// cDistortedHeightmap:
|
||||||
|
|
||||||
/** This table assigns a relative maximum overhang size in each direction to biomes.
|
/** This table assigns a relative maximum overhang size in each direction to biomes.
|
||||||
|
@ -29,7 +29,7 @@ enum
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEndGen:
|
// cEndGen:
|
||||||
|
|
||||||
cEndGen::cEndGen(int a_Seed) :
|
cEndGen::cEndGen(int a_Seed) :
|
||||||
|
@ -40,7 +40,7 @@ static inline bool IsWater(BLOCKTYPE a_BlockType)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFinishGenNetherClumpFoliage:
|
// cFinishGenNetherClumpFoliage:
|
||||||
|
|
||||||
void cFinishGenNetherClumpFoliage::GenFinish(cChunkDesc & a_ChunkDesc)
|
void cFinishGenNetherClumpFoliage::GenFinish(cChunkDesc & a_ChunkDesc)
|
||||||
@ -159,7 +159,7 @@ void cFinishGenNetherClumpFoliage::TryPlaceClump(cChunkDesc & a_ChunkDesc, int a
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFinishGenSprinkleFoliage:
|
// cFinishGenSprinkleFoliage:
|
||||||
|
|
||||||
bool cFinishGenSprinkleFoliage::TryAddSugarcane(cChunkDesc & a_ChunkDesc, int a_RelX, int a_RelY, int a_RelZ)
|
bool cFinishGenSprinkleFoliage::TryAddSugarcane(cChunkDesc & a_ChunkDesc, int a_RelX, int a_RelY, int a_RelZ)
|
||||||
@ -309,7 +309,7 @@ void cFinishGenSprinkleFoliage::GenFinish(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFinishGenSnow:
|
// cFinishGenSnow:
|
||||||
|
|
||||||
void cFinishGenSnow::GenFinish(cChunkDesc & a_ChunkDesc)
|
void cFinishGenSnow::GenFinish(cChunkDesc & a_ChunkDesc)
|
||||||
@ -345,7 +345,7 @@ void cFinishGenSnow::GenFinish(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFinishGenIce:
|
// cFinishGenIce:
|
||||||
|
|
||||||
void cFinishGenIce::GenFinish(cChunkDesc & a_ChunkDesc)
|
void cFinishGenIce::GenFinish(cChunkDesc & a_ChunkDesc)
|
||||||
@ -385,7 +385,7 @@ void cFinishGenIce::GenFinish(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFinishGenLilypads:
|
// cFinishGenLilypads:
|
||||||
|
|
||||||
int cFinishGenSingleBiomeSingleTopBlock::GetNumToGen(const cChunkDef::BiomeMap & a_BiomeMap)
|
int cFinishGenSingleBiomeSingleTopBlock::GetNumToGen(const cChunkDef::BiomeMap & a_BiomeMap)
|
||||||
@ -447,7 +447,7 @@ void cFinishGenSingleBiomeSingleTopBlock::GenFinish(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFinishGenBottomLava:
|
// cFinishGenBottomLava:
|
||||||
|
|
||||||
void cFinishGenBottomLava::GenFinish(cChunkDesc & a_ChunkDesc)
|
void cFinishGenBottomLava::GenFinish(cChunkDesc & a_ChunkDesc)
|
||||||
@ -470,7 +470,7 @@ void cFinishGenBottomLava::GenFinish(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFinishGenPreSimulator:
|
// cFinishGenPreSimulator:
|
||||||
|
|
||||||
cFinishGenPreSimulator::cFinishGenPreSimulator(void)
|
cFinishGenPreSimulator::cFinishGenPreSimulator(void)
|
||||||
@ -637,7 +637,7 @@ void cFinishGenPreSimulator::StationarizeFluid(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cFinishGenFluidSprings:
|
// cFinishGenFluidSprings:
|
||||||
|
|
||||||
cFinishGenFluidSprings::cFinishGenFluidSprings(int a_Seed, BLOCKTYPE a_Fluid, cIniFile & a_IniFile, eDimension a_Dimension) :
|
cFinishGenFluidSprings::cFinishGenFluidSprings(int a_Seed, BLOCKTYPE a_Fluid, cIniFile & a_IniFile, eDimension a_Dimension) :
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cEmptyStructure:
|
// cEmptyStructure:
|
||||||
|
|
||||||
/** A cStructure descendant representing an empty structure.
|
/** A cStructure descendant representing an empty structure.
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cTerrainHeightGen:
|
// cTerrainHeightGen:
|
||||||
|
|
||||||
cTerrainHeightGen * cTerrainHeightGen::CreateHeightGen(cIniFile &a_IniFile, cBiomeGen & a_BiomeGen, int a_Seed, bool & a_CacheOffByDefault)
|
cTerrainHeightGen * cTerrainHeightGen::CreateHeightGen(cIniFile &a_IniFile, cBiomeGen & a_BiomeGen, int a_Seed, bool & a_CacheOffByDefault)
|
||||||
@ -91,7 +91,7 @@ cTerrainHeightGen * cTerrainHeightGen::CreateHeightGen(cIniFile &a_IniFile, cBio
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cHeiGenFlat:
|
// cHeiGenFlat:
|
||||||
|
|
||||||
void cHeiGenFlat::GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap)
|
void cHeiGenFlat::GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap)
|
||||||
@ -115,7 +115,7 @@ void cHeiGenFlat::InitializeHeightGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cHeiGenCache:
|
// cHeiGenCache:
|
||||||
|
|
||||||
cHeiGenCache::cHeiGenCache(cTerrainHeightGen & a_HeiGenToCache, int a_CacheSize) :
|
cHeiGenCache::cHeiGenCache(cTerrainHeightGen & a_HeiGenToCache, int a_CacheSize) :
|
||||||
@ -234,7 +234,7 @@ bool cHeiGenCache::GetHeightAt(int a_ChunkX, int a_ChunkZ, int a_RelX, int a_Rel
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cHeiGenClassic:
|
// cHeiGenClassic:
|
||||||
|
|
||||||
cHeiGenClassic::cHeiGenClassic(int a_Seed) :
|
cHeiGenClassic::cHeiGenClassic(int a_Seed) :
|
||||||
@ -306,7 +306,7 @@ void cHeiGenClassic::InitializeHeightGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cHeiGenMountains:
|
// cHeiGenMountains:
|
||||||
|
|
||||||
cHeiGenMountains::cHeiGenMountains(int a_Seed) :
|
cHeiGenMountains::cHeiGenMountains(int a_Seed) :
|
||||||
@ -368,7 +368,7 @@ void cHeiGenMountains::InitializeHeightGen(cIniFile & a_IniFile)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cHeiGenBiomal:
|
// cHeiGenBiomal:
|
||||||
|
|
||||||
const cHeiGenBiomal::sGenParam cHeiGenBiomal::m_GenParam[256] =
|
const cHeiGenBiomal::sGenParam cHeiGenBiomal::m_GenParam[256] =
|
||||||
|
@ -275,7 +275,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenMineShafts::cMineShaftSystem:
|
// cStructGenMineShafts::cMineShaftSystem:
|
||||||
|
|
||||||
cStructGenMineShafts::cMineShaftSystem::cMineShaftSystem(
|
cStructGenMineShafts::cMineShaftSystem::cMineShaftSystem(
|
||||||
@ -400,7 +400,7 @@ bool cStructGenMineShafts::cMineShaftSystem::CanAppend(const cCuboid & a_Boundin
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMineShaftDirtRoom:
|
// cMineShaftDirtRoom:
|
||||||
|
|
||||||
cMineShaftDirtRoom::cMineShaftDirtRoom(cStructGenMineShafts::cMineShaftSystem & a_Parent, cNoise & a_Noise) :
|
cMineShaftDirtRoom::cMineShaftDirtRoom(cStructGenMineShafts::cMineShaftSystem & a_Parent, cNoise & a_Noise) :
|
||||||
@ -492,7 +492,7 @@ void cMineShaftDirtRoom::ProcessChunk(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMineShaftCorridor:
|
// cMineShaftCorridor:
|
||||||
|
|
||||||
cMineShaftCorridor::cMineShaftCorridor(
|
cMineShaftCorridor::cMineShaftCorridor(
|
||||||
@ -964,7 +964,7 @@ void cMineShaftCorridor::PlaceTorches(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMineShaftCrossing:
|
// cMineShaftCrossing:
|
||||||
|
|
||||||
cMineShaftCrossing::cMineShaftCrossing(cStructGenMineShafts::cMineShaftSystem & a_ParentSystem, const cCuboid & a_BoundingBox) :
|
cMineShaftCrossing::cMineShaftCrossing(cStructGenMineShafts::cMineShaftSystem & a_ParentSystem, const cCuboid & a_BoundingBox) :
|
||||||
@ -997,7 +997,6 @@ cMineShaft * cMineShaftCrossing::CreateAndFit(
|
|||||||
BoundingBox.p2.y -= 4;
|
BoundingBox.p2.y -= 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rnd >>= 2;
|
|
||||||
switch (a_Direction)
|
switch (a_Direction)
|
||||||
{
|
{
|
||||||
case dirXP: BoundingBox.p2.x += 4; BoundingBox.p1.z -= 2; BoundingBox.p2.z += 2; break;
|
case dirXP: BoundingBox.p2.x += 4; BoundingBox.p1.z -= 2; BoundingBox.p2.z += 2; break;
|
||||||
@ -1100,7 +1099,7 @@ void cMineShaftCrossing::ProcessChunk(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMineShaftStaircase:
|
// cMineShaftStaircase:
|
||||||
|
|
||||||
cMineShaftStaircase::cMineShaftStaircase(
|
cMineShaftStaircase::cMineShaftStaircase(
|
||||||
@ -1278,7 +1277,7 @@ void cMineShaftStaircase::ProcessChunk(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenMineShafts:
|
// cStructGenMineShafts:
|
||||||
|
|
||||||
cStructGenMineShafts::cStructGenMineShafts(
|
cStructGenMineShafts::cStructGenMineShafts(
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cNetherFortGen::cNetherFort:
|
// cNetherFortGen::cNetherFort:
|
||||||
|
|
||||||
class cNetherFortGen::cNetherFort :
|
class cNetherFortGen::cNetherFort :
|
||||||
@ -65,7 +65,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Performance test of the NetherFort generator:
|
// Performance test of the NetherFort generator:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -99,7 +99,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cNetherFortGen:
|
// cNetherFortGen:
|
||||||
|
|
||||||
cPrefabPiecePool cNetherFortGen::m_PiecePool(g_NetherFortPrefabs, g_NetherFortPrefabsCount, g_NetherFortStartingPrefabs, g_NetherFortStartingPrefabsCount);
|
cPrefabPiecePool cNetherFortGen::m_PiecePool(g_NetherFortPrefabs, g_NetherFortPrefabsCount, g_NetherFortStartingPrefabs, g_NetherFortStartingPrefabsCount);
|
||||||
|
@ -61,7 +61,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cNoise3DGenerator:
|
// cNoise3DGenerator:
|
||||||
|
|
||||||
cNoise3DGenerator::cNoise3DGenerator(cChunkGenerator & a_ChunkGenerator) :
|
cNoise3DGenerator::cNoise3DGenerator(cChunkGenerator & a_ChunkGenerator) :
|
||||||
@ -342,7 +342,7 @@ void cNoise3DGenerator::ComposeTerrain(cChunkDesc & a_ChunkDesc)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cNoise3DComposable:
|
// cNoise3DComposable:
|
||||||
|
|
||||||
cNoise3DComposable::cNoise3DComposable(int a_Seed) :
|
cNoise3DComposable::cNoise3DComposable(int a_Seed) :
|
||||||
|
@ -150,7 +150,7 @@ static void DebugPieces(const cPlacedPieces & a_Pieces)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cPOCPieceGenerator:
|
// cPOCPieceGenerator:
|
||||||
|
|
||||||
cPOCPieceGenerator::cPOCPieceGenerator(int a_Seed) :
|
cPOCPieceGenerator::cPOCPieceGenerator(int a_Seed) :
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#ifdef SELF_TEST
|
#ifdef SELF_TEST
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Self-test:
|
// Self-test:
|
||||||
|
|
||||||
static class cPieceGeneratorSelfTest :
|
static class cPieceGeneratorSelfTest :
|
||||||
@ -140,7 +140,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cPiece:
|
// cPiece:
|
||||||
|
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ cCuboid cPiece::RotateMoveHitBox(int a_NumCCWRotations, int a_MoveX, int a_MoveY
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cPiece::cConnector:
|
// cPiece::cConnector:
|
||||||
|
|
||||||
cPiece::cConnector::cConnector(int a_X, int a_Y, int a_Z, int a_Type, eBlockFace a_Direction) :
|
cPiece::cConnector::cConnector(int a_X, int a_Y, int a_Z, int a_Type, eBlockFace a_Direction) :
|
||||||
@ -279,7 +279,7 @@ cPiece::cConnector::cConnector(const Vector3i & a_Pos, int a_Type, eBlockFace a_
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cPlacedPiece:
|
// cPlacedPiece:
|
||||||
|
|
||||||
cPlacedPiece::cPlacedPiece(const cPlacedPiece * a_Parent, const cPiece & a_Piece, const Vector3i & a_Coords, int a_NumCCWRotations) :
|
cPlacedPiece::cPlacedPiece(const cPlacedPiece * a_Parent, const cPiece & a_Piece, const Vector3i & a_Coords, int a_NumCCWRotations) :
|
||||||
@ -328,7 +328,7 @@ void cPlacedPiece::MoveToGroundBy(int a_OffsetY)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cPieceGenerator:
|
// cPieceGenerator:
|
||||||
|
|
||||||
cPieceGenerator::cPieceGenerator(cPiecePool & a_PiecePool, int a_Seed) :
|
cPieceGenerator::cPieceGenerator(cPiecePool & a_PiecePool, int a_Seed) :
|
||||||
@ -578,7 +578,7 @@ void cPieceGenerator::DebugConnectorPool(const cPieceGenerator::cFreeConnectors
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cPieceGenerator::cConnection:
|
// cPieceGenerator::cConnection:
|
||||||
|
|
||||||
cPieceGenerator::cConnection::cConnection(cPiece & a_Piece, cPiece::cConnector & a_Connector, int a_NumCCWRotations, int a_Weight) :
|
cPieceGenerator::cConnection::cConnection(cPiece & a_Piece, cPiece::cConnector & a_Connector, int a_NumCCWRotations, int a_Weight) :
|
||||||
@ -593,7 +593,7 @@ cPieceGenerator::cConnection::cConnection(cPiece & a_Piece, cPiece::cConnector &
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cPieceGenerator::cFreeConnector:
|
// cPieceGenerator::cFreeConnector:
|
||||||
|
|
||||||
cPieceGenerator::cFreeConnector::cFreeConnector(cPlacedPiece * a_Piece, const cPiece::cConnector & a_Connector) :
|
cPieceGenerator::cFreeConnector::cFreeConnector(cPlacedPiece * a_Piece, const cPiece::cConnector & a_Connector) :
|
||||||
@ -606,7 +606,7 @@ cPieceGenerator::cFreeConnector::cFreeConnector(cPlacedPiece * a_Piece, const cP
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cBFSPieceGenerator:
|
// cBFSPieceGenerator:
|
||||||
|
|
||||||
cBFSPieceGenerator::cBFSPieceGenerator(cPiecePool & a_PiecePool, int a_Seed) :
|
cBFSPieceGenerator::cBFSPieceGenerator(cPiecePool & a_PiecePool, int a_Seed) :
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BarWithBasement:
|
// BarWithBasement:
|
||||||
// The data has been exported from the gallery Desert, area index 82, ID 598, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 82, ID 598, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -264,7 +264,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BarWithoutBasement:
|
// BarWithoutBasement:
|
||||||
// The data has been exported from the gallery Desert, area index 81, ID 597, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 81, ID 597, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -463,7 +463,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BlackSmith:
|
// BlackSmith:
|
||||||
// The data has been exported from the gallery Desert, area index 97, ID 642, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 97, ID 642, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -633,7 +633,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LargeHouse1:
|
// LargeHouse1:
|
||||||
// The data has been exported from the gallery Desert, area index 77, ID 577, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 77, ID 577, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -922,7 +922,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LargeTower:
|
// LargeTower:
|
||||||
// The data has been exported from the gallery Desert, area index 80, ID 596, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 80, ID 596, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1108,7 +1108,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LittleHouse:
|
// LittleHouse:
|
||||||
// The data has been exported from the gallery Desert, area index 65, ID 551, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 65, ID 551, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1229,7 +1229,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LittleHouse2:
|
// LittleHouse2:
|
||||||
// The data has been exported from the gallery Desert, area index 72, ID 562, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 72, ID 562, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1376,7 +1376,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LittleHouse3:
|
// LittleHouse3:
|
||||||
// The data has been exported from the gallery Desert, area index 66, ID 553, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 66, ID 553, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1496,7 +1496,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LittleHouse4:
|
// LittleHouse4:
|
||||||
// The data has been exported from the gallery Desert, area index 70, ID 560, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 70, ID 560, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1647,7 +1647,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LittleHouse5:
|
// LittleHouse5:
|
||||||
// The data has been exported from the gallery Desert, area index 68, ID 558, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 68, ID 558, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1781,7 +1781,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LittleHouse6:
|
// LittleHouse6:
|
||||||
// The data has been exported from the gallery Desert, area index 69, ID 559, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 69, ID 559, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1922,7 +1922,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LittleHouse7:
|
// LittleHouse7:
|
||||||
// The data has been exported from the gallery Desert, area index 73, ID 563, created by xoft
|
// The data has been exported from the gallery Desert, area index 73, ID 563, created by xoft
|
||||||
{
|
{
|
||||||
@ -2068,7 +2068,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LittleHouse8:
|
// LittleHouse8:
|
||||||
// The data has been exported from the gallery Desert, area index 99, ID 739, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 99, ID 739, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -2200,7 +2200,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LittleTower:
|
// LittleTower:
|
||||||
// The data has been exported from the gallery Desert, area index 79, ID 595, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 79, ID 595, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -2351,7 +2351,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MediumHouse1:
|
// MediumHouse1:
|
||||||
// The data has been exported from the gallery Desert, area index 71, ID 561, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 71, ID 561, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -2531,7 +2531,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MediumHouse2:
|
// MediumHouse2:
|
||||||
// The data has been exported from the gallery Desert, area index 74, ID 573, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 74, ID 573, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -2740,7 +2740,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MediumHouse3:
|
// MediumHouse3:
|
||||||
// The data has been exported from the gallery Desert, area index 76, ID 575, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 76, ID 575, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -2958,7 +2958,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SmallHouse9:
|
// SmallHouse9:
|
||||||
// The data has been exported from the gallery Desert, area index 67, ID 556, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 67, ID 556, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -3104,7 +3104,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Temple:
|
// Temple:
|
||||||
// The data has been exported from the gallery Desert, area index 83, ID 599, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 83, ID 599, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -3310,7 +3310,7 @@ const cPrefab::sDef g_AlchemistVillagePrefabs[] =
|
|||||||
|
|
||||||
const cPrefab::sDef g_AlchemistVillageStartingPrefabs[] =
|
const cPrefab::sDef g_AlchemistVillageStartingPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Well:
|
// Well:
|
||||||
// The data has been exported from the gallery Desert, area index 90, ID 631, created by STR_Warrior
|
// The data has been exported from the gallery Desert, area index 90, ID 631, created by STR_Warrior
|
||||||
{
|
{
|
||||||
|
@ -4,11 +4,30 @@ project (MCServer)
|
|||||||
|
|
||||||
include_directories ("${PROJECT_SOURCE_DIR}/../../")
|
include_directories ("${PROJECT_SOURCE_DIR}/../../")
|
||||||
|
|
||||||
file(GLOB SOURCE
|
SET (SRCS
|
||||||
"*.cpp"
|
AlchemistVillagePrefabs.cpp
|
||||||
"*.h"
|
JapaneseVillagePrefabs.cpp
|
||||||
)
|
NetherFortPrefabs.cpp
|
||||||
|
PlainsVillagePrefabs.cpp
|
||||||
|
RainbowRoadPrefabs.cpp
|
||||||
|
SandFlatRoofVillagePrefabs.cpp
|
||||||
|
SandVillagePrefabs.cpp
|
||||||
|
TestRailsPrefabs.cpp
|
||||||
|
UnderwaterBasePrefabs.cpp)
|
||||||
|
|
||||||
add_library(Generating_Prefabs ${SOURCE})
|
SET (HDRS
|
||||||
|
AlchemistVillagePrefabs.h
|
||||||
|
JapaneseVillagePrefabs.h
|
||||||
|
NetherFortPrefabs.h
|
||||||
|
PlainsVillagePrefabs.h
|
||||||
|
RainbowRoadPrefabs.h
|
||||||
|
SandFlatRoofVillagePrefabs.h
|
||||||
|
SandVillagePrefabs.h
|
||||||
|
TestRailsPrefabs.h
|
||||||
|
UnderwaterBasePrefabs.h)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
add_library(Generating_Prefabs ${SRCS} ${HDRS})
|
||||||
|
|
||||||
target_link_libraries(Generating_Prefabs OSSupport iniFile Blocks)
|
target_link_libraries(Generating_Prefabs OSSupport iniFile Blocks)
|
||||||
|
endif()
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Arch:
|
// Arch:
|
||||||
// The data has been exported from the gallery Plains, area index 144, ID 488, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 144, ID 488, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -129,7 +129,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Farm:
|
// Farm:
|
||||||
// The data has been exported from the gallery Plains, area index 166, ID 554, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 166, ID 554, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -299,7 +299,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Forge:
|
// Forge:
|
||||||
// The data has been exported from the gallery Plains, area index 79, ID 145, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 79, ID 145, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -565,7 +565,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Garden2:
|
// Garden2:
|
||||||
// The data has been exported from the gallery Plains, area index 147, ID 491, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 147, ID 491, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -717,7 +717,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseMid:
|
// HouseMid:
|
||||||
// The data has been exported from the gallery Plains, area index 62, ID 119, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 62, ID 119, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -893,7 +893,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseSmall:
|
// HouseSmall:
|
||||||
// The data has been exported from the gallery Plains, area index 68, ID 131, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 68, ID 131, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1004,7 +1004,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseSmallDblWithDoor:
|
// HouseSmallDblWithDoor:
|
||||||
// The data has been exported from the gallery Plains, area index 113, ID 265, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 113, ID 265, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1128,7 +1128,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseSmallDouble:
|
// HouseSmallDouble:
|
||||||
// The data has been exported from the gallery Plains, area index 72, ID 135, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 72, ID 135, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1249,7 +1249,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseSmallWithDoor:
|
// HouseSmallWithDoor:
|
||||||
// The data has been exported from the gallery Plains, area index 112, ID 264, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 112, ID 264, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1362,7 +1362,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseWide:
|
// HouseWide:
|
||||||
// The data has been exported from the gallery Plains, area index 64, ID 121, created by STR_Warrior
|
// The data has been exported from the gallery Plains, area index 64, ID 121, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1510,7 +1510,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseWithGarden:
|
// HouseWithGarden:
|
||||||
// The data has been exported from the gallery Plains, area index 67, ID 130, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 67, ID 130, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1756,7 +1756,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseWithSakura1:
|
// HouseWithSakura1:
|
||||||
// The data has been exported from the gallery Plains, area index 75, ID 141, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 75, ID 141, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1950,7 +1950,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseWithSpa:
|
// HouseWithSpa:
|
||||||
// The data has been exported from the gallery Plains, area index 73, ID 139, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 73, ID 139, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2158,7 +2158,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MediumSakuraTree:
|
// MediumSakuraTree:
|
||||||
// The data has been exported from the gallery Plains, area index 146, ID 490, created by STR_Warrior
|
// The data has been exported from the gallery Plains, area index 146, ID 490, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -2312,7 +2312,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Restaurant:
|
// Restaurant:
|
||||||
// The data has been exported from the gallery Plains, area index 61, ID 117, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 61, ID 117, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2566,7 +2566,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SakuraDouble:
|
// SakuraDouble:
|
||||||
// The data has been exported from the gallery Plains, area index 76, ID 142, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 76, ID 142, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2697,7 +2697,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SakuraSmall:
|
// SakuraSmall:
|
||||||
// The data has been exported from the gallery Plains, area index 145, ID 489, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 145, ID 489, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2808,7 +2808,7 @@ const cPrefab::sDef g_JapaneseVillagePrefabs[] =
|
|||||||
|
|
||||||
const cPrefab::sDef g_JapaneseVillageStartingPrefabs[] =
|
const cPrefab::sDef g_JapaneseVillageStartingPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HighTemple:
|
// HighTemple:
|
||||||
// The data has been exported from the gallery Plains, area index 70, ID 133, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 70, ID 133, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -3159,7 +3159,7 @@ const cPrefab::sDef g_JapaneseVillageStartingPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Well:
|
// Well:
|
||||||
// The data has been exported from the gallery Plains, area index 143, ID 487, created by STR_Warrior
|
// The data has been exported from the gallery Plains, area index 143, ID 487, created by STR_Warrior
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const cPrefab::sDef g_NetherFortPrefabs[] =
|
const cPrefab::sDef g_NetherFortPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BalconyCorridor:
|
// BalconyCorridor:
|
||||||
// The data has been exported from the gallery Nether, area index 37, ID 288, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 37, ID 288, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -162,7 +162,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BalconyTee2:
|
// BalconyTee2:
|
||||||
// The data has been exported from the gallery Nether, area index 38, ID 289, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 38, ID 289, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -325,7 +325,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BlazePlatform:
|
// BlazePlatform:
|
||||||
// The data has been exported from the gallery Nether, area index 26, ID 276, created by tonibm1999
|
// The data has been exported from the gallery Nether, area index 26, ID 276, created by tonibm1999
|
||||||
{
|
{
|
||||||
@ -448,7 +448,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BlazePlatformOverhang:
|
// BlazePlatformOverhang:
|
||||||
// The data has been exported from the gallery Nether, area index 20, ID 162, created by STR_Warrior
|
// The data has been exported from the gallery Nether, area index 20, ID 162, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -621,7 +621,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BridgeCircleCrossing:
|
// BridgeCircleCrossing:
|
||||||
// The data has been exported from the gallery Nether, area index 49, ID 308, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 49, ID 308, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -824,7 +824,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BridgeCrossing:
|
// BridgeCrossing:
|
||||||
// The data has been exported from the gallery Nether, area index 17, ID 159, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 17, ID 159, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1028,7 +1028,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BridgeCrumble1:
|
// BridgeCrumble1:
|
||||||
// The data has been exported from the gallery Nether, area index 19, ID 161, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 19, ID 161, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1125,7 +1125,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BridgeCrumble2:
|
// BridgeCrumble2:
|
||||||
// The data has been exported from the gallery Nether, area index 18, ID 160, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 18, ID 160, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1228,7 +1228,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BridgeDoubleCrumble:
|
// BridgeDoubleCrumble:
|
||||||
// The data has been exported from the gallery Nether, area index 46, ID 305, created by STR_Warrior
|
// The data has been exported from the gallery Nether, area index 46, ID 305, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1410,7 +1410,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BridgeFunnelDown:
|
// BridgeFunnelDown:
|
||||||
// The data has been exported from the gallery Nether, area index 0, ID 2, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 0, ID 2, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1653,7 +1653,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BridgeLevelCrossing:
|
// BridgeLevelCrossing:
|
||||||
// The data has been exported from the gallery Nether, area index 61, ID 321, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 61, ID 321, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1985,7 +1985,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BridgeSegment:
|
// BridgeSegment:
|
||||||
// The data has been exported from the gallery Nether, area index 16, ID 158, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 16, ID 158, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2107,7 +2107,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BridgeTee:
|
// BridgeTee:
|
||||||
// The data has been exported from the gallery Nether, area index 39, ID 290, created by STR_Warrior
|
// The data has been exported from the gallery Nether, area index 39, ID 290, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -2270,7 +2270,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Corridor11:
|
// Corridor11:
|
||||||
// The data has been exported from the gallery Nether, area index 36, ID 287, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 36, ID 287, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2374,7 +2374,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Corridor13:
|
// Corridor13:
|
||||||
// The data has been exported from the gallery Nether, area index 35, ID 286, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 35, ID 286, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2478,7 +2478,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Corridor5:
|
// Corridor5:
|
||||||
// The data has been exported from the gallery Nether, area index 65, ID 330, created by xoft
|
// The data has been exported from the gallery Nether, area index 65, ID 330, created by xoft
|
||||||
{
|
{
|
||||||
@ -2576,7 +2576,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CorridorCorner5:
|
// CorridorCorner5:
|
||||||
// The data has been exported from the gallery Nether, area index 10, ID 40, created by xoft
|
// The data has been exported from the gallery Nether, area index 10, ID 40, created by xoft
|
||||||
{
|
{
|
||||||
@ -2718,7 +2718,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CorridorCornerChest5:
|
// CorridorCornerChest5:
|
||||||
// The data has been exported from the gallery Nether, area index 42, ID 293, created by STR_Warrior
|
// The data has been exported from the gallery Nether, area index 42, ID 293, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -2861,7 +2861,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CorridorCrossing:
|
// CorridorCrossing:
|
||||||
// The data has been exported from the gallery Nether, area index 63, ID 328, created by xoft
|
// The data has been exported from the gallery Nether, area index 63, ID 328, created by xoft
|
||||||
{
|
{
|
||||||
@ -2989,7 +2989,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CorridorStairs:
|
// CorridorStairs:
|
||||||
// The data has been exported from the gallery Nether, area index 12, ID 42, created by xoft
|
// The data has been exported from the gallery Nether, area index 12, ID 42, created by xoft
|
||||||
{
|
{
|
||||||
@ -3144,7 +3144,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// DarkCorridor:
|
// DarkCorridor:
|
||||||
// The data has been exported from the gallery Nether, area index 3, ID 30, created by STR_Warrior
|
// The data has been exported from the gallery Nether, area index 3, ID 30, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -3248,7 +3248,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LavaStaircase:
|
// LavaStaircase:
|
||||||
// The data has been exported from the gallery Nether, area index 28, ID 278, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 28, ID 278, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -3508,7 +3508,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LavaStaircaseBig:
|
// LavaStaircaseBig:
|
||||||
// The data has been exported from the gallery Nether, area index 31, ID 282, created by STR_Warrior
|
// The data has been exported from the gallery Nether, area index 31, ID 282, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -3842,7 +3842,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LavaStairsBridge:
|
// LavaStairsBridge:
|
||||||
// The data has been exported from the gallery Nether, area index 30, ID 281, created by STR_Warrior
|
// The data has been exported from the gallery Nether, area index 30, ID 281, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -4123,7 +4123,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MidStaircase:
|
// MidStaircase:
|
||||||
// The data has been exported from the gallery Nether, area index 23, ID 165, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 23, ID 165, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -4314,7 +4314,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// StairsToOpen1:
|
// StairsToOpen1:
|
||||||
// The data has been exported from the gallery Nether, area index 27, ID 277, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 27, ID 277, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -4460,7 +4460,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// StairsToOpen2:
|
// StairsToOpen2:
|
||||||
// The data has been exported from the gallery Nether, area index 8, ID 35, created by xoft
|
// The data has been exported from the gallery Nether, area index 8, ID 35, created by xoft
|
||||||
{
|
{
|
||||||
@ -4606,7 +4606,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Tee2x4:
|
// Tee2x4:
|
||||||
// The data has been exported from the gallery Nether, area index 40, ID 291, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 40, ID 291, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -4726,7 +4726,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Tee4x4:
|
// Tee4x4:
|
||||||
// The data has been exported from the gallery Nether, area index 41, ID 292, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 41, ID 292, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -4858,7 +4858,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// TinyCorridorCorner:
|
// TinyCorridorCorner:
|
||||||
// The data has been exported from the gallery Nether, area index 66, ID 331, created by xoft
|
// The data has been exported from the gallery Nether, area index 66, ID 331, created by xoft
|
||||||
{
|
{
|
||||||
@ -4957,7 +4957,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// TinyCorridorCornerChest:
|
// TinyCorridorCornerChest:
|
||||||
// The data has been exported from the gallery Nether, area index 67, ID 332, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 67, ID 332, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -5057,7 +5057,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// TinyCorridorCrossing:
|
// TinyCorridorCrossing:
|
||||||
// The data has been exported from the gallery Nether, area index 64, ID 329, created by xoft
|
// The data has been exported from the gallery Nether, area index 64, ID 329, created by xoft
|
||||||
{
|
{
|
||||||
@ -5159,7 +5159,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Turret:
|
// Turret:
|
||||||
// The data has been exported from the gallery Nether, area index 7, ID 34, created by xoft
|
// The data has been exported from the gallery Nether, area index 7, ID 34, created by xoft
|
||||||
{
|
{
|
||||||
@ -5283,7 +5283,7 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
|
|||||||
|
|
||||||
const cPrefab::sDef g_NetherFortStartingPrefabs[] =
|
const cPrefab::sDef g_NetherFortStartingPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CentralRoom:
|
// CentralRoom:
|
||||||
// The data has been exported from the gallery Nether, area index 22, ID 164, created by Aloe_vera
|
// The data has been exported from the gallery Nether, area index 22, ID 164, created by Aloe_vera
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BigPlantBed:
|
// BigPlantBed:
|
||||||
// The data has been exported from the gallery Plains, area index 26, ID 70, created by Taugrammaton
|
// The data has been exported from the gallery Plains, area index 26, ID 70, created by Taugrammaton
|
||||||
{
|
{
|
||||||
@ -195,7 +195,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CobbleHouse10x5Library:
|
// CobbleHouse10x5Library:
|
||||||
// The data has been exported from the gallery Plains, area index 23, ID 66, created by xoft
|
// The data has been exported from the gallery Plains, area index 23, ID 66, created by xoft
|
||||||
{
|
{
|
||||||
@ -336,7 +336,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// DoublePlantBed:
|
// DoublePlantBed:
|
||||||
// The data has been exported from the gallery Plains, area index 5, ID 20, created by tonibm1999
|
// The data has been exported from the gallery Plains, area index 5, ID 20, created by tonibm1999
|
||||||
{
|
{
|
||||||
@ -492,7 +492,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Forge:
|
// Forge:
|
||||||
// The data has been exported from the gallery Plains, area index 51, ID 102, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 51, ID 102, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -692,7 +692,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// LampPost:
|
// LampPost:
|
||||||
// The data has been exported from the gallery Plains, area index 28, ID 73, created by STR_Warrior
|
// The data has been exported from the gallery Plains, area index 28, ID 73, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -784,7 +784,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineshaftCorridor:
|
// MineshaftCorridor:
|
||||||
// The data has been exported from the gallery Plains, area index 139, ID 447, created by STR_Warrior
|
// The data has been exported from the gallery Plains, area index 139, ID 447, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -861,7 +861,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineshaftCrossing:
|
// MineshaftCrossing:
|
||||||
// The data has been exported from the gallery Plains, area index 171, ID 578, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 171, ID 578, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -946,7 +946,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineshaftCrossing:
|
// MineshaftCrossing:
|
||||||
// The data has been exported from the gallery Plains, area index 193, ID 657, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 193, ID 657, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1064,7 +1064,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineshaftDoubleCrossing:
|
// MineshaftDoubleCrossing:
|
||||||
// The data has been exported from the gallery Plains, area index 172, ID 579, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 172, ID 579, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1189,7 +1189,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineshaftSpiral:
|
// MineshaftSpiral:
|
||||||
// The data has been exported from the gallery Plains, area index 198, ID 662, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 198, ID 662, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1370,7 +1370,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineshaftStairs:
|
// MineshaftStairs:
|
||||||
// The data has been exported from the gallery Plains, area index 195, ID 659, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 195, ID 659, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1469,7 +1469,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineshaftStairsCrossing:
|
// MineshaftStairsCrossing:
|
||||||
// The data has been exported from the gallery Plains, area index 199, ID 663, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 199, ID 663, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1719,7 +1719,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineshaftTee:
|
// MineshaftTee:
|
||||||
// The data has been exported from the gallery Plains, area index 194, ID 658, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 194, ID 658, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1819,7 +1819,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineshaftsCorridor5:
|
// MineshaftsCorridor5:
|
||||||
// The data has been exported from the gallery Plains, area index 200, ID 664, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 200, ID 664, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1898,7 +1898,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Scarecrow:
|
// Scarecrow:
|
||||||
// The data has been exported from the gallery Plains, area index 150, ID 494, created by STR_Warrior
|
// The data has been exported from the gallery Plains, area index 150, ID 494, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -1983,7 +1983,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SinglePlantBed:
|
// SinglePlantBed:
|
||||||
// The data has been exported from the gallery Plains, area index 17, ID 60, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 17, ID 60, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2108,7 +2108,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenChurchMid:
|
// WoodenChurchMid:
|
||||||
// The data has been exported from the gallery Plains, area index 58, ID 109, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 58, ID 109, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2418,7 +2418,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenGranary:
|
// WoodenGranary:
|
||||||
// The data has been exported from the gallery Plains, area index 54, ID 105, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 54, ID 105, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2560,7 +2560,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouse10x7Library:
|
// WoodenHouse10x7Library:
|
||||||
// The data has been exported from the gallery Plains, area index 47, ID 98, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 47, ID 98, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2729,7 +2729,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouse5x5:
|
// WoodenHouse5x5:
|
||||||
// The data has been exported from the gallery Plains, area index 49, ID 100, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 49, ID 100, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2856,7 +2856,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouse7x5:
|
// WoodenHouse7x5:
|
||||||
// The data has been exported from the gallery Plains, area index 40, ID 91, created by xoft
|
// The data has been exported from the gallery Plains, area index 40, ID 91, created by xoft
|
||||||
{
|
{
|
||||||
@ -2983,7 +2983,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouse9x5:
|
// WoodenHouse9x5:
|
||||||
// The data has been exported from the gallery Plains, area index 41, ID 92, created by xoft
|
// The data has been exported from the gallery Plains, area index 41, ID 92, created by xoft
|
||||||
{
|
{
|
||||||
@ -3117,7 +3117,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouse9x5Fence:
|
// WoodenHouse9x5Fence:
|
||||||
// The data has been exported from the gallery Plains, area index 9, ID 26, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 9, ID 26, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -3287,7 +3287,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouse9x5Library:
|
// WoodenHouse9x5Library:
|
||||||
// The data has been exported from the gallery Plains, area index 46, ID 97, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 46, ID 97, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -3428,7 +3428,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouse9x7:
|
// WoodenHouse9x7:
|
||||||
// The data has been exported from the gallery Plains, area index 52, ID 103, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 52, ID 103, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -3590,7 +3590,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouse9x7Butcher:
|
// WoodenHouse9x7Butcher:
|
||||||
// The data has been exported from the gallery Plains, area index 48, ID 99, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 48, ID 99, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -3806,7 +3806,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouse9x7DoubleDoor:
|
// WoodenHouse9x7DoubleDoor:
|
||||||
// The data has been exported from the gallery Plains, area index 38, ID 87, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 38, ID 87, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -3971,7 +3971,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouseL13x14:
|
// WoodenHouseL13x14:
|
||||||
// The data has been exported from the gallery Plains, area index 39, ID 90, created by STR_Warrior
|
// The data has been exported from the gallery Plains, area index 39, ID 90, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -4223,7 +4223,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouseL14x14:
|
// WoodenHouseL14x14:
|
||||||
// The data has been exported from the gallery Plains, area index 0, ID 4, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 0, ID 4, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -4450,7 +4450,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouseL9x9:
|
// WoodenHouseL9x9:
|
||||||
// The data has been exported from the gallery Plains, area index 42, ID 93, created by xoft
|
// The data has been exported from the gallery Plains, area index 42, ID 93, created by xoft
|
||||||
{
|
{
|
||||||
@ -4619,7 +4619,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenHouseU13x9:
|
// WoodenHouseU13x9:
|
||||||
// The data has been exported from the gallery Plains, area index 43, ID 94, created by xoft
|
// The data has been exported from the gallery Plains, area index 43, ID 94, created by xoft
|
||||||
{
|
{
|
||||||
@ -4786,7 +4786,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenMill5x5:
|
// WoodenMill5x5:
|
||||||
// The data has been exported from the gallery Plains, area index 60, ID 111, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 60, ID 111, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -5121,7 +5121,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WoodenStables:
|
// WoodenStables:
|
||||||
// The data has been exported from the gallery Plains, area index 55, ID 106, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 55, ID 106, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -5307,7 +5307,7 @@ const cPrefab::sDef g_PlainsVillagePrefabs[] =
|
|||||||
|
|
||||||
const cPrefab::sDef g_PlainsVillageStartingPrefabs[] =
|
const cPrefab::sDef g_PlainsVillageStartingPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CobbleWell4x4:
|
// CobbleWell4x4:
|
||||||
// The data has been exported from the gallery Plains, area index 1, ID 5, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 1, ID 5, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -5448,7 +5448,7 @@ const cPrefab::sDef g_PlainsVillageStartingPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MineEntrance:
|
// MineEntrance:
|
||||||
// The data has been exported from the gallery Plains, area index 138, ID 446, created by STR_Warrior
|
// The data has been exported from the gallery Plains, area index 138, ID 446, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -5897,7 +5897,7 @@ const cPrefab::sDef g_PlainsVillageStartingPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// RoofedWell:
|
// RoofedWell:
|
||||||
// The data has been exported from the gallery Plains, area index 119, ID 271, created by STR_Warrior
|
// The data has been exported from the gallery Plains, area index 119, ID 271, created by STR_Warrior
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CurveDouble:
|
// CurveDouble:
|
||||||
// The data has been exported from the gallery Cube, area index 89, ID 467, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 89, ID 467, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -85,7 +85,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CurveDownFromTopSingle:
|
// CurveDownFromTopSingle:
|
||||||
// The data has been exported from the gallery Cube, area index 100, ID 478, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 100, ID 478, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -255,7 +255,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CurveSingle:
|
// CurveSingle:
|
||||||
// The data has been exported from the gallery Cube, area index 84, ID 462, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 84, ID 462, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -320,7 +320,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CurveSingleLeft:
|
// CurveSingleLeft:
|
||||||
// The data has been exported from the gallery Cube, area index 97, ID 475, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 97, ID 475, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -385,7 +385,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CurveUpDouble:
|
// CurveUpDouble:
|
||||||
// The data has been exported from the gallery Cube, area index 92, ID 470, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 92, ID 470, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -581,7 +581,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CurveUpSingle:
|
// CurveUpSingle:
|
||||||
// The data has been exported from the gallery Cube, area index 87, ID 465, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 87, ID 465, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -751,7 +751,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SlopeDownFromTopSingle:
|
// SlopeDownFromTopSingle:
|
||||||
// The data has been exported from the gallery Cube, area index 98, ID 476, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 98, ID 476, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -881,7 +881,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SlopeUpDouble:
|
// SlopeUpDouble:
|
||||||
// The data has been exported from the gallery Cube, area index 90, ID 468, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 90, ID 468, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1061,7 +1061,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SlopeUpSingle:
|
// SlopeUpSingle:
|
||||||
// The data has been exported from the gallery Cube, area index 85, ID 463, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 85, ID 463, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1191,7 +1191,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SplitTee:
|
// SplitTee:
|
||||||
// The data has been exported from the gallery Cube, area index 93, ID 471, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 93, ID 471, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1261,7 +1261,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// StraightDouble:
|
// StraightDouble:
|
||||||
// The data has been exported from the gallery Cube, area index 88, ID 466, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 88, ID 466, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1335,7 +1335,7 @@ const cPrefab::sDef g_RainbowRoadPrefabs[] =
|
|||||||
|
|
||||||
const cPrefab::sDef g_RainbowRoadStartingPrefabs[] =
|
const cPrefab::sDef g_RainbowRoadStartingPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// StraightSingle:
|
// StraightSingle:
|
||||||
// The data has been exported from the gallery Cube, area index 83, ID 461, created by Aloe_vera
|
// The data has been exported from the gallery Cube, area index 83, ID 461, created by Aloe_vera
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Forge:
|
// Forge:
|
||||||
// The data has been exported from the gallery Desert, area index 32, ID 173, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 32, ID 173, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -162,7 +162,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House11x7:
|
// House11x7:
|
||||||
// The data has been exported from the gallery Desert, area index 31, ID 172, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 31, ID 172, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -301,7 +301,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House5x4:
|
// House5x4:
|
||||||
// The data has been exported from the gallery Desert, area index 25, ID 166, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 25, ID 166, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -412,7 +412,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House5x5:
|
// House5x5:
|
||||||
// The data has been exported from the gallery Desert, area index 26, ID 167, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 26, ID 167, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -530,7 +530,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House7x5:
|
// House7x5:
|
||||||
// The data has been exported from the gallery Desert, area index 27, ID 168, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 27, ID 168, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -648,7 +648,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House8x5:
|
// House8x5:
|
||||||
// The data has been exported from the gallery Desert, area index 28, ID 169, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 28, ID 169, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -772,7 +772,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House8x7:
|
// House8x7:
|
||||||
// The data has been exported from the gallery Desert, area index 29, ID 170, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 29, ID 170, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -910,7 +910,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House9x7:
|
// House9x7:
|
||||||
// The data has been exported from the gallery Desert, area index 30, ID 171, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 30, ID 171, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1049,7 +1049,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseL13x12:
|
// HouseL13x12:
|
||||||
// The data has been exported from the gallery Desert, area index 53, ID 345, created by jakibaki
|
// The data has been exported from the gallery Desert, area index 53, ID 345, created by jakibaki
|
||||||
{
|
{
|
||||||
@ -1220,7 +1220,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// MarketStall:
|
// MarketStall:
|
||||||
// The data has been exported from the gallery Desert, area index 34, ID 175, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 34, ID 175, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1330,7 +1330,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Marketplace:
|
// Marketplace:
|
||||||
// The data has been exported from the gallery Desert, area index 38, ID 261, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 38, ID 261, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1472,7 +1472,7 @@ const cPrefab::sDef g_SandFlatRoofVillagePrefabs[] =
|
|||||||
|
|
||||||
const cPrefab::sDef g_SandFlatRoofVillageStartingPrefabs[] =
|
const cPrefab::sDef g_SandFlatRoofVillageStartingPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Well:
|
// Well:
|
||||||
// The data has been exported from the gallery Desert, area index 44, ID 275, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 44, ID 275, created by Aloe_vera
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const cPrefab::sDef g_SandVillagePrefabs[] =
|
const cPrefab::sDef g_SandVillagePrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// DoubleField:
|
// DoubleField:
|
||||||
// The data has been exported from the gallery Desert, area index 5, ID 75, created by tonibm1999
|
// The data has been exported from the gallery Desert, area index 5, ID 75, created by tonibm1999
|
||||||
{
|
{
|
||||||
@ -102,7 +102,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House11x7:
|
// House11x7:
|
||||||
// The data has been exported from the gallery Desert, area index 6, ID 81, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 6, ID 81, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -236,7 +236,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House11x9:
|
// House11x9:
|
||||||
// The data has been exported from the gallery Desert, area index 11, ID 115, created by xoft
|
// The data has been exported from the gallery Desert, area index 11, ID 115, created by xoft
|
||||||
{
|
{
|
||||||
@ -395,7 +395,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House13x7:
|
// House13x7:
|
||||||
// The data has been exported from the gallery Desert, area index 15, ID 125, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 15, ID 125, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -527,7 +527,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House13x9:
|
// House13x9:
|
||||||
// The data has been exported from the gallery Desert, area index 12, ID 116, created by xoft
|
// The data has been exported from the gallery Desert, area index 12, ID 116, created by xoft
|
||||||
{
|
{
|
||||||
@ -686,7 +686,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House15x9:
|
// House15x9:
|
||||||
// The data has been exported from the gallery Desert, area index 13, ID 118, created by xoft
|
// The data has been exported from the gallery Desert, area index 13, ID 118, created by xoft
|
||||||
{
|
{
|
||||||
@ -845,7 +845,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House16x9:
|
// House16x9:
|
||||||
// The data has been exported from the gallery Desert, area index 16, ID 126, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 16, ID 126, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1004,7 +1004,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House7x7:
|
// House7x7:
|
||||||
// The data has been exported from the gallery Desert, area index 8, ID 112, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 8, ID 112, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1128,7 +1128,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House9x7:
|
// House9x7:
|
||||||
// The data has been exported from the gallery Desert, area index 9, ID 113, created by xoft
|
// The data has been exported from the gallery Desert, area index 9, ID 113, created by xoft
|
||||||
{
|
{
|
||||||
@ -1253,7 +1253,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// House9x9:
|
// House9x9:
|
||||||
// The data has been exported from the gallery Desert, area index 10, ID 114, created by xoft
|
// The data has been exported from the gallery Desert, area index 10, ID 114, created by xoft
|
||||||
{
|
{
|
||||||
@ -1404,7 +1404,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseL14x12:
|
// HouseL14x12:
|
||||||
// The data has been exported from the gallery Desert, area index 14, ID 124, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 14, ID 124, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1592,7 +1592,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// HouseL14x12:
|
// HouseL14x12:
|
||||||
// The data has been exported from the gallery Desert, area index 7, ID 82, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 7, ID 82, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1763,7 +1763,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SingleField:
|
// SingleField:
|
||||||
// The data has been exported from the gallery Desert, area index 17, ID 127, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 17, ID 127, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -1844,7 +1844,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// SmallHut:
|
// SmallHut:
|
||||||
// The data has been exported from the gallery Desert, area index 4, ID 68, created by tonibm1999
|
// The data has been exported from the gallery Desert, area index 4, ID 68, created by tonibm1999
|
||||||
{
|
{
|
||||||
@ -1955,7 +1955,7 @@ const cPrefab::sDef g_SandVillagePrefabs[] =
|
|||||||
|
|
||||||
const cPrefab::sDef g_SandVillageStartingPrefabs[] =
|
const cPrefab::sDef g_SandVillageStartingPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// RoofedWell:
|
// RoofedWell:
|
||||||
// The data has been exported from the gallery Desert, area index 43, ID 274, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 43, ID 274, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2155,7 +2155,7 @@ const cPrefab::sDef g_SandVillageStartingPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Well:
|
// Well:
|
||||||
// The data has been exported from the gallery Desert, area index 0, ID 1, created by Aloe_vera
|
// The data has been exported from the gallery Desert, area index 0, ID 1, created by Aloe_vera
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const cPrefab::sDef g_TestRailsPrefabs[] =
|
const cPrefab::sDef g_TestRailsPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// ActivatorRail:
|
// ActivatorRail:
|
||||||
// The data has been exported from the gallery Plains, area index 251, ID 746, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 251, ID 746, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -104,7 +104,7 @@ const cPrefab::sDef g_TestRailsPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// DetectorRail:
|
// DetectorRail:
|
||||||
// The data has been exported from the gallery Plains, area index 250, ID 745, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 250, ID 745, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -193,7 +193,7 @@ const cPrefab::sDef g_TestRailsPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// PowerRail:
|
// PowerRail:
|
||||||
// The data has been exported from the gallery Plains, area index 248, ID 743, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 248, ID 743, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -284,7 +284,7 @@ const cPrefab::sDef g_TestRailsPrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// RegularRail:
|
// RegularRail:
|
||||||
// The data has been exported from the gallery Plains, area index 247, ID 742, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 247, ID 742, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -383,7 +383,7 @@ const cPrefab::sDef g_TestRailsPrefabs[] =
|
|||||||
|
|
||||||
const cPrefab::sDef g_TestRailsStartingPrefabs[] =
|
const cPrefab::sDef g_TestRailsStartingPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CentralPiece:
|
// CentralPiece:
|
||||||
// The data has been exported from the gallery Plains, area index 249, ID 744, created by Aloe_vera
|
// The data has been exported from the gallery Plains, area index 249, ID 744, created by Aloe_vera
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// BrokenRoom:
|
// BrokenRoom:
|
||||||
// The data has been exported from the gallery Water, area index 49, ID 680, created by STR_Warrior
|
// The data has been exported from the gallery Water, area index 49, ID 680, created by STR_Warrior
|
||||||
{
|
{
|
||||||
@ -178,7 +178,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Corridor16:
|
// Corridor16:
|
||||||
// The data has been exported from the gallery Water, area index 25, ID 566, created by xoft
|
// The data has been exported from the gallery Water, area index 25, ID 566, created by xoft
|
||||||
{
|
{
|
||||||
@ -265,7 +265,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CorridorCorner:
|
// CorridorCorner:
|
||||||
// The data has been exported from the gallery Water, area index 26, ID 569, created by xoft
|
// The data has been exported from the gallery Water, area index 26, ID 569, created by xoft
|
||||||
{
|
{
|
||||||
@ -380,7 +380,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CorridorCrossing:
|
// CorridorCrossing:
|
||||||
// The data has been exported from the gallery Water, area index 31, ID 581, created by LO1ZB
|
// The data has been exported from the gallery Water, area index 31, ID 581, created by LO1ZB
|
||||||
{
|
{
|
||||||
@ -526,7 +526,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CorridorStairs:
|
// CorridorStairs:
|
||||||
// The data has been exported from the gallery Water, area index 32, ID 582, created by LO1ZB
|
// The data has been exported from the gallery Water, area index 32, ID 582, created by LO1ZB
|
||||||
{
|
{
|
||||||
@ -656,7 +656,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CorridorTee:
|
// CorridorTee:
|
||||||
// The data has been exported from the gallery Water, area index 29, ID 576, created by LO1ZB
|
// The data has been exported from the gallery Water, area index 29, ID 576, created by LO1ZB
|
||||||
{
|
{
|
||||||
@ -775,7 +775,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// ViewingCorner:
|
// ViewingCorner:
|
||||||
// The data has been exported from the gallery Water, area index 40, ID 613, created by LO1ZB
|
// The data has been exported from the gallery Water, area index 40, ID 613, created by LO1ZB
|
||||||
{
|
{
|
||||||
@ -958,7 +958,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// ViewingCorridor:
|
// ViewingCorridor:
|
||||||
// The data has been exported from the gallery Water, area index 27, ID 571, created by LO1ZB
|
// The data has been exported from the gallery Water, area index 27, ID 571, created by LO1ZB
|
||||||
{
|
{
|
||||||
@ -1065,7 +1065,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// ViewingCorridorBulge:
|
// ViewingCorridorBulge:
|
||||||
// The data has been exported from the gallery Water, area index 42, ID 615, created by LO1ZB
|
// The data has been exported from the gallery Water, area index 42, ID 615, created by LO1ZB
|
||||||
{
|
{
|
||||||
@ -1280,7 +1280,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// ViewingCrossing:
|
// ViewingCrossing:
|
||||||
// The data has been exported from the gallery Water, area index 38, ID 611, created by LO1ZB
|
// The data has been exported from the gallery Water, area index 38, ID 611, created by LO1ZB
|
||||||
{
|
{
|
||||||
@ -1483,7 +1483,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// ViewingEnd:
|
// ViewingEnd:
|
||||||
// The data has been exported from the gallery Water, area index 41, ID 614, created by LO1ZB
|
// The data has been exported from the gallery Water, area index 41, ID 614, created by LO1ZB
|
||||||
{
|
{
|
||||||
@ -1648,7 +1648,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// ViewingTee:
|
// ViewingTee:
|
||||||
// The data has been exported from the gallery Water, area index 39, ID 612, created by LO1ZB
|
// The data has been exported from the gallery Water, area index 39, ID 612, created by LO1ZB
|
||||||
{
|
{
|
||||||
@ -1850,7 +1850,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WaterfallRoom:
|
// WaterfallRoom:
|
||||||
// The data has been exported from the gallery Water, area index 50, ID 681, created by Aloe_vera
|
// The data has been exported from the gallery Water, area index 50, ID 681, created by Aloe_vera
|
||||||
{
|
{
|
||||||
@ -2059,7 +2059,7 @@ const cPrefab::sDef g_UnderwaterBasePrefabs[] =
|
|||||||
|
|
||||||
const cPrefab::sDef g_UnderwaterBaseStartingPrefabs[] =
|
const cPrefab::sDef g_UnderwaterBaseStartingPrefabs[] =
|
||||||
{
|
{
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CentralRoom:
|
// CentralRoom:
|
||||||
// The data has been exported from the gallery Water, area index 24, ID 564, created by xoft
|
// The data has been exported from the gallery Water, area index 24, ID 564, created by xoft
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ static cPrefabPiecePool g_RainbowRoads(g_RainbowRoadPrefabs, g_RainbowRoadPrefab
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cRainbowRoadsGen::cRainbowRoads:
|
// cRainbowRoadsGen::cRainbowRoads:
|
||||||
|
|
||||||
class cRainbowRoadsGen::cRainbowRoads :
|
class cRainbowRoadsGen::cRainbowRoads :
|
||||||
@ -86,7 +86,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cRainbowRoadsGen:
|
// cRainbowRoadsGen:
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenRavines:
|
// cStructGenRavines:
|
||||||
|
|
||||||
cStructGenRavines::cStructGenRavines(int a_Seed, int a_Size) :
|
cStructGenRavines::cStructGenRavines(int a_Seed, int a_Size) :
|
||||||
@ -101,7 +101,7 @@ cGridStructGen::cStructurePtr cStructGenRavines::CreateStructure(int a_GridX, in
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenRavines::cRavine
|
// cStructGenRavines::cRavine
|
||||||
|
|
||||||
cStructGenRavines::cRavine::cRavine(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_Size, cNoise & a_Noise) :
|
cStructGenRavines::cRavine::cRavine(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_Size, cNoise & a_Noise) :
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenOreNests configuration:
|
// cStructGenOreNests configuration:
|
||||||
|
|
||||||
const int MAX_HEIGHT_COAL = 127;
|
const int MAX_HEIGHT_COAL = 127;
|
||||||
@ -51,7 +51,7 @@ const int NEST_SIZE_GRAVEL = 32;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenTrees:
|
// cStructGenTrees:
|
||||||
|
|
||||||
void cStructGenTrees::GenFinish(cChunkDesc & a_ChunkDesc)
|
void cStructGenTrees::GenFinish(cChunkDesc & a_ChunkDesc)
|
||||||
@ -303,7 +303,7 @@ int cStructGenTrees::GetNumTrees(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenOreNests:
|
// cStructGenOreNests:
|
||||||
|
|
||||||
void cStructGenOreNests::GenFinish(cChunkDesc & a_ChunkDesc)
|
void cStructGenOreNests::GenFinish(cChunkDesc & a_ChunkDesc)
|
||||||
@ -410,7 +410,7 @@ void cStructGenOreNests::GenerateOre(int a_ChunkX, int a_ChunkZ, BLOCKTYPE a_Ore
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenLakes:
|
// cStructGenLakes:
|
||||||
|
|
||||||
void cStructGenLakes::GenFinish(cChunkDesc & a_ChunkDesc)
|
void cStructGenLakes::GenFinish(cChunkDesc & a_ChunkDesc)
|
||||||
@ -484,7 +484,6 @@ void cStructGenLakes::CreateLakeImage(int a_ChunkX, int a_ChunkZ, cBlockArea & a
|
|||||||
const int BubbleY = 4 + (Rnd & 0x01); // 4 .. 5
|
const int BubbleY = 4 + (Rnd & 0x01); // 4 .. 5
|
||||||
Rnd >>= 1;
|
Rnd >>= 1;
|
||||||
const int BubbleZ = BubbleR + (Rnd % Range);
|
const int BubbleZ = BubbleR + (Rnd % Range);
|
||||||
Rnd >>= 4;
|
|
||||||
const int HalfR = BubbleR / 2; // 1 .. 2
|
const int HalfR = BubbleR / 2; // 1 .. 2
|
||||||
const int RSquared = BubbleR * BubbleR;
|
const int RSquared = BubbleR * BubbleR;
|
||||||
for (int y = -HalfR; y <= HalfR; y++)
|
for (int y = -HalfR; y <= HalfR; y++)
|
||||||
@ -532,7 +531,7 @@ void cStructGenLakes::CreateLakeImage(int a_ChunkX, int a_ChunkZ, cBlockArea & a
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenDirectOverhangs:
|
// cStructGenDirectOverhangs:
|
||||||
|
|
||||||
cStructGenDirectOverhangs::cStructGenDirectOverhangs(int a_Seed) :
|
cStructGenDirectOverhangs::cStructGenDirectOverhangs(int a_Seed) :
|
||||||
@ -648,7 +647,7 @@ bool cStructGenDirectOverhangs::HasWantedBiome(cChunkDesc & a_ChunkDesc) const
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cStructGenDistortedMembraneOverhangs:
|
// cStructGenDistortedMembraneOverhangs:
|
||||||
|
|
||||||
cStructGenDistortedMembraneOverhangs::cStructGenDistortedMembraneOverhangs(int a_Seed) :
|
cStructGenDistortedMembraneOverhangs::cStructGenDistortedMembraneOverhangs(int a_Seed) :
|
||||||
|
@ -18,7 +18,7 @@ static cPrefabPiecePool g_TestRails(g_TestRailsPrefabs, g_TestRailsPrefabsCount,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cTestRailsGen::cTestRails:
|
// cTestRailsGen::cTestRails:
|
||||||
|
|
||||||
class cTestRailsGen::cTestRails :
|
class cTestRailsGen::cTestRails :
|
||||||
@ -86,7 +86,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cTestRailsGen:
|
// cTestRailsGen:
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,13 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// DEBUG:
|
|
||||||
int gTotalLargeJungleTrees = 0;
|
|
||||||
int gOversizeLargeJungleTrees = 0;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -41,42 +34,42 @@ static const sCoords Corners[] =
|
|||||||
|
|
||||||
static const sCoords BigO1[] =
|
static const sCoords BigO1[] =
|
||||||
{
|
{
|
||||||
{0, -1},
|
/* -1 */ {0, -1},
|
||||||
{-1, 0}, {1, 0},
|
/* 0 */ {-1, 0}, {1, 0},
|
||||||
{0, 1},
|
/* 1 */ {0, 1},
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static const sCoords BigO2[] =
|
static const sCoords BigO2[] =
|
||||||
{
|
{
|
||||||
{-1, -2}, {0, -2}, {1, -2},
|
/* -2 */ {-1, -2}, {0, -2}, {1, -2},
|
||||||
{-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1},
|
/* -1 */ {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1},
|
||||||
{-2, 0}, {-1, 0}, {1, 0}, {2, 0},
|
/* 0 */ {-2, 0}, {-1, 0}, {1, 0}, {2, 0},
|
||||||
{-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1},
|
/* 1 */ {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1},
|
||||||
{-1, 2}, {0, 2}, {1, 2},
|
/* 2 */ {-1, 2}, {0, 2}, {1, 2},
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static const sCoords BigO3[] =
|
static const sCoords BigO3[] =
|
||||||
{
|
{
|
||||||
{-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {2, -3},
|
/* -3 */ {-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {2, -3},
|
||||||
{-3, -2}, {-2, -2}, {-1, -2}, {0, -2}, {1, -2}, {2, -2}, {3, -2},
|
/* -2 */ {-3, -2}, {-2, -2}, {-1, -2}, {0, -2}, {1, -2}, {2, -2}, {3, -2},
|
||||||
{-3, -1}, {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1},
|
/* -1 */ {-3, -1}, {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1},
|
||||||
{-3, 0}, {-2, 0}, {-1, 0}, {1, 0}, {2, 0}, {3, 0},
|
/* 0 */ {-3, 0}, {-2, 0}, {-1, 0}, {1, 0}, {2, 0}, {3, 0},
|
||||||
{-3, 1}, {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1}, {3, 1},
|
/* 1 */ {-3, 1}, {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1}, {3, 1},
|
||||||
{-3, 2}, {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2},
|
/* 2 */ {-3, 2}, {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2},
|
||||||
{-2, 3}, {-1, 3}, {0, 3}, {1, 3}, {2, 3},
|
/* 3 */ {-2, 3}, {-1, 3}, {0, 3}, {1, 3}, {2, 3},
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static const sCoords BigO4[] = // Part of Big Jungle tree
|
static const sCoords BigO4[] = // Part of Big Jungle tree
|
||||||
{
|
{
|
||||||
{-2, -4}, {-1, -4}, {0, -4}, {1, -4}, {2, -4},
|
/* -4 */ {-2, -4}, {-1, -4}, {0, -4}, {1, -4}, {2, -4},
|
||||||
{-3, -3}, {-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {2, -3}, {3, -3},
|
/* -3 */ {-3, -3}, {-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {2, -3}, {3, -3},
|
||||||
{-4, -2}, {-3, -2}, {-2, -2}, {-1, -2}, {0, -2}, {1, -2}, {2, -2}, {3, -2}, {4, -2},
|
/* -2 */ {-4, -2}, {-3, -2}, {-2, -2}, {-1, -2}, {0, -2}, {1, -2}, {2, -2}, {3, -2}, {4, -2},
|
||||||
{-4, -1}, {-3, -1}, {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1}, {4, -1},
|
/* -1 */ {-4, -1}, {-3, -1}, {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1}, {4, -1},
|
||||||
{-4, 0}, {-3, 0}, {-2, 0}, {-1, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0},
|
/* 0 */ {-4, 0}, {-3, 0}, {-2, 0}, {-1, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0},
|
||||||
{-4, 1}, {-3, 1}, {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1},
|
/* 1 */ {-4, 1}, {-3, 1}, {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1},
|
||||||
{-4, 2}, {-3, 2}, {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2},
|
/* 2 */ {-4, 2}, {-3, 2}, {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2},
|
||||||
{-3, 3}, {-2, 3}, {-1, 3}, {0, 3}, {1, 3}, {2, 3}, {3, 3},
|
/* 3 */ {-3, 3}, {-2, 3}, {-1, 3}, {0, 3}, {1, 3}, {2, 3}, {3, 3},
|
||||||
{-2, 4}, {-1, 4}, {0, 4}, {1, 4}, {2, 4},
|
/* 4 */ {-2, 4}, {-1, 4}, {0, 4}, {1, 4}, {2, 4},
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
@ -113,6 +106,7 @@ inline void PushCoordBlocks(int a_BlockX, int a_Height, int a_BlockZ, sSetBlockV
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inline void PushCornerBlocks(int a_BlockX, int a_Height, int a_BlockZ, int a_Seq, cNoise & a_Noise, int a_Chance, sSetBlockVector & a_Blocks, int a_CornersDist, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta)
|
inline void PushCornerBlocks(int a_BlockX, int a_Height, int a_BlockZ, int a_Seq, cNoise & a_Noise, int a_Chance, sSetBlockVector & a_Blocks, int a_CornersDist, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < ARRAYCOUNT(Corners); i++)
|
for (size_t i = 0; i < ARRAYCOUNT(Corners); i++)
|
||||||
|
@ -18,7 +18,7 @@ static cPrefabPiecePool g_UnderwaterBase(g_UnderwaterBasePrefabs, g_UnderwaterBa
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cUnderwaterBaseGen::cUnderwaterBase:
|
// cUnderwaterBaseGen::cUnderwaterBase:
|
||||||
|
|
||||||
class cUnderwaterBaseGen::cUnderwaterBase :
|
class cUnderwaterBaseGen::cUnderwaterBase :
|
||||||
@ -86,7 +86,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cUnderwaterBaseGen:
|
// cUnderwaterBaseGen:
|
||||||
|
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cVillageGen:
|
// cVillageGen:
|
||||||
|
|
||||||
static cVillagePiecePool g_SandVillage(g_SandVillagePrefabs, g_SandVillagePrefabsCount, g_SandVillageStartingPrefabs, g_SandVillageStartingPrefabsCount);
|
static cVillagePiecePool g_SandVillage(g_SandVillagePrefabs, g_SandVillagePrefabsCount, g_SandVillageStartingPrefabs, g_SandVillageStartingPrefabsCount);
|
||||||
|
22
src/Group.h
22
src/Group.h
@ -5,18 +5,22 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cGroup // tolua_export
|
// tolua_begin
|
||||||
{ // tolua_export
|
class cGroup
|
||||||
public: // tolua_export
|
{
|
||||||
|
public:
|
||||||
|
// tolua_end
|
||||||
cGroup() {}
|
cGroup() {}
|
||||||
~cGroup() {}
|
~cGroup() {}
|
||||||
|
|
||||||
void SetName( const AString & a_Name ) { m_Name = a_Name; } // tolua_export
|
// tolua_begin
|
||||||
const AString & GetName() const { return m_Name; } // tolua_export
|
void SetName( const AString & a_Name ) { m_Name = a_Name; }
|
||||||
void SetColor( const AString & a_Color ) { m_Color = a_Color; } // tolua_export
|
const AString & GetName() const { return m_Name; }
|
||||||
void AddCommand( const AString & a_Command ); // tolua_export
|
void SetColor( const AString & a_Color ) { m_Color = a_Color; }
|
||||||
void AddPermission( const AString & a_Permission ); // tolua_export
|
void AddCommand( const AString & a_Command );
|
||||||
void InheritFrom( cGroup* a_Group ); // tolua_export
|
void AddPermission( const AString & a_Permission );
|
||||||
|
void InheritFrom( cGroup* a_Group );
|
||||||
|
// tolua_end
|
||||||
|
|
||||||
typedef std::map< AString, bool > PermissionMap;
|
typedef std::map< AString, bool > PermissionMap;
|
||||||
const PermissionMap & GetPermissions() const { return m_Permissions; }
|
const PermissionMap & GetPermissions() const { return m_Permissions; }
|
||||||
|
@ -4,9 +4,26 @@ project (MCServer)
|
|||||||
|
|
||||||
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
||||||
|
|
||||||
file(GLOB SOURCE
|
SET (SRCS
|
||||||
"*.cpp"
|
EnvelopeParser.cpp
|
||||||
"*.h"
|
HTTPConnection.cpp
|
||||||
)
|
HTTPFormParser.cpp
|
||||||
|
HTTPMessage.cpp
|
||||||
|
HTTPServer.cpp
|
||||||
|
MultipartParser.cpp
|
||||||
|
NameValueParser.cpp
|
||||||
|
SslHTTPConnection.cpp)
|
||||||
|
|
||||||
add_library(HTTPServer ${SOURCE})
|
SET (HDRS
|
||||||
|
EnvelopeParser.h
|
||||||
|
HTTPConnection.h
|
||||||
|
HTTPFormParser.h
|
||||||
|
HTTPMessage.h
|
||||||
|
HTTPServer.h
|
||||||
|
MultipartParser.h
|
||||||
|
NameValueParser.h
|
||||||
|
SslHTTPConnection.h)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
add_library(HTTPServer ${SRCS} ${HDRS})
|
||||||
|
endif()
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cHTTPMessage:
|
// cHTTPMessage:
|
||||||
|
|
||||||
cHTTPMessage::cHTTPMessage(eKind a_Kind) :
|
cHTTPMessage::cHTTPMessage(eKind a_Kind) :
|
||||||
@ -64,7 +64,7 @@ void cHTTPMessage::AddHeader(const AString & a_Key, const AString & a_Value)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cHTTPRequest:
|
// cHTTPRequest:
|
||||||
|
|
||||||
cHTTPRequest::cHTTPRequest(void) :
|
cHTTPRequest::cHTTPRequest(void) :
|
||||||
@ -248,7 +248,7 @@ void cHTTPRequest::OnHeaderLine(const AString & a_Key, const AString & a_Value)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cHTTPResponse:
|
// cHTTPResponse:
|
||||||
|
|
||||||
cHTTPResponse::cHTTPResponse(void) :
|
cHTTPResponse::cHTTPResponse(void) :
|
||||||
|
@ -118,12 +118,12 @@ class cDebugCallbacks :
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cHTTPServer:
|
// cHTTPServer:
|
||||||
|
|
||||||
cHTTPServer::cHTTPServer(void) :
|
cHTTPServer::cHTTPServer(void) :
|
||||||
m_ListenThreadIPv4(*this, cSocket::IPv4, "WebServer IPv4"),
|
m_ListenThreadIPv4(*this, cSocket::IPv4, "WebServer"),
|
||||||
m_ListenThreadIPv6(*this, cSocket::IPv6, "WebServer IPv6"),
|
m_ListenThreadIPv6(*this, cSocket::IPv6, "WebServer"),
|
||||||
m_Callbacks(NULL)
|
m_Callbacks(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// self-test:
|
// self-test:
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -87,7 +87,7 @@ ThisIsIgnoredEpilogue";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cMultipartParser:
|
// cMultipartParser:
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cNameValueParser:
|
// cNameValueParser:
|
||||||
|
|
||||||
cNameValueParser::cNameValueParser(bool a_AllowsKeyOnly) :
|
cNameValueParser::cNameValueParser(bool a_AllowsKeyOnly) :
|
||||||
|
@ -151,6 +151,24 @@ int cInventory::AddItems(cItems & a_ItemStackList, bool a_AllowNewStacks, bool a
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int cInventory::RemoveItem(const cItem & a_ItemStack)
|
||||||
|
{
|
||||||
|
int RemovedItems = m_HotbarSlots.RemoveItem(a_ItemStack);
|
||||||
|
|
||||||
|
if (RemovedItems < a_ItemStack.m_ItemCount)
|
||||||
|
{
|
||||||
|
cItem Temp(a_ItemStack);
|
||||||
|
Temp.m_ItemCount -= RemovedItems;
|
||||||
|
RemovedItems += m_InventorySlots.RemoveItem(Temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return RemovedItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool cInventory::RemoveOneEquippedItem(void)
|
bool cInventory::RemoveOneEquippedItem(void)
|
||||||
{
|
{
|
||||||
if (m_HotbarSlots.GetSlot(m_EquippedSlotNum).IsEmpty())
|
if (m_HotbarSlots.GetSlot(m_EquippedSlotNum).IsEmpty())
|
||||||
|
@ -86,6 +86,10 @@ public:
|
|||||||
*/
|
*/
|
||||||
int AddItems(cItems & a_ItemStackList, bool a_AllowNewStacks, bool a_tryToFillEquippedFirst);
|
int AddItems(cItems & a_ItemStackList, bool a_AllowNewStacks, bool a_tryToFillEquippedFirst);
|
||||||
|
|
||||||
|
/** Removes the specified item from the inventory, as many as possible, up to a_ItemStack.m_ItemCount.
|
||||||
|
Returns the number of items that were removed. */
|
||||||
|
int RemoveItem(const cItem & a_ItemStack);
|
||||||
|
|
||||||
/** Removes one item out of the currently equipped item stack, returns true if successful, false if empty-handed */
|
/** Removes one item out of the currently equipped item stack, returns true if successful, false if empty-handed */
|
||||||
bool RemoveOneEquippedItem(void);
|
bool RemoveOneEquippedItem(void);
|
||||||
|
|
||||||
|
14
src/Item.cpp
14
src/Item.cpp
@ -193,17 +193,29 @@ void cItem::FromJson(const Json::Value & a_Value)
|
|||||||
bool cItem::IsEnchantable(short item)
|
bool cItem::IsEnchantable(short item)
|
||||||
{
|
{
|
||||||
if ((item >= 256) && (item <= 259))
|
if ((item >= 256) && (item <= 259))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
if ((item >= 267) && (item <= 279))
|
if ((item >= 267) && (item <= 279))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
if ((item >= 283) && (item <= 286))
|
if ((item >= 283) && (item <= 286))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
if ((item >= 290) && (item <= 294))
|
if ((item >= 290) && (item <= 294))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
if ((item >= 298) && (item <= 317))
|
if ((item >= 298) && (item <= 317))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
if ((item == 346) || (item == 359) || (item == 261))
|
if ((item == 346) || (item == 359) || (item == 261))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -363,7 +375,7 @@ bool cItem::EnchantByXPLevels(int a_NumXPLevels)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// cItems:
|
// cItems:
|
||||||
|
|
||||||
cItem * cItems::Get(int a_Idx)
|
cItem * cItems::Get(int a_Idx)
|
||||||
|
@ -345,6 +345,39 @@ int cItemGrid::AddItems(cItems & a_ItemStackList, bool a_AllowNewStacks, int a_P
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int cItemGrid::RemoveItem(const cItem & a_ItemStack)
|
||||||
|
{
|
||||||
|
int NumLeft = a_ItemStack.m_ItemCount;
|
||||||
|
|
||||||
|
for (int i = 0; i < m_NumSlots; i++)
|
||||||
|
{
|
||||||
|
if (NumLeft <= 0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_Slots[i].IsEqual(a_ItemStack))
|
||||||
|
{
|
||||||
|
int NumToRemove = std::min(NumLeft, (int)m_Slots[i].m_ItemCount);
|
||||||
|
NumLeft -= NumToRemove;
|
||||||
|
m_Slots[i].m_ItemCount -= NumToRemove;
|
||||||
|
|
||||||
|
if (m_Slots[i].m_ItemCount <= 0)
|
||||||
|
{
|
||||||
|
m_Slots[i].Empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
TriggerListeners(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (a_ItemStack.m_ItemCount - NumLeft);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int cItemGrid::ChangeSlotCount(int a_SlotNum, int a_AddToCount)
|
int cItemGrid::ChangeSlotCount(int a_SlotNum, int a_AddToCount)
|
||||||
{
|
{
|
||||||
if ((a_SlotNum < 0) || (a_SlotNum >= m_NumSlots))
|
if ((a_SlotNum < 0) || (a_SlotNum >= m_NumSlots))
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user