Compare commits
3 commits
176216df8e
...
ec745f87ab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec745f87ab | ||
|
|
6f4b2fe696 | ||
|
|
9b5b9ce182 |
11 changed files with 4096 additions and 3242 deletions
88
game_ui.lua
Normal file
88
game_ui.lua
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
-- Player-facing HUD drawn into gameCanvas. Keeping it here (rather than in
|
||||
-- the editor sidebar) means its RGB circles use the same screen blend as the
|
||||
-- room, so their overlaps are the real additive colour combinations.
|
||||
local GameUI = {}
|
||||
|
||||
local channelColor = {
|
||||
red = {1, 0, 0},
|
||||
green = {0, 1, 0},
|
||||
blue = {0, 0, 1},
|
||||
}
|
||||
|
||||
local vennSize = 32
|
||||
local vennLayout = {
|
||||
red = {x = 12, y = 10},
|
||||
green = {x = 20, y = 10},
|
||||
blue = {x = 16, y = 18},
|
||||
}
|
||||
|
||||
local function drawDottedCircle(x, y, radius, color, dotRadius)
|
||||
local dots = math.max(14, math.floor((2 * math.pi * radius) / (dotRadius * 4)))
|
||||
love.graphics.setColor(color[1], color[2], color[3], 1)
|
||||
for index = 0, dots - 1 do
|
||||
local angle = index / dots * math.pi * 2
|
||||
love.graphics.circle("fill", x + math.cos(angle) * radius, y + math.sin(angle) * radius, dotRadius)
|
||||
end
|
||||
end
|
||||
|
||||
function GameUI.init()
|
||||
uiVennCanvas = love.graphics.newCanvas(vennSize, vennSize)
|
||||
uiVennCanvas:setFilter("nearest", "nearest")
|
||||
end
|
||||
|
||||
function GameUI.drawBacking()
|
||||
if not gameUiBox then return end
|
||||
love.graphics.setBlendMode("alpha")
|
||||
love.graphics.setColor(0, 0, 0, 1)
|
||||
love.graphics.rectangle("fill", gameUiBox.x, gameUiBox.y, gameUiBox.w, gameUiBox.h)
|
||||
end
|
||||
|
||||
function GameUI.drawVennOverlay()
|
||||
if not gameUiBox or not uiVennCanvas then return end
|
||||
local cellSize = width / gridWidth
|
||||
local sidebarWidth = cellSize * 2
|
||||
if gameUiBox.w < sidebarWidth then return end
|
||||
|
||||
love.graphics.setBlendMode("screen")
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
local scale = cellSize / 22
|
||||
local vennWidth = vennSize * scale
|
||||
local left = gameUiBox.x + (gameUiBox.w - vennWidth) / 2
|
||||
love.graphics.draw(uiVennCanvas, left, cellSize * 1.1, 0, scale, scale)
|
||||
end
|
||||
|
||||
function GameUI.drawColorVenn(room)
|
||||
if not room or not gameUiBox then return end
|
||||
GameUI.drawBacking()
|
||||
|
||||
local cellSize = width / gridWidth
|
||||
local sidebarWidth = cellSize * 2
|
||||
if gameUiBox.w < sidebarWidth or not uiVennCanvas then return end
|
||||
|
||||
love.graphics.setCanvas(uiVennCanvas)
|
||||
love.graphics.clear(0, 0, 0, 0)
|
||||
love.graphics.setBlendMode("screen")
|
||||
local radius = 9
|
||||
local dotRadius = 1
|
||||
local active = {}
|
||||
for _, color in ipairs(room:getActiveColors()) do active[color] = true end
|
||||
|
||||
for _, color in ipairs({"red", "green", "blue"}) do
|
||||
if room.player[color] then
|
||||
local layout = vennLayout[color]
|
||||
local x, y = layout.x, layout.y
|
||||
local rgb = channelColor[color]
|
||||
if active[color] then
|
||||
love.graphics.setColor(rgb[1], rgb[2], rgb[3], 1)
|
||||
love.graphics.circle("fill", x, y, radius)
|
||||
else
|
||||
drawDottedCircle(x, y, radius, rgb, dotRadius)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
love.graphics.setCanvas(gameCanvas)
|
||||
GameUI.drawVennOverlay()
|
||||
end
|
||||
|
||||
return GameUI
|
||||
|
|
@ -1138,10 +1138,10 @@ local function openWorldRoom(cellX, cellY)
|
|||
end
|
||||
|
||||
function editorMouseHandler(x, y, button)
|
||||
if x > width then
|
||||
if x >= sideBarBox.x and x < sideBarBox.x + sideBarBox.w then
|
||||
-- map from real window coords into the sidebar's fixed virtual space
|
||||
-- (same transform used to scale the sidebar canvas up in love.draw)
|
||||
x = (x - width) * sb.w / sideBarBox.w
|
||||
x = (x - sideBarBox.x) * sb.w / sideBarBox.w
|
||||
y = y * sb.h / sideBarBox.h
|
||||
|
||||
if editorView == "room" then
|
||||
|
|
|
|||
14
main.lua
14
main.lua
|
|
@ -15,6 +15,7 @@ require "room"
|
|||
require "world"
|
||||
require "world_seed"
|
||||
require "shaders"
|
||||
GameUI = require "game_ui"
|
||||
require "level_editor/editor"
|
||||
|
||||
-- Ink dialogue: ship the pre-parsed book (LÖVE has no lpeg to parse .ink at
|
||||
|
|
@ -110,6 +111,7 @@ function love.draw()
|
|||
else
|
||||
currentRoom:draw()
|
||||
end
|
||||
GameUI.drawColorVenn(currentRoom)
|
||||
|
||||
love.graphics.setCanvas(finalCanvas)
|
||||
love.graphics.clear()
|
||||
|
|
@ -158,6 +160,10 @@ function love.draw()
|
|||
love.graphics.setBlendMode("alpha")
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
love.graphics.draw(finalCanvas, 0, 0)
|
||||
GameUI.drawBacking()
|
||||
GameUI.drawVennOverlay()
|
||||
love.graphics.setBlendMode("alpha")
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
if DEBUG then love.graphics.draw(sideBarCanvas, sideBarBox.x, sideBarBox.y) end
|
||||
love.graphics.print("Current FPS: "..tostring(love.timer.getFPS( )), 10, 10)
|
||||
PerfProfiler:draw()
|
||||
|
|
@ -265,7 +271,7 @@ end
|
|||
function love.wheelmoved(dx, dy)
|
||||
if not DEBUG then return end
|
||||
-- Scroll the editor's asset/folder list when the cursor is over the sidebar.
|
||||
if editorView == "room" and love.mouse.getX() > width then
|
||||
if editorView == "room" and love.mouse.getX() >= sideBarBox.x then
|
||||
editorScrollRoomList(dy)
|
||||
end
|
||||
end
|
||||
|
|
@ -304,7 +310,10 @@ function _computeDimensions()
|
|||
height = width
|
||||
end
|
||||
|
||||
sideBarBox = {x = width, y = 0, w = love.graphics.getWidth() - width, h = height}
|
||||
local availableWidth = love.graphics.getWidth() - width
|
||||
local hudWidth = math.min(availableWidth, width / (gridWidth or 11) * 2)
|
||||
gameUiBox = {x = width, y = 0, w = hudWidth, h = height}
|
||||
sideBarBox = {x = gameUiBox.x + gameUiBox.w, y = 0, w = availableWidth - gameUiBox.w, h = height}
|
||||
|
||||
-- The editor sidebar is authored in a fixed virtual space and scaled up to
|
||||
-- fill the real panel, so every element keeps the same size relative to the
|
||||
|
|
@ -333,6 +342,7 @@ function _initCanvases()
|
|||
porousRoomCanvas = love.graphics.newCanvas()
|
||||
sideBarCanvas = love.graphics.newCanvas(math.max(1, sideBarBox.w), math.max(1, sideBarBox.h))
|
||||
sideBarCanvas:setFilter("nearest", "nearest") -- never average when sampled
|
||||
GameUI.init()
|
||||
end
|
||||
|
||||
function _initGridVars()
|
||||
|
|
|
|||
2140
rooms/jorge2.sav
2140
rooms/jorge2.sav
File diff suppressed because it is too large
Load diff
|
|
@ -1,217 +1,196 @@
|
|||
{
|
||||
objects={
|
||||
{
|
||||
color="green",
|
||||
x=3,
|
||||
y=7,
|
||||
active=true,
|
||||
class="player"
|
||||
},
|
||||
{
|
||||
color="blue",
|
||||
x=3,
|
||||
y=7,
|
||||
active=true,
|
||||
class="player"
|
||||
},
|
||||
{
|
||||
class="wired_door",
|
||||
y=8,
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
color="red",
|
||||
x=3,
|
||||
y=7,
|
||||
active=true,
|
||||
class="player"
|
||||
x=9
|
||||
},
|
||||
{
|
||||
color="green",
|
||||
x=9,
|
||||
class="wired_door",
|
||||
y=8,
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
class="wired_door"
|
||||
},
|
||||
{
|
||||
color="green",
|
||||
x=5,
|
||||
y=8,
|
||||
class="box"
|
||||
x=9
|
||||
},
|
||||
{
|
||||
color="blue",
|
||||
x=9,
|
||||
class="box",
|
||||
color="green",
|
||||
y=8,
|
||||
x=5
|
||||
},
|
||||
{
|
||||
class="wired_door",
|
||||
y=8,
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
class="wired_door"
|
||||
color="blue",
|
||||
x=9
|
||||
},
|
||||
{
|
||||
color="blue",
|
||||
x=7,
|
||||
class="wired_door",
|
||||
y=4,
|
||||
circuit="wire_6a7bd969_000a",
|
||||
class="wired_door"
|
||||
},
|
||||
{
|
||||
color="red",
|
||||
x=9,
|
||||
y=8,
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
class="wired_door"
|
||||
color="blue",
|
||||
x=7
|
||||
},
|
||||
{
|
||||
class="wired_switch",
|
||||
color="green",
|
||||
x=5,
|
||||
y=7,
|
||||
class="wired_switch"
|
||||
x=5
|
||||
}
|
||||
},
|
||||
wires={
|
||||
{
|
||||
edges=12,
|
||||
x=1,
|
||||
y=3,
|
||||
circuit="wire_6a7bd969_000a"
|
||||
circuit="wire_6a7bd969_000a",
|
||||
edges=12
|
||||
},
|
||||
{
|
||||
edges=3,
|
||||
x=1,
|
||||
y=4,
|
||||
circuit="wire_6a7bd969_000a"
|
||||
circuit="wire_6a7bd969_000a",
|
||||
edges=3
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=2,
|
||||
y=4,
|
||||
circuit="wire_6a7bd969_000a"
|
||||
circuit="wire_6a7bd969_000a",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=3,
|
||||
y=4,
|
||||
circuit="wire_6a7bd969_000a"
|
||||
circuit="wire_6a7bd969_000a",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=4,
|
||||
y=4,
|
||||
circuit="wire_6a7bd969_000a"
|
||||
circuit="wire_6a7bd969_000a",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=5,
|
||||
y=4,
|
||||
circuit="wire_6a7bd969_000a"
|
||||
circuit="wire_6a7bd969_000a",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=6,
|
||||
y=4,
|
||||
circuit="wire_6a7bd969_000a"
|
||||
circuit="wire_6a7bd969_000a",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=8,
|
||||
x=7,
|
||||
y=4,
|
||||
circuit="wire_6a7bd969_000a"
|
||||
circuit="wire_6a7bd969_000a",
|
||||
edges=8
|
||||
},
|
||||
{
|
||||
edges=4,
|
||||
x=7,
|
||||
y=4,
|
||||
circuit="wire_6a7bdf16_0001"
|
||||
circuit="wire_6a7bdf16_0001",
|
||||
edges=4
|
||||
},
|
||||
{
|
||||
edges=5,
|
||||
x=7,
|
||||
y=5,
|
||||
circuit="wire_6a7bdf16_0001"
|
||||
circuit="wire_6a7bdf16_0001",
|
||||
edges=5
|
||||
},
|
||||
{
|
||||
edges=6,
|
||||
x=5,
|
||||
y=6,
|
||||
circuit="wire_6a7bdf16_0001"
|
||||
circuit="wire_6a7bdf16_0001",
|
||||
edges=6
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=6,
|
||||
y=6,
|
||||
circuit="wire_6a7bdf16_0001"
|
||||
circuit="wire_6a7bdf16_0001",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=9,
|
||||
x=7,
|
||||
y=6,
|
||||
circuit="wire_6a7bdf16_0001"
|
||||
circuit="wire_6a7bdf16_0001",
|
||||
edges=9
|
||||
},
|
||||
{
|
||||
edges=0,
|
||||
x=5,
|
||||
y=7,
|
||||
circuit="wire_6a7bd969_000a"
|
||||
circuit="wire_6a7bd969_000a",
|
||||
edges=0
|
||||
},
|
||||
{
|
||||
edges=1,
|
||||
x=5,
|
||||
y=7,
|
||||
circuit="wire_6a7bdf16_0001"
|
||||
circuit="wire_6a7bdf16_0001",
|
||||
edges=1
|
||||
},
|
||||
{
|
||||
edges=4,
|
||||
x=9,
|
||||
y=8,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=4
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=1,
|
||||
y=9,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=2,
|
||||
y=9,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=3,
|
||||
y=9,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=4,
|
||||
y=9,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=5,
|
||||
y=9,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=6,
|
||||
y=9,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=7,
|
||||
y=9,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=8,
|
||||
y=9,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=10
|
||||
},
|
||||
{
|
||||
edges=9,
|
||||
x=9,
|
||||
y=9,
|
||||
circuit="wire_6a7bdb2a_0001"
|
||||
circuit="wire_6a7bdb2a_0001",
|
||||
edges=9
|
||||
}
|
||||
}
|
||||
}
|
||||
796
rooms/room_12_14.sav
Normal file
796
rooms/room_12_14.sav
Normal file
|
|
@ -0,0 +1,796 @@
|
|||
{
|
||||
objects={
|
||||
{
|
||||
color="green",
|
||||
active=true,
|
||||
x=1,
|
||||
y=6,
|
||||
class="player"
|
||||
},
|
||||
{
|
||||
color="blue",
|
||||
active=true,
|
||||
x=1,
|
||||
y=6,
|
||||
class="player"
|
||||
},
|
||||
{
|
||||
color="red",
|
||||
active=true,
|
||||
x=1,
|
||||
y=6,
|
||||
class="player"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=7,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=6,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=4,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=3,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=2,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=10,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=9,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=8,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=7,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=5,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=4,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=3,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=2,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=2,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=3,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=4,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=6,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=7,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="green",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="green",
|
||||
y=4,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="green",
|
||||
y=2,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="green",
|
||||
y=4,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="green",
|
||||
y=4,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
color="green",
|
||||
circuit="wire_6a7ca485_0005",
|
||||
x=9,
|
||||
y=3,
|
||||
class="wired_door"
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
color="green",
|
||||
y=6,
|
||||
class="box"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="green",
|
||||
y=6,
|
||||
class="box"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=7,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=6,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=4,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=3,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=2,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=10,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=9,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=8,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=7,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=5,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=4,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=3,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=2,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=2,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=3,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=4,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=6,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=7,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="blue",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=6,
|
||||
color="blue",
|
||||
y=7,
|
||||
class="box"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=7,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=6,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=4,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=3,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=2,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=11,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=10,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=9,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=8,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=7,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=5,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=4,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=3,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=2,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=2,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=3,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=4,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=6,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=7,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="red",
|
||||
y=1,
|
||||
class="static_wall"
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
color="green",
|
||||
y=3,
|
||||
class="wired_switch"
|
||||
},
|
||||
{
|
||||
x=4,
|
||||
color="blue",
|
||||
y=3,
|
||||
class="wired_switch"
|
||||
}
|
||||
},
|
||||
wires={
|
||||
{
|
||||
edges=6,
|
||||
x=4,
|
||||
y=2,
|
||||
circuit="wire_6a7ca485_0005"
|
||||
},
|
||||
{
|
||||
edges=12,
|
||||
x=5,
|
||||
y=2,
|
||||
circuit="wire_6a7ca485_0005"
|
||||
},
|
||||
{
|
||||
edges=1,
|
||||
x=4,
|
||||
y=3,
|
||||
circuit="wire_6a7ca485_0005"
|
||||
},
|
||||
{
|
||||
edges=3,
|
||||
x=5,
|
||||
y=3,
|
||||
circuit="wire_6a7ca485_0005"
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=6,
|
||||
y=3,
|
||||
circuit="wire_6a7ca485_0005"
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=7,
|
||||
y=3,
|
||||
circuit="wire_6a7ca485_0005"
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=8,
|
||||
y=3,
|
||||
circuit="wire_6a7ca485_0005"
|
||||
},
|
||||
{
|
||||
edges=8,
|
||||
x=9,
|
||||
y=3,
|
||||
circuit="wire_6a7ca485_0005"
|
||||
},
|
||||
{
|
||||
edges=2,
|
||||
x=10,
|
||||
y=3,
|
||||
circuit="wire_6a7ca47f_0004"
|
||||
},
|
||||
{
|
||||
edges=12,
|
||||
x=11,
|
||||
y=3,
|
||||
circuit="wire_6a7ca47f_0004"
|
||||
},
|
||||
{
|
||||
edges=5,
|
||||
x=11,
|
||||
y=4,
|
||||
circuit="wire_6a7ca47f_0004"
|
||||
},
|
||||
{
|
||||
edges=5,
|
||||
x=11,
|
||||
y=5,
|
||||
circuit="wire_6a7ca47f_0004"
|
||||
},
|
||||
{
|
||||
edges=6,
|
||||
x=10,
|
||||
y=6,
|
||||
circuit="wire_6a7ca47f_0004"
|
||||
},
|
||||
{
|
||||
edges=9,
|
||||
x=11,
|
||||
y=6,
|
||||
circuit="wire_6a7ca47f_0004"
|
||||
},
|
||||
{
|
||||
edges=3,
|
||||
x=10,
|
||||
y=7,
|
||||
circuit="wire_6a7ca47f_0004"
|
||||
},
|
||||
{
|
||||
edges=10,
|
||||
x=11,
|
||||
y=7,
|
||||
circuit="wire_6a7ca47f_0004"
|
||||
}
|
||||
}
|
||||
}
|
||||
1967
rooms/room_13_14.sav
1967
rooms/room_13_14.sav
File diff suppressed because it is too large
Load diff
1940
rooms/room_14_14.sav
1940
rooms/room_14_14.sav
File diff suppressed because it is too large
Load diff
207
rooms/world.sav
207
rooms/world.sav
|
|
@ -1,252 +1,257 @@
|
|||
{
|
||||
height=18,
|
||||
rooms={
|
||||
{
|
||||
x=10,
|
||||
name="3",
|
||||
y=10,
|
||||
x=10
|
||||
y=10
|
||||
},
|
||||
{
|
||||
x=12,
|
||||
name="5",
|
||||
y=10,
|
||||
x=12
|
||||
y=10
|
||||
},
|
||||
{
|
||||
x=12,
|
||||
name="village_1",
|
||||
y=9,
|
||||
x=12
|
||||
y=9
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
name="village_4",
|
||||
y=8,
|
||||
x=11
|
||||
y=8
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
name="yellow_1",
|
||||
y=7,
|
||||
x=11
|
||||
y=7
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
name="yellow_3",
|
||||
y=6,
|
||||
x=11
|
||||
y=6
|
||||
},
|
||||
{
|
||||
x=12,
|
||||
name="yellow_2",
|
||||
y=7,
|
||||
x=12
|
||||
y=7
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
name="yellow_4",
|
||||
y=5,
|
||||
x=11
|
||||
y=5
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
name="yellow_5",
|
||||
y=4,
|
||||
x=11
|
||||
y=4
|
||||
},
|
||||
{
|
||||
x=10,
|
||||
name="yellow_6",
|
||||
y=5,
|
||||
x=10
|
||||
y=5
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
name="default",
|
||||
y=1,
|
||||
x=1
|
||||
y=1
|
||||
},
|
||||
{
|
||||
x=3,
|
||||
name="old_yellow_3",
|
||||
y=1,
|
||||
x=3
|
||||
y=1
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
name="test_patt",
|
||||
y=1,
|
||||
x=5
|
||||
y=1
|
||||
},
|
||||
{
|
||||
x=7,
|
||||
name="test_patt_update",
|
||||
y=1,
|
||||
x=7
|
||||
y=1
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
name="white_asymmetrical",
|
||||
y=1,
|
||||
x=9
|
||||
y=1
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
name="white_ok",
|
||||
y=1,
|
||||
x=11
|
||||
y=1
|
||||
},
|
||||
{
|
||||
x=13,
|
||||
name="white_primary",
|
||||
y=1,
|
||||
x=13
|
||||
y=1
|
||||
},
|
||||
{
|
||||
x=15,
|
||||
name="yellow_arches",
|
||||
y=1,
|
||||
x=15
|
||||
y=1
|
||||
},
|
||||
{
|
||||
x=17,
|
||||
name="yellow_asymmetrical",
|
||||
y=1,
|
||||
x=17
|
||||
y=1
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
name="yellow_cc_moustache",
|
||||
y=3,
|
||||
x=1
|
||||
y=3
|
||||
},
|
||||
{
|
||||
x=3,
|
||||
name="yellow_color_changing_levvel_1",
|
||||
y=3,
|
||||
x=3
|
||||
y=3
|
||||
},
|
||||
{
|
||||
x=7,
|
||||
name="yellow_smile",
|
||||
y=3,
|
||||
x=7
|
||||
y=3
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
name="2",
|
||||
y=10,
|
||||
x=9
|
||||
y=10
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
name="room_11_09",
|
||||
y=9,
|
||||
x=11
|
||||
y=9
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
name="yellow_skull",
|
||||
y=3,
|
||||
x=9
|
||||
y=3
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
name="jorge_room",
|
||||
y=5,
|
||||
x=5
|
||||
y=5
|
||||
},
|
||||
{
|
||||
x=11,
|
||||
name="4",
|
||||
y=10,
|
||||
x=11
|
||||
y=10
|
||||
},
|
||||
{
|
||||
x=1,
|
||||
name="room_01_05",
|
||||
y=5,
|
||||
x=1
|
||||
y=5
|
||||
},
|
||||
{
|
||||
x=2,
|
||||
name="ok",
|
||||
y=8,
|
||||
x=2
|
||||
y=8
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
name="room_05_18",
|
||||
y=18,
|
||||
x=5
|
||||
y=18
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
name="village_start",
|
||||
y=11,
|
||||
x=9
|
||||
y=11
|
||||
},
|
||||
{
|
||||
x=4,
|
||||
name="spiky_test",
|
||||
y=8,
|
||||
x=4
|
||||
y=8
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
name="corner_trimino_test",
|
||||
y=7,
|
||||
x=5
|
||||
y=7
|
||||
},
|
||||
{
|
||||
x=6,
|
||||
name="tetromino_loop_t",
|
||||
y=7,
|
||||
x=6
|
||||
y=7
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
name="corner_trimino_test_copy",
|
||||
y=6,
|
||||
x=5
|
||||
y=6
|
||||
},
|
||||
{
|
||||
x=7,
|
||||
name="blocker_test",
|
||||
y=7,
|
||||
x=7
|
||||
y=7
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
name="spiky_test_2",
|
||||
y=8,
|
||||
x=5
|
||||
y=8
|
||||
},
|
||||
{
|
||||
x=5,
|
||||
name="spiky_test_3",
|
||||
y=9,
|
||||
x=5
|
||||
y=9
|
||||
},
|
||||
{
|
||||
x=3,
|
||||
name="jorge2",
|
||||
y=14,
|
||||
x=3
|
||||
y=14
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
name="room_08_07",
|
||||
y=7,
|
||||
x=8
|
||||
y=7
|
||||
},
|
||||
{
|
||||
x=13,
|
||||
name="village_3",
|
||||
y=8,
|
||||
x=13
|
||||
y=8
|
||||
},
|
||||
{
|
||||
x=12,
|
||||
name="village_2",
|
||||
y=8,
|
||||
x=12
|
||||
y=8
|
||||
},
|
||||
{
|
||||
x=14,
|
||||
name="room_14_07",
|
||||
y=7,
|
||||
x=14
|
||||
y=7
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
name="room_09_13",
|
||||
y=13,
|
||||
x=9
|
||||
y=13
|
||||
},
|
||||
{
|
||||
x=8,
|
||||
name="room_08_13",
|
||||
y=13,
|
||||
x=8
|
||||
y=13
|
||||
},
|
||||
{
|
||||
x=9,
|
||||
name="room_10_15",
|
||||
y=15,
|
||||
x=9
|
||||
y=15
|
||||
},
|
||||
{
|
||||
x=13,
|
||||
name="room_13_14",
|
||||
y=14,
|
||||
x=13
|
||||
y=14
|
||||
},
|
||||
{
|
||||
x=14,
|
||||
name="room_14_14",
|
||||
y=14,
|
||||
x=14
|
||||
y=14
|
||||
},
|
||||
{
|
||||
x=13,
|
||||
name="room_13_13",
|
||||
y=13,
|
||||
x=13
|
||||
y=13
|
||||
},
|
||||
{
|
||||
x=12,
|
||||
name="room_12_14",
|
||||
y=14
|
||||
}
|
||||
},
|
||||
lastRoom="room_14_14",
|
||||
width=18,
|
||||
height=18
|
||||
lastRoom="room_13_14",
|
||||
width=18
|
||||
}
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
require "door"
|
||||
|
||||
local Wire = require "wire"
|
||||
|
||||
WiredDoor = class("WiredDoor", Door)
|
||||
|
||||
function WiredDoor:initialize(x, y, color, circuitId)
|
||||
|
|
@ -18,13 +16,3 @@ function WiredDoor:setPowered(powered, canClose)
|
|||
end
|
||||
self:refreshSprites()
|
||||
end
|
||||
|
||||
function WiredDoor:draw(channel)
|
||||
Entity.draw(self, channel)
|
||||
if not self.sprites[channel] then return end
|
||||
local p = self:getDrawPos()
|
||||
local color = Wire.color(self.circuitId)
|
||||
love.graphics.setColor(color[1], color[2], color[3], 1)
|
||||
love.graphics.setLineWidth(math.max(1, drawScale))
|
||||
love.graphics.circle("line", p.x + 8 * drawScale, p.y + 8 * drawScale, 3 * drawScale)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,12 +6,3 @@ function WiredSwitch:initialize(x, y, color)
|
|||
Switch.initialize(self, x, y, color)
|
||||
self.wired = true
|
||||
end
|
||||
|
||||
function WiredSwitch:draw(channel)
|
||||
Entity.draw(self, channel)
|
||||
if not self.sprites[channel] then return end
|
||||
local p = self:getDrawPos()
|
||||
love.graphics.setColor(1, 1, 1, 0.9)
|
||||
love.graphics.setLineWidth(math.max(1, drawScale))
|
||||
love.graphics.rectangle("line", p.x + 5 * drawScale, p.y + 5 * drawScale, 6 * drawScale, 6 * drawScale)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue