Merge branch 'master' of https://github.com/PolarisSS13/Polaris into framecleanup2

This commit is contained in:
SinTwo
2016-08-23 18:33:51 -04:00
261 changed files with 3736 additions and 3657 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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)

View File

@@ -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()

View File

@@ -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"

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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]")

View File

@@ -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")

View File

@@ -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]

View File

@@ -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));

View File

@@ -1,3 +1,5 @@
//TODO: Make this match current lore
//S'randarr
/datum/locations/s_randarr

View File

@@ -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

View File

@@ -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.

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -1,8 +1,13 @@
#define ALL_SPELLS "All"
#define OFFENSIVE_SPELLS "Offensive"
#define DEFENSIVE_SPELLS "Defensive"
#define UTILITY_SPELLS "Utility"
#define SUPPORT_SPELLS "Support"
var/list/all_technomancer_spells = typesof(/datum/technomancer/spell) - /datum/technomancer/spell
var/list/all_technomancer_equipment = typesof(/datum/technomancer/equipment) - /datum/technomancer/equipment
var/list/all_technomancer_consumables = typesof(/datum/technomancer/consumable) - /datum/technomancer/consumable
var/list/all_technomancer_assistance = typesof(/datum/technomancer/assistance) - /datum/technomancer/assistance
var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datum/technomancer/presets
/datum/technomancer
var/name = "technomancer thing"
@@ -13,6 +18,9 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
var/obj_path = null
var/ability_icon_state = null
/datum/technomancer/spell
var/category = ALL_SPELLS
/obj/item/weapon/technomancer_catalog
name = "catalog"
desc = "A \"book\" featuring a holographic display, metal cover, and miniaturized teleportation device, allowing the user to \
@@ -27,8 +35,8 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
var/list/equipment_instances = list()
var/list/consumable_instances = list()
var/list/assistance_instances = list()
var/list/preset_instances = list()
var/tab = 0
var/spell_tab = ALL_SPELLS
var/show_scepter_text = 0
/obj/item/weapon/technomancer_catalog/apprentice
@@ -72,15 +80,23 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
if(!assistance_instances.len)
for(var/A in all_technomancer_assistance)
assistance_instances += new A()
if(!preset_instances.len)
for(var/P in all_technomancer_presets)
preset_instances += new P()
/obj/item/weapon/technomancer_catalog/apprentice/set_up()
..()
for(var/datum/technomancer/assistance/apprentice/A in assistance_instances)
assistance_instances.Remove(A)
// Proc: show_categories()
// Parameters: 1 (category - the category link to display)
// Description: Shows an href link to go to a spell subcategory if the category is not already selected, otherwise is bold, to reduce
// code duplicating.
/obj/item/weapon/technomancer_catalog/proc/show_categories(var/category)
if(category)
if(spell_tab != category)
return "<a href='byond://?src=\ref[src];spell_category=[category]'>[category]</a>"
else
return "<b>[category]</b>"
// Proc: attack_self()
// Parameters: 1 (user - the mob clicking on the catelog)
// Description: Shows an HTML window, to buy equipment and spells, if the user is the legitimate owner. Otherwise it cannot be used.
@@ -100,13 +116,17 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
dat += "<align='center'><b>Functions</b> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=1'>Equipment</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=2'>Consumables</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=3'>Assistance</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=4'>Presets</a></align><br>"
dat += "<a href='byond://?src=\ref[src];tab_choice=3'>Assistance</a></align><br>"
dat += "You currently have a budget of <b>[budget]/[max_budget]</b>.<br><br>"
dat += "<a href='byond://?src=\ref[src];refund_functions=1'>Refund Functions</a><br><br>"
for(var/datum/technomancer/spell in spell_instances)
dat += "[show_categories(ALL_SPELLS)] | [show_categories(OFFENSIVE_SPELLS)] | [show_categories(DEFENSIVE_SPELLS)] | \
[show_categories(UTILITY_SPELLS)] | [show_categories(SUPPORT_SPELLS)]<br>"
for(var/datum/technomancer/spell/spell in spell_instances)
if(spell.hidden)
continue
if(spell_tab != ALL_SPELLS && spell.category != spell_tab)
continue
dat += "<b>[spell.name]</b><br>"
dat += "<i>[spell.desc]</i><br>"
if(show_scepter_text)
@@ -123,8 +143,7 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
dat += "<align='center'><a href='byond://?src=\ref[src];tab_choice=0'>Functions</a> | "
dat += "<b>Equipment</b> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=2'>Consumables</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=3'>Assistance</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=4'>Presets</a></align><br>"
dat += "<a href='byond://?src=\ref[src];tab_choice=3'>Assistance</a></align><br>"
dat += "You currently have a budget of <b>[budget]/[max_budget]</b>.<br><br>"
for(var/datum/technomancer/equipment/E in equipment_instances)
dat += "<b>[E.name]</b><br>"
@@ -141,8 +160,7 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
dat += "<align='center'><a href='byond://?src=\ref[src];tab_choice=0'>Functions</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=1'>Equipment</a> | "
dat += "<b>Consumables</b> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=3'>Assistance</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=4'>Presets</a></align><br>"
dat += "<a href='byond://?src=\ref[src];tab_choice=3'>Assistance</a></align><br>"
dat += "You currently have a budget of <b>[budget]/[max_budget]</b>.<br><br>"
for(var/datum/technomancer/consumable/C in consumable_instances)
dat += "<b>[C.name]</b><br>"
@@ -159,8 +177,7 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
dat += "<align='center'><a href='byond://?src=\ref[src];tab_choice=0'>Functions</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=1'>Equipment</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=2'>Consumables</a> | "
dat += "<b>Assistance</b> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=4'>Presets</a></align><br>"
dat += "<b>Assistance</b></align><br>"
dat += "You currently have a budget of <b>[budget]/[max_budget]</b>.<br><br>"
for(var/datum/technomancer/assistance/A in assistance_instances)
dat += "<b>[A.name]</b><br>"
@@ -171,24 +188,6 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
dat += "<font color='red'><b>Cannot afford!</b></font><br><br>"
user << browse(dat, "window=radio")
onclose(user, "radio")
if(4) //Presets
var/dat = ""
user.set_machine(src)
dat += "<align='center'><a href='byond://?src=\ref[src];tab_choice=0'>Functions</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=1'>Equipment</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=2'>Consumables</a> | "
dat += "<a href='byond://?src=\ref[src];tab_choice=3'>Assistance</a> | "
dat += "<b>Presets</b></align><br>"
dat += "You currently have a budget of <b>[budget]/[max_budget]</b>.<br><br>"
for(var/datum/technomancer/presets/P in preset_instances)
dat += "<b>[P.name]</b><br>"
dat += "<i>[P.desc]</i><br>"
if(P.cost <= budget)
dat += "<a href='byond://?src=\ref[src];spell_choice=[P.name]'>Purchase</a> ([P.cost])<br><br>"
else
dat += "<font color='red'><b>Cannot afford!</b></font><br><br>"
user << browse(dat, "window=radio")
onclose(user, "radio")
// Proc: Topic()
// Parameters: 2 (href - don't know, href_list - the choice that the person using the interface above clicked on.)
@@ -210,6 +209,8 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
H.set_machine(src)
if(href_list["tab_choice"])
tab = text2num(href_list["tab_choice"])
if(href_list["spell_category"])
spell_tab = href_list["spell_category"]
if(href_list["spell_choice"])
var/datum/technomancer/new_spell = null
//Locate the spell.
@@ -269,4 +270,4 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu
budget += spell_datum.cost
core.remove_spell(spell)
break
attack_self(H)
attack_self(H)

View File

@@ -212,4 +212,4 @@
outgoing_instability = outgoing_instability * armor_factor
H.adjust_instability(outgoing_instability)
set_light(distance, distance, l_color = "#C26DDE")
set_light(distance, distance * 2, l_color = "#C26DDE")

View File

@@ -4,6 +4,7 @@
far away from the caster. Failing that, it may inhibit those entities in some form."
cost = 40
obj_path = /obj/item/weapon/spell/abjuration
category = UTILITY_SPELLS
/obj/item/weapon/spell/abjuration
name = "abjuration"

View File

@@ -4,6 +4,7 @@
will grab them automatically."
cost = 50
obj_path = /obj/item/weapon/spell/apportation
category = UTILITY_SPELLS
/obj/item/weapon/spell/apportation
name = "apportation"

View File

@@ -6,6 +6,7 @@
cost = 150
obj_path = /obj/item/weapon/spell/audible_deception
ability_icon_state = "tech_audibledeception"
category = UTILITY_SPELLS
/obj/item/weapon/spell/audible_deception
name = "audible deception"

View File

@@ -4,6 +4,7 @@
cost = 150
obj_path = /obj/item/weapon/spell/aura/biomed
ability_icon_state = "tech_biomedaura"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/aura/biomed
name = "restoration aura"

View File

@@ -7,6 +7,7 @@
cost = 150
obj_path = /obj/item/weapon/spell/aura/fire
ability_icon_state = "tech_fireaura"
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/aura/fire
name = "Fire Storm"
@@ -20,7 +21,6 @@
qdel(src)
var/list/nearby_things = range(4,owner)
var/fire_prob = 10
var/temp_change = 25
var/temp_cap = 500
var/fire_power = 2
@@ -28,7 +28,6 @@
if(check_for_scepter())
temp_change = 50
temp_cap = 700
fire_prob = 25
fire_power = 4
for(var/mob/living/carbon/human/H in nearby_things)
if(is_ally(H))
@@ -41,16 +40,11 @@
turf_check:
for(var/turf/simulated/T in nearby_things)
if(prob(fire_prob))
if(prob(30))
for(var/mob/living/carbon/human/H in T)
if(is_ally(H))
continue turf_check
T.hotspot_expose(1000, 50, 1)
T.create_fire(fire_power)
// //We use hotspot_expose() to allow firesuits to protect from this aura.
// var/turf/location = get_turf(H)
// location.hotspot_expose(1000, 50, 1)
owner.adjust_instability(1)

View File

@@ -6,6 +6,7 @@
cost = 150
obj_path = /obj/item/weapon/spell/aura/frost
ability_icon_state = "tech_frostaura"
category = DEFENSIVE_SPELLS // Scepter-less frost aura is nonlethal.
/obj/item/weapon/spell/aura/frost
name = "chilling aura"
@@ -35,8 +36,4 @@
var/cold_factor = abs(protection - 1)
H.bodytemperature = max( (H.bodytemperature - temp_change) * cold_factor, temp_cap)
// //We use hotspot_expose() to allow firesuits to protect from this aura.
// var/turf/location = get_turf(H)
// location.hotspot_expose(1, 50, 1)
owner.adjust_instability(1)

View File

@@ -4,6 +4,7 @@
cost = 150
obj_path = /obj/item/weapon/spell/aura/shock
ability_icon_state = "tech_shockaura"
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/aura/shock
name = "electric aura"

View File

@@ -5,6 +5,7 @@
cost = 150
obj_path = /obj/item/weapon/spell/aura/unstable
ability_icon_state = "tech_unstableaura"
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/aura/unstable
name = "degen aura"

View File

@@ -5,6 +5,7 @@
enhancement_desc = "Blink distance is increased greatly."
cost = 100
obj_path = /obj/item/weapon/spell/blink
category = UTILITY_SPELLS
/obj/item/weapon/spell/blink
name = "blink"

View File

@@ -4,6 +4,7 @@
useful to trick someone into believing you're casting a different spell, or perhaps just for fun."
cost = 25
obj_path = /obj/item/weapon/spell/chroma
category = UTILITY_SPELLS
/obj/item/weapon/spell/chroma
name = "chroma"

View File

@@ -5,6 +5,7 @@
ability_icon_state = "tech_condensation"
cost = 50
obj_path = /obj/item/weapon/spell/condensation
category = UTILITY_SPELLS
/obj/item/weapon/spell/condensation
name = "condensation"

View File

@@ -7,6 +7,7 @@
around the entity is merely a hologram used to allow the user to know if the creature is safe or not."
cost = 200
obj_path = /obj/item/weapon/spell/control
category = UTILITY_SPELLS
/mob/living/carbon/human/proc/technomancer_control()
place_spell_in_hand(/obj/item/weapon/spell/control)

View File

@@ -6,6 +6,7 @@
cost = 25
obj_path = /obj/item/weapon/spell/dispel
ability_icon_state = "tech_dispel"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/dispel
name = "dispel"

View File

@@ -7,6 +7,7 @@
cost = 150
obj_path = /obj/item/weapon/spell/energy_siphon
ability_icon_state = "tech_energysiphon"
category = UTILITY_SPELLS
/obj/item/weapon/spell/energy_siphon
name = "energy siphon"

View File

@@ -4,6 +4,7 @@
cost = 100
obj_path = /obj/item/weapon/spell/flame_tongue
ability_icon_state = "tech_flametongue"
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/flame_tongue
name = "flame tongue"

View File

@@ -4,6 +4,7 @@
ability_icon_state = "tech_gambit"
cost = 50
obj_path = /obj/item/weapon/spell/gambit
category = UTILITY_SPELLS
/var/global/list/all_technomancer_gambit_spells = typesof(/obj/item/weapon/spell) - list(
/obj/item/weapon/spell,

View File

@@ -5,6 +5,7 @@
cost = 100
obj_path = /obj/item/weapon/spell/illusion
ability_icon_state = "tech_illusion"
category = UTILITY_SPELLS
/obj/item/weapon/spell/illusion
name = "illusion"

View File

@@ -5,6 +5,7 @@
cost = 100
obj_path = /obj/item/weapon/spell/insert/corona
ability_icon_state = "tech_corona"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/insert/corona
name = "corona"

View File

@@ -1,10 +1,11 @@
/datum/technomancer/spell/haste
name = "Haste"
desc = "Allows the target to run at speeds that should not be possible for an ordinary being. For three seconds, the target \
desc = "Allows the target to run at speeds that should not be possible for an ordinary being. For five seconds, the target \
runs extremly fast, and cannot be slowed by any means."
cost = 100
obj_path = /obj/item/weapon/spell/insert/haste
ability_icon_state = "tech_haste"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/insert/haste
name = "haste"
@@ -22,7 +23,7 @@
L.force_max_speed = 1
L << "<span class='notice'>You suddenly find it much easier to move.</span>"
L.adjust_instability(10)
spawn(3 SECONDS)
spawn(5 SECONDS)
if(src)
on_expire()

View File

@@ -5,6 +5,7 @@
cost = 50
obj_path = /obj/item/weapon/spell/insert/mend_burns
ability_icon_state = "tech_mendburns"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/insert/mend_burns
name = "mend burns"
@@ -19,10 +20,10 @@
spawn(1)
if(ishuman(host))
var/mob/living/carbon/human/H = host
for(var/i = 0, i<25,i++)
for(var/i = 0, i<5,i++)
if(H)
H.adjustFireLoss(-1)
H.adjust_instability(0.5)
origin.adjust_instability(0.5)
H.adjustFireLoss(-5)
H.adjust_instability(2.5)
origin.adjust_instability(2.5)
sleep(10)
on_expire()

View File

@@ -4,6 +4,7 @@
cost = 50
obj_path = /obj/item/weapon/spell/insert/mend_metal
ability_icon_state = "tech_mendwounds"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/insert/mend_metal
name = "mend metal"
@@ -18,14 +19,14 @@
spawn(1)
if(ishuman(host))
var/mob/living/carbon/human/H = host
for(var/i = 0, i<25,i++)
for(var/i = 0, i<5,i++)
if(H)
for(var/obj/item/organ/external/O in H.organs)
if(O.robotic < ORGAN_ROBOT) // Robot parts only.
continue
O.heal_damage(1, 0, internal = 1, robo_repair = 1)
O.heal_damage(5, 0, internal = 1, robo_repair = 1)
H.adjust_instability(0.5)
origin.adjust_instability(0.5)
sleep(10)
H.adjust_instability(2.5)
origin.adjust_instability(2.5)
sleep(1 SECOND)
on_expire()

View File

@@ -5,6 +5,7 @@
cost = 75
obj_path = /obj/item/weapon/spell/insert/mend_organs
ability_icon_state = "tech_mendwounds"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/insert/mend_organs
name = "mend organs"
@@ -19,13 +20,13 @@
spawn(1)
if(ishuman(host))
var/mob/living/carbon/human/H = host
for(var/i = 0, i<25,i++)
for(var/i = 0, i<5,i++)
if(H)
for(var/obj/item/organ/O in H.internal_organs)
if(O.damage > 0)
O.damage = max(O.damage - 0.2, 0)
O.damage = max(O.damage - 1, 0)
H.adjust_instability(0.5)
origin.adjust_instability(0.5)
sleep(10)
H.adjust_instability(2.5)
origin.adjust_instability(2.5)
sleep(1 SECOND)
on_expire()

View File

@@ -5,6 +5,7 @@
cost = 50
obj_path = /obj/item/weapon/spell/insert/mend_wires
ability_icon_state = "tech_mendwounds"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/insert/mend_wires
name = "mend wires"
@@ -19,14 +20,14 @@
spawn(1)
if(ishuman(host))
var/mob/living/carbon/human/H = host
for(var/i = 0, i<25,i++)
for(var/i = 0, i<5,i++)
if(H)
for(var/obj/item/organ/external/O in H.organs)
if(O.robotic < ORGAN_ROBOT) // Robot parts only.
continue
O.heal_damage(0, 1, internal = 1, robo_repair = 1)
O.heal_damage(0, 5, internal = 1, robo_repair = 1)
H.adjust_instability(0.5)
origin.adjust_instability(0.5)
H.adjust_instability(2.5)
origin.adjust_instability(2.5)
sleep(10)
on_expire()

View File

@@ -5,6 +5,7 @@
cost = 50
obj_path = /obj/item/weapon/spell/insert/mend_wounds
ability_icon_state = "tech_mendwounds"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/insert/mend_wounds
name = "mend wounds"
@@ -19,10 +20,10 @@
spawn(1)
if(ishuman(host))
var/mob/living/carbon/human/H = host
for(var/i = 0, i<25,i++)
for(var/i = 0, i<5,i++)
if(H)
H.adjustBruteLoss(-1)
H.adjust_instability(0.5)
origin.adjust_instability(0.5)
sleep(10)
H.adjustBruteLoss(-5)
H.adjust_instability(2.5)
origin.adjust_instability(2.5)
sleep(1 SECOND)
on_expire()

View File

@@ -1,10 +1,11 @@
/datum/technomancer/spell/purify
name = "Purify"
desc = "Clenses the body of harmful impurities, such as toxins, radiation, viruses, and such. \
desc = "Clenses the body of harmful impurities, such as toxins, radiation, viruses, genetic damage, and such. \
Instability is split between the target and technomancer, if seperate."
cost = 25
obj_path = /obj/item/weapon/spell/insert/purify
ability_icon_state = "tech_purify"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/insert/purify
name = "purify"
@@ -23,12 +24,12 @@
H.disabilities = 0
// for(var/datum/disease/D in H.viruses)
// D.cure()
for(var/i = 0, i<25,i++)
for(var/i = 0, i<5,i++)
if(H)
H.adjustToxLoss(-1)
H.adjustCloneLoss(-1)
H.radiation = max(host.radiation - 2, 0)
H.adjust_instability(0.5)
origin.adjust_instability(0.5)
sleep(10)
H.adjustToxLoss(-5)
H.adjustCloneLoss(-5)
H.radiation = max(host.radiation - 10, 0)
H.adjust_instability(2.5)
origin.adjust_instability(2.5)
sleep(1 SECOND)
on_expire()

View File

@@ -1,10 +1,11 @@
/datum/technomancer/spell/repel_missiles
name = "Repel Missiles"
desc = "Places a repulsion field around you, which attempts to deflect incoming bullets and lasers, making them 30% less likely \
to hit you. The field lasts for two minutes and can be granted to yourself or an ally."
to hit you. The field lasts for five minutes and can be granted to yourself or an ally."
cost = 60
obj_path = /obj/item/weapon/spell/insert/repel_missiles
ability_icon_state = "tech_repelmissiles"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/insert/repel_missiles
name = "repel missiles"
@@ -21,7 +22,7 @@
var/mob/living/L = host
L.evasion += 2
L << "<span class='notice'>You have a repulsion field around you, which will attempt to deflect projectiles.</span>"
spawn(2 MINUTES)
spawn(5 MINUTES)
if(src)
on_expire()

View File

@@ -5,6 +5,7 @@
cost = 120
obj_path = /obj/item/weapon/spell/instability_tap
ability_icon_state = "tech_instabilitytap"
category = UTILITY_SPELLS
/obj/item/weapon/spell/instability_tap
name = "instability tap"

View File

@@ -6,6 +6,7 @@
cost = 50
obj_path = /obj/item/weapon/spell/mark
ability_icon_state = "tech_mark"
category = UTILITY_SPELLS
//The object to teleport to when Recall is used.
/obj/effect/mark_spell
@@ -52,6 +53,7 @@
cost = 50
obj_path = /obj/item/weapon/spell/recall
ability_icon_state = "tech_recall"
category = UTILITY_SPELLS
/obj/item/weapon/spell/recall
name = "recall"

View File

@@ -5,6 +5,7 @@
cost = 70
obj_path = /obj/item/weapon/spell/oxygenate
ability_icon_state = "oxygenate"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/oxygenate
name = "oxygenate"

View File

@@ -6,6 +6,7 @@
cost = 100
obj_path = /obj/item/weapon/spell/passwall
ability_icon_state = "tech_passwall"
category = UTILITY_SPELLS
/obj/item/weapon/spell/passwall
name = "passwall"
@@ -21,53 +22,55 @@
if(!allowed_to_teleport())
user << "<span class='warning'>You can't teleport here!</span>"
return 0
if(isturf(hit_atom))
var/turf/T = hit_atom //Turf we touched.
var/turf/our_turf = get_turf(user) //Where we are.
if(!T.density)
user << "<span class='warning'>Perhaps you should try using passWALL on a wall.</span>"
// if(isturf(hit_atom))
var/turf/T = get_turf(hit_atom) //Turf we touched.
var/turf/our_turf = get_turf(user) //Where we are.
if(!T.density)
if(!T.check_density())
user << "<span class='warning'>Perhaps you should try using passWALL on a wall, or other solid object.</span>"
return 0
var/direction = get_dir(our_turf, T)
var/total_cost = 0
var/turf/checked_turf = T //Turf we're currently checking for density in the loop below.
var/turf/found_turf = null //Our destination, if one is found.
var/i = maximum_distance
var/direction = get_dir(our_turf, T)
var/total_cost = 0
var/turf/checked_turf = T //Turf we're currently checking for density in the loop below.
var/turf/found_turf = null //Our destination, if one is found.
var/i = maximum_distance
visible_message("<span class='info'>[user] rests a hand on \the [T].</span>")
busy = 1
visible_message("<span class='info'>[user] rests a hand on \the [hit_atom].</span>")
busy = 1
var/datum/effect/effect/system/spark_spread/spark_system = PoolOrNew(/datum/effect/effect/system/spark_spread)
spark_system.set_up(5, 0, our_turf)
var/datum/effect/effect/system/spark_spread/spark_system = PoolOrNew(/datum/effect/effect/system/spark_spread)
spark_system.set_up(5, 0, our_turf)
while(i)
checked_turf = get_step(checked_turf, direction) //Advance in the given direction
total_cost += check_for_scepter() ? 400 : 800 //Phasing through matter's expensive, you know.
i--
if(!checked_turf.density) //If we found a destination (a non-dense turf), then we can stop.
var/dense_objs_on_turf = 0
for(var/atom/movable/stuff in checked_turf.contents) //Make sure nothing dense is where we want to go, like an airlock or window.
if(stuff.density)
dense_objs_on_turf = 1
while(i)
checked_turf = get_step(checked_turf, direction) //Advance in the given direction
total_cost += check_for_scepter() ? 400 : 800 //Phasing through matter's expensive, you know.
i--
if(!checked_turf.density) //If we found a destination (a non-dense turf), then we can stop.
var/dense_objs_on_turf = 0
for(var/atom/movable/stuff in checked_turf.contents) //Make sure nothing dense is where we want to go, like an airlock or window.
if(stuff.density)
dense_objs_on_turf = 1
if(!dense_objs_on_turf) //If we found a non-dense turf with nothing dense on it, then that's our destination.
found_turf = checked_turf
break
sleep(10)
if(!dense_objs_on_turf) //If we found a non-dense turf with nothing dense on it, then that's our destination.
found_turf = checked_turf
break
sleep(10)
if(found_turf)
if(user.loc != our_turf)
user << "<span class='warning'>You need to stand still in order to phase through the wall.</span>"
return 0
if(pay_energy(total_cost) && !user.incapacitated() )
visible_message("<span class='warning'>[user] appears to phase through \the [T]!</span>")
user << "<span class='info'>You find a destination on the other side of \the [T], and phase through it.</span>"
spark_system.start()
user.forceMove(found_turf)
qdel(src)
return 1
else
user << "<span class='warning'>You don't have enough energy to phase through these walls!</span>"
busy = 0
if(found_turf)
if(user.loc != our_turf)
user << "<span class='warning'>You need to stand still in order to phase through \the [hit_atom].</span>"
return 0
if(pay_energy(total_cost) && !user.incapacitated() )
visible_message("<span class='warning'>[user] appears to phase through \the [hit_atom]!</span>")
user << "<span class='info'>You find a destination on the other side of \the [hit_atom], and phase through it.</span>"
spark_system.start()
user.forceMove(found_turf)
qdel(src)
return 1
else
user << "<span class='info'>You weren't able to find an open space to go to.</span>"
user << "<span class='warning'>You don't have enough energy to phase through these walls!</span>"
busy = 0
else
user << "<span class='info'>You weren't able to find an open space to go to.</span>"
busy = 0

View File

@@ -4,6 +4,7 @@
draining your powercell."
cost = 80
obj_path = /obj/item/weapon/spell/phase_shift
category = DEFENSIVE_SPELLS
/obj/item/weapon/spell/phase_shift
name = "phase shift"

View File

@@ -4,6 +4,7 @@
cost = 150
ability_icon_state = "tech_beam"
obj_path = /obj/item/weapon/spell/projectile/beam
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/projectile/beam
name = "beam"
@@ -12,12 +13,13 @@
cast_methods = CAST_RANGED
aspect = ASPECT_LIGHT
spell_projectile = /obj/item/projectile/beam/blue
energy_cost_per_shot = 500
energy_cost_per_shot = 400
instability_per_shot = 3
cooldown = 10
fire_sound = 'sound/weapons/Laser.ogg'
/obj/item/projectile/beam/blue
damage = 20
damage = 30
muzzle_type = /obj/effect/projectile/laser_blue/muzzle
tracer_type = /obj/effect/projectile/laser_blue/tracer

View File

@@ -5,6 +5,7 @@
strike up to four targets, including yourself if conditions allow it to occur."
cost = 150
obj_path = /obj/item/weapon/spell/projectile/chain_lightning
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/projectile/chain_lightning
name = "chain lightning"
@@ -16,6 +17,7 @@
energy_cost_per_shot = 3000
instability_per_shot = 10
cooldown = 20
fire_sound = 'sound/weapons/gauss_shoot.ogg'
/obj/item/projectile/beam/chain_lightning
name = "lightning"

View File

@@ -4,6 +4,7 @@
that armor designed to protect from blunt force will mitigate this function as well."
cost = 100
obj_path = /obj/item/weapon/spell/projectile/force_missile
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/projectile/force_missile
name = "force missile"
@@ -12,13 +13,14 @@
cast_methods = CAST_RANGED
aspect = ASPECT_FORCE
spell_projectile = /obj/item/projectile/force_missile
energy_cost_per_shot = 400
energy_cost_per_shot = 300
instability_per_shot = 2
cooldown = 10
cooldown = 5
fire_sound = 'sound/weapons/wave.ogg'
/obj/item/projectile/force_missile
name = "force missile"
icon_state = "force_missile"
damage = 20
damage = 25
damage_type = BRUTE
check_armour = "melee"

View File

@@ -5,6 +5,7 @@
strike."
cost = 150
obj_path = /obj/item/weapon/spell/projectile/lightning
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/projectile/lightning
name = "lightning strike"
@@ -16,7 +17,8 @@
energy_cost_per_shot = 2500
instability_per_shot = 10
cooldown = 20
pre_shot_delay = 20
pre_shot_delay = 10
fire_sound = 'sound/weapons/gauss_shoot.ogg'
/obj/item/projectile/beam/lightning
name = "lightning"

View File

@@ -4,6 +4,7 @@
This energy pierces all known armor."
cost = 150
obj_path = /obj/item/weapon/spell/projectile/overload
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/projectile/overload
name = "overload"
@@ -13,9 +14,10 @@
aspect = ASPECT_UNSTABLE
spell_projectile = /obj/item/projectile/overload
energy_cost_per_shot = 0 // Handled later
instability_per_shot = 15
instability_per_shot = 12
cooldown = 10
pre_shot_delay = 4
fire_sound = 'sound/effects/supermatter.ogg'
/obj/item/projectile/overload
name = "overloaded bolt"
@@ -25,15 +27,15 @@
armor_penetration = 100
/obj/item/weapon/spell/projectile/overload/on_ranged_cast(atom/hit_atom, mob/living/user)
energy_cost_per_shot = round(core.max_energy * 0.15)
energy_cost_per_shot = round(core.max_energy * 0.10)
var/energy_before_firing = core.energy
if(set_up(hit_atom, user))
var/obj/item/projectile/overload/P = new spell_projectile(get_turf(user))
P.launch(hit_atom)
if(check_for_scepter())
P.damage = round(energy_before_firing * 0.003) // 3% of their current energy pool.
P.damage = round(energy_before_firing * 0.004) // 4% of their current energy pool.
else
P.damage = round(energy_before_firing * 0.002) // 2% of their current energy pool.
P.damage = round(energy_before_firing * 0.003) // 3% of their current energy pool.
owner.adjust_instability(instability_per_shot)
return 1

View File

@@ -7,12 +7,15 @@
var/energy_cost_per_shot = 0
var/instability_per_shot = 0
var/pre_shot_delay = 0
var/fire_sound = null
/obj/item/weapon/spell/projectile/on_ranged_cast(atom/hit_atom, mob/living/user)
var/turf/T = get_turf(hit_atom)
if(set_up(hit_atom, user))
var/obj/item/projectile/new_projectile = new spell_projectile(get_turf(user))
new_projectile.launch(T)
if(fire_sound)
playsound(get_turf(src), fire_sound, 75, 1)
owner.adjust_instability(instability_per_shot)
return 1
return 0
@@ -23,7 +26,7 @@
if(pre_shot_delay)
var/image/target_image = image(icon = 'icons/obj/spells.dmi', loc = get_turf(hit_atom), icon_state = "target")
user << target_image
user.Stun(pre_shot_delay)
user.Stun(pre_shot_delay / 10)
sleep(pre_shot_delay)
qdel(target_image)
return 1

View File

@@ -3,6 +3,7 @@
desc = "Causes you to be very radiant, glowing brightly in visible light, thermal energy, and deadly ionizing radiation."
cost = 180
obj_path = /obj/item/weapon/spell/radiance
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/radiance
name = "radiance"

View File

@@ -4,6 +4,7 @@
cost = 120
obj_path = /obj/item/weapon/spell/reflect
ability_icon_state = "tech_reflect"
category = DEFENSIVE_SPELLS
/obj/item/weapon/spell/reflect
name = "\proper reflect shield"

View File

@@ -6,6 +6,7 @@
cost = 100
obj_path = /obj/item/weapon/spell/resurrect
ability_icon_state = "tech_resurrect"
category = SUPPORT_SPELLS
/obj/item/weapon/spell/resurrect
name = "resurrect"

View File

@@ -3,6 +3,7 @@
desc = "One of the few functions able to adjust instability, this allows you to take someone else's instability."
cost = 50
obj_path = /obj/item/weapon/spell/shared_burden
category = SUPPORT_SPELLS
/obj/item/weapon/spell/shared_burden
name = "shared burden"

View File

@@ -5,6 +5,7 @@
cost = 120
obj_path = /obj/item/weapon/spell/shield
ability_icon_state = "tech_shield"
category = DEFENSIVE_SPELLS
/obj/item/weapon/spell/shield
name = "\proper energy shield"

View File

@@ -3,6 +3,7 @@
desc = "Disrupts photons moving in a local area, causing darkness to shroud yourself or a position of your choosing."
cost = 30
obj_path = /obj/item/weapon/spell/spawner/darkness
category = UTILITY_SPELLS
/obj/item/weapon/spell/spawner/darkness
name = "darkness"

View File

@@ -4,6 +4,7 @@
sure to not be close to the disturbance yourself."
cost = 175
obj_path = /obj/item/weapon/spell/spawner/fire_blast
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/spawner/fire_blast
name = "fire blast"

View File

@@ -3,6 +3,7 @@
desc = "Emits electronic pulses to destroy, disable, or otherwise harm devices and machines. Be sure to not hit yourself with this."
cost = 150
obj_path = /obj/item/weapon/spell/spawner/pulsar
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/spawner/pulsar
name = "pulsar"

View File

@@ -8,6 +8,7 @@
enhancement_desc = "Summoned entities will never harm their summoner."
cost = 200
obj_path = /obj/item/weapon/spell/summon/summon_creature
category = UTILITY_SPELLS
/obj/item/weapon/spell/summon/summon_creature
name = "summon creature"

View File

@@ -5,6 +5,7 @@
enhancement_desc = "Wards can detect invisibile entities, and are more specific in relaying information about what it sees."
cost = 100
obj_path = /obj/item/weapon/spell/summon/summon_ward
category = UTILITY_SPELLS
/obj/item/weapon/spell/summon/summon_ward
name = "summon ward"

View File

@@ -5,6 +5,7 @@
cost = 150
ability_icon_state = "tech_targetingmatrix"
obj_path = /obj/item/weapon/spell/targeting_matrix
category = UTILITY_SPELLS
/obj/item/weapon/spell/targeting_matrix
name = "targeting matrix"

View File

@@ -3,9 +3,10 @@
desc = "Acts as directional guidance towards an object that belongs to you or your team. It can also point towards your allies. \
Wonderful if you're worried someone will steal your valuables, like a certain shiny Scepter..."
enhancement_desc = "You will be able to track most other entities in addition to your belongings and allies."
cost = 30
cost = 25
obj_path = /obj/item/weapon/spell/track
ability_icon_state = "tech_track"
category = UTILITY_SPELLS
// This stores a ref to all important items that belong to a Technomancer, in case of theft. Used by the spell below.
// I feel dirty for adding yet another global list used by one thing, but the only alternative is to loop through world, and yeahhh.

View File

@@ -4,6 +4,7 @@
cost = 200
obj_path = /obj/item/weapon/spell/warp_strike
ability_icon_state = "tech_warpstrike"
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/warp_strike
name = "warp strike"

View File

@@ -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

View File

@@ -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)

View File

@@ -1,7 +1,7 @@
var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
/datum/job/captain
title = "Captain"
title = "Station Administrator"
flag = CAPTAIN
department = "Command"
head_position = 1
@@ -11,7 +11,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
spawn_positions = 1
supervisors = "company officials and Corporate Regulations"
selection_color = "#1D1D4F"
alt_titles = list("Station Administrator")
alt_titles = list("Site Manager")
idtype = /obj/item/weapon/card/id/gold
req_admin_notify = 1
access = list() //See get_access()

View File

@@ -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")

View File

@@ -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")

View File

@@ -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

View File

@@ -390,7 +390,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"]]"

View File

@@ -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)

View File

@@ -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)

View File

@@ -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) : ""]

View File

@@ -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)
@@ -188,13 +188,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)

View File

@@ -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"])]))

View File

@@ -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)

View File

@@ -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"])]))

View File

@@ -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)

View File

@@ -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)

View File

@@ -465,8 +465,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]")

View File

@@ -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

View File

@@ -134,7 +134,7 @@
return 1
if(STATUS_DISPLAY_TIME)
message1 = "TIME"
message2 = worldtime2text()
message2 = stationtime2text()
update_display(message1, message2)
return 1
return 0

View File

@@ -314,7 +314,7 @@
T.amount = "[currently_vending.price]"
T.source_terminal = 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 = 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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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\]"

Some files were not shown because too many files have changed in this diff Show More