1
0
Commit Graph

320 Commits

Author SHA1 Message Date
madmaxoft
d31142811d Merged branch 'Projectiles'. 2013-09-07 22:06:30 +02:00
madmaxoft
d6c4447022 Updated the API bindings. 2013-09-07 21:26:50 +02:00
madmaxoft
3b1c83acf8 Renamed cWorld::DoExplosiontAt() to cWorld::DoExplosionAt() 2013-09-07 18:12:22 +02:00
Tiger Wang
9c22cf1520 Fixed inconsistent meta naming 2013-09-03 12:33:54 +01:00
madmaxoft
4c24781a62 Added cEntity's gravity to the Lua API. 2013-09-03 10:20:56 +02:00
madmaxoft
f7d5894427 Added cArrowEntity's criticalness to the API. 2013-09-03 08:39:35 +02:00
Tiger Wang
20b64e18e4 Merge remote-tracking branch 'upstream/master'
Conflicts:
	source/Bindings.cpp
	source/Entities/Entity.cpp

Updated from upsteam
2013-09-02 14:15:28 +01:00
madmaxoft
5fccd67bad Added line collision calculation to cBoundingBox. 2013-09-01 19:08:51 +02:00
STRWarrior
2765fce522 Exported BroadcastSoundEffect and BroadcastSoundParticleEffect to the Lua API 2013-09-01 05:53:11 -07:00
madmaxoft
f91ff9e68b Added the cBoundingBox class. 2013-09-01 12:25:53 +02:00
madmaxoft
d7a5287000 Basic support for thrown items - eggs, snowballs and ender pearls.
They can be thrown, but they don't do anything on impact. Also they don't save to nor load from  MCA.
2013-08-30 18:10:58 +02:00
madmaxoft
88f3fe7f00 Moved throw pos and speed calculation from cProjectileEntity into cPlayer. 2013-08-30 17:29:46 +02:00
madmaxoft
c28ccdc9d5 Merged in the Projectiles branch.
Although the projectiles are not yet finished, the branch has several bugfixes that are needed in master as well.
2013-08-30 14:32:07 +02:00
Tiger Wang
7056992d0d Implemented xoft's suggestions [SEE DESC]
Rail metas are  now in BlockID and exported to LUA
Minecart now does a SetMass, instead of m_Mass
Minecarts use SubType instead of TypeType
2013-08-29 13:47:22 +01:00
madmaxoft
cdd0eba1b5 Added g_BlockIsXXX[] arrays to the API. 2013-08-27 08:57:35 +02:00
madmaxoft
da3e248632 Added a few API accessors to cArrowEntity. 2013-08-25 21:31:35 +02:00
madmaxoft
83811b6929 Merged branch 'master' into Projectiles. 2013-08-25 17:06:51 +02:00
madmaxoft
104a31e23d Merging in tigerw's changes from PR #118 2013-08-25 16:11:19 +02:00
Tiger Wang
2081b6dfde Fixed inconsistent metas and added snow metas 2013-08-24 18:54:03 +01:00
madmaxoft
73afb1507d Added skeleton code for projectile spawning. 2013-08-22 08:55:58 +02:00
madmaxoft
f3a0fed724 Hook adding uses the new API.
Multiple hooks per plugin can be added. The cPluginManager.AddHook() has four available signatures, the recommended one is cPluginManager.AddHook(HOOK_TYPE, CallbackFunction)
2013-08-21 21:29:30 +02:00
madmaxoft
af071fd5ab Added cWorld:GetIniFileName() to the Lua API. 2013-08-21 14:23:47 +02:00
madmaxoft
25e2f721ad Added cPickup:IsCollected() to the Lua API. 2013-08-19 11:58:20 +02:00
madmaxoft
e80c5eac40 Added cPickup:GetAge() the the Lua API. 2013-08-19 11:44:11 +02:00
madmaxoft
1a7912744f Moved entities into the Entities subfolder. 2013-08-19 11:39:13 +02:00
madmaxoft
493100bdb0 Finished renaming cPlugin_NewLua to cPluginLua. 2013-08-19 09:39:18 +02:00
madmaxoft
7b10068370 Implemented cWorld:QueueSetBlock(), as requested for delayed blocksetting.
Untested yet, so might not work.
2013-08-18 22:44:22 +02:00
madmaxoft
0d323563e4 Added cWindow property manipulation API.
Now enchantment table and furnace properties can be set by a plugin
2013-08-18 13:26:37 +02:00
madmaxoft
76cf61ce66 Disabled Lua virtual hooks.
This technology was used for old-style plugins and is no longer supported nor needed. Fixes #78.
2013-08-18 10:51:21 +02:00
madmaxoft
d287183137 Added cRoot:BroadcastChat() to the Lua API.
This allows plugins to broadcast a chat message to all connected players. It is a replacement for previously removed cServer:BroadcastChat().
2013-08-17 23:58:37 +02:00
madmaxoft
0cb00996de Replaced E_ENTITY_TYPE_XXX with cMonster::mtXXX.
Also slightly improved the spawning algorithm.
2013-08-16 10:48:30 +02:00
madmaxoft
7acb665f25 Exported cWorld:DoExplosionAt() to Lua API. 2013-08-15 22:12:57 +02:00
madmaxoft
cce9642c7b Fixed wrong names for some metas.
They were E_BLOCK_ instead of E_META_.
2013-08-14 19:49:53 +02:00
madmaxoft
8c3837987b Player counts are now properly handled.
Fixes #80
2013-08-14 10:24:34 +02:00
madmaxoft
b65a91dde3 Exported cWorld:BroadcastChat() to the Lua API; used in the Core. 2013-08-13 23:10:59 +02:00
madmaxoft
af645c62c9 Merge branch 'master' into PerWorldThreads.
Also fixed the AllToLua script not resolving conflicts.
2013-08-13 23:02:22 +02:00
madmaxoft
9020dc9932 Clients are now ticked in cServer first, then in cWorld once they get assigned a world. 2013-08-13 22:45:29 +02:00
STRWarrior
83d3635e0b Added quartz stairs. 2013-08-12 02:31:02 -07:00
madmaxoft
c628ab03e9 Removed cServer::BroadcastChat() and cServer::SendMessage().
These two functions make it difficult to move to the new ticking system, and they aren't used anyway. If so required, they can be emulated by ForEachWorld / ForEachPlayer calls.
2013-08-12 08:35:13 +02:00
madmaxoft
829cc866cd Added cWorld:QueueSaveAllChunks() function for saving chunks asynchronously.
The cWorld:SaveAllChunks() is therefore deprecated in the API and will be removed soon, use QueueSaveAllChunks() instead.
2013-08-11 21:05:44 +02:00
madmaxoft
eb9d45e906 Moved MaxPlayers and Description from cWorld to cServer.
Also started creating a new cWorld::cTickThread class, but not used yet.
2013-08-11 19:18:06 +02:00
madmaxoft
dd60f55bcc Added the OnHopperPullingItem and OnHopperPushingItem hooks.
Requested in FS 412, slightly modified the params.
2013-08-11 14:57:07 +02:00
madmaxoft
c85acd4ece Renamed Plugin_NewLua to PluginLua. 2013-08-10 08:22:52 +02:00
madmaxoft
d4a3c451c4 Added OnExploding() and OnExploded() hooks.
As requested in FS 413, with extra parameters:
World, BlockX, BlockY, BlockZ, Size, CanCauseFire, Source, SourceData

OnExploding() can return 3 values:
StopHook, CanCauseFire, ExplosionSize
2013-08-09 14:58:43 +02:00
madmaxoft
3f4abe8c95 Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.
As requested in FS 418.
2013-08-08 09:13:13 +02:00
madmaxoft
58a76a90dc Added cLineBlockTracer to the API 2013-08-07 14:34:00 +02:00
madmaxoft
3531bdb60b Implemented OnPlayerRightClickingEntity() hook
Fixes FS 425
2013-08-02 08:44:06 +02:00
madmaxoft
3920e872f7 Updated the nightbuild script for Git 2013-07-29 19:53:41 +02:00
madmaxoft
20e7221c7c WebAdmin: Removed the duplicate memory usage querying 2013-07-29 10:59:10 +02:00
madmaxoft
473dec42c8 Updated the automatic Lua bindings 2013-07-29 09:55:37 +02:00
FakeTruth
5a9d4f89c2 WebAdmin templates can use Lua
New WebAdmin templates can use Lua to completely compose the pages
themselves. This should allow infinite WebAdmin design possibilities.
2013-07-29 02:37:59 +02:00
madmaxoft@gmail.com
cd8720bf7e cInventory: Added the ChangeSlotCount() function to the Lua API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1683 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-26 19:50:06 +00:00
madmaxoft@gmail.com
2fca0567bf Added a StringToMobType() function to the Lua API (patch contributed by STR_Warrior)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1674 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-12 20:28:41 +00:00
madmaxoft@gmail.com
4fb771f3ff First implementation of movement-related hunger and API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1673 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-12 20:01:25 +00:00
madmaxoft@gmail.com
5951bc76ec Added StringUtils functions to Lua API; added StripColorCodes(); ChatLog now strips color codes from logged messages.
Fixes FS #398

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1661 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07 14:42:07 +00:00
madmaxoft@gmail.com
0224a4f7fc Fixed sprinting in 1.6.1, made speeds available through API; fixed messages containing quotes.
Fixes FS #415

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1660 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-07 14:13:43 +00:00
madmaxoft
e27a5db409 Empty buckets replace fluid buckets on use and vice versa (patch contributed by Mgueydan)
Fixes FS #277.
API change: added an optional parameter to cItemGrid:AddItem(), cItemGrid:AddItems(), cInventory:AddItem() and cInventory:AddItems()

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1643 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-03 13:56:11 +00:00
madmaxoft@gmail.com
37f6c78404 Added DamageType translation to API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1639 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-01 18:46:45 +00:00
madmaxoft@gmail.com
37276a4430 Rewritten entity-on-fire management ("forever on fire" bugs)
Fixes FS #297 and part of FS #403.
Added sizes to all entities.
Moved all damage-related functions from cPawn to cEntity
API change: renamed cPawn:TeleportTo() to cEntity:TeleportToCoords()

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1635 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-07-01 10:39:56 +00:00
madmaxoft@gmail.com
7b75aaea7c Advanced RCON: Command output is sent to the RCON client.
RCON authentication is now required before executing commands.
Console command handlers now return two values, bool (IsHandled) and string (CommandOutput).
API change: removed cRoot:ExecuteConsoleCommand(), added cRoot:QueueExecuteConsoleCommand().
API change: removed cPluginManager:ExecuteConsoleCommand(), use cRoot:QueueExecuteConsoleCommand() instead

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1631 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-29 15:30:05 +00:00
madmaxoft@gmail.com
9dd0486faf Added the End height and composition generators.
Also made the dimension in world.ini specifiable by a string. Exported StringToDimension() and StringToBiome() to Lua API.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1621 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-22 18:41:08 +00:00
madmaxoft@gmail.com
e2281df8d8 Dispensers dispense primed TNT
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1617 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-21 21:19:47 +00:00
madmaxoft@gmail.com
d95756c5cc Simulators are woken up after an explosion.
Fixes FS #391

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1615 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-21 20:47:58 +00:00
madmaxoft@gmail.com
8dd5fe5070 Furnaces light up visually when they're cooking
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1612 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-20 11:41:44 +00:00
madmaxoft@gmail.com
961c7bc51e Added the API for spawning primed TNTs
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1605 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-18 19:31:33 +00:00
madmaxoft@gmail.com
97eda34a94 Rewritten furnaces
Furnaces now smelt the correct number of items.
Furnaces store their contents in a cItemGrid.
Furnace window is updated with correct items and progressbars.
Furnace recipes now use ticks instead of milliseconds.
Furnaces save and load their state completely, not missing a smelt operation.
Hoppers take items out of furnaces.
Dropped the cSlotAreaDropSpenser class, replaced it with generic cSlotAreaItemGrid

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1601 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-16 20:24:07 +00:00
nielsbreu@gmail.com
07a1ffb499 Entity: Added IsTNT
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1593 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-15 18:09:54 +00:00
madmaxoft@gmail.com
5c38a831bf cItemGrid: Added IsSlotEmpty() functions
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1585 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-13 06:13:56 +00:00
madmaxoft@gmail.com
9cef5838a8 ChestEntity: fixed bindings
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1584 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-12 12:30:47 +00:00
madmaxoft@gmail.com
007e75de9d Implemented the Hopper block handler
Hoppers can be placed properly, but won't work yet.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1583 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-12 08:22:34 +00:00
madmaxoft@gmail.com
fe3712284e Added cWorld::SetSignLines(), re-exported to Lua manually to avoid ghost return values
FS #364

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1582 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-12 07:14:06 +00:00
nielsbreu@gmail.com
1c1e289b3d Fixed previous commit.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1573 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-09 17:46:40 +00:00
nielsbreu@gmail.com
6835f21b8b Added SetTicksUntilWeatherChange/GetTicksUntilWeatherChange. to set/get the amount of ticks before the weather changes. Added SendBlockChange to Lua to create "fake" blocks
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1572 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-09 17:38:10 +00:00
madmaxoft@gmail.com
3ee5236284 Removed cLadder, cSign, cStairs, cTorch and cVine classes, moved their functionality into the appropriate BlockHandlers / ItemHandlers
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1555 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-04 19:22:14 +00:00
madmaxoft@gmail.com
dcc3af0704 Added cItem copy-constructor to Lua API, made cItem::IsEqual() and IsStackable() enchantment-aware
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1546 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-04 11:54:44 +00:00
madmaxoft@gmail.com
d2b3011c05 Added the possibility to specify enchantments by name in the constructor and AddFromString() function
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1542 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-02 21:44:24 +00:00
madmaxoft@gmail.com
a19a070121 Enchantments: API and sending to client
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1539 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-02 10:40:20 +00:00
madmaxoft@gmail.com
7c0be7520a cItem constructor changed to create single-piece items when not given count
http://forum.mc-server.org/showthread.php?tid=1150

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1536 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-06-01 07:54:04 +00:00
madmaxoft@gmail.com
9684f90f83 LuaWindow: Initial code, the window can be opened, but not much manipulated
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1532 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-30 19:34:09 +00:00
madmaxoft@gmail.com
9be27992e2 Moved BlockEntities to a separate folder
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1527 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-28 19:12:47 +00:00
madmaxoft@gmail.com
5f208f30ac Chunk / ChunkMap: Added support for unbounded querying blocktype-only or blockmeta-only
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1522 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-28 12:05:23 +00:00
madmaxoft@gmail.com
edbc2790e3 Fixed cItemGrid API, no more changeable GetSlot().
Also fixed possible water and lava duplication glitches in the dispenser.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1520 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-26 20:52:39 +00:00
madmaxoft@gmail.com
84a7e14e86 Block entities with storage now correctly mark the chunk as dirty when their contents change.
http://forum.mc-server.org/showthread.php?tid=434&pid=8210#pid8210

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1515 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-26 15:29:43 +00:00
madmaxoft@gmail.com
5c3235ecdc Implemented droppers
Added a common ancestor class "DropSpenser" that has the common code for dropper and dispenser and is Lua-accessible, too. The Debuggers plugin now triggers both droppers and dispensers when rclking them with a redstone torch.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1514 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-26 14:39:04 +00:00
madmaxoft@gmail.com
41db106a8f Added all new bindings, refactored Debuggers; new Debuggers function.
Rclk with a redstone torch  on a dispenser causes the dispenser to spit out one item each tick.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1509 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-25 12:03:20 +00:00
madmaxoft@gmail.com
90e0656c75 Slight cleanup in the cInventory / cItemGrid API
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1504 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-24 09:16:09 +00:00
madmaxoft@gmail.com
cf87169737 Refactored cInventory to use cItemGrid for the actual Storage
This makes the API more orthogonal and is easier to use in the plugins. Also changes in the inventory are now propagated to the needed places (armor updates to BroadcastEntityEquipment etc.) even when the inventory is changed by a plugin.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1503 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-24 07:30:39 +00:00
madmaxoft@gmail.com
a4d903aa15 Fixed linking error from rev 1498
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1501 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-21 12:58:21 +00:00
madmaxoft@gmail.com
90c398a392 Inventory code cleanup, players can now see each other's armor
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1493 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-19 18:22:37 +00:00
madmaxoft@gmail.com
25cda4e8b4 cItems: Added runtime bounds-checking to avoid server crashes with badly written plugins.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1472 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-12 15:58:29 +00:00
nielsbreu@gmail.com
7dc9b2ce8d Fixed error while compiling.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1464 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-09 15:08:20 +00:00
nielsbreu@gmail.com
4e44c4b33a function SpawnItemPickups is now exported to Lua. Lua is able to create a Items object.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1463 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-09 14:32:27 +00:00
madmaxoft@gmail.com
7cbf36bf17 Refactored window clicking code to use different click actions
First part of solving FS #371; should fix #370.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1459 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-08 09:45:07 +00:00
madmaxoft@gmail.com
a0f7dea3be Added dtAdmin damage type for use in plugins
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1429 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-28 18:40:26 +00:00
keyboard.osh@gmail.com
b75fc5f4e8 Initial implementation of explosions and TNT block
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1392 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-18 02:42:45 +00:00
madmaxoft@gmail.com
a49c004278 Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13 21:02:10 +00:00
madmaxoft@gmail.com
58fb05980d Fixed a bit of coding style and function names in cItem
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1384 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-11 10:05:53 +00:00
madmaxoft@gmail.com
dc878898f3 Dispensers rewritten to use ItemGrid
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1383 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10 21:40:30 +00:00
madmaxoft@gmail.com
929d299965 ItemGrid: Renamed all Item to Slot - better and consistent naming
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1381 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10 21:03:15 +00:00
madmaxoft@gmail.com
cc26f16463 Added cItemGrid to represent an XY grid of items; converted chests to use cItemGrid.
http://forum.mc-server.org/showthread.php?tid=831

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1380 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-10 19:52:03 +00:00