func (o *Object) Width() int {
	if !o.Defined() {
		return 0
	}
	if o.Boundary {
		return 1
	}
	return definitions.ScenaryObjects[o.ID].Width()
}
Width The width measured in game tiles that this object takes up in the game world.
package world
import (
	"fmt"
	"go.uber.org/atomic"
	"github.com/spkaeros/rscgo/pkg/definitions"
	"github.com/spkaeros/rscgo/pkg/game/entity"
)
type Object struct {
	Entity
	ID        int
	Direction byte
	Boundary  bool
}
func (o *Object) String() string {
	return fmt.Sprintf("[%v, (%v, %v)]", o.ID, o.X(), o.Y())
}
var ObjectCounter = atomic.NewUint32(0)
func NewObject(id, direction, x, y int, boundary bool) *Object {
	if boundary {
	}
	return &Object{ID: id, Direction: byte(direction), Boundary: boundary,
		Entity: Entity{
			Location: NewLocation(x, y),
			Index:    int(ObjectCounter.Swap(ObjectCounter.Load() + 1)),
		},
	}
}
func (o *Object) Name() string {
	if !o.Defined() {
		return "nil"
	}
	if o.Boundary {
		return definitions.BoundaryObjects[o.ID].Name
	}
	return definitions.ScenaryObjects[o.ID].Name
}
func (o *Object) Command1() string {
	return o.Command(0)
}
func (o *Object) Command2() string {
	return o.Command(1)
}
func (o *Object) Command(click int) string {
	if !o.Defined() {
		return "nil"
	}
	if o.Boundary {
		return definitions.BoundaryObjects[o.ID].Commands[click]
	}
	return definitions.ScenaryObjects[o.ID].Commands[click]
}
func (o *Object) ClipType() int {
	if !o.Defined() {
		return 0
	}
	if o.Boundary {
		if definitions.BoundaryObjects[o.ID].Door() {
			return 2
		}
		return 3
	}
	return definitions.ScenaryObjects[o.ID].SolidityType
}
func (o *Object) TypeData() mapBarrier {
	if o.Boundary {
		return definitions.Boundary(o.ID)
	}
	return definitions.Scenary(o.ID)
}
func (o *Object) Defined() bool {
	var set interface{Size() int} = definitions.BoundaryObjects
	if !o.Boundary {
		set = definitions.ScenaryObjects
	}
	if o.ID < 0 || o.ID >= set.Size() {
		return false
	}
	return true
}