Add spiky box variants

This commit is contained in:
Your Name 2026-08-11 20:08:58 -04:00
parent 761214fe3e
commit c3a2692351
10 changed files with 340 additions and 19 deletions

View file

@ -12,6 +12,7 @@ require "dialogue_manager"
require "generic_moveable"
require "generic_sticky"
require "generic_skewer"
require "generic_spiky"
require "generic_unmoveable"
local Movement = require "movement"
@ -465,7 +466,7 @@ end
-- Instantiate one object from the flat {class,color,x,y} schema. `class` names an
-- art asset, and its .meta declares the behaviour ("door"/"switch"/"player"/
-- "moveable"/"sticky"/"skewer"); anything without a .meta defaults to immoveable. npc is the one
-- "moveable"/"sticky"/"skewer"/"spiky"); anything without a .meta defaults to immoveable. npc is the one
-- keyword handled directly since it has no art.
function Room:createEntity(class, color, x, y)
if class == "npc" then
@ -509,6 +510,8 @@ function Room:createEntity(class, color, x, y)
entity = GenericSticky:new(x, y, color, sprite, class, cellShape)
elseif behavior == "skewer" then
entity = GenericSkewer:new(x, y, color, sprite, class, cellShape)
elseif behavior == "spiky" then
entity = GenericSpiky:new(x, y, color, sprite, class, cellShape)
else
entity = GenericUnmoveable:new(x, y, color, sprite, cellShape)
end