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

Method AddTemporaryExit

internal/scripting/room_func.go:476–491  ·  view source on GitHub ↗
(exitNameSimple string, exitNameFancy string, exitRoomId int, expiresTimeString string)

Source from the content-addressed store, hash-verified

474}
475
476func (r ScriptRoom) AddTemporaryExit(exitNameSimple string, exitNameFancy string, exitRoomId int, expiresTimeString string) bool {
477
478 if exitNameFancy[0:1] == `:` {
479 exitNameFancy = colorpatterns.ApplyColorPattern(exitNameSimple, exitNameFancy[1:])
480 }
481
482 tmpExit := exit.TemporaryRoomExit{
483 RoomId: exitRoomId,
484 Title: exitNameFancy,
485 UserId: 0,
486 Expires: expiresTimeString,
487 }
488
489 // Spawn a portal in the room that leads to the portal location
490 return r.roomRecord.AddTemporaryExit(exitNameSimple, tmpExit)
491}
492
493func (r ScriptRoom) RemoveTemporaryExit(exitNameSimple string, exitNameFancy string, exitRoomId int) bool {
494 tmpExit := exit.TemporaryRoomExit{

Callers

nothing calls this directly

Calls 1

ApplyColorPatternFunction · 0.92

Tested by

no test coverage detected