Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

goonstation/Lunar-Dreamland

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lunar Dreamland

Archived

This repository is archived. You probably want the revised version of this project: https://github.com/MCHSL/extools

What is this?

Lunar Dreamland is a reverse engineering project and a Lua and C++ library for interfacing with BYOND's Dream Daemon server software. Currently it also includes a DM bytecode disassembler and debugger. It is a continuation of the old Asyncmos project.

What can I do with it?

The main feature of Lunar Dreamland is hooking procs to reimplement them in Lua. Arguments and return values are automatically translated between BYOND and Lua types. You may get and set fields & call procs of datums passed to the proc. Here is an example:

proc = require("proc")
datum = require("datum")
proc.getProc("/proc/showcase"):hook(
	function(original, usr, src, some_datum)
		local name = some_datum.name
		name = name:gsub(" ", "_")
		proc.getProc("/proc/to_chat")(datum.world, name)
		some_datum.name = name
		some_datum.listvar:append("Hello, world!")
		some_datum.listvar["key"] = "value"
		some_datum:invoke("gib", 1, 2, 3)
	end
)

You said something about a debugger though?

Hell yeah! The debugger currently depends on Lunar but it might become a serparate project entirely. At the moment, the project contains a disassembler which translates BYOND bytecode into assembly-like output. The debugger displays that output and offers the ability to set breakpoints, which stop execution of the proc and allow inspecting the proc state, such as local variable values.

I'm tired of recompiling the server every time I make a change.

A hot patching compiler is in the works! It is integrated into SpacemanDMM and the VSCode extension. It will allow you to simply recompile a proc and swap the new bytecode in, without even restarting Dream Daemon. Cool, huh? See the progress here: SpaceManiac/SpacemanDMM#104

This is great but how do I compile it?

dunno lol, use the binaries