#10 ✓resolved
Mikael Lind

Inventory order

Reported by Mikael Lind | November 6th, 2008 @ 07:36 AM | in 0.1

Ensure that objects end up in the right order when moving into inventories.

  • Alive (monsters, always mobile and impassable)
  • Dead, mobile, and impassable (boulders)
  • Dead, mobile, and passable (items except boulders)
  • Dead and immobile (features, both passable and impassable)

function before(a, b)

if a.alive or b.alive then
    return not b.alive
elseif not a.mobile or not b.mobile then
    return a.mobile
elseif not a.passable or not b.passable then
    return b.passable
else
    return false
end

end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Moonshine is a roguelike computer game written in Lua.

People watching this ticket

Pages