You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
List of MudOS efun functions and their implementation in Hexagon Mudlib, and some new useful functions.
Basic Types
Common calls and operations over the basic types.
Function
Status
Comments
clonep
✅
intp
✅
undefinedp
✅
floatp
✅
stringp
✅
virtualp
functionp
➖
nonexistent in dgd
pointerp
✅
alias for arrayp
arrayp
✅
objectp
✅
classp
➖
nonexistent in dgd
mapp
✅
alias for mappingp
userp
✅
alias for interactive
strings
capitalize
✅
lower_case
✅
replace_string
✅
sprintf
✅
included from the sprintf lpc package by Haijo Schipper (GPL license). Used in the form static string sprintf (string format, mixed args...) as there are no way to modify strings passed as arguments. Expanded to accept strings with multiple lines. Expanded to accept table/column mode with the # modifier.
printf
✅
alias for write(sprintf(...));
strlen
✅
provided by dgd, added visible_strlen to count only visible/printable characters
visible_strlen
✅
🆕 count only visible/printable characters
char_codes
✅
🆕 list of char ascii codes inside a string (including control characters)
strcmp
✅
strsrch
✅
pad
✅
chr
✅
🆕 char/int to string conversion
ord
✅
🆕 string to char/int conversion
arrays
sizeof
✅
provided by dgd
explode
✅
provided by dgd, also added full_explode
implode
✅
provided by dgd
allocate
✅
note: all array elements are initialized to nil by default. To initialize the array elements to zero, use allocate_int.
member_array
✅
index
✅
alias for member_array
sort_array
✅
unique_array
✅
filter
✅
filter_array
✅
intersection
✅
🆕 return common elements in two arrays
mappings
m_sizeof
✅
alias for map_sizeof
values
✅
alias for map_values
keys
✅
alias for map_indices
map_delete
✅
m_delete
✅
alias for map_delete
m_values
✅
alias for map_values
m_indices
✅
alias for map_indices
allocate_mapping
➖
nonexistent in dgd, not used
unique_mapping
➖
nonexistent in dgd, not used
map
➖
nonexistent in dgd, not used
map_mapping
➖
nonexistent in dgd, not used
map_array
✅
filter_mapping
✅
functions
function_exists
✅
alias for function_object
Objects
Function
Status
Comments
clone_object
✅
provided by dgd, extended
new
➖
provided by dgd, different behaviour, use clone_object instead
destruct
✅
alias for destruct_object
find_object
✅
provided by dgd
load_object
✅
extended alias for compile_object
Basic calls and interactions between objects
The general idea of how the this_player value is being stored in a central object (/lib/core/mudos.c, which is in charge of doing the respective init calls and stores current query_verb, notify_fail, etc) has been taken and expanded from the mudos_alike_4_dgd mudlib, although the code had to be written from scratch as it did not have an open source license (and it didn't work properly).
Function
Status
Comments
init
✅
it's not a function provided by MudOS per se, it's the function that will be called inside every object when they move (if it exists). Listed here for clarity, as Hexagon Mudlib makes the same calls.
this_player
✅
this_user
✅
provided by dgd
this_interactive
✅
alias for this_user
previous_object
✅
all_previous_objects
✅
alias for previous_objects
evaluate
✅
add_action
✅
🆕 added add_private_action also, to have actions that only the same object can activate.
remove_action
query_verb
✅
command
✅
commands
✅
notify_fail
✅
enable_commands
❎
not needed, everything is done inside set_living_name, dummy function, commented
disable_commands
❎
dummy function, commented
interactive
✅
works with both user and player objects
set_living_name
✅
living
✅
find_living
✅
find_player
✅
find_user
✅
🆕 added after separating the user and player objects. Works with player name or account name/email as parameter. See users and players.
livings
✅
set_heart_beat
✅
query_heart_beat
✅
users
✅
provided by dgd, masked to use user handler. players added to obtain the list of player objects.
players
✅
🆕 needed after separating users in two different objects: user manages connections, input and output, and player manages the in-game avatar
objects
children
Functions
Function
Status
Comments
call_out
✅
provided by dgd, expanded to store list of pending call outs
remove_call_out
✅
provided by dgd, expanded to store list of pending call outs
find_call_out
✅
call_out_info
✅
Time & Date
Function
Status
Comments
time
✅
provided by dgd
ctime
✅
provided by dgd, masked as efun to translate and add functionality
localtime
✅
done using the sprintf time functions, would be reimplemented
Movement, Inventory & Environment
Function
Status
Comments
init
✅
see above
environment
✅
all_inventory
✅
deep_inventory
✅
first_inventory
✅
next_inventory
✅
id
✅
present
✅
available, although find_match is much more complete
move
✅
move_object
✅
alias for move, commented
Files and paths
Function
Status
Comments
file_name
✅
alias for object_name
restore_object
✅
save_object
✅
get_dir
✅
masked to mimic MudOS behaviour
match_path
➖
nonexistent in dgd, not used
read_file
✅
The DGD version reads one character at a time. The MudOS version reads one line. Use read_file_line for this last behaviour.