MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / GetAllActors

Method GetAllActors

internal/scripting/room_func.go:143–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141}
142
143func (r ScriptRoom) GetAllActors() []*ScriptActor {
144 actorList := []*ScriptActor{}
145 for _, mobInstanceId := range r.roomRecord.GetMobs() {
146 actorList = append(actorList, GetActor(0, mobInstanceId))
147 }
148 for _, userId := range r.roomRecord.GetPlayers() {
149 actorList = append(actorList, GetActor(userId, 0))
150 }
151 return actorList
152}
153
154func (r ScriptRoom) GetContainers() []ScriptContainer {
155 containers := make([]ScriptContainer, 0, len(r.roomRecord.Containers))

Callers

nothing calls this directly

Calls 3

GetActorFunction · 0.85
GetMobsMethod · 0.45
GetPlayersMethod · 0.45

Tested by

no test coverage detected