Skip to content

Latest commit

 

History

History
268 lines (238 loc) · 14.5 KB

compatibility.md

File metadata and controls

268 lines (238 loc) · 14.5 KB

Current status: MudOS compatibility

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
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 from the mudos_alike_4_dgd mudlib, although the code had to be written from scratch as it do not have an open source license.

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

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.
read_bytes alias for read_file
write_file provided by dgd, masked for permissions
write_bytes nonexistent in dgd, not used
rename alias for rename_file, masked for permissions
file_size Mikael Lind's example code from the Phantasmal docs
cp
link nonexistent in dgd
mkdir
rm
rmdir

Interactions with users

Function Status Comments
write
say
tell_object
tell_room
shout
receive receive_message in the user object
message
input_to accepts optional parameters input_to(func, flag, args...)
in_input

Driver configuration

Function Status Comments
eval_cost uses status
reset_eval_cost dummy function, commented
set_eval_limit dummy function, commented

Exceptions

Function Status Comments
catch
error
throw use error() in dgd

Others

Function Status Comments
crypt provided by dgd
oldcrypt alias for crypt, commented to have less functions in the auto ob
debug_info not same info as in mudos, returns status(ob) converted to a string
snoop dummy function for now
query_snoop
query_snooping
query_ip_number provided by dgd
query_ip_name provided by dgd
query_host_name
resolve
query_idle moved to local function in the user object
random provided by dgd
shadow
query_shadowing
bind nonexistent in dgd
save_variable
restore_variable
call_stack
inherits
replace_program
regexp
reg_assoc
crc32
clear_bit
test_bit
set_bit
next_bit
exec dummy function, commented
set_hide
deep_inherit_list
shallow_inherit_list
stat
in_edit
master
memory_info
cache_stats nonexistent in dgd
malloc_status
query_load_average
mud_status
get_config
get_char
reload_object
flush_messages
ed
ed_start
ed_cmd
query_ed_mode
dumpallobj
dump_file_descriptors
set_light
origin
reclaim_objects
uptime uses status
shutdown

Other optional MudOS packages

Function Package Status Comments
domain_stats PACKAGE_MUDLIB_STATS Not used
author_stats PACKAGE_MUDLIB_STATS Not used

Legend

Symbol Meaning
Already added and tested.
🆕 Not present in MudOS, added for Hexagon Mudlib.
Not included/necessary.
Non existant in DGD, not necessary to implement.