Skip to content

Commit 363021a

Browse files
committed
Merge branch 'release/0.16.1.1627'
2 parents 1eb1a95 + cf06d9d commit 363021a

29 files changed

+345
-340
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Version 0.16.1.1627 - 2018-09-02 (LÖVE 11.1)
2+
3+
## Additions
4+
- Added support for latin-1 charset.
5+
6+
## Fixes
7+
- Fixed camera focusing on the wrong character when switching from the current to the previous character.
8+
- Fixed faulty loading of world objects.
9+
- Fixed faulty loading of characters.
10+
11+
## Other Changes
12+
- Changed how fonts are loaded by the game to support different charsets.
13+
14+
15+
16+
117
# Version 0.16.0.1615 - 2018-08-30 (LÖVE 11.1)
218

319
## Additions

README.md

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

3-
[![Version](https://img.shields.io/badge/Version-0.16.0.1615-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest)
4-
[![LOVE](https://img.shields.io/badge/L%C3%96VE-11.0-EA316E.svg)](http://love2d.org/)
3+
[![Version](https://img.shields.io/badge/Version-0.16.1.1627-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest)
4+
[![LOVE](https://img.shields.io/badge/L%C3%96VE-11.1-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

77
_On the Roadside_ is a turn-based strategy game in which you take control of a squad of mercenaries fighting for survival in a world shaped by unknown forces. It currently is in the very _early stages_ of development.
-1.37 KB
Binary file not shown.
1018 Bytes
Loading
Loading

res/texturepacks/default/info.lua

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,23 @@ return {
99
}
1010
},
1111
font = {
12-
source = 'imagefont.png',
13-
glyphs = {
14-
source = ' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÄÖÜäöü0123456789.,:;!?-+/()[]%&"\'*=_<>ß^©|',
15-
width = 8,
16-
height = 16
12+
width = 8,
13+
height = 16,
14+
charsets = {
15+
{
16+
-- LATIN BASIC
17+
-- 0020-007F (Excluded: 007F)
18+
-- !"# $%&' ()*+ ,-./ 0123 4567 89:; <=>? @ABC DEFG HIJK LMNO PQRS TUVW XYZ[ \]^_ `abc defg hijk lmno pqrs tuvw xyz{ |}
19+
source = 'imagefont_latin_basic.png',
20+
glyphs = [[ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]]
21+
},
22+
{
23+
-- LATIN-1
24+
-- 00A0-00FF (Excluded: 00A0, 00AD)
25+
-- ¡¢£¤ ¥¦§¨ ©ª«¬ ®¯°± ²³´µ ¶·¸¹ º»¼½ ¾¿ÀÁ ÂÃÄÅ ÆÇÈÉ ÊËÌÍ ÎÏÐÑ ÒÓÔÕ Ö×ØÙ ÚÛÜÝ Þßàá âãäå æçèé êëìí îïðñ òóôõ ö÷øù úûüý þÿ
26+
source = 'imagefont_latin_1.png',
27+
glyphs = [[¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ]]
28+
}
1729
}
1830
}
1931
}

src/CombatState.lua

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ function CombatState:initialize( playerFaction, savegame )
8383
end)
8484
end)
8585

86-
self.stateManager = StateManager( self.states )
87-
self.stateManager:push( 'planning', self.factions )
86+
self.explosionManager = ExplosionManager( self.map )
87+
88+
self.projectileManager = ProjectileManager( self.map )
89+
self.projectileManager:observe( self.explosionManager )
8890

89-
self.sadisticAIDirector = SadisticAIDirector( self.factions, self.stateManager )
91+
self.stateManager = StateManager( self.states )
92+
self.stateManager:push( 'planning', self.factions, self.explosionManager, self.projectileManager )
9093

91-
ProjectileManager.init( self.map )
92-
ExplosionManager.init( self.map )
94+
self.sadisticAIDirector = SadisticAIDirector( self.factions, self.stateManager, self.explosionManager, self.projectileManager )
9395

9496
-- Register observations.
9597
self.map:observe( self )
@@ -137,11 +139,6 @@ function CombatState:serialize()
137139
return t
138140
end
139141

140-
function CombatState:close()
141-
ProjectileManager.clear()
142-
ExplosionManager.clear()
143-
end
144-
145142
function CombatState:keypressed( _, scancode, _ )
146143
if self.factions:getFaction():isAIControlled() or self.stateManager:blocksInput() then
147144
return
@@ -160,6 +157,14 @@ function CombatState:getMap()
160157
return self.map
161158
end
162159

160+
function CombatState:getExplosionManager()
161+
return self.explosionManager
162+
end
163+
164+
function CombatState:getProjectileManager()
165+
return self.projectileManager
166+
end
167+
163168
function CombatState:getFactions()
164169
return self.factions
165170
end

src/Messenger.lua

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

src/characters/Character.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ function Character:serialize()
285285
local t = {
286286
['class'] = self.creatureClass,
287287
['name'] = self.name,
288+
['maxActionPoints'] = self.maxActionPoints,
288289
['actionPoints'] = self.actionPoints,
289290
['accuracy'] = self.accuracy,
290291
['throwingSkill'] = self.throwingSkill,

src/characters/CharacterFactory.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function CharacterFactory.init()
178178
end
179179

180180
function CharacterFactory.loadCharacter( savedCharacter )
181-
local character = Character( savedCharacter.class )
181+
local character = Character( savedCharacter.class, savedCharacter.maxActionPoints )
182182

183183
character:setName( savedCharacter.name )
184184
character:setActionPoints( savedCharacter.actionPoints )

src/characters/Faction.lua

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,18 @@ end
244244
-- @treturn Character The active Character.
245245
--
246246
function Faction:prevCharacter()
247-
local previousCharacter = self.active:getObject()
247+
-- Get the currently active character.
248+
local currentCharacter = self.active:getObject()
248249
while self.active do
250+
-- Select the previous character or wrap around to the last character
251+
-- in the list.
249252
self.active = self.active:getPrev() or self.last
250-
local character = self.active:getObject()
251-
if not character:isDead() then
253+
254+
local previousCharacter = self.active:getObject()
255+
if not previousCharacter:isDead() then
256+
currentCharacter:deactivate()
252257
previousCharacter:activate()
253-
character:deactivate()
254-
return character
258+
return previousCharacter
255259
end
256260
end
257261
end

src/characters/actions/RangedAttack.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
-- ------------------------------------------------
88

99
local Action = require( 'src.characters.actions.Action' )
10-
local ProjectileManager = require( 'src.items.weapons.ProjectileManager' )
1110
local ProjectileQueue = require( 'src.items.weapons.ProjectileQueue' )
1211
local Bresenham = require( 'lib.Bresenham' )
1312

@@ -21,8 +20,10 @@ local RangedAttack = Action:subclass( 'RangedAttack' )
2120
-- Public Methods
2221
-- ------------------------------------------------
2322

24-
function RangedAttack:initialize( character, target )
23+
function RangedAttack:initialize( character, target, projectileManager )
2524
Action.initialize( self, character, target, character:getWeapon():getAttackCost() )
25+
26+
self.projectileManager = projectileManager
2627
end
2728

2829
function RangedAttack:perform()
@@ -45,8 +46,7 @@ function RangedAttack:perform()
4546
return true
4647
end)
4748

48-
local package = ProjectileQueue( self.character, ax, ay, th )
49-
ProjectileManager.register( package )
49+
self.projectileManager:register( ProjectileQueue( self.character, ax, ay, th ))
5050
return true
5151
end
5252

src/characters/actions/ThrowingAttack.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
-- ------------------------------------------------
88

99
local Action = require( 'src.characters.actions.Action' )
10-
local ProjectileManager = require( 'src.items.weapons.ProjectileManager' )
1110
local ThrownProjectileQueue = require( 'src.items.weapons.ThrownProjectileQueue' )
1211
local Bresenham = require( 'lib.Bresenham' )
1312

@@ -21,8 +20,10 @@ local ThrowingAttack = Action:subclass( 'ThrowingAttack' )
2120
-- Public Methods
2221
-- ------------------------------------------------
2322

24-
function ThrowingAttack:initialize( character, target )
23+
function ThrowingAttack:initialize( character, target, projectileManager )
2524
Action.initialize( self, character, target, character:getWeapon():getAttackCost() )
25+
26+
self.projectileManager = projectileManager
2627
end
2728

2829
function ThrowingAttack:perform()
@@ -40,8 +41,7 @@ function ThrowingAttack:perform()
4041
return true
4142
end)
4243

43-
local package = ThrownProjectileQueue( self.character, ax, ay, th )
44-
ProjectileManager.register( package )
44+
self.projectileManager:register( ThrownProjectileQueue( self.character, ax, ay, th ))
4545
return true
4646
end
4747

src/characters/ai/SadisticAIDirector.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,20 @@ local SadisticAIDirector = Class( 'SadisticAIDirector' )
2020
-- Private Methods
2121
-- ------------------------------------------------
2222

23-
local function tickBehaviorTree( tree, character, states, factions )
23+
local function tickBehaviorTree( tree, character, states, factions, projectileManager )
2424
Log.debug( "Tick BehaviorTree for " .. tostring( character ), 'SadisticAIDirector' )
25-
return tree:traverse( {}, character, states, factions )
25+
return tree:traverse( {}, character, states, factions, projectileManager )
2626
end
2727

2828
-- ------------------------------------------------
2929
-- Public Methods
3030
-- ------------------------------------------------
3131

32-
function SadisticAIDirector:initialize( factions, states )
32+
function SadisticAIDirector:initialize( factions, states, explosionManager, projectileManager )
3333
self.factions = factions
3434
self.states = states
35+
self.explosionManager = explosionManager
36+
self.projectileManager = projectileManager
3537
end
3638

3739
function SadisticAIDirector:update()
@@ -47,9 +49,9 @@ function SadisticAIDirector:update()
4749
Log.debug( 'Select next character for this turn', 'SadisticAIDirector' )
4850
local character = faction:nextCharacterForTurn()
4951

50-
local success = tickBehaviorTree( tree, character, self.states, self.factions )
52+
local success = tickBehaviorTree( tree, character, self.states, self.factions, self.projectileManager )
5153
if success then
52-
self.states:push( 'execution', self.factions, character )
54+
self.states:push( 'execution', self.factions, character, self.explosionManager, self.projectileManager )
5355
return
5456
end
5557

src/characters/ai/behaviortree/leafs/BTAttackTarget.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ local BTAttackTarget = BTLeaf:subclass( 'BTAttackTarget' )
2121
-- ------------------------------------------------
2222

2323
function BTAttackTarget:traverse( ... )
24-
local blackboard, character = ...
24+
local blackboard, character, _, _, projectileManager = ...
2525

26-
local success = character:enqueueAction( RangedAttack( character, blackboard.target ))
26+
local success = character:enqueueAction( RangedAttack( character, blackboard.target, projectileManager ))
2727
if success then
2828
Log.debug( 'Character attacks target', 'BTAttackTarget' )
2929
return true

src/characters/ai/behaviortree/leafs/BTThrowingAttack.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ local BTThrowingAttack = BTLeaf:subclass( 'BTThrowingAttack' )
2121
-- ------------------------------------------------
2222

2323
function BTThrowingAttack:traverse( ... )
24-
local blackboard, character = ...
24+
local blackboard, character, _, _, projectileManager = ...
2525

26-
local success = character:enqueueAction( ThrowingAttack( character, blackboard.target ))
26+
local success = character:enqueueAction( ThrowingAttack( character, blackboard.target, projectileManager ))
2727
if success then
2828
-- Store weapon id for the rearm action.
2929
blackboard.weaponID = character:getWeapon():getID()

0 commit comments

Comments
 (0)