mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-19 22:51:20 +00:00
changes: Maps are no longer compiled in, instead loaded directly from the DMMs at runtime. Z level defines have been moved from the config to map datums. Unit tests now use typecaches. DMMS now actually works. DMMS has been updated slightly. DMMS is now capable of loading simple lists of non-text types. DMMS is now faster when loading many types without mapped in attributes and when loading area instances. Asteroid generation is now defined on the map datum instead of being hard-coded in SSasteroid. Holodeck presets are now defined on the map datum. Atmos machinery now uses Initialize().
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
var/global/datum/getrev/revdata = new()
|
|
|
|
/datum/getrev
|
|
var/branch
|
|
var/revision
|
|
var/date
|
|
var/showinfo
|
|
|
|
/datum/getrev/New()
|
|
var/list/head_branch = file2list(".git/HEAD", "\n")
|
|
if(head_branch.len)
|
|
branch = copytext(head_branch[1], 17)
|
|
|
|
var/list/head_log = file2list(".git/logs/HEAD", "\n")
|
|
for(var/line=head_log.len, line>=1, line--)
|
|
if(head_log[line])
|
|
var/list/last_entry = text2list(head_log[line], " ")
|
|
if(last_entry.len < 2) continue
|
|
revision = last_entry[2]
|
|
// Get date/time
|
|
if(last_entry.len >= 5)
|
|
var/unix_time = text2num(last_entry[5])
|
|
if(unix_time)
|
|
date = unix2date(unix_time)
|
|
break
|
|
|
|
world.log << "Running revision:"
|
|
world.log << branch
|
|
world.log << date
|
|
world.log << revision
|
|
|
|
client/verb/showrevinfo()
|
|
set category = "OOC"
|
|
set name = "Show Server Revision"
|
|
set desc = "Check the current server code revision"
|
|
|
|
if(revdata.revision)
|
|
src << "<b>Server revision:</b> [revdata.branch] - [revdata.date]"
|
|
if(config.githuburl)
|
|
src << "<a href='[config.githuburl]/commit/[revdata.revision]'>[revdata.revision]</a>"
|
|
else
|
|
src << revdata.revision
|
|
else
|
|
src << "Revision unknown"
|
|
|
|
src << "<b>Current Map:</b> [current_map.full_name]"
|