goonstation / Lunar-Dreamland

It's amazing!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

It's amazing!

License:ISC License


Languages

Language:C 61.5%Language:C++ 22.4%Language:Smalltalk 4.2%Language:Java 3.4%Language:Python 3.0%Language:OCaml 2.0%Language:VBA 0.8%Language:JavaScript 0.7%Language:C# 0.7%Language:Lua 0.5%Language:Makefile 0.3%Language:CMake 0.2%Language:PowerShell 0.1%Language:Batchfile 0.1%Language:DM 0.1%Language:Shell 0.1%