mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-29 15:06:39 +01:00
@@ -1,18 +0,0 @@
|
||||
// Comment this out if the external btime library is unavailable
|
||||
#define PRECISE_TIMER_AVAILABLE
|
||||
|
||||
#ifdef PRECISE_TIMER_AVAILABLE
|
||||
var/global/__btime__libName = "btime.[world.system_type==MS_WINDOWS?"dll":"so"]"
|
||||
#define TimeOfHour (__extern__timeofhour)
|
||||
#define __extern__timeofhour text2num(call(__btime__libName, "gettime")())
|
||||
/hook/startup/proc/checkbtime()
|
||||
try
|
||||
// This will always return 1 unless the btime library cannot be accessed
|
||||
if(TimeOfHour || 1) return 1
|
||||
catch(var/exception/e)
|
||||
log_to_dd("PRECISE_TIMER_AVAILABLE is defined in btime.dm, but calling the btime library failed: [e]")
|
||||
log_to_dd("This is a fatal error. The world will now shut down.")
|
||||
del(world)
|
||||
#else
|
||||
#define TimeOfHour (world.timeofday % 36000)
|
||||
#endif
|
||||
@@ -48,6 +48,7 @@ var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called
|
||||
#define NETWORK_ROBOTS "Robots"
|
||||
#define NETWORK_PRISON "Prison"
|
||||
#define NETWORK_SECURITY "Security"
|
||||
#define NETWORK_INTERROGATION "Interrogation"
|
||||
#define NETWORK_TELECOM "Tcomsat"
|
||||
#define NETWORK_THUNDER "Thunderdome"
|
||||
#define NETWORK_COMMUNICATORS "Communicators"
|
||||
|
||||
@@ -26,4 +26,7 @@
|
||||
#define INFINITY 1.#INF
|
||||
|
||||
#define TICKS_IN_DAY 24*60*60*10
|
||||
#define TICKS_IN_SECOND 10
|
||||
#define TICKS_IN_SECOND 10
|
||||
|
||||
#define SIMPLE_SIGN(X) ((X) < 0 ? -1 : 1)
|
||||
#define SIGN(X) ((X) ? SIMPLE_SIGN(X) : 0)
|
||||
|
||||
@@ -11,10 +11,9 @@
|
||||
#define PROCESS_DEFAULT_HANG_ALERT_TIME 600 // 60 seconds
|
||||
#define PROCESS_DEFAULT_HANG_RESTART_TIME 900 // 90 seconds
|
||||
#define PROCESS_DEFAULT_SCHEDULE_INTERVAL 50 // 50 ticks
|
||||
#define PROCESS_DEFAULT_SLEEP_INTERVAL 8 // 2 ticks
|
||||
#define PROCESS_DEFAULT_CPU_THRESHOLD 90 // 90%
|
||||
#define PROCESS_DEFAULT_SLEEP_INTERVAL 8 // 1/8th of a tick
|
||||
|
||||
// SCHECK macros
|
||||
// This references src directly to work around a weird bug with try/catch
|
||||
#define SCHECK_EVERY(this_many_calls) if(++src.calls_since_last_scheck >= this_many_calls) sleepCheck()
|
||||
#define SCHECK SCHECK_EVERY(50)
|
||||
#define SCHECK sleepCheck()
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// Languages.
|
||||
#define LANGUAGE_SOL_COMMON "Sol Common"
|
||||
#define LANGUAGE_UNATHI "Sinta'unathi"
|
||||
#define LANGUAGE_SIIK_MAAS "Siik'maas"
|
||||
#define LANGUAGE_SIIK_TAJR "Siik'tajr"
|
||||
#define LANGUAGE_SIIK "Siik"
|
||||
#define LANGUAGE_SKRELLIAN "Skrellian"
|
||||
#define LANGUAGE_ROOTSPEAK "Rootspeak"
|
||||
#define LANGUAGE_TRADEBAND "Tradeband"
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#define ARCHAEO_BOWL 1
|
||||
#define ARCHAEO_URN 2
|
||||
#define ARCHAEO_CUTLERY 3
|
||||
#define ARCHAEO_STATUETTE 4
|
||||
#define ARCHAEO_INSTRUMENT 5
|
||||
#define ARCHAEO_KNIFE 6
|
||||
#define ARCHAEO_COIN 7
|
||||
#define ARCHAEO_HANDCUFFS 8
|
||||
#define ARCHAEO_BEARTRAP 9
|
||||
#define ARCHAEO_LIGHTER 10
|
||||
#define ARCHAEO_BOX 11
|
||||
#define ARCHAEO_GASTANK 12
|
||||
#define ARCHAEO_TOOL 13
|
||||
#define ARCHAEO_METAL 14
|
||||
#define ARCHAEO_PEN 15
|
||||
#define ARCHAEO_CRYSTAL 16
|
||||
#define ARCHAEO_CULTBLADE 17
|
||||
#define ARCHAEO_TELEBEACON 18
|
||||
#define ARCHAEO_CLAYMORE 19
|
||||
#define ARCHAEO_CULTROBES 20
|
||||
#define ARCHAEO_SOULSTONE 21
|
||||
#define ARCHAEO_SHARD 22
|
||||
#define ARCHAEO_RODS 23
|
||||
#define ARCHAEO_STOCKPARTS 24
|
||||
#define ARCHAEO_KATANA 25
|
||||
#define ARCHAEO_LASER 26
|
||||
#define ARCHAEO_GUN 27
|
||||
#define ARCHAEO_UNKNOWN 28
|
||||
#define ARCHAEO_FOSSIL 29
|
||||
#define ARCHAEO_SHELL 30
|
||||
#define ARCHAEO_PLANT 31
|
||||
#define ARCHAEO_REMAINS_HUMANOID 32
|
||||
#define ARCHAEO_REMAINS_ROBOT 33
|
||||
#define ARCHAEO_REMAINS_XENO 34
|
||||
#define ARCHAEO_GASMASK 35
|
||||
#define MAX_ARCHAEO 35
|
||||
|
||||
#define DIGSITE_GARDEN 1
|
||||
#define DIGSITE_ANIMAL 2
|
||||
#define DIGSITE_HOUSE 3
|
||||
#define DIGSITE_TECHNICAL 4
|
||||
#define DIGSITE_TEMPLE 5
|
||||
#define DIGSITE_WAR 6
|
||||
|
||||
#define EFFECT_TOUCH 0
|
||||
#define EFFECT_AURA 1
|
||||
#define EFFECT_PULSE 2
|
||||
#define MAX_EFFECT 2
|
||||
|
||||
#define TRIGGER_TOUCH 0
|
||||
#define TRIGGER_WATER 1
|
||||
#define TRIGGER_ACID 2
|
||||
#define TRIGGER_VOLATILE 3
|
||||
#define TRIGGER_TOXIN 4
|
||||
#define TRIGGER_FORCE 5
|
||||
#define TRIGGER_ENERGY 6
|
||||
#define TRIGGER_HEAT 7
|
||||
#define TRIGGER_COLD 8
|
||||
#define TRIGGER_PHORON 9
|
||||
#define TRIGGER_OXY 10
|
||||
#define TRIGGER_CO2 11
|
||||
#define TRIGGER_NITRO 12
|
||||
#define MAX_TRIGGER 12
|
||||
|
||||
#define EFFECT_UNKNOWN 0
|
||||
#define EFFECT_ENERGY 1
|
||||
#define EFFECT_PSIONIC 2
|
||||
#define EFFECT_ELECTRO 3
|
||||
#define EFFECT_PARTICLE 4
|
||||
#define EFFECT_ORGANIC 5
|
||||
#define EFFECT_BLUESPACE 6
|
||||
#define EFFECT_SYNTH 7
|
||||
+5
-18
@@ -11,24 +11,11 @@
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
var/total = input.len
|
||||
if (!total)
|
||||
return "[nothing_text]"
|
||||
else if (total == 1)
|
||||
return "[input[1]]"
|
||||
else if (total == 2)
|
||||
return "[input[1]][and_text][input[2]]"
|
||||
else
|
||||
var/output = ""
|
||||
var/index = 1
|
||||
while (index < total)
|
||||
if (index == total - 1)
|
||||
comma_text = final_comma_text
|
||||
|
||||
output += "[input[index]][comma_text]"
|
||||
index++
|
||||
|
||||
return "[output][and_text][input[index]]"
|
||||
switch(input.len)
|
||||
if(0) return nothing_text
|
||||
if(1) return "[input[1]]"
|
||||
if(2) return "[input[1]][and_text][input[2]]"
|
||||
else return "[jointext(input, comma_text, 1, -1)][final_comma_text][and_text][input[input.len]]"
|
||||
|
||||
//Returns list element or null. Should prevent "index out of bounds" error.
|
||||
proc/listgetindex(var/list/list,index)
|
||||
|
||||
+58
-12
@@ -4,17 +4,56 @@
|
||||
#define MINUTE *600
|
||||
#define MINUTES *600
|
||||
|
||||
var/roundstart_hour = 0
|
||||
//Returns the world time in english
|
||||
proc/worldtime2text(time = world.time, timeshift = 1)
|
||||
if(!roundstart_hour) roundstart_hour = pick(2,7,12,17)
|
||||
return timeshift ? time2text(time+(36000*roundstart_hour), "hh:mm") : time2text(time, "hh:mm")
|
||||
#define HOUR *36000
|
||||
#define HOURS *36000
|
||||
|
||||
proc/worlddate2text()
|
||||
return num2text((text2num(time2text(world.timeofday, "YYYY"))+544)) + "-" + time2text(world.timeofday, "MM-DD")
|
||||
#define DAY *864000
|
||||
#define DAYS *864000
|
||||
|
||||
proc/time_stamp()
|
||||
return time2text(world.timeofday, "hh:mm:ss")
|
||||
#define TimeOfGame (get_game_time())
|
||||
#define TimeOfTick (world.tick_usage*0.01*world.tick_lag)
|
||||
|
||||
/proc/get_game_time()
|
||||
var/global/time_offset = 0
|
||||
var/global/last_time = 0
|
||||
var/global/last_usage = 0
|
||||
|
||||
var/wtime = world.time
|
||||
var/wusage = world.tick_usage * 0.01
|
||||
|
||||
if(last_time < wtime && last_usage > 1)
|
||||
time_offset += last_usage - 1
|
||||
|
||||
last_time = wtime
|
||||
last_usage = wusage
|
||||
|
||||
return wtime + (time_offset + wusage) * world.tick_lag
|
||||
|
||||
var/roundstart_hour
|
||||
var/station_date = ""
|
||||
var/next_station_date_change = 1 DAY
|
||||
|
||||
#define duration2stationtime(time) time2text(station_time_in_ticks + time, "hh:mm")
|
||||
#define worldtime2stationtime(time) time2text(roundstart_hour HOURS + time, "hh:mm")
|
||||
#define round_duration_in_ticks (round_start_time ? world.time - round_start_time : 0)
|
||||
#define station_time_in_ticks (roundstart_hour HOURS + round_duration_in_ticks)
|
||||
|
||||
/proc/stationtime2text()
|
||||
return time2text(station_time_in_ticks, "hh:mm")
|
||||
|
||||
/proc/stationdate2text()
|
||||
var/update_time = FALSE
|
||||
if(station_time_in_ticks > next_station_date_change)
|
||||
next_station_date_change += 1 DAY
|
||||
update_time = TRUE
|
||||
if(!station_date || update_time)
|
||||
var/extra_days = round(station_time_in_ticks / (1 DAY)) DAYS
|
||||
var/timeofday = world.timeofday + extra_days
|
||||
station_date = num2text((text2num(time2text(timeofday, "YYYY"))+544)) + "-" + time2text(timeofday, "MM-DD")
|
||||
return station_date
|
||||
|
||||
/proc/time_stamp()
|
||||
return time2text(station_time_in_ticks, "hh:mm:ss")
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
proc/isDay(var/month, var/day)
|
||||
@@ -36,9 +75,7 @@ var/round_start_time = 0
|
||||
round_start_time = world.time
|
||||
return 1
|
||||
|
||||
#define round_duration_in_ticks (round_start_time ? world.time - round_start_time : 0)
|
||||
|
||||
/proc/round_duration_as_text()
|
||||
/proc/roundduration2text()
|
||||
if(!round_start_time)
|
||||
return "00:00"
|
||||
if(last_round_duration && world.time < next_duration_update)
|
||||
@@ -55,3 +92,12 @@ var/round_start_time = 0
|
||||
last_round_duration = "[hours]:[mins]"
|
||||
next_duration_update = world.time + 1 MINUTES
|
||||
return last_round_duration
|
||||
|
||||
//Can be useful for things dependent on process timing
|
||||
/proc/process_schedule_interval(var/process_name)
|
||||
var/datum/controller/process/process = processScheduler.getProcess(process_name)
|
||||
return process.schedule_interval
|
||||
|
||||
/hook/startup/proc/set_roundstart_hour()
|
||||
roundstart_hour = pick(2,7,12,17)
|
||||
return 1
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* _stubs.dm
|
||||
*
|
||||
* This file contains constructs that the process scheduler expects to exist
|
||||
* in a standard ss13 fork.
|
||||
*/
|
||||
|
||||
/**
|
||||
* logTheThing
|
||||
*
|
||||
* In goonstation, this proc writes a message to either the world log or diary.
|
||||
*
|
||||
* Blame Keelin.
|
||||
*/
|
||||
/proc/logTheThing(type, source, target, text, diaryType)
|
||||
if(diaryType)
|
||||
log_debug("Diary: \[[diaryType]:[type]] [text]")
|
||||
else
|
||||
log_debug("Log: \[[type]] [text]")
|
||||
@@ -69,10 +69,10 @@
|
||||
* recordkeeping vars
|
||||
*/
|
||||
|
||||
// Records the time (1/10s timeofday) at which the process last finished sleeping
|
||||
// Records the time (1/10s timeoftick) at which the process last finished sleeping
|
||||
var/tmp/last_slept = 0
|
||||
|
||||
// Records the time (1/10s timeofday) at which the process last began running
|
||||
// Records the time (1/10s timeofgame) at which the process last began running
|
||||
var/tmp/run_start = 0
|
||||
|
||||
// Records the number of times this process has been killed and restarted
|
||||
@@ -106,12 +106,8 @@
|
||||
last_object = null
|
||||
|
||||
/datum/controller/process/proc/started()
|
||||
var/timeofhour = TimeOfHour
|
||||
// Initialize last_slept so we can know when to sleep
|
||||
last_slept = timeofhour
|
||||
|
||||
// Initialize run_start so we can detect hung processes.
|
||||
run_start = timeofhour
|
||||
run_start = TimeOfGame
|
||||
|
||||
// Initialize defer count
|
||||
cpu_defer_count = 0
|
||||
@@ -163,18 +159,13 @@
|
||||
setStatus(PROCESS_STATUS_HUNG)
|
||||
|
||||
/datum/controller/process/proc/handleHung()
|
||||
var/timeofhour = TimeOfHour
|
||||
var/datum/lastObj = last_object
|
||||
var/lastObjType = "null"
|
||||
if(istype(lastObj))
|
||||
lastObjType = lastObj.type
|
||||
|
||||
// If timeofhour has rolled over, then we need to adjust.
|
||||
if (timeofhour < run_start)
|
||||
run_start -= 36000
|
||||
var/msg = "[name] process hung at tick #[ticks]. Process was unresponsive for [(timeofhour - run_start) / 10] seconds and was restarted. Last task: [last_task]. Last Object Type: [lastObjType]"
|
||||
logTheThing("debug", null, null, msg)
|
||||
logTheThing("diary", null, null, msg, "debug")
|
||||
var/msg = "[name] process hung at tick #[ticks]. Process was unresponsive for [(TimeOfGame - run_start) / 10] seconds and was restarted. Last task: [last_task]. Last Object Type: [lastObjType]"
|
||||
log_debug(msg)
|
||||
message_admins(msg)
|
||||
|
||||
main.restartProcess(src.name)
|
||||
@@ -182,8 +173,8 @@
|
||||
/datum/controller/process/proc/kill()
|
||||
if (!killed)
|
||||
var/msg = "[name] process was killed at tick #[ticks]."
|
||||
logTheThing("debug", null, null, msg)
|
||||
logTheThing("diary", null, null, msg, "debug")
|
||||
log_debug(msg)
|
||||
message_admins(msg)
|
||||
//finished()
|
||||
|
||||
// Allow inheritors to clean up if needed
|
||||
@@ -208,17 +199,12 @@
|
||||
if (main.getCurrentTickElapsedTime() > main.timeAllowance)
|
||||
sleep(world.tick_lag)
|
||||
cpu_defer_count++
|
||||
last_slept = TimeOfHour
|
||||
last_slept = 0
|
||||
else
|
||||
var/timeofhour = TimeOfHour
|
||||
// If timeofhour has rolled over, then we need to adjust.
|
||||
if (timeofhour < last_slept)
|
||||
last_slept -= 36000
|
||||
|
||||
if (timeofhour > last_slept + sleep_interval)
|
||||
if (TimeOfTick > last_slept + sleep_interval)
|
||||
// If we haven't slept in sleep_interval deciseconds, sleep to allow other work to proceed.
|
||||
sleep(0)
|
||||
last_slept = TimeOfHour
|
||||
last_slept = TimeOfTick
|
||||
|
||||
/datum/controller/process/proc/update()
|
||||
// Clear delta
|
||||
@@ -239,10 +225,7 @@
|
||||
|
||||
|
||||
/datum/controller/process/proc/getElapsedTime()
|
||||
var/timeofhour = TimeOfHour
|
||||
if (timeofhour < run_start)
|
||||
return timeofhour - (run_start - 36000)
|
||||
return timeofhour - run_start
|
||||
return TimeOfGame - run_start
|
||||
|
||||
/datum/controller/process/proc/tickDetail()
|
||||
return
|
||||
@@ -343,6 +326,11 @@
|
||||
stat("[name]", "T#[getTicks()] | AR [averageRunTime] | LR [lastRunTime] | HR [highestRunTime] | D [cpu_defer_count]")
|
||||
|
||||
/datum/controller/process/proc/catchException(var/exception/e, var/thrower)
|
||||
if(istype(e)) // Real runtimes go to the real error handler
|
||||
// There are two newlines here, because handling desc sucks
|
||||
e.desc = " Caught by process: [name]\n\n" + e.desc
|
||||
world.Error(e, e_src = thrower)
|
||||
return
|
||||
var/etext = "[e]"
|
||||
var/eid = "[e]" // Exception ID, for tracking repeated exceptions
|
||||
var/ptext = "" // "processing..." text, for what was being processed (if known)
|
||||
@@ -369,4 +357,4 @@
|
||||
/datum/controller/process/proc/catchBadType(var/datum/caught)
|
||||
if(isnull(caught) || !istype(caught) || !isnull(caught.gcDestroyed))
|
||||
return // Only bother with types we can identify and that don't belong
|
||||
catchException("Type [caught.type] does not belong in process' queue")
|
||||
catchException("Type [caught.type] does not belong in process' queue")
|
||||
|
||||
@@ -43,8 +43,6 @@ var/global/datum/controller/processScheduler/processScheduler
|
||||
|
||||
var/tmp/currentTick = 0
|
||||
|
||||
var/tmp/currentTickStart = 0
|
||||
|
||||
var/tmp/timeAllowance = 0
|
||||
|
||||
var/tmp/cpuAverage = 0
|
||||
@@ -247,7 +245,7 @@ var/global/datum/controller/processScheduler/processScheduler
|
||||
|
||||
/datum/controller/processScheduler/proc/recordStart(var/datum/controller/process/process, var/time = null)
|
||||
if (isnull(time))
|
||||
time = TimeOfHour
|
||||
time = TimeOfGame
|
||||
last_queued[process] = world.time
|
||||
last_start[process] = time
|
||||
else
|
||||
@@ -256,11 +254,7 @@ var/global/datum/controller/processScheduler/processScheduler
|
||||
|
||||
/datum/controller/processScheduler/proc/recordEnd(var/datum/controller/process/process, var/time = null)
|
||||
if (isnull(time))
|
||||
time = TimeOfHour
|
||||
|
||||
// If world.timeofday has rolled over, then we need to adjust.
|
||||
if (time < last_start[process])
|
||||
last_start[process] -= 36000
|
||||
time = TimeOfGame
|
||||
|
||||
var/lastRunTime = time - last_start[process]
|
||||
|
||||
@@ -349,29 +343,23 @@ var/global/datum/controller/processScheduler/processScheduler
|
||||
updateCurrentTickData()
|
||||
return 0
|
||||
else
|
||||
return TimeOfHour - currentTickStart
|
||||
return TimeOfTick
|
||||
|
||||
/datum/controller/processScheduler/proc/updateCurrentTickData()
|
||||
if (world.time > currentTick)
|
||||
// New tick!
|
||||
currentTick = world.time
|
||||
currentTickStart = TimeOfHour
|
||||
updateTimeAllowance()
|
||||
cpuAverage = (world.cpu + cpuAverage + cpuAverage) / 3
|
||||
|
||||
/datum/controller/processScheduler/proc/updateTimeAllowance()
|
||||
// Time allowance goes down linearly with world.cpu.
|
||||
var/tmp/error = cpuAverage - 100
|
||||
var/tmp/timeAllowanceDelta = sign(error) * -0.5 * world.tick_lag * max(0, 0.001 * abs(error))
|
||||
var/tmp/timeAllowanceDelta = SIMPLE_SIGN(error) * -0.5 * world.tick_lag * max(0, 0.001 * abs(error))
|
||||
|
||||
//timeAllowance = world.tick_lag * min(1, 0.5 * ((200/max(1,cpuAverage)) - 1))
|
||||
timeAllowance = min(timeAllowanceMax, max(0, timeAllowance + timeAllowanceDelta))
|
||||
|
||||
/datum/controller/processScheduler/proc/sign(var/x)
|
||||
if (x == 0)
|
||||
return 1
|
||||
return x / abs(x)
|
||||
|
||||
/datum/controller/processScheduler/proc/statProcesses()
|
||||
if(!isRunning)
|
||||
stat("Processes", "Scheduler not running")
|
||||
@@ -379,4 +367,7 @@ var/global/datum/controller/processScheduler/processScheduler
|
||||
stat("Processes", "[processes.len] (R [running.len] / Q [queued.len] / I [idle.len])")
|
||||
stat(null, "[round(cpuAverage, 0.1)] CPU, [round(timeAllowance, 0.1)/10] TA")
|
||||
for(var/datum/controller/process/p in processes)
|
||||
p.statProcess()
|
||||
p.statProcess()
|
||||
|
||||
/datum/controller/processScheduler/proc/getProcess(var/process_name)
|
||||
return nameToProcessMap[process_name]
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
(function ($) {
|
||||
function setRef(theRef) {
|
||||
ref = theRef;
|
||||
}
|
||||
|
||||
function jax(action, data) {
|
||||
if (typeof data === 'undefined')
|
||||
data = {};
|
||||
var params = [];
|
||||
for (var k in data) {
|
||||
if (data.hasOwnProperty(k)) {
|
||||
params.push(encodeURIComponent(k) + '=' + encodeURIComponent(data[k]));
|
||||
}
|
||||
}
|
||||
var newLoc = '?src=' + ref + ';action=' + action + ';' + params.join(';');
|
||||
window.location = newLoc;
|
||||
}
|
||||
|
||||
function requestRefresh(e) {
|
||||
jax("refresh", null);
|
||||
}
|
||||
|
||||
function handleRefresh(processTable) {
|
||||
$('#processTable').html(processTable);
|
||||
initProcessTableButtons();
|
||||
}
|
||||
|
||||
function requestKill(e) {
|
||||
var button = $(e.currentTarget);
|
||||
jax("kill", {name: button.data("process-name")});
|
||||
}
|
||||
|
||||
function requestEnable(e) {
|
||||
var button = $(e.currentTarget);
|
||||
jax("enable", {name: button.data("process-name")});
|
||||
}
|
||||
|
||||
function requestDisable(e) {
|
||||
var button = $(e.currentTarget);
|
||||
jax("disable", {name: button.data("process-name")});
|
||||
}
|
||||
|
||||
function initProcessTableButtons() {
|
||||
$(".kill-btn").on("click", requestKill);
|
||||
$(".enable-btn").on("click", requestEnable);
|
||||
$(".disable-btn").on("click", requestDisable);
|
||||
}
|
||||
|
||||
window.setRef = setRef;
|
||||
window.handleRefresh = handleRefresh;
|
||||
|
||||
$(function() {
|
||||
initProcessTableButtons();
|
||||
$('#btn-refresh').on("click", requestRefresh);
|
||||
});
|
||||
}(jQuery));
|
||||
@@ -1,3 +1,5 @@
|
||||
//TODO: Make this match current lore
|
||||
|
||||
//S'randarr
|
||||
|
||||
/datum/locations/s_randarr
|
||||
|
||||
@@ -9,27 +9,34 @@
|
||||
*************/
|
||||
/datum/category_group/underwear
|
||||
var/sort_order // Lower sort order is applied as icons first
|
||||
var/display_name // For displaying in text
|
||||
var/gender = NEUTER
|
||||
|
||||
datum/category_group/underwear/dd_SortValue()
|
||||
return sort_order
|
||||
|
||||
/datum/category_group/underwear/top
|
||||
name = "Underwear, top"
|
||||
display_name = "top piece"
|
||||
sort_order = 1
|
||||
category_item_type = /datum/category_item/underwear/top
|
||||
|
||||
/datum/category_group/underwear/bottom
|
||||
name = "Underwear, bottom"
|
||||
display_name = "bottom piece"
|
||||
sort_order = 2
|
||||
category_item_type = /datum/category_item/underwear/bottom
|
||||
|
||||
/datum/category_group/underwear/socks
|
||||
name = "Socks"
|
||||
display_name = "socks"
|
||||
gender = PLURAL
|
||||
sort_order = 3
|
||||
category_item_type = /datum/category_item/underwear/socks
|
||||
|
||||
/datum/category_group/underwear/undershirt
|
||||
name = "Undershirt"
|
||||
display_name = "undershirt"
|
||||
sort_order = 4 // Undershirts currently have the highest sort order because they may cover both underwear and socks.
|
||||
category_item_type = /datum/category_item/underwear/undershirt
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
var/flags = 0 // Various runtime options.
|
||||
|
||||
// Used for setting appearance.
|
||||
var/list/valid_species = list("Unathi","Tajara","Skrell","Human")
|
||||
var/list/valid_species = list("Unathi","Tajara","Skrell","Human","Diona","Teshari")
|
||||
|
||||
// Runtime vars.
|
||||
var/datum/mind/leader // Current leader, if any.
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
if(!preserve_appearance && (flags & ANTAG_SET_APPEARANCE))
|
||||
spawn(3)
|
||||
var/mob/living/carbon/human/H = player.current
|
||||
if(istype(H)) H.change_appearance(APPEARANCE_ALL, H.loc, H, valid_species, state = z_state)
|
||||
if(istype(H))
|
||||
H.change_appearance(APPEARANCE_ALL, H.loc, H, species_whitelist = valid_species, state = z_state)
|
||||
return player.current
|
||||
|
||||
/datum/antagonist/proc/update_access(var/mob/living/player)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
certain though... there is never just one of them. Good luck."
|
||||
config_tag = "changeling"
|
||||
required_players = 2
|
||||
required_players_secret = 5
|
||||
required_players_secret = 2
|
||||
required_enemies = 1
|
||||
end_on_antag_death = 0
|
||||
antag_scaling_coeff = 10
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
for(var/limb in H.organs_by_name)
|
||||
var/obj/item/organ/external/current_limb = H.organs_by_name[limb]
|
||||
current_limb.undislocate()
|
||||
current_limb.open = 0
|
||||
|
||||
C.halloss = 0
|
||||
C.shock_stage = 0 //Pain
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
extended_round_description = "The station has been infiltrated by a fanatical group of death-cultists! They will use powers from beyond your comprehension to subvert you to their cause and ultimately please their gods through sacrificial summons and physical immolation! Try to survive!"
|
||||
config_tag = "cult"
|
||||
required_players = 5
|
||||
required_players_secret = 10
|
||||
required_players_secret = 5
|
||||
required_enemies = 3
|
||||
end_on_antag_death = 0
|
||||
antag_tags = list(MODE_CULTIST)
|
||||
|
||||
@@ -34,9 +34,6 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t
|
||||
switch(DD)
|
||||
if(1)
|
||||
Holiday["New Years's Day"] = "The day of the new solar year on Sol."
|
||||
if(10)
|
||||
Holiday["Messa's Day"] = "A Tajaran holiday. It takes place on the shortest day of the year on \
|
||||
Ahdomai, and is named after Messa, the Tajaran deity of Change."
|
||||
if(12)
|
||||
Holiday["Vertalliq-Qerr"] = "Vertalliq-Qerr, translated to mean 'Festival of the Royals', is a \
|
||||
Skrell holiday that celebrates the Qerr-Katish and all they have provided for the rest of Skrell society, \
|
||||
@@ -79,9 +76,6 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t
|
||||
Holiday["April Fool's Day"] = "An old holiday that endevours one to pull pranks and spread hoaxes on their friends."
|
||||
if(YY == 18)
|
||||
Holiday["Easter"] = ""
|
||||
if(7)
|
||||
Holiday["Tajaran Independence Day"] = "A Tajaran holiday celebrating their independence by winning the \
|
||||
war against the Slavemasters, the former ruling elite that went known as 'The Overseers'."
|
||||
if(8)
|
||||
if(YY == 15)
|
||||
Holiday["Easter"] = ""
|
||||
@@ -123,9 +117,11 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t
|
||||
|
||||
if(8) //Aug
|
||||
switch(DD)
|
||||
if(10)
|
||||
Holiday["S'randarr's Day"] = "A Tajaran holiday that occurs on the longest day of the year in summer, \
|
||||
on Ahdomai. It is named after the Tajaran deity of Light, and huge celebrations are common."
|
||||
// if(10)
|
||||
// Holiday["S'randarr's Day"] = "A Tajaran holiday that occurs on the longest day of the year in summer, \
|
||||
// on Ahdomai. It is named after the Tajaran deity of Light, and huge celebrations are common."
|
||||
if(27)
|
||||
Holiday["Forgiveness Day"] = "A time to forgive and be forgiven."
|
||||
|
||||
if(9) //Sep
|
||||
switch(DD)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
extended_round_description = "The AI will attempt to hack the APCs around the station in order to gain as much control as possible."
|
||||
config_tag = "malfunction"
|
||||
required_players = 2
|
||||
required_players_secret = 7
|
||||
required_players_secret = 2
|
||||
required_enemies = 1
|
||||
end_on_antag_death = 0
|
||||
auto_recall_shuttle = 0
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
only hope this unknown assassin isn't here for you."
|
||||
config_tag = "ninja"
|
||||
required_players = 1
|
||||
required_players_secret = 6
|
||||
required_players_secret = 1
|
||||
required_enemies = 1
|
||||
end_on_antag_death = 0
|
||||
antag_tags = list(MODE_NINJA)
|
||||
@@ -13,7 +13,7 @@ var/list/nuke_disks = list()
|
||||
attempts of robbery, fraud and other malicious actions."
|
||||
config_tag = "mercenary"
|
||||
required_players = 15
|
||||
required_players_secret = 20 // 20 players - 5 players to be the nuke ops = 15 players remaining
|
||||
required_players_secret = 15
|
||||
required_enemies = 1
|
||||
end_on_antag_death = 0
|
||||
var/nuke_off_station = 0 //Used for tracking if the syndies actually haul the nuke to the station
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
friends and family as they try to use your emotions and trust to their advantage, leaving you with nothing \
|
||||
but the painful reminder that space is cruel and unforgiving."
|
||||
config_tag = "traitor"
|
||||
required_players = 0
|
||||
required_players_secret = 5
|
||||
required_players = 1
|
||||
required_players_secret = 1
|
||||
required_enemies = 1
|
||||
end_on_antag_death = 0
|
||||
antag_tags = list(MODE_TRAITOR)
|
||||
@@ -23,5 +23,5 @@
|
||||
config_tag = "autotraitor"
|
||||
antag_tags = list(MODE_AUTOTRAITOR)
|
||||
round_autoantag = 1
|
||||
required_players_secret = 3
|
||||
required_players_secret = 1
|
||||
antag_scaling_coeff = 5
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
config_tag = "wizard"
|
||||
votable = 0
|
||||
required_players = 1
|
||||
required_players_secret = 6
|
||||
required_players_secret = 1
|
||||
required_enemies = 1
|
||||
end_on_antag_death = 0
|
||||
antag_tags = list(MODE_WIZARD)
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
supervisors = "the quartermaster and the head of personnel"
|
||||
selection_color = "#515151"
|
||||
idtype = /obj/item/weapon/card/id/cargo
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_mining, access_mining_station)
|
||||
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
selection_color = "#515151"
|
||||
idtype = /obj/item/weapon/card/id/cargo
|
||||
economic_modifier = 5
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_mining, access_mining_station)
|
||||
minimal_access = list(access_mining, access_mining_station, access_mailsorting)
|
||||
alt_titles = list("Drill Technician","Prospector")
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
selection_color = "#515151"
|
||||
idtype = /obj/item/weapon/card/id/civilian
|
||||
access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels)
|
||||
minimal_access = list(access_morgue, access_chapel_office, access_crematorium)
|
||||
minimal_access = list(access_chapel_office, access_crematorium)
|
||||
alt_titles = list("Counselor")
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/healthanalyzer(H), slot_s_store)
|
||||
return 1
|
||||
|
||||
/datum/job/doctor
|
||||
@@ -94,7 +94,7 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/healthanalyzer(H), slot_s_store)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
visible_message("<span class='notice'>\The [src] rattles and prints out a sheet of paper.</span>")
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
|
||||
P.info = "<CENTER><B>Body Scan - [href_list["name"]]</B></CENTER><BR>"
|
||||
P.info += "<b>Time of scan:</b> [worldtime2text(world.time)]<br><br>"
|
||||
P.info += "<b>Time of scan:</b> [worldtime2stationtime(world.time)]<br><br>"
|
||||
P.info += "[printing_text]"
|
||||
P.info += "<br><br><b>Notes:</b><br>"
|
||||
P.name = "Body Scan - [href_list["name"]]"
|
||||
|
||||
@@ -17,7 +17,8 @@ var/global/list/station_networks = list(
|
||||
NETWORK_RESEARCH_OUTPOST,
|
||||
NETWORK_ROBOTS,
|
||||
NETWORK_PRISON,
|
||||
NETWORK_SECURITY
|
||||
NETWORK_SECURITY,
|
||||
NETWORK_INTERROGATION
|
||||
)
|
||||
var/global/list/engineering_networks = list(
|
||||
NETWORK_ENGINE,
|
||||
@@ -66,6 +67,9 @@ var/global/list/engineering_networks = list(
|
||||
/obj/machinery/camera/network/exodus
|
||||
network = list(NETWORK_EXODUS)
|
||||
|
||||
/obj/machinery/camera/network/interrogation
|
||||
network = list(NETWORK_INTERROGATION)
|
||||
|
||||
/obj/machinery/camera/network/mining
|
||||
network = list(NETWORK_MINE)
|
||||
|
||||
|
||||
@@ -14,138 +14,140 @@
|
||||
var/cache_id = 0
|
||||
circuit = /obj/item/weapon/circuitboard/security
|
||||
|
||||
New()
|
||||
if(!network)
|
||||
network = station_networks.Copy()
|
||||
..()
|
||||
if(network.len)
|
||||
current_network = network[1]
|
||||
/obj/machinery/computer/security/New()
|
||||
if(!network)
|
||||
network = station_networks.Copy()
|
||||
..()
|
||||
if(network.len)
|
||||
current_network = network[1]
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
/obj/machinery/computer/security/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
check_eye(var/mob/user as mob)
|
||||
if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here.
|
||||
return -1
|
||||
if(!current_camera)
|
||||
return 0
|
||||
var/viewflag = current_camera.check_eye(user)
|
||||
if ( viewflag < 0 ) //camera doesn't work
|
||||
reset_current()
|
||||
return viewflag
|
||||
/obj/machinery/computer/security/check_eye(var/mob/user as mob)
|
||||
if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here.
|
||||
return -1
|
||||
if(!current_camera)
|
||||
return 0
|
||||
var/viewflag = current_camera.check_eye(user)
|
||||
if ( viewflag < 0 ) //camera doesn't work
|
||||
reset_current()
|
||||
return viewflag
|
||||
|
||||
ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
if(src.z > 6) return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
if(user.stat) return
|
||||
/obj/machinery/computer/security/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
if(src.z > 6) return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
if(user.stat) return
|
||||
|
||||
var/data[0]
|
||||
var/data[0]
|
||||
|
||||
data["current_camera"] = current_camera ? current_camera.nano_structure() : null
|
||||
data["current_network"] = current_network
|
||||
data["networks"] = network ? network : list()
|
||||
if(current_network)
|
||||
data["cameras"] = camera_repository.cameras_in_network(current_network)
|
||||
data["current_camera"] = current_camera ? current_camera.nano_structure() : null
|
||||
data["current_network"] = current_network
|
||||
data["networks"] = network ? network : list()
|
||||
if(current_network)
|
||||
data["cameras"] = camera_repository.cameras_in_network(current_network)
|
||||
if(current_camera)
|
||||
switch_to_camera(user, current_camera)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
|
||||
|
||||
// adding a template with the key "mapContent" enables the map ui functionality
|
||||
ui.add_template("mapContent", "sec_camera_map_content.tmpl")
|
||||
// adding a template with the key "mapHeader" replaces the map header content
|
||||
ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
|
||||
// adding a template with the key "mapContent" enables the map ui functionality
|
||||
ui.add_template("mapContent", "sec_camera_map_content.tmpl")
|
||||
// adding a template with the key "mapHeader" replaces the map header content
|
||||
ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
|
||||
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["switch_camera"])
|
||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
||||
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||
var/obj/machinery/camera/C = locate(href_list["switch_camera"]) in cameranet.cameras
|
||||
if(!C)
|
||||
return
|
||||
if(!(current_network in C.network))
|
||||
return
|
||||
|
||||
switch_to_camera(usr, C)
|
||||
return 1
|
||||
else if(href_list["switch_network"])
|
||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
||||
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||
if(href_list["switch_network"] in network)
|
||||
current_network = href_list["switch_network"]
|
||||
return 1
|
||||
else if(href_list["reset"])
|
||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
||||
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||
reset_current()
|
||||
usr.reset_view(current_camera)
|
||||
return 1
|
||||
else
|
||||
. = ..()
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (src.z > 6)
|
||||
user << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
|
||||
/obj/machinery/computer/security/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["switch_camera"])
|
||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
||||
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||
var/obj/machinery/camera/C = locate(href_list["switch_camera"]) in cameranet.cameras
|
||||
if(!C)
|
||||
return
|
||||
if(!(current_network in C.network))
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
|
||||
if(!isAI(user))
|
||||
user.set_machine(src)
|
||||
ui_interact(user)
|
||||
switch_to_camera(usr, C)
|
||||
return 1
|
||||
else if(href_list["switch_network"])
|
||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
||||
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||
if(href_list["switch_network"] in network)
|
||||
current_network = href_list["switch_network"]
|
||||
return 1
|
||||
else if(href_list["reset"])
|
||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
||||
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||
reset_current()
|
||||
usr.reset_view(current_camera)
|
||||
return 1
|
||||
else
|
||||
. = ..()
|
||||
|
||||
proc/switch_to_camera(var/mob/user, var/obj/machinery/camera/C)
|
||||
//don't need to check if the camera works for AI because the AI jumps to the camera location and doesn't actually look through cameras.
|
||||
if(isAI(user))
|
||||
var/mob/living/silicon/ai/A = user
|
||||
// Only allow non-carded AIs to view because the interaction with the eye gets all wonky otherwise.
|
||||
if(!A.is_in_chassis())
|
||||
return 0
|
||||
/obj/machinery/computer/security/attack_hand(var/mob/user as mob)
|
||||
if (src.z > 6)
|
||||
user << "<span class='danger'>Unable to establish a connection:</span> You're too far away from the station!"
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
|
||||
A.eyeobj.setLoc(get_turf(C))
|
||||
A.client.eye = A.eyeobj
|
||||
return 1
|
||||
if(!isAI(user))
|
||||
user.set_machine(src)
|
||||
ui_interact(user)
|
||||
|
||||
if (!C.can_use() || user.stat || (get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) && !istype(user, /mob/living/silicon)))
|
||||
/obj/machinery/computer/security/proc/switch_to_camera(var/mob/user, var/obj/machinery/camera/C)
|
||||
//don't need to check if the camera works for AI because the AI jumps to the camera location and doesn't actually look through cameras.
|
||||
if(isAI(user))
|
||||
var/mob/living/silicon/ai/A = user
|
||||
// Only allow non-carded AIs to view because the interaction with the eye gets all wonky otherwise.
|
||||
if(!A.is_in_chassis())
|
||||
return 0
|
||||
set_current(C)
|
||||
user.reset_view(current_camera)
|
||||
check_eye(user)
|
||||
|
||||
A.eyeobj.setLoc(get_turf(C))
|
||||
A.client.eye = A.eyeobj
|
||||
return 1
|
||||
|
||||
if (!C.can_use() || user.stat || (get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) && !istype(user, /mob/living/silicon)))
|
||||
return 0
|
||||
set_current(C)
|
||||
user.reset_view(current_camera)
|
||||
check_eye(user)
|
||||
return 1
|
||||
|
||||
//Camera control: moving.
|
||||
proc/jump_on_click(var/mob/user,var/A)
|
||||
if(user.machine != src)
|
||||
return
|
||||
var/obj/machinery/camera/jump_to
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
jump_to = A
|
||||
else if(ismob(A))
|
||||
if(ishuman(A))
|
||||
jump_to = locate() in A:head
|
||||
else if(isrobot(A))
|
||||
jump_to = A:camera
|
||||
else if(isobj(A))
|
||||
jump_to = locate() in A
|
||||
else if(isturf(A))
|
||||
var/best_dist = INFINITY
|
||||
for(var/obj/machinery/camera/camera in get_area(A))
|
||||
if(!camera.can_use())
|
||||
continue
|
||||
if(!can_access_camera(camera))
|
||||
continue
|
||||
var/dist = get_dist(camera,A)
|
||||
if(dist < best_dist)
|
||||
best_dist = dist
|
||||
jump_to = camera
|
||||
if(isnull(jump_to))
|
||||
return
|
||||
if(can_access_camera(jump_to))
|
||||
switch_to_camera(user,jump_to)
|
||||
/obj/machinery/computer/security/proc/jump_on_click(var/mob/user,var/A)
|
||||
if(user.machine != src)
|
||||
return
|
||||
var/obj/machinery/camera/jump_to
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
jump_to = A
|
||||
else if(ismob(A))
|
||||
if(ishuman(A))
|
||||
jump_to = locate() in A:head
|
||||
else if(isrobot(A))
|
||||
jump_to = A:camera
|
||||
else if(isobj(A))
|
||||
jump_to = locate() in A
|
||||
else if(isturf(A))
|
||||
var/best_dist = INFINITY
|
||||
for(var/obj/machinery/camera/camera in get_area(A))
|
||||
if(!camera.can_use())
|
||||
continue
|
||||
if(!can_access_camera(camera))
|
||||
continue
|
||||
var/dist = get_dist(camera,A)
|
||||
if(dist < best_dist)
|
||||
best_dist = dist
|
||||
jump_to = camera
|
||||
if(isnull(jump_to))
|
||||
return
|
||||
if(can_access_camera(jump_to))
|
||||
switch_to_camera(user,jump_to)
|
||||
|
||||
/obj/machinery/computer/security/process()
|
||||
if(cache_id != camera_repository.camera_cache_id)
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
if (mode)
|
||||
P.name = text("crew manifest ([])", worldtime2text())
|
||||
P.name = text("crew manifest ([])", stationtime2text())
|
||||
P.info = {"<h4>Crew Manifest</h4>
|
||||
<br>
|
||||
[data_core ? data_core.get_manifest(0) : ""]
|
||||
|
||||
@@ -20,17 +20,17 @@
|
||||
/obj/item/weapon/card/id/guest/examine(mob/user)
|
||||
..(user)
|
||||
if (world.time < expiration_time)
|
||||
user << "<span class='notice'>This pass expires at [worldtime2text(expiration_time)].</span>"
|
||||
user << "<span class='notice'>This pass expires at [worldtime2stationtime(expiration_time)].</span>"
|
||||
else
|
||||
user << "<span class='warning'>It expired at [worldtime2text(expiration_time)].</span>"
|
||||
user << "<span class='warning'>It expired at [worldtime2stationtime(expiration_time)].</span>"
|
||||
|
||||
/obj/item/weapon/card/id/guest/read()
|
||||
if(!Adjacent(usr))
|
||||
return //Too far to read
|
||||
if (world.time > expiration_time)
|
||||
usr << "<span class='notice'>This pass expired at [worldtime2text(expiration_time)].</span>"
|
||||
usr << "<span class='notice'>This pass expired at [worldtime2stationtime(expiration_time)].</span>"
|
||||
else
|
||||
usr << "<span class='notice'>This pass expires at [worldtime2text(expiration_time)].</span>"
|
||||
usr << "<span class='notice'>This pass expires at [worldtime2stationtime(expiration_time)].</span>"
|
||||
|
||||
usr << "<span class='notice'>It grants access to following areas:</span>"
|
||||
for (var/A in temp_access)
|
||||
@@ -207,13 +207,13 @@
|
||||
if ("issue")
|
||||
if (giver)
|
||||
var/number = add_zero("[rand(0,9999)]", 4)
|
||||
var/entry = "\[[worldtime2text()]\] Pass #[number] issued by [giver.registered_name] ([giver.assignment]) to [giv_name]. Reason: [reason]. Grants access to following areas: "
|
||||
var/entry = "\[[stationtime2text()]\] Pass #[number] issued by [giver.registered_name] ([giver.assignment]) to [giv_name]. Reason: [reason]. Grants access to following areas: "
|
||||
for (var/i=1 to accesses.len)
|
||||
var/A = accesses[i]
|
||||
if (A)
|
||||
var/area = get_access_desc(A)
|
||||
entry += "[i > 1 ? ", [area]" : "[area]"]"
|
||||
entry += ". Expires at [worldtime2text(world.time + duration*10*60)]."
|
||||
entry += ". Expires at [worldtime2stationtime(world.time + duration*10*60)]."
|
||||
internal_log.Add(entry)
|
||||
|
||||
var/obj/item/weapon/card/id/guest/pass = new(src.loc)
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
var/counter = 1
|
||||
while(src.active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]<BR>[t1]")
|
||||
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]<BR>[t1]")
|
||||
|
||||
if (href_list["del_c"])
|
||||
if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
|
||||
|
||||
@@ -391,7 +391,7 @@ What a mess.*/
|
||||
var/counter = 1
|
||||
while(active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]<BR>[t1]")
|
||||
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]<BR>[t1]")
|
||||
|
||||
if ("Delete Record (ALL)")
|
||||
if (active1)
|
||||
|
||||
@@ -461,7 +461,7 @@
|
||||
var/counter = 1
|
||||
while(src.active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]<BR>[t1]")
|
||||
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]<BR>[t1]")
|
||||
|
||||
if (href_list["del_c"])
|
||||
if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
|
||||
|
||||
@@ -410,7 +410,7 @@ What a mess.*/
|
||||
var/counter = 1
|
||||
while(active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]<BR>[t1]")
|
||||
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]<BR>[t1]")
|
||||
|
||||
if ("Delete Record (ALL)")
|
||||
if (active1)
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
@@ -210,7 +210,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
newlap = new /obj/machinery/computer3/laptop/vended(src.loc)
|
||||
@@ -350,7 +350,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
@@ -359,7 +359,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
qdel(relap)
|
||||
|
||||
@@ -466,8 +466,8 @@
|
||||
|
||||
|
||||
//Make an announcement and log the person entering storage.
|
||||
control_computer.frozen_crew += "[occupant.real_name], [occupant.mind.role_alt_title] - [worldtime2text()]"
|
||||
control_computer._admin_logs += "[key_name(occupant)] ([occupant.mind.role_alt_title]) at [worldtime2text()]"
|
||||
control_computer.frozen_crew += "[occupant.real_name], [occupant.mind.role_alt_title] - [stationtime2text()]"
|
||||
control_computer._admin_logs += "[key_name(occupant)] ([occupant.mind.role_alt_title]) at [stationtime2text()]"
|
||||
log_and_message_admins("[key_name(occupant)] ([occupant.mind.role_alt_title]) entered cryostorage.")
|
||||
|
||||
announce.autosay("[occupant.real_name], [occupant.mind.role_alt_title], [on_store_message]", "[on_store_name]")
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = author
|
||||
newMsg.body = msg
|
||||
newMsg.time_stamp = "[worldtime2text()]"
|
||||
newMsg.time_stamp = "[stationtime2text()]"
|
||||
newMsg.is_admin_message = adminMessage
|
||||
if(message_type)
|
||||
newMsg.message_type = message_type
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
return 1
|
||||
if(STATUS_DISPLAY_TIME)
|
||||
message1 = "TIME"
|
||||
message2 = worldtime2text()
|
||||
message2 = stationtime2text()
|
||||
update_display(message1, message2)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
T.amount = "[currently_vending.price]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
customer_account.transaction_log.Add(T)
|
||||
|
||||
// Give the vendor the money. We use the account owner name, which means
|
||||
@@ -337,7 +337,7 @@
|
||||
T.amount = "[currently_vending.price]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
/obj/machinery/vending/attack_ai(mob/user as mob)
|
||||
|
||||
@@ -66,7 +66,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "The time [worldtime2text()] is displayed in the corner of the screen."
|
||||
user << "The time [stationtime2text()] is displayed in the corner of the screen."
|
||||
|
||||
/obj/item/device/pda/medical
|
||||
default_cartridge = /obj/item/weapon/cartridge/medical
|
||||
@@ -523,7 +523,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
cartdata["charges"] = cartridge.charges ? cartridge.charges : 0
|
||||
data["cartridge"] = cartdata
|
||||
|
||||
data["stationTime"] = worldtime2text()
|
||||
data["stationTime"] = stationtime2text()
|
||||
data["new_Message"] = new_message
|
||||
data["new_News"] = new_news
|
||||
|
||||
@@ -1054,7 +1054,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P, var/tap = 1)
|
||||
if(tap)
|
||||
U.visible_message("<span class='notice'>\The [U] taps on \his PDA's screen.</span>")
|
||||
U.visible_message("<span class='notice'>\The [U] taps on their PDA's screen.</span>")
|
||||
var/t = input(U, "Please enter message", P.name, null) as text
|
||||
t = sanitize(t)
|
||||
//t = readd_quotes(t)
|
||||
|
||||
@@ -334,7 +334,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
data["video_comm"] = video_source ? "\ref[video_source.loc]" : null
|
||||
data["imContacts"] = im_contacts_ui
|
||||
data["imList"] = im_list_ui
|
||||
data["time"] = worldtime2text()
|
||||
data["time"] = stationtime2text()
|
||||
data["ring"] = ringer
|
||||
data["homeScreen"] = modules_ui
|
||||
data["note"] = note // current notes
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
nanoui_data["categories"] = categories
|
||||
nanoui_data["discount_name"] = discount_item ? discount_item.name : ""
|
||||
nanoui_data["discount_amount"] = (1-discount_amount)*100
|
||||
nanoui_data["offer_expiry"] = worldtime2text(next_offer_time)
|
||||
nanoui_data["offer_expiry"] = worldtime2stationtime(next_offer_time)
|
||||
else if(nanoui_menu == 1)
|
||||
var/items[0]
|
||||
for(var/datum/uplink_item/item in category.items)
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
var/scan_data = ""
|
||||
|
||||
if(timeofdeath)
|
||||
scan_data += "<b>Time of death:</b> [worldtime2text(timeofdeath)]<br><br>"
|
||||
scan_data += "<b>Time of death:</b> [worldtime2stationtime(timeofdeath)]<br><br>"
|
||||
|
||||
var/n = 1
|
||||
for(var/wdata_idx in wdata)
|
||||
@@ -133,7 +133,7 @@
|
||||
if(damaging_weapon)
|
||||
scan_data += "Severity: [damage_desc]<br>"
|
||||
scan_data += "Hits by weapon: [total_hits]<br>"
|
||||
scan_data += "Approximate time of wound infliction: [worldtime2text(age)]<br>"
|
||||
scan_data += "Approximate time of wound infliction: [worldtime2stationtime(age)]<br>"
|
||||
scan_data += "Affected limbs: [D.organ_names]<br>"
|
||||
scan_data += "Possible weapons:<br>"
|
||||
for(var/weapon_name in weapon_chances)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
var/access = list()
|
||||
var/registered_name = "Unknown" // The name registered_name on the card
|
||||
slot_flags = SLOT_ID
|
||||
slot_flags = SLOT_ID | SLOT_EARS
|
||||
|
||||
var/age = "\[UNSET\]"
|
||||
var/blood_type = "\[UNSET\]"
|
||||
|
||||
@@ -484,6 +484,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
if(lit == 1)
|
||||
M.IgniteMob()
|
||||
msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] and lit them on fire (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(istype(M.wear_mask, /obj/item/clothing/mask/smokable/cigarette) && user.zone_sel.selecting == O_MOUTH && lit)
|
||||
var/obj/item/clothing/mask/smokable/cigarette/cig = M.wear_mask
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
var/colour = "red"
|
||||
var/open = 0
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/purple
|
||||
name = "purple lipstick"
|
||||
colour = "purple"
|
||||
@@ -22,7 +21,6 @@
|
||||
name = "black lipstick"
|
||||
colour = "black"
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/random
|
||||
name = "lipstick"
|
||||
|
||||
@@ -30,7 +28,6 @@
|
||||
colour = pick("red","purple","jade","black")
|
||||
name = "[colour] lipstick"
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/attack_self(mob/user as mob)
|
||||
user << "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>"
|
||||
open = !open
|
||||
@@ -67,7 +64,6 @@
|
||||
|
||||
//you can wipe off lipstick with paper! see code/modules/paperwork/paper.dm, paper/attack()
|
||||
|
||||
|
||||
/obj/item/weapon/haircomb //sparklysheep's comb
|
||||
name = "purple comb"
|
||||
desc = "A pristine purple comb made from flexible plastic."
|
||||
@@ -77,4 +73,18 @@
|
||||
icon_state = "purplecomb"
|
||||
|
||||
/obj/item/weapon/haircomb/attack_self(mob/living/user)
|
||||
user.visible_message(text("<span class='notice'>[] uses [] to comb their hair with incredible style and sophistication. What a [].</span>", user, src, user.gender == FEMALE ? "lady" : "guy"))
|
||||
var/text = "person"
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
switch(U.identifying_gender)
|
||||
if(MALE)
|
||||
text = "guy"
|
||||
if(FEMALE)
|
||||
text = "lady"
|
||||
else
|
||||
switch(user.gender)
|
||||
if(MALE)
|
||||
text = "guy"
|
||||
if(FEMALE)
|
||||
text = "lady"
|
||||
user.visible_message("<span class='notice'>[user] uses [src] to comb their hair with incredible style and sophistication. What a [text].</span>")
|
||||
@@ -7,10 +7,10 @@
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
flags = CONDUCT
|
||||
throwforce = 10
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
force = 10.0
|
||||
force = 10
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 90)
|
||||
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
sharp = 1
|
||||
edge = 1
|
||||
w_class = 2
|
||||
force_divisor = 0.2 // 6 with hardness 30 (glass)
|
||||
thrown_force_divisor = 0.4 // 4 with weight 15 (glass)
|
||||
force_divisor = 0.25 // 7.5 with hardness 30 (glass)
|
||||
thrown_force_divisor = 0.5
|
||||
item_state = "shard-glass"
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
default_material = "glass"
|
||||
@@ -87,7 +87,7 @@
|
||||
if(affecting)
|
||||
if(affecting.robotic >= ORGAN_ROBOT)
|
||||
return
|
||||
if(affecting.take_damage(5, 0))
|
||||
if(affecting.take_damage(force, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
if(affecting.can_feel_pain())
|
||||
|
||||
@@ -271,7 +271,8 @@
|
||||
/obj/item/weapon/anodevice,
|
||||
/obj/item/clothing/glasses,
|
||||
/obj/item/weapon/wrench,
|
||||
/obj/item/weapon/storage/box/excavation,
|
||||
/obj/item/weapon/storage/excavation,
|
||||
/obj/item/weapon/anobattery,
|
||||
/obj/item/device/ano_scanner
|
||||
/obj/item/device/ano_scanner,
|
||||
/obj/item/weapon/pickaxe/hand
|
||||
)
|
||||
@@ -387,7 +387,7 @@
|
||||
|
||||
/obj/item/weapon/storage/box/monkeycubes/farwacubes
|
||||
name = "farwa cube box"
|
||||
desc = "Drymate brand farwa cubes, shipped from Ahdomai. Just add water!"
|
||||
desc = "Drymate brand farwa cubes, shipped from Meralar. Just add water!"
|
||||
|
||||
/obj/item/weapon/storage/box/monkeycubes/farwacubes/New()
|
||||
..()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "red"
|
||||
item_state_slots = list(slot_r_hand_str = "toolbox_red", slot_l_hand_str = "toolbox_red")
|
||||
flags = CONDUCT
|
||||
force = 5
|
||||
force = 10
|
||||
throwforce = 10
|
||||
throw_speed = 1
|
||||
throw_range = 7
|
||||
@@ -67,7 +67,7 @@
|
||||
icon_state = "syndicate"
|
||||
item_state_slots = list(slot_r_hand_str = "toolbox_syndi", slot_l_hand_str = "toolbox_syndi")
|
||||
origin_tech = list(TECH_COMBAT = 1, TECH_ILLEGAL = 1)
|
||||
force = 7.0
|
||||
force = 14
|
||||
|
||||
/obj/item/weapon/storage/toolbox/syndicate/New()
|
||||
..()
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
icon_state = "wrench"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
w_class = 2.0
|
||||
force = 6
|
||||
throwforce = 7
|
||||
w_class = 2
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 150)
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
@@ -39,9 +39,9 @@
|
||||
icon_state = "screwdriver"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT | SLOT_EARS
|
||||
force = 5.0
|
||||
w_class = 1.0
|
||||
throwforce = 5.0
|
||||
force = 6
|
||||
w_class = 1
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 75)
|
||||
@@ -100,7 +100,7 @@
|
||||
icon_state = "cutters"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 6.0
|
||||
force = 6
|
||||
throw_speed = 2
|
||||
throw_range = 9
|
||||
w_class = 2.0
|
||||
@@ -411,11 +411,11 @@
|
||||
icon_state = "crowbar"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
force = 6
|
||||
throwforce = 7
|
||||
pry = 1
|
||||
item_state = "crowbar"
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
origin_tech = list(TECH_ENGINEERING = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
|
||||
/obj/structure/flora/pottedplant
|
||||
name = "potted plant"
|
||||
desc = "Really ties the room together."
|
||||
icon = 'icons/obj/plants.dmi'
|
||||
icon_state = "plant-26"
|
||||
|
||||
|
||||
@@ -13,20 +13,21 @@
|
||||
var/victim_name = "corpse"
|
||||
|
||||
/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
if(!istype(G, /obj/item/weapon/grab) || !G.affecting)
|
||||
if(!istype(G, /obj/item/weapon/grab) || !ismob(G.affecting))
|
||||
return
|
||||
if(occupied)
|
||||
user << "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>"
|
||||
else
|
||||
if(spike(G.affecting))
|
||||
visible_message("<span class = 'danger'>[user] has forced [G.affecting] onto the spike, killing them instantly!</span>")
|
||||
qdel(G.affecting)
|
||||
var/mob/M = G.affecting
|
||||
M.forceMove(src)
|
||||
qdel(G)
|
||||
qdel(M)
|
||||
else
|
||||
user << "<span class='danger'>They are too big for the spike, try something smaller!</span>"
|
||||
|
||||
/obj/structure/kitchenspike/proc/spike(var/mob/living/victim)
|
||||
|
||||
if(!istype(victim))
|
||||
return
|
||||
|
||||
@@ -52,9 +53,9 @@
|
||||
return
|
||||
meat--
|
||||
new meat_type(get_turf(src))
|
||||
if(src.meat > 1)
|
||||
if(meat > 1)
|
||||
user << "You remove some meat from \the [victim_name]."
|
||||
else if(src.meat == 1)
|
||||
else if(meat == 1)
|
||||
user << "You remove the last piece of meat from \the [victim_name]!"
|
||||
icon_state = "spike"
|
||||
occupied = 0
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
var/datum/category_item/underwear/selected_underwear = input(H, "Choose underwear:", "Choose underwear", H.all_underwear[UWC.name]) as null|anything in UWC.items
|
||||
if(selected_underwear && CanUseTopic(H, default_state))
|
||||
H.all_underwear[UWC.name] = selected_underwear
|
||||
H.hide_underwear[UWC.name] = FALSE
|
||||
. = TRUE
|
||||
else if(href_list["underwear"] && href_list["tweak"])
|
||||
var/underwear = href_list["underwear"]
|
||||
@@ -80,6 +81,7 @@
|
||||
var/new_metadata = gt.get_metadata(usr, get_metadata(H, underwear, gt), "Wardrobe Underwear Selection")
|
||||
if(new_metadata)
|
||||
set_metadata(H, underwear, gt, new_metadata)
|
||||
H.hide_underwear[underwear] = FALSE
|
||||
. = TRUE
|
||||
|
||||
if(.)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
tracks.AddTracks(bloodDNA,comingdir,goingdir,bloodcolor)
|
||||
|
||||
/turf/simulated/proc/update_dirt()
|
||||
dirt = min(dirt++, 101)
|
||||
dirt = min(dirt+1, 101)
|
||||
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, src)
|
||||
if (dirt > 50)
|
||||
if (!dirtoverlay)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/turf/simulated/floor
|
||||
name = "plating"
|
||||
desc = "Unfinished flooring."
|
||||
icon = 'icons/turf/flooring/plating.dmi'
|
||||
icon_state = "plating"
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
/world
|
||||
|
||||
hub = "Exadv1.spacestation13"
|
||||
//hub_password = "SORRYNOPASSWORD"
|
||||
hub_password = "kMZy3U5jJHSiBQjr"
|
||||
hub_password = "SORRYNOPASSWORD"
|
||||
//hub_password = "kMZy3U5jJHSiBQjr"
|
||||
name = "Space Station 13"
|
||||
|
||||
/* This is for any host that would like their server to appear on the main SS13 hub.
|
||||
|
||||
@@ -59,7 +59,8 @@ proc/admin_notice(var/message, var/rights)
|
||||
<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a> -
|
||||
<a href='?src=\ref[src];subtlemessage=\ref[M]'>SM</a> -
|
||||
[admin_jump_link(M, src)]\] <br>
|
||||
<b>Mob type</b> = [M.type]<br><br>
|
||||
<b>Mob type:</b> [M.type]<br>
|
||||
<b>Inactivity time:</b> [M.client ? "[M.client.inactivity/600] minutes" : "Logged out"]<br/><br/>
|
||||
<A href='?src=\ref[src];boot2=\ref[M]'>Kick</A> |
|
||||
<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> |
|
||||
<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> |
|
||||
@@ -1348,6 +1349,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
H.paralysis = 0
|
||||
msg = "has unparalyzed [key_name(H)]."
|
||||
log_and_message_admins(msg)
|
||||
|
||||
/datum/admins/proc/set_tcrystals(mob/living/carbon/human/H as mob)
|
||||
set category = "Debug"
|
||||
set name = "Set Telecrystals"
|
||||
@@ -1380,3 +1382,93 @@ proc/admin_notice(var/message, var/rights)
|
||||
else
|
||||
usr << "You do not have access to this command."
|
||||
|
||||
|
||||
/datum/admins/proc/sendFax()
|
||||
set category = "Special Verbs"
|
||||
set name = "Send Fax"
|
||||
set desc = "Sends a fax to this machine"
|
||||
var/department = input("Choose a fax", "Fax") as null|anything in alldepartments
|
||||
for(var/obj/machinery/photocopier/faxmachine/sendto in allfaxes)
|
||||
if(sendto.department == department)
|
||||
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins))
|
||||
usr << "Error: you are not an admin!"
|
||||
return
|
||||
|
||||
var/replyorigin = input(src.owner, "Please specify who the fax is coming from", "Origin") as text|null
|
||||
|
||||
var/obj/item/weapon/paper/admin/P = new /obj/item/weapon/paper/admin( null ) //hopefully the null loc won't cause trouble for us
|
||||
faxreply = P
|
||||
|
||||
P.admindatum = src
|
||||
P.origin = replyorigin
|
||||
P.destination = sendto
|
||||
|
||||
P.adminbrowse()
|
||||
|
||||
|
||||
datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies in
|
||||
|
||||
/datum/admins/proc/faxCallback(var/obj/item/weapon/paper/admin/P, var/obj/machinery/photocopier/faxmachine/destination)
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
P.name = "[P.origin] - [customname]"
|
||||
P.desc = "This is a paper titled '" + P.name + "'."
|
||||
|
||||
var/shouldStamp = 1
|
||||
if(!P.sender) // admin initiated
|
||||
switch(alert("Would you like the fax stamped?",, "Yes", "No"))
|
||||
if("No")
|
||||
shouldStamp = 0
|
||||
|
||||
if(shouldStamp)
|
||||
P.stamps += "<hr><i>This paper has been stamped by the [P.origin] Quantum Relay.</i>"
|
||||
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
var/{x; y;}
|
||||
x = rand(-2, 0)
|
||||
y = rand(-1, 2)
|
||||
P.offset_x += x
|
||||
P.offset_y += y
|
||||
stampoverlay.pixel_x = x
|
||||
stampoverlay.pixel_y = y
|
||||
|
||||
if(!P.ico)
|
||||
P.ico = new
|
||||
P.ico += "paper_stamp-cent"
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp/centcomm
|
||||
P.overlays += stampoverlay
|
||||
|
||||
var/obj/item/rcvdcopy
|
||||
rcvdcopy = destination.copy(P)
|
||||
rcvdcopy.loc = null //hopefully this shouldn't cause trouble
|
||||
adminfaxes += rcvdcopy
|
||||
|
||||
|
||||
|
||||
if(destination.recievefax(P))
|
||||
src.owner << "<span class='notice'>Message reply to transmitted successfully.</span>"
|
||||
if(P.sender) // sent as a reply
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(P.sender)]")
|
||||
for(var/client/C in admins)
|
||||
if((R_ADMIN | R_MOD) & C.holder.rights)
|
||||
C << "<span class='log_message'><span class='prefix'>FAX LOG:</span>[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(P.sender)] (<a href='?_src_=holder;AdminFaxView=\ref[rcvdcopy]'>VIEW</a>)</span>"
|
||||
else
|
||||
log_admin("[key_name(src.owner)] has sent a fax message to [destination.department]")
|
||||
for(var/client/C in admins)
|
||||
if((R_ADMIN | R_MOD) & C.holder.rights)
|
||||
C << "<span class='log_message'><span class='prefix'>FAX LOG:</span>[key_name_admin(src.owner)] has sent a fax message to [destination.department] (<a href='?_src_=holder;AdminFaxView=\ref[rcvdcopy]'>VIEW</a>)</span>"
|
||||
|
||||
else
|
||||
src.owner << "<span class='warning'>Message reply failed.</span>"
|
||||
|
||||
spawn(100)
|
||||
qdel(P)
|
||||
faxreply = null
|
||||
return
|
||||
|
||||
@@ -97,7 +97,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/toggle_debug_logs,
|
||||
/client/proc/toggle_attack_logs,
|
||||
/datum/admins/proc/paralyze_mob,
|
||||
/client/proc/fixatmos
|
||||
/client/proc/fixatmos,
|
||||
/datum/admins/proc/sendFax
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
@@ -306,7 +307,9 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
|
||||
/datum/admins/proc/paralyze_mob,
|
||||
/client/proc/cmd_admin_direct_narrate,
|
||||
/client/proc/allow_character_respawn // Allows a ghost to respawn ,
|
||||
/client/proc/allow_character_respawn, // Allows a ghost to respawn ,
|
||||
/datum/admins/proc/sendFax
|
||||
|
||||
)
|
||||
|
||||
var/list/admin_verbs_mentor = list(
|
||||
|
||||
@@ -13,6 +13,7 @@ var/list/admin_datums = list()
|
||||
var/datum/feed_channel/admincaster_feed_channel = new /datum/feed_channel
|
||||
var/admincaster_signature //What you'll sign the newsfeeds as
|
||||
|
||||
|
||||
/datum/admins/New(initial_rank = "Temporary Admin", initial_rights = 0, ckey)
|
||||
if(!ckey)
|
||||
error("Admin datum created without a ckey argument. Datum has been deleted")
|
||||
@@ -57,22 +58,26 @@ proc/admin_proc()
|
||||
|
||||
NOTE: It checks usr by default. Supply the "user" argument if you wish to check for a specific mob.
|
||||
*/
|
||||
/proc/check_rights(rights_required, show_msg=1, var/mob/user = usr)
|
||||
if(user && user.client)
|
||||
if(rights_required)
|
||||
if(user.client.holder)
|
||||
if(rights_required & user.client.holder.rights)
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
user << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
|
||||
/proc/check_rights(rights_required, show_msg=1, var/client/C = usr)
|
||||
if(ismob(C))
|
||||
var/mob/M = C
|
||||
C = M.client
|
||||
if(!C)
|
||||
return FALSE
|
||||
if(!C.holder)
|
||||
if(show_msg)
|
||||
C << "<span class='warning'>Error: You are not an admin.</span>"
|
||||
return FALSE
|
||||
|
||||
if(rights_required)
|
||||
if(rights_required & C.holder.rights)
|
||||
return TRUE
|
||||
else
|
||||
if(user.client.holder)
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
user << "<font color='red'>Error: You are not an admin.</font>"
|
||||
return 0
|
||||
if(show_msg)
|
||||
C << "<span class='warning'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</span>"
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
|
||||
//probably a bit iffy - will hopefully figure out a better solution
|
||||
/proc/check_if_greater_rights_than(client/other)
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
|
||||
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
|
||||
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
|
||||
dat += "Round Duration: <B>[round_duration_as_text()]</B><BR>"
|
||||
dat += "Round Duration: <B>[roundduration2text()]</B><BR>"
|
||||
dat += "<B>Emergency shuttle</B><BR>"
|
||||
if (!emergency_shuttle.online())
|
||||
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><br>"
|
||||
|
||||
+12
-77
@@ -1386,86 +1386,21 @@
|
||||
H.show(src.owner)
|
||||
return
|
||||
|
||||
else if(href_list["CentcommFaxReply"])
|
||||
var/mob/sender = locate(href_list["CentcommFaxReply"])
|
||||
else if(href_list["FaxReply"])
|
||||
var/mob/sender = locate(href_list["FaxReply"])
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
|
||||
//todo: sanitize
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(sender)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input) return
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
// Create the reply message
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( null ) //hopefully the null loc won't cause trouble for us
|
||||
P.name = "[command_name()]- [customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
|
||||
// Stamps
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>This paper has been stamped by the Central Command Quantum Relay.</i>"
|
||||
|
||||
if(fax.recievefax(P))
|
||||
src.owner << "\blue Message reply to transmitted successfully."
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)]", 1)
|
||||
else
|
||||
src.owner << "\red Message reply failed."
|
||||
|
||||
spawn(100)
|
||||
qdel(P)
|
||||
return
|
||||
|
||||
else if(href_list["SolGovFaxReply"])
|
||||
//TODO
|
||||
/*
|
||||
var/mob/living/carbon/human/H = locate(href_list["SolGovFaxReply"])
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input) return
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in machines)
|
||||
if(F == fax)
|
||||
if(! (F.stat & (BROKEN|NOPOWER) ) )
|
||||
|
||||
// animate! it's alive!
|
||||
flick("faxreceive", F)
|
||||
|
||||
// give the sprite some time to flick
|
||||
spawn(20)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( F.loc )
|
||||
P.name = "Sol Government- [customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
|
||||
playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1)
|
||||
|
||||
// Stamps
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cap"
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>This paper has been stamped and encrypted by the Sol Government Quantum Relay.</i>"
|
||||
|
||||
src.owner << "Message reply to transmitted successfully."
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(H)]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]", 1)
|
||||
return
|
||||
src.owner << "/red Unable to locate fax!"
|
||||
*/
|
||||
var/replyorigin = href_list["replyorigin"]
|
||||
|
||||
|
||||
var/obj/item/weapon/paper/admin/P = new /obj/item/weapon/paper/admin( null ) //hopefully the null loc won't cause trouble for us
|
||||
faxreply = P
|
||||
|
||||
P.admindatum = src
|
||||
P.origin = replyorigin
|
||||
P.destination = fax
|
||||
P.sender = sender
|
||||
|
||||
P.adminbrowse()
|
||||
|
||||
else if(href_list["jumpto"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
. += "- [pref.species] cannot choose secondary languages.<br>"
|
||||
|
||||
. += "<b>Language Keys</b><br>"
|
||||
. += " [english_list(pref.language_prefixes, and_text = " ", comma_text = " ")] <a href='?src=\ref[src];change_prefix=1'>Change</a> <a href='?src=\ref[src];reset_prefix=1'>Reset</a><br>"
|
||||
. += " [jointext(pref.language_prefixes, " ")] <a href='?src=\ref[src];change_prefix=1'>Change</a> <a href='?src=\ref[src];reset_prefix=1'>Reset</a><br>"
|
||||
|
||||
/datum/category_item/player_setup_item/general/language/OnTopic(var/href,var/list/href_list, var/mob/user)
|
||||
if(href_list["remove_language"])
|
||||
|
||||
@@ -17,7 +17,7 @@ var/global/list/citizenship_choices = list(
|
||||
"Earth",
|
||||
"Mars",
|
||||
"Moghes",
|
||||
"Ahdomai",
|
||||
"Meralar",
|
||||
"Qerrbalak"
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ var/global/list/home_system_choices = list(
|
||||
"Tau Ceti",
|
||||
"Qerr'Vallis",
|
||||
"Epsilon Ursae Minoris",
|
||||
"S'randarr"
|
||||
"Rarkajar"
|
||||
)
|
||||
|
||||
var/global/list/faction_choices = list(
|
||||
@@ -44,7 +44,7 @@ var/global/list/faction_choices = list(
|
||||
"Zeng-Hu Pharmaceuticals",
|
||||
"Hesphaistos Industries"
|
||||
)
|
||||
|
||||
|
||||
var/global/list/antag_faction_choices = list() //Should be populated after brainstorming. Leaving as blank in case brainstorming does not occur.
|
||||
|
||||
var/global/list/antag_visiblity_choices = list(
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/obj/item/clothing/shoes/rainbow
|
||||
name = "rainbow shoes"
|
||||
desc = "Very gay shoes."
|
||||
desc = "Very colourful shoes."
|
||||
icon_state = "rain_bow"
|
||||
|
||||
/obj/item/clothing/shoes/flats
|
||||
|
||||
@@ -91,9 +91,13 @@
|
||||
usr << "\icon[piece] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed."
|
||||
|
||||
if(src.loc == usr)
|
||||
usr << "The access panel is [locked? "locked" : "unlocked"]."
|
||||
usr << "The maintenance panel is [open ? "open" : "closed"]."
|
||||
usr << "Hardsuit systems are [offline ? "<font color='red'>offline</font>" : "<font color='green'>online</font>"]."
|
||||
|
||||
if(open)
|
||||
usr << "It's equipped with [english_list(installed_modules)]."
|
||||
|
||||
/obj/item/weapon/rig/New()
|
||||
..()
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/ert
|
||||
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/box/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils)
|
||||
|
||||
req_access = list()
|
||||
req_one_access = list()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/obj/item/weapon/rig/eva
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/toolbox,/obj/item/weapon/storage/briefcase/inflatable,/obj/item/device/t_scanner,/obj/item/weapon/rcd,/obj/item/weapon/storage/backpack)
|
||||
/obj/item/weapon/rig/hazmat
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/box/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils,/obj/item/weapon/storage/backpack)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils,/obj/item/weapon/storage/backpack)
|
||||
/obj/item/weapon/rig/ce
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd,/obj/item/weapon/storage/backpack)
|
||||
/obj/item/weapon/rig/medical
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
user << "<span class='warning'>The [initial(name)] is dry!</span>"
|
||||
else
|
||||
user.visible_message("\The [user] starts to wipe down [A] with [src]!")
|
||||
reagents.splash(A, 1) //get a small amount of liquid on the thing we're wiping.
|
||||
//reagents.splash(A, 1) //get a small amount of liquid on the thing we're wiping.
|
||||
update_name()
|
||||
if(do_after(user,30))
|
||||
user.visible_message("\The [user] finishes wiping off the [A]!")
|
||||
|
||||
@@ -131,7 +131,7 @@ log transactions
|
||||
T.amount = I:worth
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
|
||||
user << "<span class='info'>You insert [I] into [src].</span>"
|
||||
@@ -260,7 +260,7 @@ log transactions
|
||||
T.purpose = transfer_purpose
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
T.amount = "([transfer_amount])"
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
else
|
||||
@@ -302,7 +302,7 @@ log transactions
|
||||
T.purpose = "Unauthorised login attempt"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
failed_account.transaction_log.Add(T)
|
||||
else
|
||||
usr << "\red \icon[src] Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining."
|
||||
@@ -322,7 +322,7 @@ log transactions
|
||||
T.purpose = "Remote terminal access"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
|
||||
usr << "\blue \icon[src] Access granted. Welcome user '[authenticated_account.owner_name].'"
|
||||
@@ -350,7 +350,7 @@ log transactions
|
||||
T.amount = "([amount])"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have enough funds to do that!</span>"
|
||||
@@ -375,7 +375,7 @@ log transactions
|
||||
T.amount = "([amount])"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have enough funds to do that!</span>"
|
||||
@@ -387,7 +387,7 @@ log transactions
|
||||
R.info += "<i>Account holder:</i> [authenticated_account.owner_name]<br>"
|
||||
R.info += "<i>Account number:</i> [authenticated_account.account_number]<br>"
|
||||
R.info += "<i>Balance:</i> $[authenticated_account.money]<br>"
|
||||
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
|
||||
R.info += "<i>Date and time:</i> [stationtime2text()], [current_date_string]<br><br>"
|
||||
R.info += "<i>Service terminal ID:</i> [machine_id]<br>"
|
||||
|
||||
//stamp the paper
|
||||
@@ -410,7 +410,7 @@ log transactions
|
||||
R.info = "<b>Transaction logs</b><br>"
|
||||
R.info += "<i>Account holder:</i> [authenticated_account.owner_name]<br>"
|
||||
R.info += "<i>Account number:</i> [authenticated_account.account_number]<br>"
|
||||
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
|
||||
R.info += "<i>Date and time:</i> [stationtime2text()], [current_date_string]<br><br>"
|
||||
R.info += "<i>Service terminal ID:</i> [machine_id]<br>"
|
||||
R.info += "<table border=1 style='width:100%'>"
|
||||
R.info += "<tr>"
|
||||
@@ -486,7 +486,7 @@ log transactions
|
||||
T.purpose = "Remote terminal access"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
|
||||
view_screen = NO_SCREEN
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
M.account_number = rand(111111, 999999)
|
||||
else
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
T.source_terminal = source_db.machine_id
|
||||
|
||||
M.account_number = next_account_number
|
||||
@@ -57,7 +57,7 @@
|
||||
R.info += "<i>Account number:</i> [M.account_number]<br>"
|
||||
R.info += "<i>Account pin:</i> [M.remote_access_pin]<br>"
|
||||
R.info += "<i>Starting balance:</i> $[M.money]<br>"
|
||||
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
|
||||
R.info += "<i>Date and time:</i> [stationtime2text()], [current_date_string]<br><br>"
|
||||
R.info += "<i>Creation terminal ID:</i> [source_db.machine_id]<br>"
|
||||
R.info += "<i>Authorised NT officer overseeing creation:</i> [source_db.held_card.registered_name]<br>"
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == attempt_account_number && !D.suspended)
|
||||
D.money += amount
|
||||
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = source_name
|
||||
@@ -90,12 +90,12 @@
|
||||
else
|
||||
T.amount = "[amount]"
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
T.source_terminal = terminal_id
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
return 0
|
||||
|
||||
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
T.purpose = reason
|
||||
T.amount = amount
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
T.source_terminal = machine_id
|
||||
return T
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
T.amount = transaction_amount
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
linked_account.transaction_log.Add(T)
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>\The [O] doesn't have that much money!</span>"
|
||||
@@ -264,7 +264,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
@@ -273,7 +273,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
linked_account.transaction_log.Add(T)
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
[pick("playwright","author","director","actor","TV star")] [random_name(pick(MALE,FEMALE))] comes the latest sensation: '\
|
||||
[pick("Deadly","The last","Lost","Dead")] [pick("Starships","Warriors","outcasts","Tajarans","Unathi","Skrell")] \
|
||||
[pick("of","from","raid","go hunting on","visit","ravage","pillage","destroy")] \
|
||||
[pick("Moghes","Earth","Biesel","Ahdomai","S'randarr","the Void","the Edge of Space")]'.\
|
||||
[pick("Moghes","Earth","Biesel","Meralar","Rarkajar","the Void","the Edge of Space")]'.\
|
||||
. Own it on webcast today, or visit the galactic premier on [affected_dest.name]!"
|
||||
|
||||
if(BIG_GAME_HUNTERS)
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
T.amount = "([transaction_amount])"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
// Create log entry in owner's account
|
||||
@@ -266,7 +266,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
linked_account.transaction_log.Add(T)
|
||||
|
||||
// Save log
|
||||
@@ -304,7 +304,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
linked_account.transaction_log.Add(T)
|
||||
|
||||
// Save log
|
||||
@@ -414,7 +414,7 @@
|
||||
<tr></tr>
|
||||
<tr><td class="tx-name">Customer</td><td class="tx-data">[c_name]</td></tr>
|
||||
<tr><td class="tx-name">Pay Method</td><td class="tx-data">[p_method]</td></tr>
|
||||
<tr><td class="tx-name">Station Time</td><td class="tx-data">[worldtime2text()]</td></tr>
|
||||
<tr><td class="tx-name">Station Time</td><td class="tx-data">[stationtime2text()]</td></tr>
|
||||
</table>
|
||||
<table width=300>
|
||||
"}
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
T.amount = "([transaction_amount])"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
// Create log entry in owner's account
|
||||
@@ -241,7 +241,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
linked_account.transaction_log.Add(T)
|
||||
|
||||
// Save log
|
||||
@@ -274,7 +274,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
linked_account.transaction_log.Add(T)
|
||||
|
||||
// Save log
|
||||
@@ -348,7 +348,7 @@
|
||||
<tr></tr>
|
||||
<tr><td class="tx-name">Customer</td><td class="tx-data">[c_name]</td></tr>
|
||||
<tr><td class="tx-name">Pay Method</td><td class="tx-data">[p_method]</td></tr>
|
||||
<tr><td class="tx-name">Station Time</td><td class="tx-data">[worldtime2text()]</td></tr>
|
||||
<tr><td class="tx-name">Station Time</td><td class="tx-data">[stationtime2text()]</td></tr>
|
||||
</table>
|
||||
<table width=300>
|
||||
"}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(EM.add_to_queue)
|
||||
EC.available_events += EM
|
||||
|
||||
log_debug("Event '[EM.name]' has completed at [worldtime2text()].")
|
||||
log_debug("Event '[EM.name]' has completed at [worldtime2stationtime(world.time)].")
|
||||
|
||||
/datum/event_manager/proc/delay_events(var/severity, var/delay)
|
||||
var/list/datum/event_container/EC = event_containers[severity]
|
||||
@@ -67,12 +67,12 @@
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
if(EM.name == "Nothing")
|
||||
continue
|
||||
var/message = "'[EM.name]' began at [worldtime2text(E.startedAt)] "
|
||||
var/message = "'[EM.name]' began at [worldtime2stationtime(E.startedAt)] "
|
||||
if(E.isRunning)
|
||||
message += "and is still running."
|
||||
else
|
||||
if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes
|
||||
message += "and ended at [worldtime2text(E.endedAt)]."
|
||||
message += "and ended at [worldtime2stationtime(E.endedAt)]."
|
||||
else
|
||||
message += "and ran to completion."
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
var/next_event_at = max(0, EC.next_event_time - world.time)
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[severity]]</td>"
|
||||
html += "<td>[worldtime2text(max(EC.next_event_time, world.time))]</td>"
|
||||
html += "<td>[worldtime2stationtime(max(EC.next_event_time, world.time))]</td>"
|
||||
html += "<td>[round(next_event_at / 600, 0.1)]</td>"
|
||||
html += "<td>"
|
||||
html += "<A align='right' href='?src=\ref[src];dec_timer=2;event=\ref[EC]'>--</A>"
|
||||
@@ -178,7 +178,7 @@
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[EM.severity]]</td>"
|
||||
html += "<td>[EM.name]</td>"
|
||||
html += "<td>[worldtime2text(ends_at)]</td>"
|
||||
html += "<td>[worldtime2stationtime(ends_at)]</td>"
|
||||
html += "<td>[ends_in]</td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];stop=\ref[E]'>Stop</A></td>"
|
||||
html += "</tr>"
|
||||
|
||||
@@ -15,15 +15,15 @@
|
||||
kill()
|
||||
|
||||
/datum/event/money_hacker/announce()
|
||||
var/message = "A brute force hack has been detected (in progress since [worldtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \
|
||||
var/message = "A brute force hack has been detected (in progress since [stationtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \
|
||||
without intervention this attack will succeed in approximately 10 minutes. Required intervention: temporary suspension of affected accounts until the attack has ceased. \
|
||||
Notifications will be sent as updates occur.<br>"
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
|
||||
|
||||
for(var/obj/machinery/message_server/MS in world)
|
||||
if(!MS.active) continue
|
||||
MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2)
|
||||
|
||||
|
||||
|
||||
/datum/event/money_hacker/tick()
|
||||
if(world.time >= end_time)
|
||||
@@ -51,7 +51,7 @@
|
||||
T.date = pick("", current_date_string, date1, date2)
|
||||
var/time1 = rand(0, 99999999)
|
||||
var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]"
|
||||
T.time = pick("", worldtime2text(), time2)
|
||||
T.time = pick("", stationtime2text(), time2)
|
||||
T.source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD")
|
||||
|
||||
affected_account.transaction_log.Add(T)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
T.purpose = "Winner!"
|
||||
T.amount = winner_sum
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = stationtime2text()
|
||||
T.source_terminal = "Sif TCD Terminal #[rand(111,333)]"
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
var/releaseWhen = 60
|
||||
var/list/area/areas = list() //List of areas to affect. Filled by start()
|
||||
|
||||
|
||||
var/eventDept = "Security" //Department name in announcement
|
||||
var/list/areaName = list("Brig") //Names of areas mentioned in AI and Engineering announcements
|
||||
var/list/areaType = list(/area/security/prison, /area/security/brig) //Area types to include.
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
if(areas && areas.len > 0)
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [worldtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
|
||||
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [stationtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
|
||||
for(var/obj/machinery/message_server/MS in world)
|
||||
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
|
||||
for(var/mob/living/silicon/ai/A in player_list)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
else
|
||||
var/language_type = pick(/datum/language/human,/datum/language/diona,/datum/language/tajaran,/datum/language/unathi)
|
||||
var/datum/language/L = new language_type()
|
||||
var/team = pick("Brickburn Galaxy Trekers","Mars Rovers", "Qerrbalak Saints", "Moghes Rockets", "Ahdomai Lightening", starsys_name+" Vixens", "Euphoric-Earth Alligators")
|
||||
var/team = pick("Brickburn Galaxy Trekers","Mars Rovers", "Qerrbalak Saints", "Moghes Rockets", "Meralar Lightning", starsys_name+" Vixens", "Euphoric-Earth Alligators")
|
||||
P.name = "[L.get_random_name(pick(MALE,FEMALE))], [year - rand(0,50)] [team]"
|
||||
P.card_icon = "spaceball_standard"
|
||||
P.back_icon = "card_back_spaceball"
|
||||
|
||||
@@ -1028,8 +1028,8 @@
|
||||
|
||||
/datum/seed/shand
|
||||
name = "shand"
|
||||
seed_name = "S'randar's hand"
|
||||
display_name = "S'randar's hand leaves"
|
||||
seed_name = "Selem's hand"
|
||||
display_name = "Selem's hand leaves"
|
||||
chems = list("bicaridine" = list(0,10))
|
||||
kitchen_tag = "shand"
|
||||
|
||||
@@ -1048,8 +1048,8 @@
|
||||
|
||||
/datum/seed/mtear
|
||||
name = "mtear"
|
||||
seed_name = "Messa's tear"
|
||||
display_name = "Messa's tear leaves"
|
||||
seed_name = "Malani's tear"
|
||||
display_name = "Malani's tear leaves"
|
||||
chems = list("honey" = list(1,10), "kelotane" = list(3,5))
|
||||
kitchen_tag = "mtear"
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
var/drill_verb = "drilling"
|
||||
sharp = 1
|
||||
|
||||
var/excavation_amount = 100
|
||||
var/excavation_amount = 200
|
||||
|
||||
/obj/item/weapon/pickaxe/hammer
|
||||
name = "sledgehammer"
|
||||
|
||||
@@ -121,6 +121,12 @@ var/list/mining_overlay_cache = list()
|
||||
if(!mining_overlay_cache["rock_side_[place_dir]"])
|
||||
mining_overlay_cache["rock_side_[place_dir]"] = image('icons/turf/walls.dmi', "rock_side", dir = place_dir)
|
||||
T.overlays += mining_overlay_cache["rock_side_[place_dir]"]
|
||||
|
||||
if(archaeo_overlay)
|
||||
overlays += archaeo_overlay
|
||||
|
||||
if(excav_overlay)
|
||||
overlays += excav_overlay
|
||||
else
|
||||
|
||||
name = "sand"
|
||||
@@ -320,13 +326,12 @@ var/list/mining_overlay_cache = list()
|
||||
if (istype(W, /obj/item/device/measuring_tape))
|
||||
var/obj/item/device/measuring_tape/P = W
|
||||
user.visible_message("<span class='notice'>\The [user] extends \a [P] towards \the [src].</span>","<span class='notice'>You extend \the [P] towards \the [src].</span>")
|
||||
if(do_after(user,25))
|
||||
user << "<span class='notice'>\icon[P] [src] has been excavated to a depth of [2*excavation_level]cm.</span>"
|
||||
if(do_after(user, 15))
|
||||
user << "<span class='notice'>\The [src] has been excavated to a depth of [excavation_level]cm.</span>"
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/pickaxe))
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
if(!istype(user.loc, /turf))
|
||||
return
|
||||
|
||||
var/obj/item/weapon/pickaxe/P = W
|
||||
@@ -335,44 +340,37 @@ var/list/mining_overlay_cache = list()
|
||||
last_act = world.time
|
||||
|
||||
playsound(user, P.drill_sound, 20, 1)
|
||||
var/newDepth = excavation_level + P.excavation_amount // Used commonly below
|
||||
|
||||
//handle any archaeological finds we might uncover
|
||||
var/fail_message
|
||||
var/fail_message = ""
|
||||
if(finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
if(excavation_level + P.excavation_amount > F.excavation_required)
|
||||
//Chance to destroy / extract any finds here
|
||||
if(newDepth > F.excavation_required) // Digging too deep can break the item. At least you won't summon a Balrog (probably)
|
||||
fail_message = ". <b>[pick("There is a crunching noise","[W] collides with some different rock","Part of the rock face crumbles away","Something breaks under [W]")]</b>"
|
||||
|
||||
user << "<span class='notice'>You start [P.drill_verb][fail_message ? fail_message : ""].</span>"
|
||||
user << "<span class='notice'>You start [P.drill_verb][fail_message].</span>"
|
||||
|
||||
if(fail_message && prob(90))
|
||||
if(prob(25))
|
||||
excavate_find(5, finds[1])
|
||||
excavate_find(prob(5), finds[1])
|
||||
else if(prob(50))
|
||||
finds.Remove(finds[1])
|
||||
if(prob(50))
|
||||
artifact_debris()
|
||||
|
||||
if(do_after(user,P.digspeed))
|
||||
user << "<span class='notice'>You finish [P.drill_verb] \the [src].</span>"
|
||||
|
||||
if(finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
if(round(excavation_level + P.excavation_amount) == F.excavation_required)
|
||||
//Chance to extract any items here perfectly, otherwise just pull them out along with the rock surrounding them
|
||||
if(excavation_level + P.excavation_amount > F.excavation_required)
|
||||
//if you can get slightly over, perfect extraction
|
||||
excavate_find(100, F)
|
||||
else
|
||||
excavate_find(80, F)
|
||||
if(newDepth == F.excavation_required) // When the pick hits that edge just right, you extract your find perfectly, it's never confined in a rock
|
||||
excavate_find(1, F)
|
||||
else if(newDepth > F.excavation_required - F.clearance_range) // Not quite right but you still extract your find, the closer to the bottom the better, but not above 80%
|
||||
excavate_find(prob(80 * (F.excavation_required - newDepth) / F.clearance_range), F)
|
||||
|
||||
else if(excavation_level + P.excavation_amount > F.excavation_required - F.clearance_range)
|
||||
//just pull the surrounding rock out
|
||||
excavate_find(0, F)
|
||||
user << "<span class='notice'>You finish [P.drill_verb] \the [src].</span>"
|
||||
|
||||
if( excavation_level + P.excavation_amount >= 100 )
|
||||
//if players have been excavating this turf, leave some rocky debris behind
|
||||
if(newDepth >= 200) // This means the rock is mined out fully
|
||||
var/obj/structure/boulder/B
|
||||
if(artifact_find)
|
||||
if( excavation_level > 0 || prob(15) )
|
||||
@@ -382,7 +380,7 @@ var/list/mining_overlay_cache = list()
|
||||
B.artifact_find = artifact_find
|
||||
else
|
||||
artifact_debris(1)
|
||||
else if(prob(15))
|
||||
else if(prob(5))
|
||||
//empty boulder
|
||||
B = new(src)
|
||||
|
||||
@@ -393,36 +391,44 @@ var/list/mining_overlay_cache = list()
|
||||
return
|
||||
|
||||
excavation_level += P.excavation_amount
|
||||
var/updateIcon = 0
|
||||
|
||||
//archaeo overlays
|
||||
if(!archaeo_overlay && finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
if(F.excavation_required <= excavation_level + F.view_range)
|
||||
archaeo_overlay = "overlay_archaeo[rand(1,3)]"
|
||||
overlays += archaeo_overlay
|
||||
updateIcon = 1
|
||||
|
||||
else if(archaeo_overlay && (!finds || !finds.len))
|
||||
archaeo_overlay = null
|
||||
updateIcon = 1
|
||||
|
||||
//there's got to be a better way to do this
|
||||
var/update_excav_overlay = 0
|
||||
if(excavation_level >= 75)
|
||||
if(excavation_level - P.excavation_amount < 75)
|
||||
if(excavation_level >= 150)
|
||||
if(excavation_level - P.excavation_amount < 150)
|
||||
update_excav_overlay = 1
|
||||
else if(excavation_level >= 100)
|
||||
if(excavation_level - P.excavation_amount < 100)
|
||||
update_excav_overlay = 1
|
||||
else if(excavation_level >= 50)
|
||||
if(excavation_level - P.excavation_amount < 50)
|
||||
update_excav_overlay = 1
|
||||
else if(excavation_level >= 25)
|
||||
if(excavation_level - P.excavation_amount < 25)
|
||||
update_excav_overlay = 1
|
||||
|
||||
//update overlays displaying excavation level
|
||||
if( !(excav_overlay && excavation_level > 0) || update_excav_overlay )
|
||||
var/excav_quadrant = round(excavation_level / 25) + 1
|
||||
excav_overlay = "overlay_excv[excav_quadrant]_[rand(1,3)]"
|
||||
overlays += excav_overlay
|
||||
updateIcon = 1
|
||||
|
||||
if(updateIcon)
|
||||
update_icon()
|
||||
|
||||
//drop some rocks
|
||||
next_rock += P.excavation_amount * 10
|
||||
while(next_rock > 100)
|
||||
next_rock -= 100
|
||||
next_rock += P.excavation_amount
|
||||
while(next_rock > 50)
|
||||
next_rock -= 50
|
||||
var/obj/item/weapon/ore/O = new(src)
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
O.geologic_data = geologic_data
|
||||
@@ -481,11 +487,11 @@ var/list/mining_overlay_cache = list()
|
||||
make_floor()
|
||||
update_icon(1)
|
||||
|
||||
/turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F)
|
||||
/turf/simulated/mineral/proc/excavate_find(var/is_clean = 0, var/datum/find/F)
|
||||
//with skill and luck, players can cleanly extract finds
|
||||
//otherwise, they come out inside a chunk of rock
|
||||
var/obj/item/weapon/X
|
||||
if(prob_clean)
|
||||
if(is_clean)
|
||||
X = new /obj/item/weapon/archaeological_find(src, new_item_type = F.find_type)
|
||||
else
|
||||
X = new /obj/item/weapon/ore/strangerock(src, inside_item_type = F.find_type)
|
||||
@@ -503,7 +509,7 @@ var/list/mining_overlay_cache = list()
|
||||
//many finds are ancient and thus very delicate - luckily there is a specialised energy suspension field which protects them when they're being extracted
|
||||
if(prob(F.prob_delicate))
|
||||
var/obj/effect/suspension_field/S = locate() in src
|
||||
if(!S || S.field_type != get_responsive_reagent(F.find_type))
|
||||
if(!S)
|
||||
if(X)
|
||||
visible_message("<span class='danger'>\The [pick("[display_name] crumbles away into dust","[display_name] breaks apart")].</span>")
|
||||
qdel(X)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/weapon/ore
|
||||
name = "rock"
|
||||
name = "small rock"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "ore2"
|
||||
w_class = 2
|
||||
|
||||
@@ -820,16 +820,26 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
|
||||
set category = "Ghost"
|
||||
set name = "Choose Sprite"
|
||||
|
||||
icon = 'icons/mob/ghost.dmi'
|
||||
overlays.Cut()
|
||||
var/choice
|
||||
var/previous_state
|
||||
var/finalized = "No"
|
||||
|
||||
while(finalized == "No" && src.client)
|
||||
|
||||
choice = input(usr,"What would you like to use for your ghost sprite?") as null|anything in possible_ghost_sprites
|
||||
if(!choice) return
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
icon_state = possible_ghost_sprites[choice]
|
||||
finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes")
|
||||
if(choice)
|
||||
icon = 'icons/mob/ghost.dmi'
|
||||
overlays.Cut()
|
||||
|
||||
ghost_sprite = possible_ghost_sprites[choice]
|
||||
if(icon_state && icon)
|
||||
previous_state = icon_state
|
||||
|
||||
icon_state = possible_ghost_sprites[choice]
|
||||
finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes")
|
||||
|
||||
ghost_sprite = possible_ghost_sprites[choice]
|
||||
|
||||
if(finalized == "No")
|
||||
icon_state = previous_state
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
healths.icon_state = "health6"
|
||||
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [worldtime2text()]", 0)
|
||||
if(mind) mind.store_memory("Time of death: [stationtime2text()]", 0)
|
||||
living_mob_list -= src
|
||||
dead_mob_list |= src
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(speaker == src)
|
||||
src << "<span class='warning'>You cannot hear yourself speak!</span>"
|
||||
else
|
||||
src << "<span class='name'>[speaker_name]</span>[alt_name] talks but you cannot hear \him."
|
||||
src << "<span class='name'>[speaker_name]</span>[alt_name] talks but you cannot hear."
|
||||
else
|
||||
if(language)
|
||||
on_hear_say("<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track][language.format_message(message, verb)]</span>")
|
||||
@@ -194,7 +194,7 @@
|
||||
on_hear_radio(part_a, speaker_name, track, part_b, formatted)
|
||||
|
||||
/proc/say_timestamp()
|
||||
return "<span class='say_quote'>\[[worldtime2text()]\]</span>"
|
||||
return "<span class='say_quote'>\[[stationtime2text()]\]</span>"
|
||||
|
||||
/mob/proc/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
|
||||
src << "[part_a][speaker_name][part_b][formatted]"
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
flags = WHITELISTED
|
||||
space_chance = 40
|
||||
syllables = list(
|
||||
"za", "az", "ze", "ez", "zi", "iz", "zo", "oz", "zu", "uz", "zs", "sz",
|
||||
"ha", "ah", "he", "eh", "hi", "ih", "ho", "oh", "hu", "uh", "hs", "sh",
|
||||
"la", "al", "le", "el", "li", "il", "lo", "ol", "lu", "ul", "ls", "sl",
|
||||
"ka", "ak", "ke", "ek", "ki", "ik", "ko", "ok", "ku", "uk", "ks", "sk",
|
||||
"sa", "as", "se", "es", "si", "is", "so", "os", "su", "us", "ss", "ss",
|
||||
"ra", "ar", "re", "er", "ri", "ir", "ro", "or", "ru", "ur", "rs", "sr",
|
||||
"a", "a", "e", "e", "i", "i", "o", "o", "u", "u", "s", "s"
|
||||
"za", "az", "ze", "ez", "zi", "iz", "zo", "oz", "zu", "uz", "zs", "sz",
|
||||
"ha", "ah", "he", "eh", "hi", "ih", "ho", "oh", "hu", "uh", "hs", "sh",
|
||||
"la", "al", "le", "el", "li", "il", "lo", "ol", "lu", "ul", "ls", "sl",
|
||||
"ka", "ak", "ke", "ek", "ki", "ik", "ko", "ok", "ku", "uk", "ks", "sk",
|
||||
"sa", "as", "se", "es", "si", "is", "so", "os", "su", "us", "ss", "ss",
|
||||
"ra", "ar", "re", "er", "ri", "ir", "ro", "or", "ru", "ur", "rs", "sr",
|
||||
"a", "a", "e", "e", "i", "i", "o", "o", "u", "u", "s", "s"
|
||||
)
|
||||
|
||||
/datum/language/unathi/get_random_name()
|
||||
@@ -42,8 +42,8 @@
|
||||
return capitalize(new_name)
|
||||
|
||||
/datum/language/tajaran
|
||||
name = "Siik'tajr"
|
||||
desc = "The traditionally employed tongue of Ahdomai, composed of expressive yowls and chirps. Native to the Tajaran."
|
||||
name = "Siik"
|
||||
desc = "The most prevalant language of Meralar, composed of expressive yowls and chirps. Native to the Tajaran."
|
||||
speech_verb = "mrowls"
|
||||
ask_verb = "mrowls"
|
||||
exclaim_verb = "yowls"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
autohiss_basic_map = list(
|
||||
"r" = list("rr", "rrr", "rrrr")
|
||||
)
|
||||
autohiss_exempt = list("Siik'tajr")
|
||||
autohiss_exempt = list("Siik")
|
||||
|
||||
|
||||
/datum/species/proc/handle_autohiss(message, datum/language/lang, mode)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Cleanbot"
|
||||
desc = "A little cleaning robot, he looks so excited!"
|
||||
icon_state = "cleanbot0"
|
||||
req_access = list(access_janitor)
|
||||
req_one_access = list(access_robotics, access_janitor)
|
||||
botcard_access = list(access_janitor, access_maint_tunnels)
|
||||
|
||||
locked = 0 // Start unlocked so roboticist can set them to patrol.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
icon_state = "farmbot0"
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
req_access = list(access_hydroponics)
|
||||
req_one_access = list(access_robotics, access_hydroponics)
|
||||
|
||||
var/action = "" // Used to update icon
|
||||
var/waters_trays = 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Floorbot"
|
||||
desc = "A little floor repairing robot, he looks so excited!"
|
||||
icon_state = "floorbot0"
|
||||
req_access = list(access_construction)
|
||||
req_one_access = list(access_robotics, access_construction)
|
||||
wait_if_pulled = 1
|
||||
min_target_dist = 0
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Medbot"
|
||||
desc = "A little medical robot. He looks somewhat underwhelmed."
|
||||
icon_state = "medibot0"
|
||||
req_access = list(access_medical)
|
||||
req_one_access = list(access_robotics, access_medical)
|
||||
botcard_access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
|
||||
|
||||
var/skin = null //Set to "tox", "ointment" or "o2" for the other two firstaid kits.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user