Commit Graph

943 Commits

Author SHA1 Message Date
Jesse 35ab034f3d Port location NPC spawns from Ruby to Kotlin 2017-06-01 23:43:48 +01:00
Jesse 8d00dcc7c8 Add height and direction params to npc_spawn 2017-06-01 23:23:49 +01:00
Gary Tierney 7ecc2e3158 Clean up plugin script compilation 2017-06-01 23:09:24 +01:00
Gary Tierney 42fdaee8b8 Make run task depend on plugin scripts 2017-06-01 22:47:50 +01:00
Gary Tierney eed32efcf9 Move stub.kt to main game module 2017-05-31 21:05:35 +01:00
Gary Tierney 258fc6c97b Add stub to plugin compile-time classpath 2017-05-31 10:55:12 +01:00
Gary Tierney 9353daabc3 Add plugin tests to the game build 2017-05-30 21:11:40 +01:00
Gary Tierney 3fb6d3f792 Treat each plugin as an individual source set
Adds separate build tasks for each plugin by auto-discovering plugin meta
files in the build script.  Each plugin will automatically have its
main sources and tests compiled, and then it's output added to the game
modules classpath.

This enables support for incremental compilation of scripts, as well as
unit testing using Gradle's test framework.
2017-05-30 21:06:37 +01:00
Gary Tierney 4ee123a59d Add private messaging plugin 2017-05-28 23:20:07 +01:00
Gary Tierney ad72036853 Add port of the 'dummys' plugin from Ruby 2017-05-28 23:09:36 +01:00
Gary Tierney 48e1726bc0 Remove 'world' object from global script scope 2017-05-28 23:07:05 +01:00
Gary Tierney 05e20d9d51 Reorganize project sources from src/main to src/main/java 2017-05-28 22:04:34 +01:00
Gary Tierney 7ffef28117 Compile plugins at build-time instead of runtime
Adds gradle tasks to build all plugin scripts under data/plugins with
the KotlinPluginCompiler implementation previously used for runtime code
generation.  In addition to .plugin.kts files, scripts can also declare
API code in .kt files which will also be included on the classpath and
made available to other plugins.
2017-05-28 01:43:35 +01:00
Gary Tierney 79f79cd15c Add a 'plugins' source set to the game module
Creates a new sourceset for server plugins to support IDE integration
with plugin code.  Additionally moves plugins to game/data/plugins and
contains some gradle related fixes (remove java plugin from root project
and fix exec task dependency).
2017-05-27 18:58:05 +01:00
Gary Tierney 3403c0a2d1 First draft of KotlinPluginEnvironment 2017-05-27 18:57:39 +01:00
Promises 3ae6a1b290 Use current_level in Magic plugin. (#320) 2017-05-27 17:54:14 +01:00
Major 0402c8310c Merge pull request #336 from Major-/daction
Make immutable DistancedAction fields visible to subclasses
2017-05-26 17:44:15 +01:00
Major 6bced4868f Make immutable DistancedAction fields visible to subclasses 2017-05-26 14:42:25 +01:00
Major 9bbfebcfb1 Merge pull request #334 from Major-/magic-npc
Register MagicOnNpcMessageDecoder in 317
2017-05-25 15:40:55 +01:00
Major 3c9b214134 Register MagicOnNpcMessageDecoder in 317 2017-05-25 15:39:52 +01:00
Gary Tierney 93df5c8546 Merge pull request #333 from Major-/hit-bug
Fix 317 HitUpdateBlock encoding
2017-05-25 15:32:27 +01:00
Lmctruck30 4802fba081 Fix 317 HitUpdateBlock encoding 2017-05-25 15:28:22 +01:00
Gary Tierney 7456a43e4f Merge pull request #332 from Major-/report
Add support for decoding Report Abuse messages
2017-05-25 15:23:15 +01:00
Lmctruck30 57680aec3e Add Report Abuse Message 2017-05-25 15:19:08 +01:00
Gary Tierney 85587bd9d1 Merge pull request #331 from Major-/npc-item
Add support for decoding Item on Npc messages
2017-05-25 15:15:17 +01:00
Lmctruck30 cb0d7e369a Add Item on Npc 2017-05-25 15:08:15 +01:00
Major e4487458f6 Merge pull request #329 from Major-/heap-size
Increase maximum heap size
2017-05-25 14:44:08 +01:00
Gary Tierney 358594a91b Merge pull request #327 from Major-/unignore-fs
Ensure /data/fs exists in fresh clones
2017-05-25 11:50:30 +01:00
Gary Tierney ffa5a39a17 Merge pull request #326 from Major-/getting-started
Add 'getting started' section to README
2017-05-25 11:50:17 +01:00
Major 613e69f4db Increase maximum heap size
Required or Apollo reaches the limit on boot. See #328.
2017-05-25 03:39:18 +01:00
Major 09f5695fd0 Ensure /data/fs exists in fresh clones 2017-05-25 03:32:01 +01:00
Major e8cccb3e26 Add 'getting' started section to README
Fixes #280. Also removes the list of 'bog standard stuff' that has been
present since the original release in 2011, R.I.P.
2017-05-25 03:27:28 +01:00
Major d315fff095 Merge pull request #324 from Major-/b308
Fix #308
2017-05-25 02:48:43 +01:00
Major 2878c637e0 Fix #308 2017-05-25 02:47:23 +01:00
Major 7e8bb67f93 Merge pull request #323 from Major-/sfix-literacy
Condense some unnecessarily-long variable names
2017-05-25 02:46:03 +01:00
Major f4c08995b5 Condense some unnecessarily-long variable names 2017-05-25 02:32:20 +01:00
Major 8393dd8322 Merge pull request #319 from Promises/patch-1
Correct the button id for the "Protect from Melee" prayer
2017-05-24 11:54:09 +01:00
Promises 6440e2d3d4 Wrong Button ID for "Protect from Melee" Prayer. 2017-05-24 02:26:33 +02:00
Gary Tierney d4219320a1 Merge pull request #318 from apollo-rsps/bug/fix-grounditem-message
Fix argument order of tile item message ctor call
2017-05-23 01:46:49 +01:00
Gary Tierney 0559c4093c Fix argument order of tile item message ctor call
Rearrange the arguments passed to the SendTileItemUpdateMessage
constructor when recording a ground item RegionUpdate.  Fixes #316.
2017-05-23 01:40:31 +01:00
Gary Tierney d8f4aa88fe Merge pull request #309 from apollo-rsps/refactor/gradle
Port the Maven POMs to Gradle build scripts
2017-01-02 05:11:50 +00:00
Gary Tierney 30a1aebb56 Remove Maven POM files 2017-01-02 04:59:41 +00:00
Gary Tierney 4d79052199 Convert to the gradle build system
Ports the Maven build POMs to Gradle build scripts, which are a bit
friendlier to use.  Instead of using the exec:java Maven goal to run the
server now, the gradle run task should be used.
2017-01-02 04:44:04 +00:00
Gary Tierney e5a6638e2f Add support for player / npc following
Implements a new MobExtension plugin which adds 'follow', and 'chase'
mixins that allow the mob to follow behind another mob, and chase them
while keeping at a safe distance to fire projectiles.  Also adds a new
public method 'raycast' to CollisionManager, for drawing a line through
the world using bresenham's line algorithm whille checking for any impenetrable
objects.
2017-01-02 04:11:13 +00:00
Gary Tierney baa12ca446 Add a mob extension plugin for walking to entities
Adds a new mob extension plugin which creates a walk_to() method on
Mobs to allow walking to another entity (accounting for the size of the
entity) with an optional facing position.
2017-01-02 03:39:02 +00:00
Gary Tierney b047d0197a Add a plugin which allows creating mixins for Mobs
Adds a mob-extension plugin, which allows creating modules as mixins to
be monkey-patched into the Mob class.  Having a standard method of doing
this prevents confusing problems with mixin name conflicts, by allowing
the plugin to raise an error that 2 mixins with the same name exist.
2017-01-01 08:13:09 +00:00
Gary Tierney 82643b10b6 Merge pull request #222 from apollo-rsps/bugfix/collision-detection
Add support for building and updating collision flags on the fly
2016-12-31 05:26:56 +00:00
Gary Tierney 916f6c547d Add tests around CollisionManager functionality
Adds tests for the CollisionManager which makes sure that collision
matrices are correctly built for the following object types:

* Interactables
* Walls
* Corners

Missing from these tests are tests for blocked / bridged tiles, and
large corner walls, which can be added later.  Additionally, the test
cases include ASCII illustrations of the collision grid and how it is
built / checked for a particular object or movement.
2016-12-31 05:19:49 +00:00
Gary Tierney 6188c2e751 Add support for dynamic collision detection
This commit implements collision detection using the map files loaded
from the cache, and adds support for modifying the collision matrices at
runtime when the game world is updated.

All checks to see if a tile is reachable should now be done via.
World#traversable, instead of Region#traversable, as the World object
can handle checking tiles across multiple regions.  These are done for
the WalkingQueue and Pathfinder implementations.
2016-12-31 05:14:19 +00:00
Gary Tierney 0672fa2ea0 Fix bitwise negation in CollisionMatrix#clear()
Adds the missing bitwise AND to the clear() method in CollisionMatrix,
so any flags besides the one given are retained.
2016-12-31 02:09:42 +00:00