mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
@@ -10,13 +10,13 @@
|
||||
#define DEBUG
|
||||
// END_PREFERENCES
|
||||
// BEGIN_INCLUDE
|
||||
#include "code\_macros.dm"
|
||||
#include "code\global.dm"
|
||||
#include "code\hub.dm"
|
||||
#include "code\names.dm"
|
||||
#include "code\stylesheet.dm"
|
||||
#include "code\world.dm"
|
||||
#include "code\__defines\_compile_options.dm"
|
||||
#include "code\__defines\_macros.dm"
|
||||
#include "code\__defines\admin.dm"
|
||||
#include "code\__defines\atmos.dm"
|
||||
#include "code\__defines\chemistry.dm"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
/obj/machinery/radiocarbon_spectrometer
|
||||
name = "Radiocarbon spectrometer"
|
||||
name = "radiocarbon spectrometer"
|
||||
desc = "A specialised, complex scanner for gleaning information on all manner of small things."
|
||||
anchored = 1
|
||||
density = 1
|
||||
@@ -91,9 +91,13 @@
|
||||
user << "<span class='info'>You remove [amount_transferred]u of coolant from [src].</span>"
|
||||
update_coolant()
|
||||
return
|
||||
if(scanned_item)
|
||||
user << "<span class=warning>\The [src] already has \a [scanned_item] inside!</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
scanned_item = I
|
||||
user << "<span class=notice>You put \the [I] into \the [src].</span>"
|
||||
|
||||
/obj/machinery/radiocarbon_spectrometer/proc/update_coolant()
|
||||
var/total_purity = 0
|
||||
|
||||
@@ -209,6 +209,69 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
|
||||
return list2params(positions)
|
||||
|
||||
else if(copytext(T,1,5) == "info")
|
||||
var/input[] = params2list(T)
|
||||
if(input["key"] != config.comms_password)
|
||||
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
|
||||
|
||||
spawn(50)
|
||||
world_topic_spam_protect_time = world.time
|
||||
return "Bad Key (Throttled)"
|
||||
|
||||
world_topic_spam_protect_time = world.time
|
||||
world_topic_spam_protect_ip = addr
|
||||
|
||||
return "Bad Key"
|
||||
|
||||
var/search = input["info"]
|
||||
var/ckey = ckey(search)
|
||||
|
||||
var/list/match = list()
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
if(findtext(M.name, search))
|
||||
match += M
|
||||
else if(M.ckey == ckey)
|
||||
match += M
|
||||
else if(M.mind && findtext(M.mind.assigned_role, search))
|
||||
match += M
|
||||
|
||||
if(!match.len)
|
||||
return "No matches"
|
||||
else if(match.len == 1)
|
||||
var/mob/M = match[1]
|
||||
var/info = list()
|
||||
info["key"] = M.key
|
||||
info["name"] = M.name == M.real_name ? M.name : "[M.name] ([M.real_name])"
|
||||
info["role"] = M.mind ? (M.mind.assigned_role ? M.mind.assigned_role : "No role") : "No mind"
|
||||
var/turf/MT = get_turf(M)
|
||||
info["loc"] = M.loc ? "[M.loc]" : "null"
|
||||
info["turf"] = MT ? "[MT] @ [MT.x], [MT.y], [MT.z]" : "null"
|
||||
info["area"] = MT ? "[MT.loc]" : "null"
|
||||
info["antag"] = M.mind ? (M.mind.special_role ? M.mind.special_role : "Not antag") : "No mind"
|
||||
info["hasbeenrev"] = M.mind ? M.mind.has_been_rev : "No mind"
|
||||
info["stat"] = M.stat
|
||||
info["type"] = M.type
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
info["damage"] = list2params(list(
|
||||
oxy = L.getOxyLoss(),
|
||||
tox = L.getToxLoss(),
|
||||
fire = L.getFireLoss(),
|
||||
brute = L.getBruteLoss(),
|
||||
clone = L.getCloneLoss(),
|
||||
brain = L.getBrainLoss()
|
||||
))
|
||||
else
|
||||
info["damage"] = "non-living"
|
||||
info["gender"] = M.gender
|
||||
return list2params(info)
|
||||
else
|
||||
var/list/ret = list()
|
||||
for(var/mob/M in match)
|
||||
ret[M.key] = M.name
|
||||
return list2params(ret)
|
||||
|
||||
else if(copytext(T,1,9) == "adminmsg")
|
||||
/*
|
||||
We got an adminmsg from IRC bot lets split the input then validate the input.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 7.2 KiB |
Reference in New Issue
Block a user