Skip to content

Commit 00f50d7

Browse files
committed
Merge branch 'release/0.12.0.1207'
2 parents d859311 + 8789d23 commit 00f50d7

File tree

113 files changed

+4918
-3069
lines changed

Some content is hidden

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

113 files changed

+4918
-3069
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See http://editorconfig.org for more information.
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.luacheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ globals = {
99
}
1010

1111
exclude_files = {
12+
'./lib/*',
1213
'./lua_install/*'
1314
}
1415

CHANGELOG.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# Version 0.12.0.1207 - 2017-11-24
2+
3+
## Additions
4+
- Added input dialog which allows custom savegame names
5+
- Added ingame map editor which allows to create layouts and prefabs which are used by the procedural map generator (can be activated in the options menu)
6+
- Added new map layouts
7+
- Added new prefabs
8+
9+
## Fixes
10+
- Fixed text content of UISelectField not matching the width of the actual UIElement
11+
- Fixed window flickering for a moment on game start
12+
- Fixed overlapping buttons on horizontal ui lists
13+
14+
## Other Changes
15+
- Settings can now be saved to disk
16+
- Adjusted the options menu to apply changed settings only when the user clicks on apply. It will also warn the user if there are unsaved changes upon closing the screen.
17+
- Renamed button "Close" to "Resume" on Ingame-Menu
18+
- Changed path for external texturepacks to "mods/texturepacks"
19+
- The default texture pack is now copied to the mods folder on game start
20+
- Update sprite definition for tile_grass
21+
- Optimized search for valid spawnpoints (with the old method it could take up to a few hundred tries to spawn a character - now it takes only 3 on average)
22+
23+
24+
25+
126
# Version 0.11.1.1132 - 2017-11-08
227

328
## Fixes
@@ -472,7 +497,7 @@
472497
- Disable camera tracking for AI controlled characters
473498
- FOV isn't drawn for AI controlled factions
474499
- Tweaked shot calculations
475-
- Uses the maximum angle for a shot's derivation correctly now
500+
- Uses the maximum angle for a shot's deviation correctly now
476501
- Randomly varies the projectile's traveling distance
477502
- Improved line of sight drawing
478503
- Line of sight is now generated in real time between the active character and the mouse cursor

README.md

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

3-
[![Version](https://img.shields.io/badge/Version-0.11.1.1132-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest)
3+
[![Version](https://img.shields.io/badge/Version-0.12.0.1207-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest)
44
[![LOVE](https://img.shields.io/badge/L%C3%96VE-0.10.2-EA316E.svg)](http://love2d.org/)
55
[![Build Status](https://travis-ci.com/rm-code/On-The-Roadside.svg?token=q3rLXeyGTBN9VB2zsWMr&branch=develop)](https://travis-ci.com/rm-code/On-The-Roadside)
66

conf.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function love.conf(t)
2626
t.window.resizable = true
2727
t.window.minwidth = 1024
2828
t.window.minheight = 768
29-
t.window.fullscreen = true
29+
t.window.fullscreen = false
3030
t.window.fullscreentype = "desktop"
3131
t.window.vsync = true
3232
t.window.msaa = 0

lib/Middleclass.lua

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
local middleclass = {
2+
_VERSION = 'middleclass v4.1.0',
3+
_DESCRIPTION = 'Object Orientation for Lua',
4+
_URL = 'https://github.com/kikito/middleclass',
5+
_LICENSE = [[
6+
MIT LICENSE
7+
8+
Copyright (c) 2011 Enrique García Cota
9+
10+
Permission is hereby granted, free of charge, to any person obtaining a
11+
copy of this software and associated documentation files (the
12+
"Software"), to deal in the Software without restriction, including
13+
without limitation the rights to use, copy, modify, merge, publish,
14+
distribute, sublicense, and/or sell copies of the Software, and to
15+
permit persons to whom the Software is furnished to do so, subject to
16+
the following conditions:
17+
18+
The above copyright notice and this permission notice shall be included
19+
in all copies or substantial portions of the Software.
20+
21+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28+
]]
29+
}
30+
31+
local function _createIndexWrapper(aClass, f)
32+
if f == nil then
33+
return aClass.__instanceDict
34+
else
35+
return function(self, name)
36+
local value = aClass.__instanceDict[name]
37+
38+
if value ~= nil then
39+
return value
40+
elseif type(f) == "function" then
41+
return (f(self, name))
42+
else
43+
return f[name]
44+
end
45+
end
46+
end
47+
end
48+
49+
local function _propagateInstanceMethod(aClass, name, f)
50+
f = name == "__index" and _createIndexWrapper(aClass, f) or f
51+
aClass.__instanceDict[name] = f
52+
53+
for subclass in pairs(aClass.subclasses) do
54+
if rawget(subclass.__declaredMethods, name) == nil then
55+
_propagateInstanceMethod(subclass, name, f)
56+
end
57+
end
58+
end
59+
60+
local function _declareInstanceMethod(aClass, name, f)
61+
aClass.__declaredMethods[name] = f
62+
63+
if f == nil and aClass.super then
64+
f = aClass.super.__instanceDict[name]
65+
end
66+
67+
_propagateInstanceMethod(aClass, name, f)
68+
end
69+
70+
local function _tostring(self) return "class " .. self.name end
71+
local function _call(self, ...) return self:new(...) end
72+
73+
local function _createClass(name, super)
74+
local dict = {}
75+
dict.__index = dict
76+
77+
local aClass = { name = name, super = super, static = {},
78+
__instanceDict = dict, __declaredMethods = {},
79+
subclasses = setmetatable({}, {__mode='k'}) }
80+
81+
if super then
82+
setmetatable(aClass.static, { __index = function(_,k) return rawget(dict,k) or super.static[k] end })
83+
else
84+
setmetatable(aClass.static, { __index = function(_,k) return rawget(dict,k) end })
85+
end
86+
87+
setmetatable(aClass, { __index = aClass.static, __tostring = _tostring,
88+
__call = _call, __newindex = _declareInstanceMethod })
89+
90+
return aClass
91+
end
92+
93+
local function _includeMixin(aClass, mixin)
94+
assert(type(mixin) == 'table', "mixin must be a table")
95+
96+
for name,method in pairs(mixin) do
97+
if name ~= "included" and name ~= "static" then aClass[name] = method end
98+
end
99+
100+
for name,method in pairs(mixin.static or {}) do
101+
aClass.static[name] = method
102+
end
103+
104+
if type(mixin.included)=="function" then mixin:included(aClass) end
105+
return aClass
106+
end
107+
108+
local DefaultMixin = {
109+
__tostring = function(self) return "instance of " .. tostring(self.class) end,
110+
111+
initialize = function(self, ...) end,
112+
113+
isInstanceOf = function(self, aClass)
114+
return type(aClass) == 'table' and (aClass == self.class or self.class:isSubclassOf(aClass))
115+
end,
116+
117+
static = {
118+
allocate = function(self)
119+
assert(type(self) == 'table', "Make sure that you are using 'Class:allocate' instead of 'Class.allocate'")
120+
return setmetatable({ class = self }, self.__instanceDict)
121+
end,
122+
123+
new = function(self, ...)
124+
assert(type(self) == 'table', "Make sure that you are using 'Class:new' instead of 'Class.new'")
125+
local instance = self:allocate()
126+
instance:initialize(...)
127+
return instance
128+
end,
129+
130+
subclass = function(self, name)
131+
assert(type(self) == 'table', "Make sure that you are using 'Class:subclass' instead of 'Class.subclass'")
132+
assert(type(name) == "string", "You must provide a name(string) for your class")
133+
134+
local subclass = _createClass(name, self)
135+
136+
for methodName, f in pairs(self.__instanceDict) do
137+
_propagateInstanceMethod(subclass, methodName, f)
138+
end
139+
subclass.initialize = function(instance, ...) return self.initialize(instance, ...) end
140+
141+
self.subclasses[subclass] = true
142+
self:subclassed(subclass)
143+
144+
return subclass
145+
end,
146+
147+
subclassed = function(self, other) end,
148+
149+
isSubclassOf = function(self, other)
150+
return type(other) == 'table' and
151+
type(self.super) == 'table' and
152+
( self.super == other or self.super:isSubclassOf(other) )
153+
end,
154+
155+
include = function(self, ...)
156+
assert(type(self) == 'table', "Make sure you that you are using 'Class:include' instead of 'Class.include'")
157+
for _,mixin in ipairs({...}) do _includeMixin(self, mixin) end
158+
return self
159+
end
160+
}
161+
}
162+
163+
function middleclass.class(name, super)
164+
assert(type(name) == 'string', "A name (string) is needed for the new class")
165+
return super and super:subclass(name) or _includeMixin(_createClass(name), DefaultMixin)
166+
end
167+
168+
setmetatable(middleclass, { __call = function(_, ...) return middleclass.class(...) end })
169+
170+
return middleclass

0 commit comments

Comments
 (0)