Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Set a property of the room. This updates basic properties of the room you are in
Containers:
You can interactively add/remove/edit containers using the command:
<ansi fg="command">room edit containers</ansi>
Exits:
You can interactively add/remove/edit exits using the command:
<ansi fg="command">room edit exits</ansi>

<ansi fg="command">room exit [exit_name] [room_id]</ansi> - e.g. <ansi fg="command">room exit west 159</ansi>
This will create a new exit that links to a specific room_id using the exit_name provided.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Set a property of the room. This updates basic properties of the room you are in
Containers:
You can interactively add/remove/edit containers using the command:
<ansi fg="command">room edit containers</ansi>
Exits:
You can interactively add/remove/edit exits using the command:
<ansi fg="command">room edit exits</ansi>

<ansi fg="command">room exit [exit_name] [room_id]</ansi> - e.g. <ansi fg="command">room exit west 159</ansi>
This will create a new exit that links to a specific room_id using the exit_name provided.
Expand Down
14 changes: 14 additions & 0 deletions internal/items/itemspec.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,20 @@ func FindItem(nameOrId string) int {
return FindItemByName(nameOrId)
}

func FindKeyByLockId(lockId string) int {

for _, item := range items {
if item.Type != Key {
continue
}
if item.KeyLockId == lockId {
return item.ItemId
}
}

return 0
}

func FindItemByName(name string) int {
name = strings.ToLower(name)

Expand Down
2 changes: 1 addition & 1 deletion internal/rooms/rooms.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type Room struct {
LastIdleMessage uint8 `yaml:"-"` // index of the last idle message displayed
LongTermDataStore map[string]any `yaml:"longtermdatastore,omitempty"` // Long term data store for the room
Mutators mutators.MutatorList `yaml:"mutators,omitempty"` // mutators this room spawns with.
Pvp bool `yaml:"pvp,omitempty"` // config pvp is set to `limited`, uses this value
Pvp bool `yaml:"pvp,omitempty"` // if config pvp is set to `limited`, uses this value
players []int `yaml:"-"` // list of user IDs currently in the room
mobs []int `yaml:"-"` // list of mob instance IDs currently in the room. Does not get saved.
visitors map[VisitorType]map[int]uint64 `yaml:"-"` // list of user IDs that have visited this room, and the last round they did
Expand Down
Loading
Loading