Skip to content

Commit 4e20cf2

Browse files
committed
Merge branch 'release/0.3.0.564'
2 parents 2283d72 + 08581d6 commit 4e20cf2

File tree

143 files changed

+2488
-1078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+2488
-1078
lines changed

.luacheckrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
files['.luacheckrc'].global = false
2+
std = 'max+busted'
3+
4+
globals = {
5+
'love',
6+
'getVersion',
7+
'getTitle'
8+
}
9+
10+
exclude_files = {
11+
'./lua_install/*'
12+
}
13+
14+
ignore = {
15+
'/self'
16+
}

.travis.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
language: python
2+
sudo: false
3+
4+
env:
5+
- LUA="lua 5.1"
6+
- LUA="lua 5.2"
7+
- LUA="lua 5.3"
8+
- LUA="luajit 2.0"
9+
- LUA="luajit 2.1"
10+
11+
before_install:
12+
- pip install hererocks
13+
- hererocks lua_install -r^ --$LUA
14+
- export PATH=$PATH:$PWD/lua_install/bin
15+
16+
install:
17+
- luarocks install luacheck
18+
- luarocks install busted
19+
20+
script:
21+
- luacheck .
22+
- busted spc
23+
24+
branches:
25+
only:
26+
- master
27+
- develop
28+
29+
notifications:
30+
email:
31+
on_success: change
32+
on_failure: always

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,72 @@
1+
# Version 0.3.0.564 - 2016-11-10
2+
3+
## Additions
4+
- Added keybinding which toggles fullscreen ([#37](https://github.com/rm-code/On-The-Roadside/issues/37))
5+
- Added keybinding for quitting the game
6+
- Added a translation system ([#51](https://github.com/rm-code/On-The-Roadside/issues/51))
7+
- Added crate world objects which act as item containers ([#42](https://github.com/rm-code/On-The-Roadside/issues/42))
8+
- Ammo is spawned randomly in these crates when the game starts
9+
- Characters can open and interact with the container's inventory by using the "interact" mode
10+
- Added inventory screen for swapping items between friendly characters ([#59](https://github.com/rm-code/On-The-Roadside/issues/59))
11+
- Added weight attributes for items ([#44](https://github.com/rm-code/On-The-Roadside/issues/44))
12+
- Added volume attributes for items ([#65](https://github.com/rm-code/On-The-Roadside/issues/65))
13+
- Added weight and volume limitation for inventory containers (bags, tiles, etc.) ([#48](https://github.com/rm-code/On-The-Roadside/issues/48))
14+
- Inventory lists show the current weight and the weight limit ([#62](https://github.com/rm-code/On-The-Roadside/issues/62))
15+
- Added stackable items ([#45](https://github.com/rm-code/On-The-Roadside/issues/45))
16+
- Items in stacks can be moved one-by-one or as as the whole stack ([#57](https://github.com/rm-code/On-The-Roadside/issues/57))
17+
- Stacks can be split in half ([#58](https://github.com/rm-code/On-The-Roadside/issues/58))
18+
- Stacks can be merged ([#61](https://github.com/rm-code/On-The-Roadside/issues/61))
19+
- Added functionality to allow arbitrary item sorting in the inventory ([#60](https://github.com/rm-code/On-The-Roadside/issues/60))
20+
- Added a maximum range for weapons ([#63](https://github.com/rm-code/On-The-Roadside/issues/63))
21+
- Added line-of-sight overlay for grenades ([#64](https://github.com/rm-code/On-The-Roadside/issues/64))
22+
- Added a cone overlay representing the maximum angle at which a projectile can divert from its intended target ([#71](https://github.com/rm-code/On-The-Roadside/issues/71))
23+
- Added a small version info overlay
24+
- Added a quick-help screen
25+
26+
## Removals
27+
- Removed a bunch items until the item and inventory system is a bit more stable
28+
29+
## Fixes
30+
- Fixed serialization and loading of openable world objects ([#49](https://github.com/rm-code/On-The-Roadside/issues/49))
31+
- Fixed unequippable items vanishing when trying to equip them ([#54](https://github.com/rm-code/On-The-Roadside/issues/54))
32+
- Fixed crash when trying to switch firing modes without a weapon equipped
33+
([#55](https://github.com/rm-code/On-The-Roadside/issues/55))
34+
- Fixed grenades being removed upon explosion instead of being thrown
35+
- Fixed crash when a character tries to attack its own tile
36+
([#68](https://github.com/rm-code/On-The-Roadside/issues/68))
37+
- Fixed crash with dropping a character's inventory on death
38+
([#70](https://github.com/rm-code/On-The-Roadside/issues/70))
39+
40+
## Other Changes
41+
- The game starts in fullscreen now by default
42+
- The mouse scrolling stops if the mouse cursor leaves the game's window ([#38](https://github.com/rm-code/On-The-Roadside/issues/38))
43+
- Increased the size of the mouse scrolling area
44+
- Renamed _Police Baton_ to _Tonfa_
45+
- Ammunition is now handled on a single-round level instead of using magazines ([#52](https://github.com/rm-code/On-The-Roadside/issues/52))
46+
- Pathfinding now uses the more appropriate Chebyshev distance as an heuristic ([#66](https://github.com/rm-code/On-The-Roadside/issues/66))
47+
- Updated spawnpoints for player's characters
48+
49+
50+
51+
152
# Version 0.2.2.455 - 2016-09-13
253
## Fixes
354
- Fixed drawing of overlays for actions that can't be executed ([#35](https://github.com/rm-code/On-The-Roadside/issues/35))
455
- Fixed crash when shooting an adjacent world object ([#39](https://github.com/rm-code/On-The-Roadside/issues/39))
556
- Fixed crash when a grenade hit a world object ([#40](https://github.com/rm-code/On-The-Roadside/issues/40))
657

58+
59+
60+
761
# Version 0.2.1.450 - 2016-09-12
862
## Fixes
963
- Fixed crash when trying to load a savegame containing grenades ([#32](https://github.com/rm-code/On-The-Roadside/issues/32))
1064
- Fixed issue with rockets failing to explode when hitting an indestructible object ([#33](https://github.com/rm-code/On-The-Roadside/issues/33))
1165
- Fixed crash when trying to reload with no (ranged) weapon equipped ([#34](https://github.com/rm-code/On-The-Roadside/issues/34))
1266

67+
68+
69+
1370
# Version 0.2.0.445 - 2016-09-11
1471
## Additions
1572
- Added system to handle calculation, updating and drawing of explosions ([#6](https://github.com/rm-code/On-The-Roadside/issues/6))
@@ -54,6 +111,9 @@
54111
- Reduce turn delay for AI controlled characters
55112
- Updated the map
56113

114+
115+
116+
57117
# Version 0.1.0.337 - 2016-07-31
58118
- Initial Release
59119
- Add basic implementation of turn based combat mechanics

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# On The Roadside
22

3-
[![Version](https://img.shields.io/badge/Version-0.2.2.455-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest) [![LOVE](https://img.shields.io/badge/L%C3%96VE-0.10.1-EA316E.svg)](http://love2d.org/) [![License](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENSE.md)
3+
[![Version](https://img.shields.io/badge/Version-0.3.0.564-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest) [![LOVE](https://img.shields.io/badge/L%C3%96VE-0.10.2-EA316E.svg)](http://love2d.org/) [![License](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENSE.md)
4+
[![Build Status](https://travis-ci.org/rm-code/On-The-Roadside.svg?branch=develop)](https://travis-ci.org/rm-code/On-The-Roadside)
45

56
On the Roadside is a turnbased strategy game. It is developed by [@rm-code](https://twitter.com/rm_code) using [Lua](http://www.lua.org/) and the [LÖVE](https://love2d.org/) framework.
67

conf.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ local PROJECT_IDENTITY = "rmcode_otr";
44

55
local PROJECT_VERSION = require( 'version' );
66

7-
local LOVE_VERSION = "0.10.1";
7+
local LOVE_VERSION = "0.10.2";
88

99
---
1010
-- Initialise löve's config file.
@@ -26,7 +26,7 @@ function love.conf(t)
2626
t.window.resizable = false;
2727
t.window.minwidth = 1;
2828
t.window.minheight = 1;
29-
t.window.fullscreen = false;
29+
t.window.fullscreen = true;
3030
t.window.fullscreentype = "desktop";
3131
t.window.vsync = true;
3232
t.window.msaa = 0;

lib/Bresenham.lua

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
-- THE SOFTWARE. =
2121
--==================================================================================
2222

23-
local Bresenham = {};
23+
local Bresenham = {
24+
_VERSION = "1.1.0",
25+
_DESCRIPTION = "Bresenham's line algorithm written in Lua." ,
26+
_URL = 'https://github.com/rm-code/bresenham/',
27+
};
2428

2529
---
2630
-- Maps a line from point (ox, oy) to point (ex, ey) onto a two dimensional
@@ -35,8 +39,10 @@ local Bresenham = {};
3539
-- @ex (number) The x-coordinates of the target.
3640
-- @ey (number) The y-coordinates of the target.
3741
-- @callback (function) A callback function being called for every tile the line passes.
42+
-- @... (varargs) Additional parameters which will be forwarded to the callback.
43+
-- @return (boolean) True if the target was reached, otherwise false.
3844
--
39-
function Bresenham.calculateLine( ox, oy, ex, ey, callback )
45+
function Bresenham.calculateLine( ox, oy, ex, ey, callback, ... )
4046
local dx = math.abs( ex - ox );
4147
local dy = math.abs( ey - oy ) * -1;
4248

@@ -46,9 +52,9 @@ function Bresenham.calculateLine( ox, oy, ex, ey, callback )
4652

4753
local counter = 0;
4854
while true do
49-
local continue = callback( ox, oy, counter );
55+
local continue = callback( ox, oy, counter, ... );
5056
if not continue then
51-
return;
57+
return false;
5258
end
5359

5460
counter = counter + 1;

lib/Camera.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2424
THE SOFTWARE.
2525
]]--
2626

27-
local _PATH = (...):match('^(.*[%./])[^%.%/]+$') or ''
2827
local cos, sin = math.cos, math.sin
2928

3029
local camera = {}

main.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ local ProFi = require( 'lib.ProFi' );
77

88
-- TODO Remove profiling code.
99
local profile = 0;
10+
local versionString = "WIP - Version: " .. getVersion();
1011

1112
-- ------------------------------------------------
1213
-- Callbacks
@@ -30,6 +31,7 @@ function love.load()
3031
local screens = {
3132
main = require('src.screens.MainScreen');
3233
inventory = require('src.screens.InventoryScreen');
34+
help = require('src.screens.HelpScreen');
3335
};
3436

3537
ScreenManager.init(screens, 'main');
@@ -47,6 +49,11 @@ function love.draw()
4749
ProFi:writeReport( string.format( '../profiling/draw_%d.txt', os.time( os.date( '*t' ))));
4850
profile = 0;
4951
end
52+
53+
love.graphics.setColor( 255, 255, 255, 100 );
54+
love.graphics.print( versionString, love.graphics.getWidth() - 155, 5 );
55+
love.graphics.print( 'Press "h" for help!', love.graphics.getWidth() - 155, 25 );
56+
love.graphics.setColor( 255, 255, 255, 255 );
5057
end
5158

5259
function love.update(dt)
@@ -78,3 +85,7 @@ end
7885
function love.mousepressed( mx, my, button, isTouch )
7986
ScreenManager.mousepressed( mx, my, button, isTouch );
8087
end
88+
89+
function love.mousefocus( f )
90+
ScreenManager.mousefocus( f );
91+
end

pack.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

publish-release.sh

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#!/bin/bash
2+
3+
# Get the version numbers from the lua file and store them in an array.
4+
i=0
5+
while read line ; do
6+
no=${line//[!0-9]/}
7+
if [ ! -z "$no" ]; then
8+
version[$i]=${line//[!0-9]/}
9+
i=$((i+1))
10+
fi
11+
done < version.lua
12+
13+
# Assign to variables.
14+
major=${version[0]}
15+
minor=${version[1]}
16+
patch=${version[2]}
17+
build=${version[3]}
18+
19+
formatted="$major$minor$patch-$build"
20+
21+
# Zip files. Exclude git folder and DS_Store files.
22+
echo "Packing .love file for $major.$minor.$patch.$build"
23+
zip -r -q OTR_$formatted.love ./ -x *.git* -x *.DS_Store* -x *.sh*
24+
25+
# Move to releases folder and cd to releases.
26+
mkdir ../releases/OTR_$formatted
27+
mv -i -v OTR_$formatted.love ../releases/OTR_$formatted
28+
cd ../releases/OTR_$formatted || exit
29+
30+
## CREATE WINDOWS EXECUTABLE
31+
# Unzip the LÖVE binaries.
32+
unzip -q ../LOVE_bin.zip -d LOVE_WIN
33+
34+
# Create the executable.
35+
echo "Creating .exe"
36+
cp ./OTR_$formatted.love ./LOVE_WIN
37+
cd LOVE_WIN || exit
38+
cat love.exe OTR_$formatted.love > OTR_$formatted.exe
39+
rm love.exe
40+
rm OTR_$formatted.love
41+
42+
# Zip all files.
43+
echo "Zipping .exe and binary files"
44+
zip -r -q OTR_$formatted-WIN.zip ./ -x *.git* -x *.DS_Store*
45+
mv -i -v OTR_$formatted-WIN.zip ../
46+
47+
# Remove the folder.
48+
cd ..
49+
rm -r LOVE_WIN
50+
51+
## CREATE MAC OS APPLICATION
52+
echo "Creating Mac OS Application"
53+
unzip -q ../LOVE_bin_OSX.zip -d LOVE_OSX
54+
55+
# Rename Application
56+
cd LOVE_OSX || exit
57+
mv love.app OTR_$formatted.app
58+
59+
# Move .love file into the .app
60+
cp ../OTR_$formatted.love OTR_$formatted.app/Contents/Resources
61+
62+
# Copy modifed plist
63+
cp ../../Info.plist OTR_$formatted.app/Contents/
64+
65+
# There probably is a wayyy better way to do this ...
66+
echo "<key>CFBundleShortVersionString</key>" >> OTR_$formatted.app/Contents/Info.plist
67+
echo "<string>$major.$minor.$patch.$build</string>" >> OTR_$formatted.app/Contents/Info.plist
68+
echo "</dict>" >> OTR_$formatted.app/Contents/Info.plist
69+
echo "</plist>" >> OTR_$formatted.app/Contents/Info.plist
70+
71+
# Move to the parent folder
72+
mv -i -v OTR_$formatted.app ../OTR_$formatted-OSX.app
73+
74+
# Remove the temporary folder.
75+
cd ..
76+
rm -r LOVE_OSX
77+
78+
# Publish to itch.io
79+
echo "Publishing to itch.io"
80+
butler push OTR_$formatted-WIN.zip rmcode/on-the-roadside:win --userversion $major.$minor.$patch.$build
81+
butler push OTR_$formatted-OSX.app rmcode/on-the-roadside:osx --userversion $major.$minor.$patch.$build
82+
butler push OTR_$formatted.love rmcode/on-the-roadside:win-osx-linux --userversion $major.$minor.$patch.$build
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
return {
2-
name = "12 gauge",
2+
id = "12 gauge",
33
itemType = "Ammunition",
4-
ammoType = "ShotgunShell",
5-
pellets = 12
4+
weight = 0,
5+
volume = 0,
6+
stackable = true,
7+
equippable = false,
8+
effects = {
9+
spreadsOnShot = { pellets = 12 }
10+
}
611
}
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
return {
2-
name = "5.45x39mm",
3-
itemType = "Ammunition"
2+
id = "5.45x39mm",
3+
itemType = "Ammunition",
4+
weight = 0,
5+
volume = 0,
6+
stackable = true,
7+
equippable = false,
8+
effects = {
9+
customSpeed = { speed = 35 }
10+
}
411
}

res/data/items/ammunition/5_56x45mm.lua

Lines changed: 0 additions & 4 deletions
This file was deleted.

res/data/items/ammunition/5_7x28mm.lua

Lines changed: 0 additions & 4 deletions
This file was deleted.

res/data/items/ammunition/9x19mm.lua

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)