smash_and_grab 0.0.3alpha → 0.0.5alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/README.md +31 -16
- data/config/gui/schema.yml +3 -2
- data/config/map/entities.yml +36 -12
- data/lib/smash_and_grab/abilities/ability.rb +5 -0
- data/lib/smash_and_grab/abilities/melee.rb +11 -5
- data/lib/smash_and_grab/abilities/ranged.rb +20 -0
- data/lib/smash_and_grab/abilities/sprint.rb +4 -0
- data/lib/smash_and_grab/abilities.rb +3 -1
- data/lib/smash_and_grab/fidgit_ext/event.rb +77 -0
- data/lib/smash_and_grab/gui/editor_selector.rb +54 -73
- data/lib/smash_and_grab/gui/entity_panel.rb +110 -0
- data/lib/smash_and_grab/gui/entity_summary.rb +9 -8
- data/lib/smash_and_grab/gui/game_log.rb +44 -0
- data/lib/smash_and_grab/gui/info_panel.rb +39 -95
- data/lib/smash_and_grab/gui/object_panel.rb +37 -0
- data/lib/smash_and_grab/gui/scenario_panel.rb +21 -0
- data/lib/smash_and_grab/history/editor_actions/place_object.rb +1 -1
- data/lib/smash_and_grab/main.rb +11 -16
- data/lib/smash_and_grab/map/map.rb +1 -0
- data/lib/smash_and_grab/map/tile.rb +6 -3
- data/lib/smash_and_grab/map/wall.rb +4 -2
- data/lib/smash_and_grab/mouse_selection.rb +103 -46
- data/lib/smash_and_grab/objects/entity.rb +219 -30
- data/lib/smash_and_grab/objects/static.rb +7 -5
- data/lib/smash_and_grab/objects/vehicle.rb +7 -5
- data/lib/smash_and_grab/objects/world_object.rb +13 -3
- data/lib/smash_and_grab/path.rb +13 -7
- data/lib/smash_and_grab/players/player.rb +15 -10
- data/lib/smash_and_grab/states/edit_level.rb +17 -0
- data/lib/smash_and_grab/states/play_level.rb +20 -10
- data/lib/smash_and_grab/version.rb +1 -1
- data/lib/smash_and_grab.rb +18 -14
- data/test/smash_and_grab/abilities/melee_test.rb +37 -39
- data/test/teststrap.rb +3 -3
- metadata +21 -16
@@ -5,11 +5,14 @@ class WorldObject < GameObject
|
|
5
5
|
include Fidgit::Event
|
6
6
|
extend Forwardable
|
7
7
|
|
8
|
+
event :changed
|
9
|
+
|
8
10
|
def_delegators :@tile, :map, :grid_position, :grid_x, :grid_y
|
9
11
|
|
10
12
|
attr_reader :tile
|
11
13
|
|
12
|
-
|
14
|
+
attr_reader :z
|
15
|
+
def z=(z); @z = z; @recorded_shadow = nil; z; end
|
13
16
|
|
14
17
|
def id; @map.id_for_object(self); end
|
15
18
|
def blocks_sight?; true; end
|
@@ -46,6 +49,8 @@ class WorldObject < GameObject
|
|
46
49
|
|
47
50
|
@tile << self if @tile
|
48
51
|
|
52
|
+
publish :changed if tile != @tile
|
53
|
+
|
49
54
|
@tile
|
50
55
|
end
|
51
56
|
|
@@ -78,15 +83,20 @@ class WorldObject < GameObject
|
|
78
83
|
end
|
79
84
|
end
|
80
85
|
|
81
|
-
@recorded_shadow.draw 0, 0, ZOrder::SHADOWS
|
86
|
+
@recorded_shadow.draw 0, 0, ZOrder::SHADOWS if casts_shadow?
|
82
87
|
|
83
|
-
@image.draw_rot @x, @y + 2.5, @y, 0, 0.5, 1, OUTLINE_SCALE * @factor_x, OUTLINE_SCALE
|
88
|
+
@image.draw_rot @x, @y + 2.5 - @z, @y, 0, 0.5, 1, OUTLINE_SCALE * @factor_x, OUTLINE_SCALE, color
|
84
89
|
end
|
85
90
|
|
91
|
+
def busy?; false; end
|
92
|
+
def active?; false; end
|
93
|
+
|
86
94
|
def destroy
|
87
95
|
self.tile = nil
|
88
96
|
map.remove self
|
89
97
|
|
98
|
+
publish :changed
|
99
|
+
|
90
100
|
super
|
91
101
|
end
|
92
102
|
end
|
data/lib/smash_and_grab/path.rb
CHANGED
@@ -6,11 +6,14 @@ class Path
|
|
6
6
|
|
7
7
|
TILE_SIZE = 16
|
8
8
|
|
9
|
+
class << self
|
10
|
+
def sprites; @sprites ||= SpriteSheet.new("path.png", 32, 16, 4); end
|
11
|
+
end
|
12
|
+
|
9
13
|
attr_reader :cost, :move_distance, :previous_path, :destination_distance, :first, :last
|
10
14
|
|
11
15
|
def accessible?; true; end
|
12
16
|
def tiles; @previous_path.tiles + [@last]; end
|
13
|
-
def self.sprites; @@sprites ||= SpriteSheet.new("path.png", 32, 16, 4); end
|
14
17
|
def sprites; self.class.sprites; end
|
15
18
|
|
16
19
|
def initialize(previous_path, next_tile, extra_move_distance)
|
@@ -22,14 +25,17 @@ class Path
|
|
22
25
|
@cost = @move_distance + @destination_distance
|
23
26
|
end
|
24
27
|
|
25
|
-
|
28
|
+
# @option from [Tile] Tile to start drawing the path from.
|
29
|
+
def prepare_for_drawing(tiles_within_range, options = {})
|
26
30
|
path_tiles = tiles
|
31
|
+
from = options[:from] || path_tiles.first
|
32
|
+
start_index = path_tiles.index from
|
27
33
|
|
28
34
|
@record = $window.record(1, 1) do
|
29
|
-
|
35
|
+
path_tiles[start_index..-1].each.with_index(start_index) do |tile, i|
|
30
36
|
sheet_x, sheet_y =
|
31
37
|
case tile
|
32
|
-
when
|
38
|
+
when from
|
33
39
|
case tile.direction_to(path_tiles[i + 1])
|
34
40
|
when :up then [3, 0]
|
35
41
|
when :down then [0, 0]
|
@@ -93,7 +99,7 @@ class Melee < Path
|
|
93
99
|
super(previous_path, last, 0)
|
94
100
|
end
|
95
101
|
|
96
|
-
def prepare_for_drawing(tiles_within_range)
|
102
|
+
def prepare_for_drawing(tiles_within_range, options = {})
|
97
103
|
super(tiles_within_range)
|
98
104
|
@draw_color = tiles_within_range.include?(last) ? COLOR_IN_RANGE : COLOR_OUT_OF_RANGE
|
99
105
|
end
|
@@ -132,7 +138,7 @@ class Inaccessible < Path
|
|
132
138
|
sprites[2, 1].draw_rot last.x, last.y, ZOrder::PATH, 0, 0.5, 0.5
|
133
139
|
end
|
134
140
|
|
135
|
-
def prepare_for_drawing(tiles_within_range); end
|
141
|
+
def prepare_for_drawing(tiles_within_range, options = {}); end
|
136
142
|
end
|
137
143
|
|
138
144
|
# Path going to the same location as it started.
|
@@ -140,7 +146,7 @@ class None < Path
|
|
140
146
|
def accessible?; false; end
|
141
147
|
def tiles; []; end
|
142
148
|
def initialize; end
|
143
|
-
def prepare_for_drawing(tiles_within_range); end
|
149
|
+
def prepare_for_drawing(tiles_within_range, options = {}); end
|
144
150
|
def draw(*args); end
|
145
151
|
end
|
146
152
|
end
|
@@ -35,13 +35,12 @@ end
|
|
35
35
|
# Local AI.
|
36
36
|
class AI < Player
|
37
37
|
def update
|
38
|
+
return if faction.map.busy?
|
39
|
+
|
38
40
|
if @active_entities.empty?
|
39
41
|
faction.end_turn
|
40
42
|
else
|
41
|
-
|
42
|
-
return unless Time.now >= @pause_until
|
43
|
-
|
44
|
-
# Attempt to attack, else move, else stand around like a loon.
|
43
|
+
# Attempt to attack, else move, else stand around like a loon.
|
45
44
|
entity = @active_entities.first
|
46
45
|
if entity.alive?
|
47
46
|
moves, attacks = entity.potential_moves.partition {|t| t.empty? }
|
@@ -49,15 +48,21 @@ class AI < Player
|
|
49
48
|
if attacks.any?
|
50
49
|
# TODO: Pick the nearest attack and consider re-attacking.
|
51
50
|
path = entity.path_to(attacks.sample)
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
51
|
+
entity.use_ability :move, path.previous_path if path.requires_movement?
|
52
|
+
# Only perform melee if you weren't killed by attacks of opportunity.
|
53
|
+
target = path.last.object
|
54
|
+
entity.add_activity do
|
55
|
+
entity.use_ability :melee, target if entity.alive?
|
56
|
+
end
|
57
|
+
|
58
|
+
entity.add_activity do
|
59
|
+
@active_entities.shift unless entity.use_ability?(:melee)
|
60
|
+
end
|
61
|
+
|
56
62
|
elsif moves.any?
|
57
63
|
# TODO: Wait with moves until everyone who can has attacked?
|
58
|
-
|
64
|
+
entity.use_ability :move, entity.path_to(moves.sample)
|
59
65
|
@active_entities.shift
|
60
|
-
@pause_until = Time.now + 0.5 unless @active_entities.empty?
|
61
66
|
else
|
62
67
|
# Can't do anything at all :(
|
63
68
|
# TODO: Maybe wait until other people have tried to move?
|
@@ -3,6 +3,8 @@ require_relative 'world'
|
|
3
3
|
module SmashAndGrab
|
4
4
|
module States
|
5
5
|
class EditLevel < World
|
6
|
+
PLACEMENT_COLOR = Color.rgba(255, 255, 255, 190)
|
7
|
+
|
6
8
|
def initialize(file)
|
7
9
|
super()
|
8
10
|
|
@@ -169,8 +171,23 @@ class EditLevel < World
|
|
169
171
|
factor_x = (@hover_wall.orientation == :vertical) ? -1 : 1
|
170
172
|
@mouse_hover_wall_image.draw_rot tile.x + offset_x, tile.y + offset_y, ZOrder::TILE_SELECTION, 0, 0.5, 0.5, factor_x
|
171
173
|
|
174
|
+
image = @selector.icon_for @selector.selected
|
175
|
+
if image
|
176
|
+
image.draw_rot tile.x, tile.y + 8, tile.y + 8, 0, 0.5, 1, -factor_x, 1, PLACEMENT_COLOR
|
177
|
+
end
|
178
|
+
|
172
179
|
elsif @hover_tile
|
173
180
|
@mouse_hover_tile_image.draw_rot @hover_tile.x, @hover_tile.y, ZOrder::TILE_SELECTION, 0, 0.5, 0.5
|
181
|
+
|
182
|
+
image = @selector.icon_for @selector.selected
|
183
|
+
if image
|
184
|
+
offset_y, scale, rel_x = if @selector.tab == :tiles
|
185
|
+
[0, 1, 0.5]
|
186
|
+
else
|
187
|
+
[2.5, 0.5, 1]
|
188
|
+
end
|
189
|
+
image.draw_rot @hover_tile.x, @hover_tile.y + offset_y, @hover_tile.y, 0, 0.5, rel_x, scale, scale, PLACEMENT_COLOR
|
190
|
+
end
|
174
191
|
end
|
175
192
|
end
|
176
193
|
end
|
@@ -3,8 +3,13 @@ require_relative 'world'
|
|
3
3
|
module SmashAndGrab
|
4
4
|
module States
|
5
5
|
class PlayLevel < World
|
6
|
+
include Fidgit::Event
|
7
|
+
|
6
8
|
attr_reader :info_panel
|
7
9
|
|
10
|
+
event :game_info
|
11
|
+
event :game_heading
|
12
|
+
|
8
13
|
def initialize(file)
|
9
14
|
super()
|
10
15
|
|
@@ -19,6 +24,12 @@ class PlayLevel < World
|
|
19
24
|
@players.each.with_index do |player, i|
|
20
25
|
map.factions[i].player = player
|
21
26
|
player.faction = map.factions[i]
|
27
|
+
player.faction.subscribe :turn_started do
|
28
|
+
publish :game_heading, "=== Turn #{map.turn + 1} ===" if player == @players.first
|
29
|
+
publish :game_info, ""
|
30
|
+
publish :game_heading, "#{player.faction}' turn (#{Inflector.demodulize player.class})"
|
31
|
+
publish :game_info, ""
|
32
|
+
end
|
22
33
|
end
|
23
34
|
|
24
35
|
save_game_as AUTOSAVE_FILE
|
@@ -36,15 +47,15 @@ class PlayLevel < World
|
|
36
47
|
baddy = @map.baddies[i]
|
37
48
|
summary = Gui::EntitySummary.new baddy, parent: packer
|
38
49
|
summary.subscribe :left_mouse_button do
|
39
|
-
@mouse_selection.
|
40
|
-
@info_panel.
|
50
|
+
@mouse_selection.selected = baddy if baddy.alive?
|
51
|
+
@info_panel.object = baddy
|
41
52
|
end
|
42
53
|
end
|
43
54
|
end
|
44
55
|
|
45
56
|
# Info panel.
|
46
|
-
@info_panel = Gui::InfoPanel.new parent: container
|
47
|
-
@info_panel.
|
57
|
+
@info_panel = Gui::InfoPanel.new self, parent: container
|
58
|
+
@info_panel.object = @map.baddies[0]
|
48
59
|
|
49
60
|
# Button box.
|
50
61
|
@button_box = vertical parent: container, padding: 4, spacing: 8, width: 150, background_color: Color::BLACK do
|
@@ -70,23 +81,22 @@ class PlayLevel < World
|
|
70
81
|
end
|
71
82
|
|
72
83
|
def end_turn
|
73
|
-
@mouse_selection.select nil
|
74
84
|
@map.active_faction.end_turn
|
75
85
|
save_game_as AUTOSAVE_FILE
|
76
86
|
end
|
77
87
|
|
78
88
|
def undo_action
|
79
89
|
selection = @mouse_selection.selected
|
80
|
-
@mouse_selection.
|
90
|
+
@mouse_selection.selected = nil
|
81
91
|
@map.actions.undo if @map.actions.can_undo?
|
82
|
-
@mouse_selection.
|
92
|
+
@mouse_selection.selected = selection if selection
|
83
93
|
end
|
84
94
|
|
85
95
|
def redo_action
|
86
96
|
selection = @mouse_selection.selected
|
87
|
-
@mouse_selection.
|
97
|
+
@mouse_selection.selected = nil
|
88
98
|
@map.actions.redo if @map.actions.can_redo?
|
89
|
-
@mouse_selection.
|
99
|
+
@mouse_selection.selected =sd selection if selection
|
90
100
|
end
|
91
101
|
|
92
102
|
def map=(map)
|
@@ -121,7 +131,7 @@ class PlayLevel < World
|
|
121
131
|
nil
|
122
132
|
end
|
123
133
|
|
124
|
-
@info_panel.
|
134
|
+
@info_panel.object = @mouse_selection.selected
|
125
135
|
|
126
136
|
@mouse_selection.update
|
127
137
|
|
data/lib/smash_and_grab.rb
CHANGED
@@ -1,22 +1,26 @@
|
|
1
1
|
require 'optparse'
|
2
|
+
require 'fileutils'
|
2
3
|
|
3
4
|
begin
|
4
|
-
|
5
|
-
|
6
|
-
ROOT_PATH = if ENV['OCRA_EXECUTABLE']
|
7
|
-
File.dirname(File.expand_path(ENV['OCRA_EXECUTABLE']))
|
8
|
-
elsif defined? OSX_EXECUTABLE_FOLDER
|
9
|
-
File.dirname(OSX_EXECUTABLE_FOLDER)
|
10
|
-
else
|
11
|
-
EXTRACT_PATH
|
12
|
-
end
|
5
|
+
# Path script running from.
|
6
|
+
EXTRACT_PATH = File.expand_path("../..", __FILE__)
|
13
7
|
|
8
|
+
# Name of app, such as my_application
|
14
9
|
APP_NAME = File.basename(__FILE__).chomp(File.extname(__FILE__))
|
15
10
|
|
16
|
-
RUNNING_FROM_EXECUTABLE = (ENV['OCRA_EXECUTABLE'] or
|
11
|
+
RUNNING_FROM_EXECUTABLE = (ENV['OCRA_EXECUTABLE'] or ENV['RELEASY_OSX_APP'])
|
12
|
+
|
13
|
+
# Path to logs, save games, user config, etc.
|
14
|
+
USER_DATA_PATH = if ENV['APPDATA']
|
15
|
+
File.join(ENV['APPDATA'].gsub("\\", "/"), APP_NAME.split("_").map(&:capitalize).join(" ").gsub(" And ", " and "))
|
16
|
+
else
|
17
|
+
File.expand_path("~/.#{APP_NAME}")
|
18
|
+
end
|
19
|
+
|
20
|
+
FileUtils.mkdir_p USER_DATA_PATH
|
17
21
|
|
18
|
-
DEFAULT_LOG_FILE = "
|
19
|
-
DEFAULT_LOG_FILE_PATH = File.join(
|
22
|
+
DEFAULT_LOG_FILE = "log.txt"
|
23
|
+
DEFAULT_LOG_FILE_PATH = File.join(USER_DATA_PATH, DEFAULT_LOG_FILE)
|
20
24
|
|
21
25
|
def parse_options
|
22
26
|
options = {}
|
@@ -25,7 +29,7 @@ begin
|
|
25
29
|
parser.banner =<<TEXT
|
26
30
|
Usage: #{File.basename(__FILE__)} [options]
|
27
31
|
|
28
|
-
Defaults to using --#{RUNNING_FROM_EXECUTABLE ?
|
32
|
+
Defaults to using --#{RUNNING_FROM_EXECUTABLE ? "log '#{DEFAULT_LOG_FILE}'" : 'console'}
|
29
33
|
|
30
34
|
TEXT
|
31
35
|
|
@@ -93,7 +97,7 @@ TEXT
|
|
93
97
|
$stdout.sync = true
|
94
98
|
end
|
95
99
|
|
96
|
-
require_relative "
|
100
|
+
require_relative "#{APP_NAME}/main"
|
97
101
|
|
98
102
|
exit_message = ""
|
99
103
|
|
@@ -2,20 +2,23 @@ require_relative "../../teststrap"
|
|
2
2
|
require_relative "helpers/ability_helper"
|
3
3
|
|
4
4
|
describe SmashAndGrab::Abilities::Melee do
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
before do
|
6
|
+
@entity = Object.new
|
7
|
+
@enemy = Object.new
|
8
|
+
@map = Object.new
|
9
|
+
@tile = SmashAndGrab::Tile.new(:grass, nil, 1, 2)
|
10
|
+
end
|
8
11
|
|
9
|
-
subject { SmashAndGrab::Abilities.ability entity, type: :melee, action_cost: 1, skill: 5 }
|
12
|
+
subject { SmashAndGrab::Abilities.ability @entity, type: :melee, action_cost: 1, skill: 5 }
|
10
13
|
|
11
14
|
behaves_like SmashAndGrab::Abilities::Ability
|
12
15
|
|
13
16
|
should "fail if not given the required arguments" do
|
14
|
-
->{ SmashAndGrab::Abilities.ability entity, type: :melee }.should.raise(ArgumentError).message.should.match /No skill value for/
|
17
|
+
->{ SmashAndGrab::Abilities.ability @entity, type: :melee }.should.raise(ArgumentError).message.should.match /No skill value for/
|
15
18
|
end
|
16
19
|
|
17
20
|
should "be initialized" do
|
18
|
-
subject.owner.should.equal entity
|
21
|
+
subject.owner.should.equal @entity
|
19
22
|
subject.can_be_undone?.should.be.false
|
20
23
|
subject.skill.should.equal 5
|
21
24
|
subject.action_cost.should.equal 1
|
@@ -30,18 +33,19 @@ describe SmashAndGrab::Abilities::Melee do
|
|
30
33
|
end
|
31
34
|
|
32
35
|
should "generate appropriate action_data" do
|
33
|
-
stub(entity).id.returns 12
|
34
|
-
stub(enemy).id.returns 13
|
35
|
-
stub(
|
36
|
+
stub(@entity).id.returns 12
|
37
|
+
stub(@enemy).id.returns 13
|
38
|
+
stub(@enemy).tile.returns @tile
|
39
|
+
stub(@tile).object.returns @enemy
|
36
40
|
stub(subject).random_damage.returns 5
|
37
|
-
subject.action_data(
|
41
|
+
subject.action_data(@enemy).should.equal(
|
38
42
|
ability: :melee,
|
39
43
|
skill: 5,
|
40
44
|
action_cost: 1,
|
41
45
|
|
42
46
|
owner_id: 12,
|
43
47
|
target_id: 13,
|
44
|
-
target_position: [1,
|
48
|
+
target_position: [1, 2],
|
45
49
|
damage: 5
|
46
50
|
)
|
47
51
|
end
|
@@ -60,46 +64,40 @@ describe SmashAndGrab::Abilities::Melee do
|
|
60
64
|
|
61
65
|
describe "#do" do
|
62
66
|
should "remove action points and health" do
|
63
|
-
stub(
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
stub(entity).action_points.returns 1
|
68
|
-
mock(entity, :action_points=).with 0
|
67
|
+
stub(@entity).map.stub!.object_by_id(13).returns @enemy
|
68
|
+
stub(@entity).action_points.returns 1
|
69
|
+
mock(@entity).action_points = 0
|
70
|
+
mock(@entity).melee(@enemy, 5)
|
69
71
|
|
70
|
-
subject.do action_cost: 1, target_id: 13, damage: 5 #, target_position: [1,
|
71
|
-
true
|
72
|
+
subject.do action_cost: 1, target_id: 13, damage: 5 #, target_position: [1, 2]
|
72
73
|
end
|
73
74
|
end
|
74
75
|
|
75
76
|
describe "#undo" do
|
76
77
|
should "give action points and health (if target alive)" do
|
77
|
-
stub(enemy).tile.returns tile
|
78
|
-
stub(
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
stub(entity).action_points.returns 0
|
83
|
-
mock(entity, :action_points=).with 1
|
78
|
+
stub(@enemy).tile.returns @tile
|
79
|
+
stub(@entity).map.stub!.object_by_id(13).returns @enemy
|
80
|
+
stub(@entity).action_points.returns 0
|
81
|
+
mock(@entity).action_points = 1
|
82
|
+
mock(@entity).melee(@enemy, -5)
|
84
83
|
|
85
|
-
subject.undo action_cost: 1, target_id: 13, damage: 5, target_position: [1,
|
84
|
+
subject.undo action_cost: 1, target_id: 13, damage: 5, target_position: [1, 2]
|
86
85
|
end
|
87
86
|
|
88
87
|
should "give action points, health and return to map (if target dead)" do
|
89
|
-
stub(enemy).tile.returns nil
|
90
|
-
|
91
|
-
mock(enemy,
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
map
|
96
|
-
|
97
|
-
stub(map).tile_at_grid([1, 1]).returns tile
|
88
|
+
stub(@enemy).tile.returns nil
|
89
|
+
mock(@enemy).tile = @tile
|
90
|
+
mock(@entity).melee(@enemy, -5)
|
91
|
+
|
92
|
+
stub(@entity).map do
|
93
|
+
stub(@map).object_by_id(13).returns @enemy
|
94
|
+
stub(@map).tile_at_grid([1, 2]).returns @tile
|
95
|
+
@map
|
98
96
|
end
|
99
|
-
stub(entity).action_points.returns 0
|
100
|
-
mock(entity
|
97
|
+
stub(@entity).action_points.returns 0
|
98
|
+
mock(@entity).action_points = 1
|
101
99
|
|
102
|
-
subject.undo action_cost: 1, target_id: 13, damage: 5, target_position: [1,
|
100
|
+
subject.undo action_cost: 1, target_id: 13, damage: 5, target_position: [1, 2]
|
103
101
|
end
|
104
102
|
end
|
105
103
|
end
|
data/test/teststrap.rb
CHANGED
@@ -2,11 +2,11 @@ require 'bacon'
|
|
2
2
|
require 'bacon/rr'
|
3
3
|
|
4
4
|
DEVELOPMENT_MODE = true
|
5
|
-
ROOT_PATH = EXTRACT_PATH = File.expand_path("../../", __FILE__)
|
6
5
|
|
7
|
-
require_relative '../lib/smash_and_grab'
|
6
|
+
require_relative '../lib/smash_and_grab/log'
|
7
|
+
SmashAndGrab::Log.level = :ERROR # Don't print out junk.
|
8
8
|
|
9
|
-
|
9
|
+
require_relative '../lib/smash_and_grab'
|
10
10
|
|
11
11
|
module Bacon
|
12
12
|
class Context
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smash_and_grab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5alpha
|
5
5
|
prerelease: 5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gosu
|
16
|
-
requirement: &
|
16
|
+
requirement: &23823180 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.7.41
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *23823180
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: chingu
|
27
|
-
requirement: &
|
27
|
+
requirement: &23821236 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.9rc7
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *23821236
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: fidgit
|
38
|
-
requirement: &
|
38
|
+
requirement: &23836032 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.1.10
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *23836032
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: texplay
|
49
|
-
requirement: &
|
49
|
+
requirement: &23834916 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0.3'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *23834916
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: releasy
|
60
|
-
requirement: &
|
60
|
+
requirement: &23832384 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.2.2
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *23832384
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
|
-
requirement: &
|
71
|
+
requirement: &23830980 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.9.2.2
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *23830980
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: bacon-rr
|
82
|
-
requirement: &
|
82
|
+
requirement: &23830260 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: 0.1.0
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *23830260
|
91
91
|
description: ! 'Turn-based isometric heist game
|
92
92
|
|
93
93
|
'
|
@@ -123,12 +123,17 @@ files:
|
|
123
123
|
- lib/smash_and_grab/fidgit_ext/container.rb
|
124
124
|
- lib/smash_and_grab/fidgit_ext/cursor.rb
|
125
125
|
- lib/smash_and_grab/fidgit_ext/element.rb
|
126
|
+
- lib/smash_and_grab/fidgit_ext/event.rb
|
126
127
|
- lib/smash_and_grab/game_window.rb
|
127
128
|
- lib/smash_and_grab/gosu_ext/font.rb
|
128
129
|
- lib/smash_and_grab/gui/editor_selector.rb
|
130
|
+
- lib/smash_and_grab/gui/entity_panel.rb
|
129
131
|
- lib/smash_and_grab/gui/entity_summary.rb
|
132
|
+
- lib/smash_and_grab/gui/game_log.rb
|
130
133
|
- lib/smash_and_grab/gui/info_panel.rb
|
131
134
|
- lib/smash_and_grab/gui/minimap.rb
|
135
|
+
- lib/smash_and_grab/gui/object_panel.rb
|
136
|
+
- lib/smash_and_grab/gui/scenario_panel.rb
|
132
137
|
- lib/smash_and_grab/history/action_history.rb
|
133
138
|
- lib/smash_and_grab/history/editor_action_history.rb
|
134
139
|
- lib/smash_and_grab/history/editor_actions/erase_object.rb
|