diff --git a/btime.dll b/btime.dll deleted file mode 100644 index af6c82a998..0000000000 Binary files a/btime.dll and /dev/null differ diff --git a/btime.so b/btime.so deleted file mode 100644 index edb3cc3113..0000000000 Binary files a/btime.so and /dev/null differ diff --git a/code/__defines/btime.dm b/code/__defines/btime.dm deleted file mode 100644 index d4cefc3524..0000000000 --- a/code/__defines/btime.dm +++ /dev/null @@ -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 \ No newline at end of file diff --git a/code/__defines/math_physics.dm b/code/__defines/math_physics.dm index 198f87eccc..da1c2aebd1 100644 --- a/code/__defines/math_physics.dm +++ b/code/__defines/math_physics.dm @@ -26,4 +26,7 @@ #define INFINITY 1.#INF #define TICKS_IN_DAY 24*60*60*10 -#define TICKS_IN_SECOND 10 \ No newline at end of file +#define TICKS_IN_SECOND 10 + +#define SIMPLE_SIGN(X) ((X) < 0 ? -1 : 1) +#define SIGN(X) ((X) ? SIMPLE_SIGN(X) : 0) diff --git a/code/__defines/process_scheduler.dm b/code/__defines/process_scheduler.dm index 76449b9a4b..d9c8f106ef 100644 --- a/code/__defines/process_scheduler.dm +++ b/code/__defines/process_scheduler.dm @@ -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) \ No newline at end of file +#define SCHECK sleepCheck() diff --git a/code/__defines/xenoarcheaology.dm b/code/__defines/xenoarcheaology.dm new file mode 100644 index 0000000000..b6af0d0681 --- /dev/null +++ b/code/__defines/xenoarcheaology.dm @@ -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 \ No newline at end of file diff --git a/code/_helpers/time.dm b/code/_helpers/time.dm index 4443440615..633ef3773a 100644 --- a/code/_helpers/time.dm +++ b/code/_helpers/time.dm @@ -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) @@ -56,6 +93,14 @@ var/round_start_time = 0 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 /* Returns "watch handle" (really just a timestamp) */ diff --git a/code/controllers/ProcessScheduler/core/_stubs.dm b/code/controllers/ProcessScheduler/core/_stubs.dm deleted file mode 100644 index 1aa2c8efb8..0000000000 --- a/code/controllers/ProcessScheduler/core/_stubs.dm +++ /dev/null @@ -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]") diff --git a/code/controllers/ProcessScheduler/core/process.dm b/code/controllers/ProcessScheduler/core/process.dm index b7767c367f..836d2124bd 100644 --- a/code/controllers/ProcessScheduler/core/process.dm +++ b/code/controllers/ProcessScheduler/core/process.dm @@ -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") \ No newline at end of file + catchException("Type [caught.type] does not belong in process' queue") diff --git a/code/controllers/ProcessScheduler/core/processScheduler.dm b/code/controllers/ProcessScheduler/core/processScheduler.dm index bde79fba07..dc412ee92a 100644 --- a/code/controllers/ProcessScheduler/core/processScheduler.dm +++ b/code/controllers/ProcessScheduler/core/processScheduler.dm @@ -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() \ No newline at end of file + p.statProcess() + +/datum/controller/processScheduler/proc/getProcess(var/process_name) + return nameToProcessMap[process_name] diff --git a/code/controllers/ProcessScheduler/test/processScheduler.js b/code/controllers/ProcessScheduler/test/processScheduler.js deleted file mode 100644 index 0a4f111355..0000000000 --- a/code/controllers/ProcessScheduler/test/processScheduler.js +++ /dev/null @@ -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)); \ No newline at end of file diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index e6f88731b6..aa06984f69 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -120,7 +120,7 @@ var/global/list/round_voters = list() // Keeps track of the individuals voting f if(choices[current_votes[key]] == .) round_voters += key // Keep track of who voted for the winning round. if(mode != VOTE_GAMEMODE || . == "Extended" || ticker.hide_mode == 0) // Announce Extended gamemode, but not other gamemodes - text += "Vote Result: [.]" + text += "Vote Result: [mode == VOTE_GAMEMODE ? gamemode_names[.] : .]" else text += "The vote has ended." diff --git a/code/datums/uplink/ammunition.dm b/code/datums/uplink/ammunition.dm index 8569308543..756d5fc55b 100644 --- a/code/datums/uplink/ammunition.dm +++ b/code/datums/uplink/ammunition.dm @@ -25,11 +25,12 @@ /datum/uplink_item/item/ammo/tommydrum name = "Tommygun Drum Magazine (.45)" path = /obj/item/ammo_magazine/tommydrum - item_cost = 4 // Buy 40 bullets, get 10 free! + item_cost = 40 // Buy 40 bullets, get 10 free! /datum/uplink_item/item/ammo/darts name = "Darts" path = /obj/item/ammo_magazine/chemdart + item_cost = 5 /datum/uplink_item/item/ammo/sniperammo name = "Anti-Materiel Rifle ammo box (14.5mm)" @@ -98,7 +99,9 @@ /datum/uplink_item/item/ammo/g12/stun name = "12g Auto-Shotgun Magazine (Stun)" path = /obj/item/weapon/storage/box/stunshells + item_cost = 10 // Discount due to it being LTL. /datum/uplink_item/item/ammo/g12/flash name = "12g Auto-Shotgun Magazine (Flash)" - path = /obj/item/weapon/storage/box/flashshells \ No newline at end of file + path = /obj/item/weapon/storage/box/flashshells + item_cost = 10 // Discount due to it being LTL. \ No newline at end of file diff --git a/code/datums/uplink/badassery.dm b/code/datums/uplink/badassery.dm index 2cfd2f7203..62c570a972 100644 --- a/code/datums/uplink/badassery.dm +++ b/code/datums/uplink/badassery.dm @@ -61,17 +61,17 @@ /datum/uplink_item/item/badassery/surplus/merc2 name = "Surplus Crate - 240 TC" item_cost = DEFAULT_TELECRYSTAL_AMOUNT * 2 - item_worth = 360 + item_worth = 540 /datum/uplink_item/item/badassery/surplus/merc4 name = "Surplus Crate - 480 TC" item_cost = DEFAULT_TELECRYSTAL_AMOUNT * 4 - item_worth = 720 + item_worth = 1200 /datum/uplink_item/item/badassery/surplus/merc6 name = "Surplus Crate - 720 TC" item_cost = DEFAULT_TELECRYSTAL_AMOUNT * 6 - item_worth = 1440 + item_worth = 1980 /datum/uplink_item/item/badassery/surplus/New() ..() diff --git a/code/datums/uplink/stealth_items.dm b/code/datums/uplink/stealth_items.dm index 1da0381390..23e0593cad 100644 --- a/code/datums/uplink/stealth_items.dm +++ b/code/datums/uplink/stealth_items.dm @@ -31,10 +31,10 @@ /datum/uplink_item/item/stealth_items/voice name = "Voice Changer" - item_cost = 30 + item_cost = 15 path = /obj/item/clothing/mask/gas/voice /datum/uplink_item/item/stealth_items/camera_floppy name = "Camera Network Access - Floppy" - item_cost = 30 + item_cost = 15 path = /obj/item/weapon/disk/file/cameras/syndicate diff --git a/code/datums/uplink/stealthy_weapons.dm b/code/datums/uplink/stealthy_weapons.dm index 7a60e42e13..5576ebcac5 100644 --- a/code/datums/uplink/stealthy_weapons.dm +++ b/code/datums/uplink/stealthy_weapons.dm @@ -26,10 +26,10 @@ /datum/uplink_item/item/stealthy_weapons/cigarette_kit name = "Cigarette Kit" - item_cost = 15 + item_cost = 10 path = /obj/item/weapon/storage/box/syndie_kit/cigarette /datum/uplink_item/item/stealthy_weapons/random_toxin name = "Random Toxin - Beaker" - item_cost = 15 + item_cost = 10 path = /obj/item/weapon/storage/box/syndie_kit/toxin diff --git a/code/datums/uplink/tools.dm b/code/datums/uplink/tools.dm index 7a02e16990..17203e3d5d 100644 --- a/code/datums/uplink/tools.dm +++ b/code/datums/uplink/tools.dm @@ -14,16 +14,55 @@ item_cost = 10 path = /obj/item/weapon/storage/toolbox/syndicate -/datum/uplink_item/item/tools/plastique - name = "C-4 (Destroys walls)" - item_cost = 20 - path = /obj/item/weapon/plastique +/datum/uplink_item/item/tools/clerical + name = "Morphic Clerical Kit" + item_cost = 10 + path = /obj/item/weapon/storage/box/syndie_kit/clerical /datum/uplink_item/item/tools/encryptionkey_radio name = "Encrypted Radio Channel Key" - item_cost = 20 + item_cost = 10 path = /obj/item/device/encryptionkey/syndicate +/datum/uplink_item/item/tools/money + name = "Operations Funding" + item_cost = 10 + path = /obj/item/weapon/storage/secure/briefcase/money + desc = "A briefcase with 10,000 untraceable thalers for funding your sneaky activities." + +/datum/uplink_item/item/tools/plastique + name = "C-4 (Destroys walls)" + item_cost = 10 + path = /obj/item/weapon/plastique + +/datum/uplink_item/item/tools/duffle + name = "Black Duffle Bag" + item_cost = 10 + path = /obj/item/weapon/storage/backpack/dufflebag/syndie + +/datum/uplink_item/item/tools/duffle/med + name = "Black Medical Duffle Bag" + path = /obj/item/weapon/storage/backpack/dufflebag/syndie/med + +/datum/uplink_item/item/tools/duffle/ammo + name = "Black Ammunition Duffle Bag" + path = /obj/item/weapon/storage/backpack/dufflebag/syndie/ammo + +/datum/uplink_item/item/tools/space_suit + name = "Space Suit" + item_cost = 15 + path = /obj/item/weapon/storage/box/syndie_kit/space + +/datum/uplink_item/item/tools/encryptionkey_binary + name = "Binary Translator Key" + item_cost = 15 + path = /obj/item/device/encryptionkey/binary + +/datum/uplink_item/item/tools/packagebomb + name = "Package Bomb (Small)" + item_cost = 20 + path = /obj/item/weapon/storage/box/syndie_kit/demolitions + /datum/uplink_item/item/tools/hacking_tool name = "Door Hacking Tool" item_cost = 20 @@ -32,32 +71,11 @@ When in hacking mode this device will grant full access to any standard airlock within 20 to 40 seconds. \ This device will also be able to immediately access the last 6 to 8 hacked airlocks." -/datum/uplink_item/item/tools/encryptionkey_binary - name = "Binary Translator Key" - item_cost = 20 - path = /obj/item/device/encryptionkey/binary - /datum/uplink_item/item/tools/emag name = "Cryptographic Sequencer" item_cost = 30 path = /obj/item/weapon/card/emag -/datum/uplink_item/item/tools/clerical - name = "Morphic Clerical Kit" - item_cost = 15 - path = /obj/item/weapon/storage/box/syndie_kit/clerical - -/datum/uplink_item/item/tools/money - name = "Operations Funding" - item_cost = 15 - path = /obj/item/weapon/storage/secure/briefcase/money - desc = "A briefcase with 10,000 untraceable thalers for funding your sneaky activities." - -/datum/uplink_item/item/tools/space_suit - name = "Space Suit" - item_cost = 15 - path = /obj/item/weapon/storage/box/syndie_kit/space - /datum/uplink_item/item/tools/thermal name = "Thermal Imaging Glasses" item_cost = 30 @@ -65,9 +83,21 @@ /datum/uplink_item/item/tools/powersink name = "Powersink (DANGER!)" - item_cost = 50 + item_cost = 40 path = /obj/item/device/powersink +/datum/uplink_item/item/tools/packagebomb/large + name = "Package Bomb (Large)" + item_cost = 40 + path = /obj/item/weapon/storage/box/syndie_kit/demolitions_heavy + +/* +/datum/uplink_item/item/tools/packagebomb/huge + name = "Package Bomb (Huge) + item_cost = 60 + path = /obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy +*/ + /datum/uplink_item/item/tools/ai_module name = "Hacked AI Upload Module" item_cost = 60 diff --git a/code/datums/uplink/visible_weapons.dm b/code/datums/uplink/visible_weapons.dm index 58b054b849..41a1779322 100644 --- a/code/datums/uplink/visible_weapons.dm +++ b/code/datums/uplink/visible_weapons.dm @@ -11,7 +11,7 @@ /datum/uplink_item/item/visible_weapons/combatknife name = "Combat Knife" - item_cost = 30 + item_cost = 20 path = /obj/item/weapon/material/hatchet/tacknife/combatknife /datum/uplink_item/item/visible_weapons/energy_sword diff --git a/code/game/antagonist/outsider/technomancer.dm b/code/game/antagonist/outsider/technomancer.dm index 817c18873a..88a27cf7ed 100644 --- a/code/game/antagonist/outsider/technomancer.dm +++ b/code/game/antagonist/outsider/technomancer.dm @@ -41,7 +41,9 @@ var/datum/antagonist/technomancer/technomancers technomancer_mob.equip_to_slot_or_del(new /obj/item/weapon/disposable_teleporter/free(technomancer_mob), slot_r_store) technomancer_mob.equip_to_slot_or_del(new /obj/item/weapon/technomancer_catalog(technomancer_mob), slot_l_store) technomancer_mob.equip_to_slot_or_del(new /obj/item/device/radio/headset(technomancer_mob), slot_l_ear) - technomancer_mob.equip_to_slot_or_del(new /obj/item/weapon/technomancer_core(technomancer_mob), slot_back) + var/obj/item/weapon/technomancer_core/core = new /obj/item/weapon/technomancer_core(technomancer_mob) + technomancer_mob.equip_to_slot_or_del(core, slot_back) + technomancer_belongings.Add(core) // So it can be Tracked. technomancer_mob.equip_to_slot_or_del(new /obj/item/device/flashlight(technomancer_mob), slot_belt) technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(technomancer_mob), slot_shoes) technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/head/technomancer/master(technomancer_mob), slot_head) @@ -59,7 +61,9 @@ var/datum/antagonist/technomancer/technomancers technomancer_mob.equip_to_slot_or_del(catalog, slot_l_store) technomancer_mob.equip_to_slot_or_del(new /obj/item/device/radio/headset(technomancer_mob), slot_l_ear) - technomancer_mob.equip_to_slot_or_del(new /obj/item/weapon/technomancer_core(technomancer_mob), slot_back) + var/obj/item/weapon/technomancer_core/core = new /obj/item/weapon/technomancer_core(technomancer_mob) + technomancer_mob.equip_to_slot_or_del(core, slot_back) + technomancer_belongings.Add(core) // So it can be Tracked. technomancer_mob.equip_to_slot_or_del(new /obj/item/device/flashlight(technomancer_mob), slot_belt) technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(technomancer_mob), slot_shoes) technomancer_mob.equip_to_slot_or_del(new /obj/item/clothing/head/technomancer/apprentice(technomancer_mob), slot_head) diff --git a/code/game/gamemodes/changeling/powers/armor.dm b/code/game/gamemodes/changeling/powers/armor.dm index b27b0ef523..87a3eee449 100644 --- a/code/game/gamemodes/changeling/powers/armor.dm +++ b/code/game/gamemodes/changeling/powers/armor.dm @@ -2,7 +2,7 @@ name = "Organic Space Suit" desc = "We grow an organic suit to protect ourselves from space exposure." helptext = "To remove the suit, use the ability again." - ability_icon_state = "ling_space_suit" + ability_icon_state = "lingspacesuit" genomecost = 1 verbpath = /mob/proc/changeling_spacesuit @@ -17,7 +17,7 @@ name = "Chitinous Spacearmor" desc = "We turn our skin into tough chitin to protect us from damage and space exposure." helptext = "To remove the armor, use the ability again." - ability_icon_state = "ling_armor" + ability_icon_state = "lingarmor" genomecost = 3 verbpath = /mob/proc/changeling_spacearmor @@ -34,7 +34,6 @@ /obj/item/clothing/suit/space/changeling name = "flesh mass" icon_state = "lingspacesuit" - item_state = "lingspacehelmet" desc = "A huge, bulky mass of pressure and temperature-resistant organic tissue, evolved to facilitate space travel." flags = STOPPRESSUREDAMAGE //Not THICKMATERIAL because it's organic tissue, so if somebody tries to inject something into it, //it still ends up in your blood. (also balance but muh fluff) @@ -55,7 +54,6 @@ /obj/item/clothing/head/helmet/space/changeling name = "flesh mass" icon_state = "lingspacehelmet" - item_state = "lingspacehelmet" desc = "A covering of pressure and temperature-resistant organic tissue with a glass-like chitin front." flags = BLOCKHAIR | STOPPRESSUREDAMAGE //Again, no THICKMATERIAL. armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index 72dfd6ec5c..3953caa525 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -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 diff --git a/code/game/gamemodes/changeling/powers/self_respiration.dm b/code/game/gamemodes/changeling/powers/self_respiration.dm index 96b8f3d277..6d6228eba8 100644 --- a/code/game/gamemodes/changeling/powers/self_respiration.dm +++ b/code/game/gamemodes/changeling/powers/self_respiration.dm @@ -2,15 +2,30 @@ name = "Self Respiration" desc = "We evolve our body to no longer require drawing oxygen from the atmosphere." helptext = "We will no longer require internals, and we cannot inhale any gas, including harmful ones." + ability_icon_state = "ling_toggle_breath" genomecost = 0 - isVerb = 0 verbpath = /mob/proc/changeling_self_respiration //No breathing required /mob/proc/changeling_self_respiration() + set category = "Changeling" + set name = "Toggle Breathing" + set desc = "We choose whether or not to breathe." + + var/datum/changeling/changeling = changeling_power(0,0,100,UNCONSCIOUS) + if(!changeling) + return 0 + if(istype(src,/mob/living/carbon)) var/mob/living/carbon/C = src - C.does_not_breathe = 1 - src << "We stop breathing, as we no longer need to." - return 1 + if(C.suiciding) + src << "You're committing suicide, this isn't going to work." + return 0 + if(C.does_not_breathe == 0) + C.does_not_breathe = 1 + src << "We stop breathing, as we no longer need to." + return 1 + else + C.does_not_breathe = 0 + src << "We resume breathing, as we now need to again." return 0 \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/catalog.dm b/code/game/gamemodes/technomancer/catalog.dm index 80f77ac75f..891ca926de 100644 --- a/code/game/gamemodes/technomancer/catalog.dm +++ b/code/game/gamemodes/technomancer/catalog.dm @@ -247,7 +247,8 @@ var/list/all_technomancer_presets = typesof(/datum/technomancer/presets) - /datu if(desired_object.cost <= budget) budget -= desired_object.cost H << "You have just bought \a [desired_object.name]." - new desired_object.obj_path(get_turf(H)) + var/obj/O = new desired_object.obj_path(get_turf(H)) + technomancer_belongings.Add(O) // Used for the Track spell. else //Can't afford. H << "You can't afford that!" diff --git a/code/game/gamemodes/technomancer/core_obj.dm b/code/game/gamemodes/technomancer/core_obj.dm index 945102053e..5ef5d37507 100644 --- a/code/game/gamemodes/technomancer/core_obj.dm +++ b/code/game/gamemodes/technomancer/core_obj.dm @@ -83,6 +83,9 @@ energy_delta = energy - old_energy if(world.time % 5 == 0) // Maintaining fat lists is expensive, I imagine. maintain_summon_list() + if(wearer && wearer.mind) + if(!(technomancers.is_antagonist(wearer.mind))) // In case someone tries to wear a stolen core. + wearer.adjust_instability(20) /obj/item/weapon/technomancer_core/proc/regenerate() energy = min(max(energy + regen_rate, 0), max_energy) diff --git a/code/game/gamemodes/technomancer/devices/implants.dm b/code/game/gamemodes/technomancer/devices/implants.dm new file mode 100644 index 0000000000..e2c1857d5d --- /dev/null +++ b/code/game/gamemodes/technomancer/devices/implants.dm @@ -0,0 +1,11 @@ +/datum/technomancer/consumable/freedom_implant + name = "Freedom Implant" + desc = "A hidden implant which allows one to escape bindings such as handcuffs." + cost = 50 + obj_path = /obj/item/weapon/storage/box/syndie_kit/imp_freedom + +/datum/technomancer/consumable/explosive_implant + name = "Explosive Implant" + desc = "A hidden implant which will explode if it hears a passphrase." + cost = 150 + obj_path = /obj/item/weapon/storage/box/syndie_kit/imp_explosive \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/equipment.dm b/code/game/gamemodes/technomancer/equipment.dm index efec413e30..2e0fe3833a 100644 --- a/code/game/gamemodes/technomancer/equipment.dm +++ b/code/game/gamemodes/technomancer/equipment.dm @@ -82,8 +82,7 @@ /obj/item/weapon/storage/belt/holding name = "Belt of Holding" desc = "Can hold more than you'd expect." - icon_state = "emsbelt" - item_state = "emsbelt" + icon_state = "ems" max_w_class = 3 // Can hold normal sized items. storage_slots = 14 // Twice the capacity of a typical belt. max_storage_space = 42 diff --git a/code/game/gamemodes/technomancer/instability.dm b/code/game/gamemodes/technomancer/instability.dm index 9297f18a17..5d5432fa4e 100644 --- a/code/game/gamemodes/technomancer/instability.dm +++ b/code/game/gamemodes/technomancer/instability.dm @@ -205,6 +205,11 @@ var/radius = max(get_dist(H, src), 1) // People next to the source take a third of the instability. Further distance decreases the amount absorbed. var/outgoing_instability = (instability / 3) * ( 1 / (radius**2) ) + + // Energy armor like from the AMI RIG can protect from this. + var/armor = getarmor(null, "energy") + var/armor_factor = abs( (armor - 100) / 100) + outgoing_instability = outgoing_instability * armor_factor H.adjust_instability(outgoing_instability) set_light(distance, distance, l_color = "#C26DDE") diff --git a/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm b/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm index caec6ff3a2..44bd8feea0 100644 --- a/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm @@ -13,7 +13,7 @@ icon_state = "generic" cast_methods = null aspect = ASPECT_FROST - glow_color = "#FF6A00" + glow_color = "#00B3FF" /obj/item/weapon/spell/aura/frost/process() if(!pay_energy(100)) diff --git a/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm b/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm index d7e2d2a7b6..6307d2f4ca 100644 --- a/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm @@ -15,7 +15,7 @@ glow_color = "#0000FF" //TODO /obj/item/weapon/spell/aura/unstable/process() - if(!pay_energy(500)) + if(!pay_energy(200)) qdel(src) var/list/nearby_mobs = range(14,owner) for(var/mob/living/L in nearby_mobs) @@ -25,6 +25,7 @@ var/damage_to_inflict = max(L.health / L.maxHealth, 0) // Otherwise, those in crit would actually be healed. var/armor_factor = abs(L.getarmor(null, "energy") - 100) + armor_factor = armor_factor / 100 damage_to_inflict = damage_to_inflict * armor_factor diff --git a/code/game/gamemodes/technomancer/spells/gambit.dm b/code/game/gamemodes/technomancer/spells/gambit.dm index 6a0b29d117..797536cc45 100644 --- a/code/game/gamemodes/technomancer/spells/gambit.dm +++ b/code/game/gamemodes/technomancer/spells/gambit.dm @@ -6,11 +6,13 @@ obj_path = /obj/item/weapon/spell/gambit /var/global/list/all_technomancer_gambit_spells = typesof(/obj/item/weapon/spell) - list( + /obj/item/weapon/spell, /obj/item/weapon/spell/gambit, /obj/item/weapon/spell/projectile, /obj/item/weapon/spell/aura, /obj/item/weapon/spell/insert, - /obj/item/weapon/spell/spawner) + /obj/item/weapon/spell/spawner, + /obj/item/weapon/spell/summon) /obj/item/weapon/spell/gambit name = "gambit" diff --git a/code/game/gamemodes/technomancer/spells/illusion.dm b/code/game/gamemodes/technomancer/spells/illusion.dm index 62cda729e9..3c72506320 100644 --- a/code/game/gamemodes/technomancer/spells/illusion.dm +++ b/code/game/gamemodes/technomancer/spells/illusion.dm @@ -46,10 +46,19 @@ /obj/item/weapon/spell/illusion/on_use_cast(mob/user) if(illusion) - var/what_to_say = input(user, "What do you want \the [illusion] to say?","Illusion Speak") as null|text - what_to_say = sanitize(what_to_say) - if(what_to_say) - illusion.say(what_to_say) + var/choice = alert(user, "Would you like to have \the [illusion] speak, or do an emote?", "Illusion", "Speak","Emote","Cancel") + switch(choice) + if("Cancel") + return + if("Speak") + var/what_to_say = input(user, "What do you want \the [illusion] to say?","Illusion Speak") as null|text + //what_to_say = sanitize(what_to_say) //Sanitize occurs inside say() already. + if(what_to_say) + illusion.say(what_to_say) + if("Emote") + var/what_to_emote = input(user, "What do you want \the [illusion] to do?","Illusion Emote") as null|text + if(what_to_emote) + illusion.emote(what_to_emote) /obj/item/weapon/spell/illusion/Destroy() if(illusion) diff --git a/code/game/gamemodes/technomancer/spells/phase_shift.dm b/code/game/gamemodes/technomancer/spells/phase_shift.dm index cd6a87df1f..142134abc9 100644 --- a/code/game/gamemodes/technomancer/spells/phase_shift.dm +++ b/code/game/gamemodes/technomancer/spells/phase_shift.dm @@ -33,15 +33,24 @@ AM.forceMove(get_turf(src)) ..() +/obj/effect/phase_shift/relaymove(mob/user as mob) + if(user.stat) + return + + user << "You step out of the rift." + user.forceMove(get_turf(src)) + qdel(src) + /obj/item/weapon/spell/phase_shift/on_use_cast(mob/user) if(isturf(user.loc)) //Check if we're not already in a rift. - var/obj/effect/phase_shift/PS = new(get_turf(user)) - visible_message("[user] vanishes into a pink rift!") - user << "You create an unstable rift, and go through it. Be sure to not stay too long." - user.forceMove(PS) - else //We're already in a rift, time to get out. - if(istype(loc, /obj/effect/phase_shift)) - var/obj/effect/phase_shift/PS = user.loc - qdel(PS) //Ejecting is handled in Destory() - visible_message("[user] reappears from the rift as it collapses.") + if(pay_energy(2000)) + var/obj/effect/phase_shift/PS = new(get_turf(user)) + visible_message("[user] vanishes into a pink rift!") + user << "You create an unstable rift, and go through it. Be sure to not stay too long." + user.forceMove(PS) + adjust_instability(10) qdel(src) + else + user << "You don't have enough energy to make a rift!" + else //We're already in a rift or something like a closet. + user << "Making a rift here would probably be a bad idea." diff --git a/code/game/gamemodes/technomancer/spells/projectile/overload.dm b/code/game/gamemodes/technomancer/spells/projectile/overload.dm index a96e2f70ab..9b3964503a 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/overload.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/overload.dm @@ -22,6 +22,7 @@ icon_state = "bluespace" // nodamage = 1 damage_type = BURN + 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) diff --git a/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm b/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm index a9be662cf3..1bbab4d299 100644 --- a/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm +++ b/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm @@ -43,6 +43,8 @@ /mob/living/simple_animal/ward/death() if(creator) creator << "Your ward inside [get_area(src)] was killed!" + ..() + qdel(src) /mob/living/simple_animal/ward/proc/expire() if(creator && src) diff --git a/code/game/gamemodes/technomancer/spells/track.dm b/code/game/gamemodes/technomancer/spells/track.dm index a6249c5eed..90e6518200 100644 --- a/code/game/gamemodes/technomancer/spells/track.dm +++ b/code/game/gamemodes/technomancer/spells/track.dm @@ -39,6 +39,8 @@ var/list/technomancer_belongings = list() for(var/mob/living/L in mob_list) if(!is_ally(L) && !can_track_non_allies) continue + if(L == user) + continue mob_choices += L var/choice = input(user,"Decide what or who to track.","Tracking") as null|anything in object_choices + mob_choices if(choice) @@ -58,9 +60,9 @@ var/list/technomancer_belongings = list() icon_state = "track_unknown" else - set_dir(get_dir(src,tracked)) + set_dir(get_dir(src,get_turf(tracked))) - switch(get_dist(src,tracked)) + switch(get_dist(src,get_turf(tracked))) if(0) icon_state = "track_direct" if(1 to 8) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 14d772437d..0eb2025450 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -343,10 +343,12 @@ var/global/datum/controller/occupations/job_master permitted = 1 if(G.whitelisted && !is_alien_whitelisted(H, all_species[G.whitelisted])) + + //if(G.whitelisted && (G.whitelisted != H.species.name || !is_alien_whitelisted(H, G.whitelisted))) permitted = 0 if(!permitted) - H << "Your current job or whitelist status does not permit you to spawn with [thing]!" + H << "Your current species, job or whitelist status does not permit you to spawn with [thing]!" continue if(G.slot && !(G.slot in custom_equip_slots)) diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index 4d7106d213..9a13e066a5 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -75,7 +75,7 @@ var/list/whitelist = list() /proc/whitelist_overrides(mob/M) if(!config.usealienwhitelist) return 1 - if(check_rights(R_ADMIN, 0)) + if(check_rights(R_ADMIN, 0, M)) return 1 return 0 diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 6a34cd7bb3..9c59c9f62c 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -419,7 +419,7 @@ visible_message("\The [src] rattles and prints out a sheet of paper.") var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc) P.info = "
Body Scan - [href_list["name"]]

" - P.info += "Time of scan: [worldtime2text(world.time)]

" + P.info += "Time of scan: [worldtime2stationtime(world.time)]

" P.info += "[printing_text]" P.info += "

Notes:
" P.name = "Body Scan - [href_list["name"]]" diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 3bc9a17fce..293ff22ef9 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -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 = {"

Crew Manifest


[data_core ? data_core.get_manifest(0) : ""] diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index b3f9765746..4c0f0591b2 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -20,17 +20,17 @@ /obj/item/weapon/card/id/guest/examine(mob/user) ..(user) if (world.time < expiration_time) - user << "This pass expires at [worldtime2text(expiration_time)]." + user << "This pass expires at [worldtime2stationtime(expiration_time)]." else - user << "It expired at [worldtime2text(expiration_time)]." + user << "It expired at [worldtime2stationtime(expiration_time)]." /obj/item/weapon/card/id/guest/read() if(!Adjacent(usr)) return //Too far to read if (world.time > expiration_time) - usr << "This pass expired at [worldtime2text(expiration_time)]." + usr << "This pass expired at [worldtime2stationtime(expiration_time)]." else - usr << "This pass expires at [worldtime2text(expiration_time)]." + usr << "This pass expires at [worldtime2stationtime(expiration_time)]." usr << "It grants access to following areas:" 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) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 3150003f46..4f73301e84 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -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]
[t1]") + src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]
[t1]") if (href_list["del_c"]) if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 2624c4ff28..6868f23343 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -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]
[t1]") + active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]
[t1]") if ("Delete Record (ALL)") if (active1) diff --git a/code/game/machinery/computer3/computers/medical.dm b/code/game/machinery/computer3/computers/medical.dm index 4425dc236a..57a662db46 100644 --- a/code/game/machinery/computer3/computers/medical.dm +++ b/code/game/machinery/computer3/computers/medical.dm @@ -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]
[t1]") + src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]
[t1]") if (href_list["del_c"]) if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm index 59bb46fd69..e6f19b8588 100644 --- a/code/game/machinery/computer3/computers/security.dm +++ b/code/game/machinery/computer3/computers/security.dm @@ -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]
[t1]") + active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [stationtime2text()], [game_year]
[t1]") if ("Delete Record (ALL)") if (active1) diff --git a/code/game/machinery/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm index 6acb530acc..3800fb9440 100644 --- a/code/game/machinery/computer3/lapvend.dm +++ b/code/game/machinery/computer3/lapvend.dm @@ -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) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index e1c65243d9..90db93ad8d 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -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]") diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 517b9c7fee..744e412240 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -412,6 +412,8 @@ About the new airlock wires panel: if(electrified_until && isAllPowerLoss()) electrify(0) + update_icon() + /obj/machinery/door/airlock/proc/loseBackupPower() backup_power_lost_until = backupPowerCablesCut() ? -1 : world.time + SecondsToTicks(60) @@ -419,6 +421,8 @@ About the new airlock wires panel: if(electrified_until && isAllPowerLoss()) electrify(0) + update_icon() + /obj/machinery/door/airlock/proc/regainMainPower() if(!mainPowerCablesCut()) main_power_lost_until = 0 @@ -426,11 +430,15 @@ About the new airlock wires panel: if(!backup_power_lost_until) backup_power_lost_until = -1 + update_icon() + /obj/machinery/door/airlock/proc/regainBackupPower() if(!backupPowerCablesCut()) // Restore backup power only if main power is offline, otherwise permanently disable backup_power_lost_until = main_power_lost_until == 0 ? -1 : 0 + update_icon() + /obj/machinery/door/airlock/proc/electrify(var/duration, var/feedback = 0) var/message = "" if(src.isWireCut(AIRLOCK_WIRE_ELECTRIFY) && arePowerSystemsOn()) @@ -781,7 +789,7 @@ About the new airlock wires panel: if (istype(da, /obj/structure/door_assembly/multi_tile)) da.set_dir(src.dir) - da.anchored = 1 + da.anchored = 1 if(mineral) da.glass = mineral //else if(glass) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 3f0d9e4613..b815a4e222 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -64,6 +64,7 @@ bound_height = width * world.icon_size health = maxhealth + update_icon() update_nearby_tiles(need_rebuild=1) return diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 2272cff0cc..ed01c85149 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -24,10 +24,16 @@ src.base_state = src.icon_state return +/obj/machinery/door/window/update_icon() + if(density) + icon_state = base_state + else + icon_state = "[base_state]open" + /obj/machinery/door/window/proc/shatter(var/display_message = 1) new /obj/item/weapon/material/shard(src.loc) - var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc) - CC.amount = 2 + new /obj/item/weapon/material/shard(src.loc) + new /obj/item/stack/cable_coil(src.loc, 1) var/obj/item/weapon/airlock_electronics/ae if(!electronics) ae = new/obj/item/weapon/airlock_electronics( src.loc ) @@ -103,43 +109,39 @@ return 1 /obj/machinery/door/window/open() - if (src.operating == 1) //doors can still open when emag-disabled + if (operating == 1) //doors can still open when emag-disabled return 0 if (!ticker) return 0 - if(!src.operating) //in case of emag - src.operating = 1 - flick(text("[]opening", src.base_state), src) + if (!operating) //in case of emag + operating = 1 + flick(text("[src.base_state]opening"), src) playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1) - src.icon_state = text("[]open", src.base_state) sleep(10) explosion_resistance = 0 - src.density = 0 -// src.sd_SetOpacity(0) //TODO: why is this here? Opaque windoors? ~Carn + density = 0 + update_icon() update_nearby_tiles() if(operating == 1) //emag again - src.operating = 0 + operating = 0 return 1 /obj/machinery/door/window/close() - if (src.operating) + if (operating) return 0 src.operating = 1 flick(text("[]closing", src.base_state), src) playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1) - src.icon_state = src.base_state - src.density = 1 + density = 1 + update_icon() explosion_resistance = initial(explosion_resistance) -// if(src.visible) -// SetOpacity(1) //TODO: why is this here? Opaque windoors? ~Carn update_nearby_tiles() sleep(10) - - src.operating = 0 + operating = 0 return 1 /obj/machinery/door/window/take_damage(var/damage) @@ -197,12 +199,14 @@ var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc) if (istype(src, /obj/machinery/door/window/brigdoor)) wa.secure = "secure_" - wa.name = "Secure Wired Windoor Assembly" + wa.name = "secure wired windoor assembly" else - wa.name = "Wired Windoor Assembly" + wa.name = "wired windoor assembly" if (src.base_state == "right" || src.base_state == "rightsecure") wa.facing = "r" wa.set_dir(src.dir) + wa.anchored = 1 + wa.created_name = name wa.state = "02" wa.update_icon() @@ -223,7 +227,7 @@ ae.icon_state = "door_electronics_smoked" operating = 0 - shatter(src) + qdel(src) return //If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway) @@ -262,6 +266,10 @@ maxhealth = 300 health = 300.0 //Stronger doors for prison (regular window door health is 150) +/obj/machinery/door/window/brigdoor/shatter() + new /obj/item/stack/rods(src.loc, 2) + ..() + /obj/machinery/door/window/northleft dir = NORTH diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 6d77713ce6..0774b920e2 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -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 diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 8b0d78cb96..2c4a2cefbb 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -150,7 +150,7 @@ return 1 if(STATUS_DISPLAY_TIME) message1 = "TIME" - message2 = worldtime2text() + message2 = stationtime2text() update_display(message1, message2) return 1 return 0 diff --git a/code/game/machinery/status_display_ai.dm b/code/game/machinery/status_display_ai.dm index 97f022ef55..51fcfb4f51 100644 --- a/code/game/machinery/status_display_ai.dm +++ b/code/game/machinery/status_display_ai.dm @@ -23,12 +23,6 @@ var/list/ai_status_emotions = list( "Dorfy" = new /datum/ai_emotion("ai_urist"), "Facepalm" = new /datum/ai_emotion("ai_facepalm"), "Friend Computer" = new /datum/ai_emotion("ai_friend"), - "Your Best Friend" = new /datum/ai_emotion("ai_flowey"), - "Your Best Nightmare" = new /datum/ai_emotion("ai_floweymalf"), - "Soviet Union" = new /datum/ai_emotion("ai_soviet"), - "Holly" = new /datum/ai_emotion("ai_holly"), - "Hilly" = new /datum/ai_emotion("ai_hilly"), - "Fish" = new /datum/ai_emotion("ai_fishtank"), "Tribunal" = new /datum/ai_emotion("ai_tribunal", "serithi"), "Tribunal Malfunctioning" = new /datum/ai_emotion("ai_tribunal_malf", "serithi") ) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index d28cb2444c..2cf5347edb 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -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) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 2c208ac62b..861bd701b9 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -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 diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index f608ea01de..22000a7a77 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -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 diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 550ea04380..4447ca7af2 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -4,7 +4,7 @@ w_class = 4 icon = 'icons/obj/device.dmi' icon_state = "suitcooler0" - slot_flags = SLOT_BACK //you can carry it on your back if you want, but it won't do anything unless attached to suit storage + slot_flags = SLOT_BACK //copied from tank.dm flags = CONDUCT @@ -20,7 +20,7 @@ var/on = 0 //is it turned on? var/cover_open = 0 //is the cover open? var/obj/item/weapon/cell/cell - var/max_cooling = 12 // in degrees per second - probably don't need to mess with heat capacity here + var/max_cooling = 15 // in degrees per second - probably don't need to mess with heat capacity here var/charge_consumption = 3 // charge per second at max_cooling var/thermostat = T20C @@ -87,7 +87,7 @@ var/mob/living/carbon/human/H = M - if (!H.wear_suit || H.s_store != src) + if (!H.wear_suit || (H.s_store != src && H.back != src)) return 0 return 1 diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index faa17586c2..a68e65b6ea 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -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) diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index 2682361d2c..f56b9580fc 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -7,19 +7,16 @@ icon_state = "telecrystal" w_class = 1 max_amount = 240 - flags = NOBLUDGEON origin_tech = list(TECH_MATERIAL = 6, TECH_BLUESPACE = 4) + force = 1 //Needs a token force to ensure you can attack because for some reason you can't attack with 0 force things -/obj/item/stack/telecrystal/afterattack(var/obj/item/I as obj, mob/user as mob, proximity) - if(!proximity) - return - if(istype(I, /obj/item)) - if(I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up. - I.hidden_uplink.uses += amount - I.hidden_uplink.update_nano_data() - nanomanager.update_uis(I.hidden_uplink) - use(amount) - user << "You slot \the [src] into \the [I] and charge its internal uplink." +/obj/item/stack/telecrystal/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) + if(amount >= 5) + target.visible_message("\The [target] has been transported with \the [src] by \the [user].") + safe_blink(target, 14) + use(5) + else + user << "There are not enough telecrystals to do that." /obj/item/stack/telecrystal/attack_self(mob/user as mob) if(user.mind.accept_tcrystals) //Checks to see if antag type allows for tcrystals diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm index 61c6668c33..3cbc75bfeb 100644 --- a/code/game/objects/items/weapons/autopsy.dm +++ b/code/game/objects/items/weapons/autopsy.dm @@ -86,7 +86,7 @@ var/scan_data = "" if(timeofdeath) - scan_data += "Time of death: [worldtime2text(timeofdeath)]

" + scan_data += "Time of death: [worldtime2stationtime(timeofdeath)]

" var/n = 1 for(var/wdata_idx in wdata) @@ -133,7 +133,7 @@ if(damaging_weapon) scan_data += "Severity: [damage_desc]
" scan_data += "Hits by weapon: [total_hits]
" - scan_data += "Approximate time of wound infliction: [worldtime2text(age)]
" + scan_data += "Approximate time of wound infliction: [worldtime2stationtime(age)]
" scan_data += "Affected limbs: [D.organ_names]
" scan_data += "Possible weapons:
" for(var/weapon_name in weapon_chances) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 2a85fbdfc9..6e323d7387 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -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") diff --git a/code/game/objects/items/weapons/grenades/explosive.dm b/code/game/objects/items/weapons/grenades/explosive.dm index e3e2ecdd75..62d13c3a2b 100644 --- a/code/game/objects/items/weapons/grenades/explosive.dm +++ b/code/game/objects/items/weapons/grenades/explosive.dm @@ -17,7 +17,8 @@ //Explosive grenade projectile, borrowed from fragmentation grenade code. /obj/item/projectile/bullet/pellet/fragment damage = 10 - range_step = 2 + armor_penetration = 30 + range_step = 2 //projectiles lose a fragment each time they travel this distance. Can be a non-integer. base_spread = 0 //causes it to be treated as a shrapnel explosion instead of cone spread_step = 20 @@ -32,9 +33,8 @@ icon_state = "frggrenade" item_state = "grenade" - var/num_fragments = 50 //total number of fragments produced by the grenade - var/fragment_damage = 10 - var/damage_step = 2 //projectiles lose a fragment each time they travel this distance. Can be a non-integer. + var/fragment_type = /obj/item/projectile/bullet/pellet/fragment + var/num_fragments = 63 //total number of fragments produced by the grenade var/explosion_size = 2 //size of the center explosion //The radius of the circle used to launch projectiles. Lower values mean less projectiles are used but if set too low gaps may appear in the spread pattern @@ -56,9 +56,7 @@ for(var/turf/T in target_turfs) var/obj/item/projectile/bullet/pellet/fragment/P = new (O) - P.damage = fragment_damage P.pellets = fragments_per_projectile - P.range_step = damage_step P.shot_from = src.name P.launch(T) diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index f4b763c5e9..d957c049b5 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -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()) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 97fea878ea..cdbf477101 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -214,25 +214,25 @@ name = "virologist satchel" desc = "A sterile satchel with virologist colours." icon_state = "satchel-vir" - item_state_slots = list(slot_r_hand_str = "medicalpack", slot_l_hand_str = "medicalpack") + item_state_slots = list(slot_r_hand_str = "viropack", slot_l_hand_str = "viropack") /obj/item/weapon/storage/backpack/satchel/chem name = "chemist satchel" desc = "A sterile satchel with chemist colours." icon_state = "satchel-chem" - item_state_slots = list(slot_r_hand_str = "medicalpack", slot_l_hand_str = "medicalpack") + item_state_slots = list(slot_r_hand_str = "chempack", slot_l_hand_str = "chempack") /obj/item/weapon/storage/backpack/satchel/gen name = "geneticist satchel" desc = "A sterile satchel with geneticist colours." icon_state = "satchel-gen" - item_state_slots = list(slot_r_hand_str = "medicalpack", slot_l_hand_str = "medicalpack") + item_state_slots = list(slot_r_hand_str = "genpack", slot_l_hand_str = "genpack") /obj/item/weapon/storage/backpack/satchel/tox name = "scientist satchel" desc = "Useful for holding research materials." icon_state = "satchel-tox" - item_state_slots = list(slot_r_hand_str = "medicalpack", slot_l_hand_str = "medicalpack") + item_state_slots = list(slot_r_hand_str = "toxpack", slot_l_hand_str = "toxpack") /obj/item/weapon/storage/backpack/satchel/sec name = "security satchel" diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index d2556917a4..f7de0b46f6 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -2,7 +2,7 @@ name = "belt" desc = "Can hold various things." icon = 'icons/obj/clothing/belts.dmi' - icon_state = "utilitybelt" + icon_state = "utility" storage_slots = 7 max_storage_space = 28 //This should ensure belts always have enough room to store whatever. max_w_class = 3 @@ -27,11 +27,10 @@ var/mob/M = src.loc M.update_inv_belt() - /obj/item/weapon/storage/belt/utility name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing. desc = "Can hold various tools." - icon_state = "utilitybelt" + icon_state = "utility" can_hold = list( ///obj/item/weapon/combitool, /obj/item/weapon/crowbar, @@ -59,7 +58,6 @@ /obj/item/weapon/tape_roll, ) - /obj/item/weapon/storage/belt/utility/full/New() ..() new /obj/item/weapon/screwdriver(src) @@ -69,7 +67,6 @@ new /obj/item/weapon/wirecutters(src) new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange")) - /obj/item/weapon/storage/belt/utility/atmostech/New() ..() new /obj/item/weapon/screwdriver(src) @@ -79,12 +76,10 @@ new /obj/item/weapon/wirecutters(src) new /obj/item/device/t_scanner(src) - - /obj/item/weapon/storage/belt/medical name = "medical belt" desc = "Can hold various medical equipment." - icon_state = "medicalbelt" + icon_state = "medical" can_hold = list( /obj/item/device/healthanalyzer, /obj/item/weapon/dnainjector, @@ -115,12 +110,12 @@ /obj/item/weapon/storage/belt/medical/emt name = "EMT utility belt" desc = "A sturdy black webbing belt with attached pouches." - icon_state = "emsbelt" + icon_state = "ems" /obj/item/weapon/storage/belt/security name = "security belt" desc = "Can hold security gear like handcuffs and flashes." - icon_state = "securitybelt" + icon_state = "security" max_w_class = 3 can_hold = list( /obj/item/weapon/grenade, @@ -150,7 +145,7 @@ /obj/item/weapon/storage/belt/detective name = "forensic utility belt" desc = "A belt for holding forensics equipment." - icon_state = "securitybelt" + icon_state = "security" storage_slots = 7 max_w_class = 3 can_hold = list( @@ -190,7 +185,7 @@ /obj/item/weapon/storage/belt/soulstone name = "soul stone belt" desc = "Designed for ease of access to the shards during a fight, as to not let a single enemy spirit slip away" - icon_state = "soulstonebelt" + icon_state = "soulstone" storage_slots = 6 can_hold = list( /obj/item/device/soulstone @@ -209,7 +204,7 @@ /obj/item/weapon/storage/belt/champion name = "championship belt" desc = "Proves to the world that you are the strongest!" - icon_state = "championbelt" + icon_state = "champion" storage_slots = 1 can_hold = list( "/obj/item/clothing/mask/luchador" @@ -218,7 +213,7 @@ /obj/item/weapon/storage/belt/security/tactical name = "combat belt" desc = "Can hold security gear like handcuffs and flashes, with more pouches for more storage." - icon_state = "swatbelt" + icon_state = "swat" storage_slots = 9 max_w_class = 3 max_storage_space = 28 @@ -231,7 +226,7 @@ /obj/item/weapon/storage/belt/janitor name = "janitorial belt" desc = "A belt used to hold most janitorial supplies." - icon_state = "janibelt" + icon_state = "janitor" storage_slots = 7 max_w_class = 3 can_hold = list( @@ -250,4 +245,34 @@ /obj/item/taperoll, /obj/item/weapon/reagent_containers/spray, /obj/item/weapon/soap + ) + +/obj/item/weapon/storage/belt/archaeology + name = "excavation gear-belt" + desc = "Can hold various excavation gear." + icon_state = "gear" + can_hold = list( + /obj/item/weapon/storage/box/samplebags, + /obj/item/device/core_sampler, + /obj/item/device/beacon_locator, + /obj/item/device/radio/beacon, + /obj/item/device/gps, + /obj/item/device/measuring_tape, + /obj/item/device/flashlight, + /obj/item/weapon/pickaxe, + /obj/item/device/depth_scanner, + /obj/item/device/camera, + /obj/item/weapon/paper, + /obj/item/weapon/photo, + /obj/item/weapon/folder, + /obj/item/weapon/pen, + /obj/item/weapon/folder, + /obj/item/weapon/clipboard, + /obj/item/weapon/anodevice, + /obj/item/clothing/glasses, + /obj/item/weapon/wrench, + /obj/item/weapon/storage/excavation, + /obj/item/weapon/anobattery, + /obj/item/device/ano_scanner, + /obj/item/weapon/pickaxe/hand ) \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index c890377475..7d0161a2fd 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -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() ..() diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index 4e427c8f6e..76b50ab608 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -265,4 +265,19 @@ new /obj/item/clothing/suit/armor/combat(src) new /obj/item/clothing/gloves/arm_guard/combat(src) new /obj/item/clothing/shoes/leg_guard/combat(src) - return \ No newline at end of file + return + +/obj/item/weapon/storage/box/syndie_kit/demolitions/New() + ..() + new /obj/item/weapon/syndie/c4explosive(src) + new /obj/item/weapon/screwdriver(src) + +/obj/item/weapon/storage/box/syndie_kit/demolitions_heavy/New() + ..() + new /obj/item/weapon/syndie/c4explosive/heavy(src) + new /obj/item/weapon/screwdriver(src) + +/obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy/New() + ..() + new /obj/item/weapon/syndie/c4explosive/heavy/super_heavy(src) + new /obj/item/weapon/screwdriver(src) \ No newline at end of file diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index 56cbda16ff..fb9aa3eb41 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -23,62 +23,70 @@ power = 2 size = "large" +/obj/item/weapon/syndie/c4explosive/heavy/super_heavy + name = "large-sized package" + desc = "A mysterious package, it's quite exceptionally heavy." + power = 3 + /obj/item/weapon/syndie/c4explosive/New() var/K = rand(1,2000) K = md5(num2text(K)+name) K = copytext(K,1,7) - src.desc += "\n You see [K] engraved on \the [src]." - var/obj/item/weapon/syndie/c4detonator/detonator = new(src.loc) - detonator.desc += "\n You see [K] engraved on the lighter." + desc += "\n You see [K] engraved on \the [src]." + var/obj/item/weapon/flame/lighter/zippo/c4detonator/detonator = new(src.loc) + detonator.desc += " You see [K] engraved on the lighter." detonator.bomb = src /obj/item/weapon/syndie/c4explosive/proc/detonate() icon_state = "c-4[size]_1" - spawn(50) - explosion(get_turf(src), power, power*2, power*3, power*4, power*4) - for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors. - var/turf/simulated/wall/T = get_step(src,dirn) - if(locate(/obj/machinery/door/airlock) in T) - var/obj/machinery/door/airlock/D = locate() in T - if(D.density) - D.open() - if(istype(T,/turf/simulated/wall)) - T.dismantle_wall(1) - qdel(src) + explosion(get_turf(src), power, power*2, power*3, power*4, power*5) + for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors. + var/turf/simulated/wall/T = get_step(src,dirn) + if(locate(/obj/machinery/door/airlock) in T) + var/obj/machinery/door/airlock/D = locate() in T + if(D.density) + D.open() + if(istype(T,/turf/simulated/wall)) + T.dismantle_wall(1) + qdel(src) /*Detonator, disguised as a lighter*/ /*Click it when closed to open, when open to bring up a prompt asking you if you want to close it or press the button.*/ -/obj/item/weapon/syndie/c4detonator - icon_state = "c-4detonator_0" - item_state = "zippo" - name = "\improper Zippo lighter" /*Sneaky, thanks Dreyfus.*/ - desc = "The zippo." - w_class = 1 - +/obj/item/weapon/flame/lighter/zippo/c4detonator + var/detonator_mode = 0 var/obj/item/weapon/syndie/c4explosive/bomb - var/pr_open = 0 /*Is the "What do you want to do?" prompt open?*/ -/obj/item/weapon/syndie/c4detonator/attack_self(mob/user as mob) - switch(src.icon_state) - if("c-4detonator_0") - src.icon_state = "c-4detonator_1" - user << "You flick open the lighter." +/obj/item/weapon/flame/lighter/zippo/c4detonator/attack_self(mob/user as mob) + if(!detonator_mode) + ..() - if("c-4detonator_1") - if(!pr_open) - pr_open = 1 - switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter.")) - if("Press the button.") - user << "You press the button." - flick("c-4detonator_click", src) - if(src.bomb) - src.bomb.detonate() - log_admin("[key_name(user)] has triggered [src.bomb] with [src].") - message_admins("[key_name_admin(user)] has triggered [src.bomb] with [src].") + else if(!lit) + base_state = icon_state + lit = 1 + icon_state = "[base_state]1" + //item_state = "[base_state]on" + user.visible_message("Without even breaking stride, \the [user] flips open \the [src] in one smooth movement.") - if("Close the lighter.") - src.icon_state = "c-4detonator_0" - user << "You close the lighter." - pr_open = 0 + else if(lit && detonator_mode) + switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter.")) + if("Press the button.") + user << "You press the button." + icon_state = "[base_state]click" + if(src.bomb) + src.bomb.detonate() + log_admin("[key_name(user)] has triggered [src.bomb] with [src].") + message_admins("[key_name_admin(user)] has triggered [src.bomb] with [src].") + + if("Close the lighter.") + lit = 0 + icon_state = "[base_state]" + //item_state = "[base_state]" + user.visible_message("You hear a quiet click, as \the [user] shuts off \the [src] without even looking at what they're doing.") + + +/obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob) + if(istype(W, /obj/item/weapon/screwdriver)) + detonator_mode = !detonator_mode + user << "You unscrew the top panel of \the [src] revealing a button." \ No newline at end of file diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 33a9f46ed1..98c7876811 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -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") diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index a60b9c0c1c..62964125d9 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -114,6 +114,8 @@ new /obj/item/weapon/shield/riot/tele(src) new /obj/item/weapon/storage/box/holobadge/hos(src) new /obj/item/clothing/accessory/badge/holo/hos(src) + new /obj/item/weapon/reagent_containers/spray/pepper(src) + new /obj/item/weapon/crowbar/red(src) new /obj/item/weapon/storage/box/flashbangs(src) new /obj/item/weapon/storage/belt/security(src) new /obj/item/device/flash(src) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 89e841bc58..cb7dac0684 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -7,7 +7,7 @@ w_class = 5 var/state = 0 var/base_icon_state = "" - var/base_name = "Airlock" + var/base_name = "airlock" var/obj/item/weapon/airlock_electronics/electronics = null var/airlock_type = "" //the type path of the airlock once completed var/glass_type = "/glass" @@ -19,91 +19,91 @@ /obj/structure/door_assembly/door_assembly_com base_icon_state = "com" - base_name = "Command Airlock" + base_name = "Command airlock" glass_type = "/glass_command" airlock_type = "/command" /obj/structure/door_assembly/door_assembly_sec base_icon_state = "sec" - base_name = "Security Airlock" + base_name = "Security airlock" glass_type = "/glass_security" airlock_type = "/security" /obj/structure/door_assembly/door_assembly_eng base_icon_state = "eng" - base_name = "Engineering Airlock" + base_name = "Engineering airlock" glass_type = "/glass_engineering" airlock_type = "/engineering" /obj/structure/door_assembly/door_assembly_eat base_icon_state = "eat" - base_name = "Engineering Atmos Airlock" + base_name = "Engineering atmos airlock" glass_type = "/glass_engineeringatmos" airlock_type = "/engineering" /obj/structure/door_assembly/door_assembly_min base_icon_state = "min" - base_name = "Mining Airlock" + base_name = "Mining airlock" glass_type = "/glass_mining" airlock_type = "/mining" /obj/structure/door_assembly/door_assembly_atmo base_icon_state = "atmo" - base_name = "Atmospherics Airlock" + base_name = "Atmospherics airlock" glass_type = "/glass_atmos" airlock_type = "/atmos" /obj/structure/door_assembly/door_assembly_research base_icon_state = "res" - base_name = "Research Airlock" + base_name = "Research airlock" glass_type = "/glass_research" airlock_type = "/research" /obj/structure/door_assembly/door_assembly_science base_icon_state = "sci" - base_name = "Science Airlock" + base_name = "Science airlock" glass_type = "/glass_science" airlock_type = "/science" /obj/structure/door_assembly/door_assembly_med base_icon_state = "med" - base_name = "Medical Airlock" + base_name = "Medical airlock" glass_type = "/glass_medical" airlock_type = "/medical" /obj/structure/door_assembly/door_assembly_mai base_icon_state = "mai" - base_name = "Maintenance Airlock" + base_name = "Maintenance airlock" airlock_type = "/maintenance" glass = -1 /obj/structure/door_assembly/door_assembly_ext base_icon_state = "ext" - base_name = "External Airlock" + base_name = "External airlock" airlock_type = "/external" glass = -1 /obj/structure/door_assembly/door_assembly_fre base_icon_state = "fre" - base_name = "Freezer Airlock" + base_name = "Freezer airlock" airlock_type = "/freezer" glass = -1 /obj/structure/door_assembly/door_assembly_hatch base_icon_state = "hatch" - base_name = "Airtight Hatch" + base_name = "airtight hatch" airlock_type = "/hatch" glass = -1 /obj/structure/door_assembly/door_assembly_mhatch base_icon_state = "mhatch" - base_name = "Maintenance Hatch" + base_name = "maintenance hatch" airlock_type = "/maintenance_hatch" glass = -1 /obj/structure/door_assembly/door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly base_icon_state = "highsec" - base_name = "High Security Airlock" + base_name = "high security airlock" airlock_type = "/highsecurity" glass = -1 @@ -221,7 +221,6 @@ W.loc = src user << "You installed the airlock electronics!" src.state = 2 - src.name = "Near finished Airlock Assembly" src.electronics = W else if(istype(W, /obj/item/weapon/crowbar) && state == 2 ) @@ -238,7 +237,6 @@ if(!src) return user << "You removed the airlock electronics!" src.state = 1 - src.name = "Wired Airlock Assembly" electronics.loc = src.loc electronics = null @@ -294,9 +292,9 @@ switch (state) if(0) if (anchored) - name = "Secured " + name = "secured " if(1) - name = "Wired " + name = "wired " if(2) - name = "Near Finished " - name += "[glass == 1 ? "Window " : ""][istext(glass) ? "[glass] Airlock" : base_name] Assembly" + name = "near finished " + name += "[glass == 1 ? "window " : ""][istext(glass) ? "[glass] airlock" : base_name] assembly ([created_name])" diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index aa961f4c10..52afecd66d 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -126,7 +126,8 @@ return ..() /obj/structure/girder/proc/construct_wall(obj/item/stack/material/S, mob/user) - if(S.get_amount() < 2) + var/amount_to_use = reinf_material ? 1 : 2 + if(S.get_amount() < amount_to_use) user << "There isn't enough material here to construct a wall." return 0 @@ -143,7 +144,6 @@ user << "You begin adding the plating..." - var/amount_to_use = reinf_material ? 1 : 2 if(!do_after(user,40) || !S.use(amount_to_use)) return 1 //once we've gotten this far don't call parent attackby() diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index fb48f6249d..3764386679 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -19,12 +19,18 @@ obj/structure/windoor_assembly w_class = 3 var/obj/item/weapon/airlock_electronics/electronics = null + var/created_name = null //Vars to help with the icon's name var/facing = "l" //Does the windoor open to the left or right? var/secure = "" //Whether or not this creates a secure windoor var/state = "01" //How far the door assembly has progressed in terms of sprites +obj/structure/windoor_assembly/secure + name = "secure windoor assembly" + secure = "secure_" + icon_state = "l_secure_windoor_assembly01" + obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0) ..() if(constructed) @@ -65,24 +71,31 @@ obj/structure/windoor_assembly/Destroy() /obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob) - //I really should have spread this out across more states but thin little windoors are hard to sprite. + if(istype(W, /obj/item/weapon/pen)) + var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN) + if(!t) return + if(!in_range(src, usr) && src.loc != usr) return + created_name = t + return + switch(state) if("01") if(istype(W, /obj/item/weapon/weldingtool) && !anchored ) var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0,user)) - user.visible_message("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.") + user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.") playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) if(do_after(user, 40)) if(!src || !WT.isOn()) return - user << "You dissasembled the windoor assembly!" - new /obj/item/stack/material/glass/reinforced(get_turf(src), 5) + user << "You disassembled the windoor assembly!" if(secure) - PoolOrNew(/obj/item/stack/rods, list(get_turf(src), 4)) + new /obj/item/stack/material/glass/reinforced(get_turf(src), 2) + else + new /obj/item/stack/material/glass(get_turf(src), 2) qdel(src) else - user << "You need more welding fuel to dissassemble the windoor assembly." + user << "You need more welding fuel to disassemble the windoor assembly." return //Wrenching an unsecure assembly anchors it in place. Step 4 complete @@ -95,9 +108,9 @@ obj/structure/windoor_assembly/Destroy() user << "You've secured the windoor assembly!" src.anchored = 1 if(src.secure) - src.name = "Secure Anchored Windoor Assembly" + src.name = "secure anchored windoor assembly" else - src.name = "Anchored Windoor Assembly" + src.name = "anchored windoor assembly" //Unwrenching an unsecure assembly un-anchors it. Step 4 undone else if(istype(W, /obj/item/weapon/wrench) && anchored) @@ -109,26 +122,9 @@ obj/structure/windoor_assembly/Destroy() user << "You've unsecured the windoor assembly!" src.anchored = 0 if(src.secure) - src.name = "Secure Windoor Assembly" + src.name = "secure windoor assembly" else - src.name = "Windoor Assembly" - - //Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete. - else if(istype(W, /obj/item/stack/rods) && !secure) - var/obj/item/stack/rods/R = W - if(R.get_amount() < 4) - user << "You need more rods to do this." - return - user << "You start to reinforce the windoor with rods." - - if(do_after(user,40) && !secure) - if (R.use(4)) - user << "You reinforce the windoor." - src.secure = "secure_" - if(src.anchored) - src.name = "Secure Anchored Windoor Assembly" - else - src.name = "Secure Windoor Assembly" + src.name = "windoor assembly" //Adding cable to the assembly. Step 5 complete. else if(istype(W, /obj/item/stack/cable_coil) && anchored) @@ -140,9 +136,9 @@ obj/structure/windoor_assembly/Destroy() user << "You wire the windoor!" src.state = "02" if(src.secure) - src.name = "Secure Wired Windoor Assembly" + src.name = "secure wired windoor assembly" else - src.name = "Wired Windoor Assembly" + src.name = "wired windoor assembly" else ..() @@ -160,9 +156,9 @@ obj/structure/windoor_assembly/Destroy() new/obj/item/stack/cable_coil(get_turf(user), 1) src.state = "01" if(src.secure) - src.name = "Secure Anchored Windoor Assembly" + src.name = "secure anchored windoor assembly" else - src.name = "Anchored Windoor Assembly" + src.name = "anchored windoor assembly" //Adding airlock electronics for access. Step 6 complete. else if(istype(W, /obj/item/weapon/airlock_electronics) && W:icon_state != "door_electronics_smoked") @@ -175,7 +171,7 @@ obj/structure/windoor_assembly/Destroy() user.drop_item() W.loc = src user << "You've installed the airlock electronics!" - src.name = "Near finished Windoor Assembly" + src.name = "near finished windoor assembly" src.electronics = W else W.loc = src.loc @@ -189,9 +185,9 @@ obj/structure/windoor_assembly/Destroy() if(!src || !src.electronics) return user << "You've removed the airlock electronics!" if(src.secure) - src.name = "Secure Wired Windoor Assembly" + src.name = "secure wired windoor assembly" else - src.name = "Wired Windoor Assembly" + src.name = "wired windoor assembly" var/obj/item/weapon/airlock_electronics/ae = electronics electronics = null ae.loc = src.loc @@ -222,6 +218,9 @@ obj/structure/windoor_assembly/Destroy() windoor.base_state = "rightsecure" windoor.set_dir(src.dir) windoor.density = 0 + windoor.name = created_name + spawn(0) + windoor.close() if(src.electronics.one_access) windoor.req_access = null @@ -240,6 +239,9 @@ obj/structure/windoor_assembly/Destroy() windoor.base_state = "right" windoor.set_dir(src.dir) windoor.density = 0 + windoor.name = created_name + spawn(0) + windoor.close() if(src.electronics.one_access) windoor.req_access = null @@ -257,8 +259,11 @@ obj/structure/windoor_assembly/Destroy() ..() //Update to reflect changes(if applicable) - update_icon() + update_state() +/obj/structure/windoor_assembly/proc/update_state() + update_icon() + name += " ([created_name])" //Rotates the windoor assembly clockwise /obj/structure/windoor_assembly/verb/revrotate() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 8e6c2cd0d5..c419de639d 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -161,6 +161,7 @@ if(reinf) tforce *= 0.25 if(health - tforce <= 7 && !reinf) anchored = 0 + update_verbs() update_nearby_icons() step(src, get_dir(AM, src)) take_damage(tforce) diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index ffc2297d02..71c17b5895 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -7,7 +7,6 @@ if(density) can_open = WALL_OPENING //flick("[material.icon_base]fwall_opening", src) - sleep(15) density = 0 update_icon() set_light(0) @@ -20,7 +19,6 @@ //flick("[material.icon_base]fwall_closing", src) density = 1 update_icon() - sleep(15) set_light(1) src.blocks_air = 1 src.opacity = 1 diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index bed720d584..874b6f3998 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -27,6 +27,7 @@ src << "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))" return suiciding = 1 + does_not_breathe = 0 //Prevents ling-suicide zombies, or something var/obj/item/held_item = get_active_hand() if(held_item) var/damagetype = held_item.suicide_act(src) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 622be84c3d..ece5f068d7 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -392,7 +392,7 @@ if (ticker && ticker.current_state >= GAME_STATE_PLAYING) var/dat = "Round Status

Round Status

" dat += "Current Game Mode: [ticker.mode.name]
" - dat += "Round Duration: [round_duration_as_text()]
" + dat += "Round Duration: [roundduration2text()]
" dat += "Emergency shuttle
" if (!emergency_shuttle.online()) dat += "Call Shuttle
" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index a59a88f12a..8653031ea7 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -892,9 +892,9 @@ if (ticker && ticker.mode) return alert(usr, "The game has already started.", null, null, null, null) master_mode = href_list["c_mode2"] - log_admin("[key_name(usr)] set the mode as [master_mode].") - message_admins("\blue [key_name_admin(usr)] set the mode as [master_mode].", 1) - world << "\blue The mode is now: [master_mode]" + log_admin("[key_name(usr)] set the mode as [config.mode_names[master_mode]].") + message_admins("\blue [key_name_admin(usr)] set the mode as [config.mode_names[master_mode]].", 1) + world << "\blue The mode is now: [config.mode_names[master_mode]]" Game() // updates the main game menu world.save_mode(master_mode) .(href, list("c_mode"=1)) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index f252961b6a..cdfd931116 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -137,6 +137,7 @@ prefs.last_id = computer_id //these are gonna be used for banning . = ..() //calls mob.Login() + prefs.sanitize_preferences() if(custom_event_msg && custom_event_msg != "") src << "

Custom Event

" diff --git a/code/modules/client/preference_setup/loadout/loadout.dm b/code/modules/client/preference_setup/loadout/loadout.dm index 31b510ef1a..8f2d5af598 100644 --- a/code/modules/client/preference_setup/loadout/loadout.dm +++ b/code/modules/client/preference_setup/loadout/loadout.dm @@ -52,34 +52,38 @@ var/list/gear_datums = list() S["gear"] << pref.gear /datum/category_item/player_setup_item/loadout/proc/valid_gear_choices(var/max_cost) - var/list/valid_gear_choices = list() + . = list() + var/mob/preference_mob = preference_mob() for(var/gear_name in gear_datums) var/datum/gear/G = gear_datums[gear_name] - if(G.whitelisted && !is_alien_whitelisted(preference_mob(), all_species[G.whitelisted])) + + if(G.whitelisted && !is_alien_whitelisted(preference_mob, all_species[G.whitelisted])) continue if(max_cost && G.cost > max_cost) continue - valid_gear_choices += gear_name - return valid_gear_choices + . += gear_name /datum/category_item/player_setup_item/loadout/sanitize_character() + var/mob/preference_mob = preference_mob() if(!islist(pref.gear)) pref.gear = list() for(var/gear_name in pref.gear) if(!(gear_name in gear_datums)) pref.gear -= gear_name - var/total_cost = 0 for(var/gear_name in pref.gear) if(!gear_datums[gear_name]) + preference_mob << "You cannot have more than one of the \the [gear_name]" pref.gear -= gear_name else if(!(gear_name in valid_gear_choices())) + preference_mob << "You cannot take \the [gear_name] as you are not whitelisted for the species." pref.gear -= gear_name else var/datum/gear/G = gear_datums[gear_name] if(total_cost + G.cost > MAX_GEAR_COST) pref.gear -= gear_name + preference_mob << "You cannot afford to take \the [gear_name]" else total_cost += G.cost diff --git a/code/modules/client/preference_setup/loadout/loadout_suit.dm b/code/modules/client/preference_setup/loadout/loadout_suit.dm index 5134f48b3f..6e6acf08bd 100644 --- a/code/modules/client/preference_setup/loadout/loadout_suit.dm +++ b/code/modules/client/preference_setup/loadout/loadout_suit.dm @@ -180,6 +180,31 @@ path = /obj/item/clothing/suit/wcoat cost = 1 +/datum/gear/suit/wcoat/red + display_name = "red waistcoat" + path = /obj/item/clothing/suit/wcoat/red + +/datum/gear/suit/wcoat/grey + display_name = "grey waistcoat" + path = /obj/item/clothing/suit/wcoat/grey + +/datum/gear/suit/wcoat/brown + display_name = "brown waistcoat" + path = /obj/item/clothing/suit/wcoat/brown + +/datum/gear/suit/swvest + display_name = "black sweatervest" + path = /obj/item/clothing/suit/wcoat/swvest + cost = 1 + +/datum/gear/suit/swvest/blue + display_name = "blue sweatervest" + path = /obj/item/clothing/suit/wcoat/swvest/blue + +/datum/gear/suit/swvest/red + display_name = "red sweatervest" + path = /obj/item/clothing/suit/wcoat/swvest/red + /datum/gear/suit/forensics display_name = "forensics long, red" path = /obj/item/clothing/suit/storage/forensics/red/long diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno.dm b/code/modules/client/preference_setup/loadout/loadout_xeno.dm index 9f814743ae..80e6bb8ebf 100644 --- a/code/modules/client/preference_setup/loadout/loadout_xeno.dm +++ b/code/modules/client/preference_setup/loadout/loadout_xeno.dm @@ -2,14 +2,12 @@ /datum/gear/suit/zhan_furs display_name = "Zhan-Khazan furs (Tajara)" path = /obj/item/clothing/suit/tajaran/furs - whitelisted = "Tajara" sort_category = "Xenowear" /datum/gear/suit/unathi_mantle display_name = "hide mantle (Unathi)" path = /obj/item/clothing/suit/unathi/mantle cost = 1 - whitelisted = "Unathi" sort_category = "Xenowear" /datum/gear/ears/skrell/chains //Chains @@ -25,7 +23,7 @@ var/obj/item/clothing/ears/skrell/chain/chain = chain_style chaintypes[initial(chain.name)] = chain gear_tweaks += new/datum/gear_tweak/path(sortAssoc(chaintypes)) - + /datum/gear/ears/skrell/bands display_name = "headtail band selection (Skrell)" path = /obj/item/clothing/ears/skrell/band @@ -39,7 +37,7 @@ var/obj/item/clothing/ears/skrell/band/band = band_style bandtypes[initial(band.name)] = band gear_tweaks += new/datum/gear_tweak/path(sortAssoc(bandtypes)) - + /datum/gear/ears/skrell/cloth/male display_name = "male headtail cloth selection (Skrell)" path = /obj/item/clothing/ears/skrell/cloth_male @@ -73,17 +71,17 @@ path = /obj/item/clothing/ears/skrell/colored/band sort_category = "Xenowear" whitelisted = "Skrell" - + /datum/gear/ears/skrell/colored/band/New() ..() gear_tweaks = list(gear_tweak_free_color_choice) - + /datum/gear/ears/skrell/colored/chain display_name = "Colored chain (Skrell)" path = /obj/item/clothing/ears/skrell/colored/chain sort_category = "Xenowear" whitelisted = "Skrell" - + /datum/gear/ears/skrell/colored/chain/New() ..() gear_tweaks = list(gear_tweak_free_color_choice) diff --git a/code/modules/client/preference_setup/preference_setup.dm b/code/modules/client/preference_setup/preference_setup.dm index 832d529d7c..f72ff0645c 100644 --- a/code/modules/client/preference_setup/preference_setup.dm +++ b/code/modules/client/preference_setup/preference_setup.dm @@ -129,8 +129,6 @@ // Need due to, for example, the 01_basic module relying on species having been loaded to sanitize correctly but that isn't loaded until module 03_body. for(var/datum/category_item/player_setup_item/PI in items) PI.load_character(S) - for(var/datum/category_item/player_setup_item/PI in items) - PI.sanitize_character() /datum/category_group/player_setup_category/proc/save_character(var/savefile/S) // Sanitize all data, then save it @@ -142,8 +140,6 @@ /datum/category_group/player_setup_category/proc/load_preferences(var/savefile/S) for(var/datum/category_item/player_setup_item/PI in items) PI.load_preferences(S) - for(var/datum/category_item/player_setup_item/PI in items) - PI.sanitize_preferences() /datum/category_group/player_setup_category/proc/save_preferences(var/savefile/S) for(var/datum/category_item/player_setup_item/PI in items) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index f018636f50..9ded7874fb 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -237,12 +237,14 @@ datum/preferences else if(href_list["reload"]) load_preferences() load_character() + sanitize_preferences() else if(href_list["load"]) if(!IsGuestKey(usr.key)) open_load_dialog(usr) return 1 else if(href_list["changeslot"]) load_character(text2num(href_list["changeslot"])) + sanitize_preferences() close_load_dialog(usr) else return 0 diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 9d4ec828b1..e829f6c86f 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -32,7 +32,8 @@ /obj/item/clothing/head/chaplain_hood name = "chaplain's hood" desc = "It's hood that covers the head. It keeps you warm during the space winters." - icon_state = "beret_black" + icon_state = "chaplain_hood" + item_state_slots = list(slot_r_hand_str = "beret_black", slot_l_hand_str = "beret_black") flags_inv = BLOCKHAIR body_parts_covered = HEAD diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 09cc0356ad..3a2ad098ad 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -5,6 +5,11 @@ siemens_coefficient = 0.9 body_parts_covered = 0 +/obj/item/clothing/head/centhat/customs + name = "Customs Hat" + desc = "A formal hat for SolGov Customs Officers." + icon_state = "customshat" + /obj/item/clothing/head/hairflower name = "hair flower pin" icon_state = "hairflower" @@ -73,13 +78,13 @@ /obj/item/clothing/head/nursehat name = "nurse's hat" desc = "It allows quick identification of trained medical personnel." - item_state_slots = list(slot_r_hand_str = "nursehat", slot_l_hand_str = "nursehat") + icon_state = "nursehat" siemens_coefficient = 0.9 body_parts_covered = 0 /obj/item/clothing/head/syndicatefake name = "red space-helmet replica" - item_state_slots = list(slot_r_hand_str = "syndicate-helm-black-red", slot_l_hand_str = "syndicate-helm-black-red") + item_state_slots = list(slot_r_hand_str = "syndicate-helm-black-red", slot_l_hand_str = "syndicate-helm-black-red") icon_state = "syndicate" desc = "A plastic replica of a bloodthirsty mercenary's space helmet, you'll look just like a real murderous criminal operative in this! This is a toy, it is not made for use in space!" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR @@ -125,7 +130,7 @@ /obj/item/clothing/head/justice/pink icon_state = "justicepink" - + /obj/item/clothing/head/rabbitears name = "rabbit ears" desc = "Wearing these makes you looks useless, and only good for your sex appeal." @@ -202,7 +207,7 @@ name = "fez" icon_state = "fez" desc = "You should wear a fez. Fezzes are cool." - + /obj/item/clothing/head/cowboy_hat name = "cowboy hat" desc = "For those that have spurs that go jingle jangle jingle." diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm index 270d21cfeb..10994ea57b 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station.dm @@ -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() diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index c93bb20760..51ec3c6edd 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -55,7 +55,7 @@ flags = CONDUCT fire_resist = T0C+5200 flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT - + /obj/item/clothing/suit/greatcoat name = "great coat" desc = "A heavy great coat" @@ -92,6 +92,31 @@ blood_overlay_type = "armor" body_parts_covered = UPPER_TORSO|LOWER_TORSO +/obj/item/clothing/suit/wcoat/red + name = "red waistcoat" + icon_state = "red_waistcoat" + +/obj/item/clothing/suit/wcoat/grey + name = "grey waistcoat" + icon_state = "grey_waistcoat" + +/obj/item/clothing/suit/wcoat/brown + name = "brown waistcoat" + icon_state = "brown_waistcoat" + +/obj/item/clothing/suit/wcoat/swvest + name = "black sweatervest" + desc = "A sleeveless sweater. Wear this if you don't want your arms to be warm, or if you're a nerd." + icon_state = "sweatervest" + +/obj/item/clothing/suit/wcoat/swvest/blue + name = "blue sweatervest" + icon_state = "sweatervest_blue" + +/obj/item/clothing/suit/wcoat/swvest/red + name = "red sweatervest" + icon_state = "sweatervest_red" + /obj/item/clothing/suit/apron/overalls name = "coveralls" desc = "A set of denim overalls." @@ -197,7 +222,13 @@ desc = "A flowing, black coat." icon_state = "neocoat" item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket") - + +/obj/item/clothing/suit/customs + name = "customs jacket" + desc = "A standard SolGov Customs formal jacket." + icon_state = "customs_jacket" + item_state_slots = list(slot_r_hand_str = "suit_blue", slot_l_hand_str = "suit_blue") + /* * stripper */ @@ -732,4 +763,4 @@ icon_open = "suitjacket_green_open" icon_closed = "suitjacket_green" blood_overlay_type = "coat" - body_parts_covered = UPPER_TORSO|ARMS + body_parts_covered = UPPER_TORSO|ARMS diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index e3c1d6b45d..dc4085ddde 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -33,6 +33,14 @@ icon_state = "waiter" rolled_sleeves = 0 +/obj/item/clothing/under/customs + name = "customs uniform" + desc = "A standard SolGov customs uniform. Complete with epaulettes." + icon_state = "cu_suit" + +/obj/item/clothing/under/customs/khaki + icon_state = "cu_suit_kh" + /obj/item/clothing/under/rank/mailman name = "mailman's jumpsuit" desc = "'Special delivery!'" @@ -253,7 +261,7 @@ /obj/item/clothing/under/dress/stripeddress name = "striped dress" desc = "Fashion in space." - icon_state = "striped_dress" + icon_state = "striped_dress" /obj/item/clothing/under/dress/sailordress name = "sailor dress" @@ -529,7 +537,7 @@ name = "fancy dark red dress" desc = "A short, red dress with a black belt. Fancy." icon_state = "darkreddress" - + /* * swimsuit */ @@ -566,7 +574,7 @@ desc = "An oldfashioned red swimsuit." icon_state = "swim_red" siemens_coefficient = 1 - + /* * pyjamas */ @@ -583,7 +591,7 @@ icon_state = "red_pyjamas" item_state_slots = list(slot_r_hand_str = "red", slot_l_hand_str = "red") body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS - + /obj/item/clothing/under/stripper body_parts_covered = 0 @@ -598,7 +606,7 @@ desc = "A rather skimpy green swimsuit." icon_state = "stripper_g_under" siemens_coefficient = 1 - + /obj/item/clothing/under/stripper/mankini name = "mankini" desc = "No honest man would wear this abomination" diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 049eb61abf..89c5b56d99 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -132,7 +132,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 << "You insert [I] into [src]." @@ -307,7 +307,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 @@ -343,7 +343,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 << "\icon[src]Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining." @@ -363,7 +363,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 << "\icon[src]Access granted. Welcome user '[authenticated_account.owner_name].'" @@ -395,7 +395,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]You don't have enough funds to do that!" @@ -422,7 +422,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]You don't have enough funds to do that!" @@ -478,7 +478,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 = 0 diff --git a/code/modules/economy/Accounts.dm b/code/modules/economy/Accounts.dm index 712c591741..cfd720d4dc 100644 --- a/code/modules/economy/Accounts.dm +++ b/code/modules/economy/Accounts.dm @@ -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 += "Account number: [M.account_number]
" R.info += "Account pin: [M.remote_access_pin]
" R.info += "Starting balance: $[M.money]
" - R.info += "Date and time: [worldtime2text()], [current_date_string]

" + R.info += "Date and time: [stationtime2text()], [current_date_string]

" R.info += "Creation terminal ID: [source_db.machine_id]
" R.info += "Authorised NT officer overseeing creation: [source_db.held_card.registered_name]
" @@ -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 diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index 20278d0757..200c3c8320 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -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 diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index 003816e04c..21ef8b4bfa 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -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]\The [O] doesn't have that much money!" @@ -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]You don't have that much money!" diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm index 109572ffc0..87f7b53a7f 100644 --- a/code/modules/economy/cash_register.dm +++ b/code/modules/economy/cash_register.dm @@ -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 @@ Customer[c_name] Pay Method[p_method] - Station Time[worldtime2text()] + Station Time[stationtime2text()] "} diff --git a/code/modules/economy/retail_scanner.dm b/code/modules/economy/retail_scanner.dm index 0a79ad5018..4ddf058de2 100644 --- a/code/modules/economy/retail_scanner.dm +++ b/code/modules/economy/retail_scanner.dm @@ -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 @@ - +
Customer[c_name]
Pay Method[p_method]
Station Time[worldtime2text()]
Station Time[stationtime2text()]
"} diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index 4fca5eb3d9..534c5aa56d 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -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 += "" html += "" - html += "" + html += "" html += "" html += "" html += "" html += "" - html += "" + html += "" html += "" html += "" html += "" diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm index 07d18c2746..b0304d4f88 100644 --- a/code/modules/events/money_hacker.dm +++ b/code/modules/events/money_hacker.dm @@ -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.
" 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) diff --git a/code/modules/events/money_lotto.dm b/code/modules/events/money_lotto.dm index b905dd576c..df7f8d1674 100644 --- a/code/modules/events/money_lotto.dm +++ b/code/modules/events/money_lotto.dm @@ -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) diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 5173236627..2f5d099e8d 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -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.
" + 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.
" 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) diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 809fa76a3a..b6e2a49fe0 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -395,7 +395,7 @@ var/list/name_to_material weight = 15 door_icon_base = "stone" destruction_desc = "shatters" - window_options = list("One Direction" = 1, "Full Window" = 4) + window_options = list("One Direction" = 1, "Full Window" = 4, "Windoor" = 2) created_window = /obj/structure/window/basic rod_product = /obj/item/stack/material/glass/reinforced @@ -425,6 +425,12 @@ var/list/name_to_material for (var/obj/structure/window/check_window in user.loc) window_count++ possible_directions -= check_window.dir + for (var/obj/structure/windoor_assembly/check_assembly in user.loc) + window_count++ + possible_directions -= check_assembly.dir + for (var/obj/machinery/door/window/check_windoor in user.loc) + window_count++ + possible_directions -= check_windoor.dir // Get the closest available dir to the user's current facing. var/build_dir = SOUTHWEST //Default to southwest for fulltile windows. @@ -435,18 +441,12 @@ var/list/name_to_material else if(choice in list("One Direction","Windoor")) if(possible_directions.len) - for(var/direction in list(user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) )) + for(var/direction in list(user.dir, turn(user.dir,90), turn(user.dir,270), turn(user.dir,180))) if(direction in possible_directions) build_dir = direction break else failed_to_build = 1 - if(!failed_to_build && choice == "Windoor") - if(!is_reinforced()) - user << "This material is not reinforced enough to use for a door." - return - if((locate(/obj/structure/windoor_assembly) in T.contents) || (locate(/obj/machinery/door/window) in T.contents)) - failed_to_build = 1 if(failed_to_build) user << "There is no room in this location." return 1 @@ -454,7 +454,8 @@ var/list/name_to_material var/build_path = /obj/structure/windoor_assembly var/sheets_needed = window_options[choice] if(choice == "Windoor") - build_dir = user.dir + if(is_reinforced()) + build_path = /obj/structure/windoor_assembly/secure else build_path = created_window @@ -484,7 +485,7 @@ var/list/name_to_material weight = 30 stack_origin_tech = "materials=2" composite_material = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT / 2, "glass" = SHEET_MATERIAL_AMOUNT) - window_options = list("One Direction" = 1, "Full Window" = 4, "Windoor" = 5) + window_options = list("One Direction" = 1, "Full Window" = 4, "Windoor" = 2) created_window = /obj/structure/window/reinforced wire_product = null rod_product = null @@ -497,6 +498,7 @@ var/list/name_to_material integrity = 100 icon_colour = "#FC2BC5" stack_origin_tech = list(TECH_MATERIAL = 4) + window_options = list("One Direction" = 1, "Full Window" = 4) created_window = /obj/structure/window/phoronbasic wire_product = null rod_product = /obj/item/stack/material/glass/phoronrglass @@ -507,6 +509,7 @@ var/list/name_to_material stack_type = /obj/item/stack/material/glass/phoronrglass stack_origin_tech = list(TECH_MATERIAL = 5) composite_material = list() //todo + window_options = list("One Direction" = 1, "Full Window" = 4) created_window = /obj/structure/window/phoronreinforced hardness = 40 weight = 30 diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index ce3ec04a25..ea69670885 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -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" diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 6d460dd850..1c6208061d 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -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("\The [user] extends \a [P] towards \the [src].","You extend \the [P] towards \the [src].") - if(do_after(user,25)) - user << "\icon[P] [src] has been excavated to a depth of [2*excavation_level]cm." + if(do_after(user, 15)) + user << "\The [src] has been excavated to a depth of [excavation_level]cm." 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 = ". [pick("There is a crunching noise","[W] collides with some different rock","Part of the rock face crumbles away","Something breaks under [W]")]" - user << "You start [P.drill_verb][fail_message ? fail_message : ""]." + user << "You start [P.drill_verb][fail_message]." 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 << "You finish [P.drill_verb] \the [src]." 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 << "You finish [P.drill_verb] \the [src]." - 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("\The [pick("[display_name] crumbles away into dust","[display_name] breaks apart")].") qdel(X) diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 19cdf2a18b..1f78c7ce77 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -1,5 +1,5 @@ /obj/item/weapon/ore - name = "rock" + name = "small rock" icon = 'icons/obj/mining.dmi' icon_state = "ore2" w_class = 2 diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 9fe7f221e1..5e7cfe2603 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -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 diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 4f14216747..93f6ceb47e 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -194,7 +194,7 @@ on_hear_radio(part_a, speaker_name, track, part_b, formatted) /proc/say_timestamp() - return "\[[worldtime2text()]\]" + return "\[[stationtime2text()]\]" /mob/proc/on_hear_radio(part_a, speaker_name, track, part_b, formatted) src << "[part_a][speaker_name][part_b][formatted]" diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index 476e1c1117..7f4dc972c4 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -7,7 +7,7 @@ /mob/living/carbon/proc/breathe() //if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return - if(!should_have_organ(O_LUNGS) || does_not_breathe) return + if(!should_have_organ(O_LUNGS)) return var/datum/gas_mixture/breath = null diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c1926cb71a..df1bfc4667 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1025,9 +1025,8 @@ src << msg organ.take_damage(rand(1,3), 0, 0) - if(!(organ.robotic >= ORGAN_ROBOT) && !(should_have_organ(O_HEART))) //There is no blood in protheses. + if(!(organ.robotic >= ORGAN_ROBOT) && (should_have_organ(O_HEART))) //There is no blood in protheses. organ.status |= ORGAN_BLEEDING - src.adjustToxLoss(rand(1,3)) /mob/living/carbon/human/verb/check_pulse() set category = "Object" diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index df851dfa25..1d716b519d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -18,12 +18,11 @@ emp_act //Shields var/shield_check = check_shields(P.damage, P, null, def_zone, "the [P.name]") - if(shield_check) - if(shield_check < 0) - return shield_check - else - P.on_hit(src, 2, def_zone) - return 2 + if(shield_check) // If the block roll succeeded, this is true. + if(shield_check < 0) // The shield did something weird and the bullet needs to keep doing things (e.g. it was reflected). + return shield_check // Likely equal to PROJECTILE_FORCE_MISS or PROJECTILE_CONTINUE. + else // Otherwise we blocked normally and stopped all the damage. + return 0 //Shrapnel if(P.can_embed()) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 93706ccdb4..39d190ddcd 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -4,9 +4,9 @@ #define HUMAN_MAX_OXYLOSS 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it. #define HUMAN_CRIT_MAX_OXYLOSS ( 2.0 / 6) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 50HP to get through, so (1/6)*last_tick_duration per second. Breaths however only happen every 4 ticks. last_tick_duration = ~2.0 on average -#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point -#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point -#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point +#define HEAT_DAMAGE_LEVEL_1 5 //Amount of damage applied when your body temperature just passes the 360.15k safety point +#define HEAT_DAMAGE_LEVEL_2 10 //Amount of damage applied when your body temperature passes the 400K point +#define HEAT_DAMAGE_LEVEL_3 20 //Amount of damage applied when your body temperature passes the 1000K point #define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point #define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point @@ -327,6 +327,11 @@ if(status_flags & GODMODE) return + if(does_not_breathe) + failed_last_breath = 0 + adjustOxyLoss(-5) + return + if(!breath || (breath.total_moles == 0) || suiciding) failed_last_breath = 1 if(suiciding) @@ -1184,10 +1189,10 @@ // if(resting || lying || sleeping) rest.icon_state = "rest1" // else rest.icon_state = "rest0" if(toxin) - if(hal_screwyhud == 4 || phoron_alert) toxin.icon_state = "tox1" + if(hal_screwyhud == 4 || (phoron_alert && !does_not_breathe)) toxin.icon_state = "tox1" else toxin.icon_state = "tox0" if(oxygen) - if(hal_screwyhud == 3 || oxygen_alert) oxygen.icon_state = "oxy1" + if(hal_screwyhud == 3 || (oxygen_alert && !does_not_breathe)) oxygen.icon_state = "oxy1" else oxygen.icon_state = "oxy0" if(fire) if(fire_alert) fire.icon_state = "fire[fire_alert]" //fire_alert is either 0 if no alert, 1 for cold and 2 for heat. diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index bcd204e499..ebbacc747e 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -103,11 +103,11 @@ min_age = 17 max_age = 80 - blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \ - S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \ - influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \ - of family and politics. They prefer colder environments, and speak a variety of languages, mostly Siik'Maas, \ - using unique inflections their mouths form." + blurb = "The Tajaran are a mammalian species resembling roughly felines, hailing from Meralar in the Rarkajar system. \ + While reaching to the stars independently from outside influences, the humans engaged them in peaceful trade contact \ + and have accelerated the fledgling culture into the interstellar age. Their history is full of war and highly fractious \ + governments, something that permeates even to today's times. They prefer colder, tundra-like climates, much like their \ + home worlds and speak a variety of languages, especially Siik and Akhani." cold_level_1 = 200 //Default 260 cold_level_2 = 140 //Default 200 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index d84dfe28a8..b9bf50a51c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -565,7 +565,21 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c var/icon_list[] = list( "default", "floating face", - "carp" + "carp", + "ian", + "runtime", + "poly", + "pun pun", + "male human", + "female human", + "male unathi", + "female unathi", + "male tajara", + "female tajara", + "male tesharii", + "female tesharii", + "male skrell", + "female skrell" ) input = input("Please select a hologram:") as null|anything in icon_list if(input) @@ -577,6 +591,35 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo2")) if("carp") holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo4")) + if("ian") + holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"corgi")) + if("runtime") + holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"cat")) + if("poly") + holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"parrot_fly")) + if("pun pun") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"punpun")) + if("male human") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holohumm")) + if("female human") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holohumf")) + if("male unathi") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holounam")) + if("female unathi") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holounaf")) + if("male tajara") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotajm")) + if("female tajara") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotajf")) + if("male tesharii") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotesm")) + if("female tesharii") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holotesf")) + if("male skrell") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holoskrm")) + if("female skrell") + holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holoskrf")) + return //Toggles the luminosity and applies it by re-entereing the camera. diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 081eb39a5c..9d7ba1bc63 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -654,8 +654,8 @@ if(.) if(statpanel("Status") && ticker && ticker.current_state != GAME_STATE_PREGAME) - stat("Station Time", worldtime2text()) - stat("Round Duration", round_duration_as_text()) + stat("Station Time", stationtime2text()) + stat("Round Duration", roundduration2text()) if(client.holder) if(statpanel("Status")) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 46cead5a3b..060bd2b651 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -76,7 +76,7 @@ stat("Game Mode:", "Secret") else if(ticker.hide_mode == 0) - stat("Game Mode:", "[master_mode]") // Old setting for showing the game mode + stat("Game Mode:", "[config.mode_names[master_mode]]") // Old setting for showing the game mode if(ticker.current_state == GAME_STATE_PREGAME) stat("Time To Start:", "[ticker.pregame_timeleft][round_progressing ? "" : " (DELAYED)"]") @@ -362,7 +362,7 @@ var/dat = "
" dat += "Welcome, [name].
" - dat += "Round Duration: [round_duration_as_text()]
" + dat += "Round Duration: [roundduration2text()]
" if(emergency_shuttle) //In case Nanotrasen decides reposess CentComm's shuttles. if(emergency_shuttle.going_to_centcom()) //Shuttle is going to centcomm, not recalled diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 2c5f24984a..105a547e08 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -135,16 +135,18 @@ var/const/BLOOD_VOLUME_SURVIVE = 40 drip(blood_max) //Makes a blood drop, leaking amt units of blood from the mob -/mob/living/carbon/human/proc/drip(var/amt as num) +/mob/living/carbon/human/proc/drip(var/amt) + if(remove_blood(amt)) + blood_splatter(src,src) +/mob/living/carbon/human/proc/remove_blood(var/amt) if(!should_have_organ(O_HEART)) //TODO: Make drips come from the reagents instead. - return + return 0 if(!amt) - return + return 0 - vessel.remove_reagent("blood",amt) - blood_splatter(src,src) + return vessel.remove_reagent("blood",amt * (src.mob_size/MOB_MEDIUM)) /**************************************************** BLOOD TRANSFERS diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index d50d5009e7..612cda4a98 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -474,6 +474,11 @@ This function completely restores a damaged organ to perfect condition. wounds += I owner.custom_pain("You feel something rip in your [name]!", 1) +//Burn damage can cause fluid loss due to blistering and cook-off + if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT)) + var/fluid_loss = (damage/(owner.maxHealth - config.health_threshold_dead)) * owner.species.blood_volume*(1 - BLOOD_VOLUME_SURVIVE/100) + owner.remove_blood(fluid_loss) + // first check whether we can widen an existing wound if(wounds.len > 0 && prob(max(50+(number_wounds-1)*10,90))) if((type == CUT || type == BRUISE) && damage >= 5) @@ -733,7 +738,7 @@ Note that amputating the affected organ does in fact remove the infection from t else brute_dam += W.damage - if(!(robotic >= ORGAN_ROBOT) && W.bleeding() && (H && !H.should_have_organ(O_HEART))) + if(!(robotic >= ORGAN_ROBOT) && W.bleeding() && (H && H.should_have_organ(O_HEART))) W.bleed_timer-- status |= ORGAN_BLEEDING diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 5e296531f4..bfb3e482be 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -239,8 +239,8 @@ t = replacetext(t, "\[/i\]", "") t = replacetext(t, "\[u\]", "") t = replacetext(t, "\[/u\]", "") - t = replacetext(t, "\[time\]", "[worldtime2text()]") - t = replacetext(t, "\[date\]", "[worlddate2text()]") + t = replacetext(t, "\[time\]", "[stationtime2text()]") + t = replacetext(t, "\[date\]", "[stationtime2text()]") t = replacetext(t, "\[large\]", "") t = replacetext(t, "\[/large\]", "") t = replacetext(t, "\[sign\]", "[get_signature(P, user)]") diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 59428ceb94..930cc54d82 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -91,6 +91,8 @@ /obj/item/ammo_magazine/New() ..() + pixel_x = rand(-5, 5) + pixel_y = rand(-5, 5) if(multiple_sprites) initialize_magazine_icondata(src) diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index b2d04233f2..57b62e609d 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -97,30 +97,30 @@ return 0 if(my_atom.flags & NOREACT) // No reactions here return 0 - + var/reaction_occured var/list/effect_reactions = list() var/list/eligible_reactions = list() for(var/i in 1 to PROCESS_REACTION_ITER) reaction_occured = 0 - + //need to rebuild this to account for chain reactions for(var/datum/reagent/R in reagent_list) eligible_reactions |= chemical_reactions_list[R.id] - + for(var/datum/chemical_reaction/C in eligible_reactions) if(C.can_happen(src) && C.process(src)) effect_reactions |= C reaction_occured = 1 - + eligible_reactions.Cut() - + if(!reaction_occured) break - + for(var/datum/chemical_reaction/C in effect_reactions) C.post_reaction(src) - + update_total() return reaction_occured @@ -300,7 +300,7 @@ amount -= spill if(spill) splash(target.loc, spill, multiplier, copy, min_spill, max_spill) - + trans_to(target, amount, multiplier, copy) /datum/reagents/proc/trans_id_to(var/atom/target, var/id, var/amount = 1) @@ -366,6 +366,10 @@ var/perm = 1 if(isliving(target)) //will we ever even need to tranfer reagents to non-living mobs? var/mob/living/L = target + if(ishuman(L)) + var/mob/living/carbon/human/H = L + if(H.check_shields(0, null, null, null, "the spray") == 1) //If they block the spray, it does nothing. + amount = 0 perm = L.reagent_permeability() return trans_to_mob(target, amount, CHEM_TOUCH, perm, copy) @@ -416,4 +420,4 @@ /* Atom reagent creation - use it all the time */ /atom/proc/create_reagents(var/max_vol) - reagents = new/datum/reagents(max_vol, src) + reagents = new/datum/reagents(max_vol, src) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index ac054b224f..0d83a5725c 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -133,7 +133,7 @@ M.adjustOxyLoss(3 * removed) M.Weaken(10) M.silent = max(M.silent, 10) - M.tod = worldtime2text() + M.tod = stationtime2text() /datum/reagent/toxin/zombiepowder/Destroy() if(holder && holder.my_atom && ismob(holder.my_atom)) diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index c0189dd1c6..3114f12f55 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -6,7 +6,7 @@ amount_per_transfer_from_this = 10 volume = 100 item_state = "broken_beer" //Generic held-item sprite until unique ones are made. - force = 5 + force = 6 var/smash_duration = 5 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets) var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it @@ -172,7 +172,7 @@ desc = "A bottle with a sharp broken bottom." icon = 'icons/obj/drinks.dmi' icon_state = "broken_bottle" - force = 9 + force = 10 throwforce = 5 throw_speed = 3 throw_range = 5 diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 186c869ad3..24e0c7ae4e 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -389,7 +389,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, PR.name = "list of researched technologies" PR.info = "
[station_name()] Science Laboratories" PR.info += "

[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report

" - PR.info += "report prepared at [worldtime2text()] station time

" + PR.info += "report prepared at [stationtime2text()] station time

" if(text2num(href_list["print"]) == 2) PR.info += GetResearchListInfo() else diff --git a/code/modules/research/xenoarchaeology/artifact/artifact.dm b/code/modules/research/xenoarchaeology/artifact/artifact.dm deleted file mode 100644 index 71819efc65..0000000000 --- a/code/modules/research/xenoarchaeology/artifact/artifact.dm +++ /dev/null @@ -1,123 +0,0 @@ - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Large finds - (Potentially) active alien machinery from the dawn of time - -/datum/artifact_find - var/artifact_id - var/artifact_find_type - var/artifact_detect_range - -/datum/artifact_find/New() - artifact_detect_range = rand(5,300) - - artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]" - - artifact_find_type = pick(\ - 5;/obj/machinery/power/supermatter,\ - 5;/obj/structure/constructshell,\ - 5;/obj/machinery/syndicate_beacon,\ - 25;/obj/machinery/power/supermatter/shard,\ - 50;/obj/structure/cult/pylon,\ - 100;/obj/machinery/auto_cloner,\ - 100;/obj/machinery/giga_drill,\ - 100;/obj/machinery/replicator,\ - 150;/obj/structure/crystal,\ - 1000;/obj/machinery/artifact) - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Boulders - sometimes turn up after excavating turf - excavate further to try and find large xenoarch finds - -/obj/structure/boulder - name = "rocky debris" - desc = "Leftover rock from an excavation, it's been partially dug out already but there's still a lot to go." - icon = 'icons/obj/mining.dmi' - icon_state = "boulder1" - density = 1 - opacity = 1 - anchored = 1 - var/excavation_level = 0 - var/datum/geosample/geological_data - var/datum/artifact_find/artifact_find - var/last_act = 0 - -/obj/structure/boulder/New() - icon_state = "boulder[rand(1,4)]" - excavation_level = rand(5,50) - -/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/device/core_sampler)) - src.geological_data.artifact_distance = rand(-100,100) / 100 - src.geological_data.artifact_id = artifact_find.artifact_id - - var/obj/item/device/core_sampler/C = W - C.sample_item(src, user) - return - - if (istype(W, /obj/item/device/depth_scanner)) - var/obj/item/device/depth_scanner/C = W - C.scan_atom(user, src) - return - - if (istype(W, /obj/item/device/measuring_tape)) - var/obj/item/device/measuring_tape/P = W - user.visible_message("\blue[user] extends [P] towards [src].","\blue You extend [P] towards [src].") - if(do_after(user,40)) - user << "\blue \icon[P] [src] has been excavated to a depth of [2*src.excavation_level]cm." - return - - if (istype(W, /obj/item/weapon/pickaxe)) - var/obj/item/weapon/pickaxe/P = W - - if(last_act + P.digspeed > world.time)//prevents message spam - return - last_act = world.time - - user << "\red You start [P.drill_verb] [src]." - - - - if(!do_after(user,P.digspeed)) - return - - user << "\blue You finish [P.drill_verb] [src]." - excavation_level += P.excavation_amount - - if(excavation_level > 100) - //failure - user.visible_message("[src] suddenly crumbles away.",\ - "\red [src] has disintegrated under your onslaught, any secrets it was holding are long gone.") - qdel(src) - return - - if(prob(excavation_level)) - //success - if(artifact_find) - var/spawn_type = artifact_find.artifact_find_type - var/obj/O = new spawn_type(get_turf(src)) - if(istype(O,/obj/machinery/artifact)) - var/obj/machinery/artifact/X = O - if(X.my_effect) - X.my_effect.artifact_id = artifact_find.artifact_id - src.visible_message("[src] suddenly crumbles away.") - else - user.visible_message("[src] suddenly crumbles away.",\ - "\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.") - qdel(src) - -/obj/structure/boulder/Bumped(AM) - . = ..() - if(istype(AM,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = AM - var/obj/item/weapon/pickaxe/P = H.get_inactive_hand() - if(istype(P)) - src.attackby(P, H) - - else if(istype(AM,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/R = AM - if(istype(R.module_active,/obj/item/weapon/pickaxe)) - attackby(R.module_active,R) - - else if(istype(AM,/obj/mecha)) - var/obj/mecha/M = AM - if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill)) - M.selected.action(src) diff --git a/code/modules/research/xenoarchaeology/chemistry.dm b/code/modules/research/xenoarchaeology/chemistry.dm deleted file mode 100644 index 7556369b11..0000000000 --- a/code/modules/research/xenoarchaeology/chemistry.dm +++ /dev/null @@ -1,90 +0,0 @@ - -//chemistry stuff here so that it can be easily viewed/modified - -/obj/item/weapon/reagent_containers/glass/solution_tray - name = "solution tray" - desc = "A small, open-topped glass container for delicate research samples. It sports a re-useable strip for labelling with a pen." - icon = 'icons/obj/device.dmi' - icon_state = "solution_tray" - matter = list("glass" = 5) - w_class = 2.0 - amount_per_transfer_from_this = 1 - possible_transfer_amounts = list(1, 2) - volume = 2 - flags = OPENCONTAINER - -obj/item/weapon/reagent_containers/glass/solution_tray/attackby(obj/item/weapon/W as obj, mob/living/user as mob) - if(istype(W, /obj/item/weapon/pen)) - var/new_label = sanitizeSafe(input("What should the new label be?","Label solution tray"), MAX_NAME_LEN) - if(new_label) - name = "solution tray ([new_label])" - user << "\blue You write on the label of the solution tray." - else - ..(W, user) - -/obj/item/weapon/storage/box/solution_trays - name = "solution tray box" - icon_state = "solution_trays" - - New() - ..() - new /obj/item/weapon/reagent_containers/glass/solution_tray( src ) - new /obj/item/weapon/reagent_containers/glass/solution_tray( src ) - new /obj/item/weapon/reagent_containers/glass/solution_tray( src ) - new /obj/item/weapon/reagent_containers/glass/solution_tray( src ) - new /obj/item/weapon/reagent_containers/glass/solution_tray( src ) - new /obj/item/weapon/reagent_containers/glass/solution_tray( src ) - new /obj/item/weapon/reagent_containers/glass/solution_tray( src ) - -/obj/item/weapon/reagent_containers/glass/beaker/tungsten - name = "beaker 'tungsten'" - New() - ..() - reagents.add_reagent("tungsten",50) - update_icon() - -/obj/item/weapon/reagent_containers/glass/beaker/oxygen - name = "beaker 'oxygen'" - New() - ..() - reagents.add_reagent("oxygen",50) - update_icon() - -/obj/item/weapon/reagent_containers/glass/beaker/sodium - name = "beaker 'sodium'" - New() - ..() - reagents.add_reagent("sodium",50) - update_icon() - -/obj/item/weapon/reagent_containers/glass/beaker/lithium - name = "beaker 'lithium'" - - New() - ..() - reagents.add_reagent("lithium",50) - update_icon() - -/obj/item/weapon/reagent_containers/glass/beaker/water - name = "beaker 'water'" - - New() - ..() - reagents.add_reagent("water",50) - update_icon() - -/obj/item/weapon/reagent_containers/glass/beaker/water - name = "beaker 'water'" - - New() - ..() - reagents.add_reagent("water",50) - update_icon() - -/obj/item/weapon/reagent_containers/glass/beaker/fuel - name = "beaker 'fuel'" - - New() - ..() - reagents.add_reagent("fuel",50) - update_icon() diff --git a/code/modules/research/xenoarchaeology/finds/finds_defines.dm b/code/modules/research/xenoarchaeology/finds/finds_defines.dm deleted file mode 100644 index 4026cc0a03..0000000000 --- a/code/modules/research/xenoarchaeology/finds/finds_defines.dm +++ /dev/null @@ -1,281 +0,0 @@ - -#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 -//eggs -//droppings -//footprints -//alien clothing - -//DNA sampling from fossils, or a new archaeo type specifically for it? - -//descending order of likeliness to spawn -#define DIGSITE_GARDEN 1 -#define DIGSITE_ANIMAL 2 -#define DIGSITE_HOUSE 3 -#define DIGSITE_TECHNICAL 4 -#define DIGSITE_TEMPLE 5 -#define DIGSITE_WAR 6 - -/proc/get_responsive_reagent(var/find_type) - switch(find_type) - if(ARCHAEO_BOWL) - return "mercury" - if(ARCHAEO_URN) - return "mercury" - if(ARCHAEO_CUTLERY) - return "mercury" - if(ARCHAEO_STATUETTE) - return "mercury" - if(ARCHAEO_INSTRUMENT) - return "mercury" - if(ARCHAEO_COIN) - return "iron" - if(ARCHAEO_KNIFE) - return "iron" - if(ARCHAEO_HANDCUFFS) - return "mercury" - if(ARCHAEO_BEARTRAP) - return "mercury" - if(ARCHAEO_LIGHTER) - return "mercury" - if(ARCHAEO_BOX) - return "mercury" - if(ARCHAEO_GASTANK) - return "mercury" - if(ARCHAEO_TOOL) - return "iron" - if(ARCHAEO_METAL) - return "iron" - if(ARCHAEO_PEN) - return "mercury" - if(ARCHAEO_CRYSTAL) - return "nitrogen" - if(ARCHAEO_CULTBLADE) - return "potassium" - if(ARCHAEO_TELEBEACON) - return "potassium" - if(ARCHAEO_CLAYMORE) - return "iron" - if(ARCHAEO_CULTROBES) - return "potassium" - if(ARCHAEO_SOULSTONE) - return "nitrogen" - if(ARCHAEO_SHARD) - return "nitrogen" - if(ARCHAEO_RODS) - return "iron" - if(ARCHAEO_STOCKPARTS) - return "potassium" - if(ARCHAEO_KATANA) - return "iron" - if(ARCHAEO_LASER) - return "iron" - if(ARCHAEO_GUN) - return "iron" - if(ARCHAEO_UNKNOWN) - return "mercury" - if(ARCHAEO_FOSSIL) - return "carbon" - if(ARCHAEO_SHELL) - return "carbon" - if(ARCHAEO_PLANT) - return "carbon" - if(ARCHAEO_REMAINS_HUMANOID) - return "carbon" - if(ARCHAEO_REMAINS_ROBOT) - return "carbon" - if(ARCHAEO_REMAINS_XENO) - return "carbon" - if(ARCHAEO_GASMASK) - return "carbon" - return "phoron" - -//see /turf/simulated/mineral/New() in code/modules/mining/mine_turfs.dm -/proc/get_random_digsite_type() - return pick(100;DIGSITE_GARDEN,95;DIGSITE_ANIMAL,90;DIGSITE_HOUSE,85;DIGSITE_TECHNICAL,80;DIGSITE_TEMPLE,75;DIGSITE_WAR) - -/proc/get_random_find_type(var/digsite) - - var/find_type = 0 - switch(digsite) - if(DIGSITE_GARDEN) - find_type = pick(\ - 100;ARCHAEO_PLANT,\ - 25;ARCHAEO_SHELL,\ - 25;ARCHAEO_FOSSIL,\ - 5;ARCHAEO_BEARTRAP\ - ) - if(DIGSITE_ANIMAL) - find_type = pick(\ - 100;ARCHAEO_FOSSIL,\ - 50;ARCHAEO_SHELL,\ - 50;ARCHAEO_PLANT,\ - 25;ARCHAEO_BEARTRAP\ - ) - if(DIGSITE_HOUSE) - find_type = pick(\ - 100;ARCHAEO_BOWL,\ - 100;ARCHAEO_URN,\ - 100;ARCHAEO_CUTLERY,\ - 100;ARCHAEO_STATUETTE,\ - 100;ARCHAEO_INSTRUMENT,\ - 100;ARCHAEO_PEN,\ - 100;ARCHAEO_LIGHTER,\ - 100;ARCHAEO_BOX,\ - 75;ARCHAEO_GASMASK,\ - 75;ARCHAEO_COIN,\ - 75;ARCHAEO_UNKNOWN,\ - 50;ARCHAEO_SHARD,\ - 50;ARCHAEO_RODS,\ - 25;ARCHAEO_METAL\ - ) - if(DIGSITE_TECHNICAL) - find_type = pick(\ - 125;ARCHAEO_GASMASK,\ - 100;ARCHAEO_METAL,\ - 100;ARCHAEO_GASTANK,\ - 100;ARCHAEO_TELEBEACON,\ - 100;ARCHAEO_TOOL,\ - 100;ARCHAEO_STOCKPARTS,\ - 75;ARCHAEO_SHARD,\ - 75;ARCHAEO_RODS,\ - 75;ARCHAEO_UNKNOWN,\ - 50;ARCHAEO_HANDCUFFS,\ - 50;ARCHAEO_BEARTRAP,\ - ) - if(DIGSITE_TEMPLE) - find_type = pick(\ - 200;ARCHAEO_CULTROBES,\ - 200;ARCHAEO_STATUETTE,\ - 100;ARCHAEO_URN,\ - 100;ARCHAEO_BOWL,\ - 100;ARCHAEO_KNIFE,\ - 100;ARCHAEO_CRYSTAL,\ - 75;ARCHAEO_CULTBLADE,\ - 50;ARCHAEO_SOULSTONE,\ - 50;ARCHAEO_UNKNOWN,\ - 25;ARCHAEO_HANDCUFFS,\ - 25;ARCHAEO_BEARTRAP,\ - 10;ARCHAEO_KATANA,\ - 10;ARCHAEO_CLAYMORE,\ - 10;ARCHAEO_SHARD,\ - 10;ARCHAEO_RODS,\ - 10;ARCHAEO_METAL,\ - 10;ARCHAEO_GASMASK,\ - ) - if(DIGSITE_WAR) - find_type = pick(\ - 100;ARCHAEO_GUN,\ - 100;ARCHAEO_KNIFE,\ - 75;ARCHAEO_LASER,\ - 75;ARCHAEO_KATANA,\ - 75;ARCHAEO_CLAYMORE,\ - 50;ARCHAEO_UNKNOWN,\ - 50;ARCHAEO_CULTROBES,\ - 50;ARCHAEO_CULTBLADE,\ - 50;ARCHAEO_GASMASK,\ - 25;ARCHAEO_HANDCUFFS,\ - 25;ARCHAEO_BEARTRAP,\ - 25;ARCHAEO_TOOL\ - ) - return find_type - -var/list/responsive_carriers = list( \ - "carbon", \ - "potassium", \ - "hydrogen", \ - "nitrogen", \ - "mercury", \ - "iron", \ - "chlorine", \ - "phosphorus", \ - "phoron") - -var/list/finds_as_strings = list( \ - "Trace organic cells", \ - "Long exposure particles", \ - "Trace water particles", \ - "Crystalline structures", \ - "Metallic derivative", \ - "Metallic composite", \ - "Metamorphic/igneous rock composite", \ - "Metamorphic/sedimentary rock composite", \ - "Anomalous material" ) - -#undef ARCHAEO_BOWL -#undef ARCHAEO_URN -#undef ARCHAEO_CUTLERY -#undef ARCHAEO_STATUETTE -#undef ARCHAEO_INSTRUMENT -#undef ARCHAEO_KNIFE -#undef ARCHAEO_COIN -#undef ARCHAEO_HANDCUFFS -#undef ARCHAEO_BEARTRAP -#undef ARCHAEO_LIGHTER -#undef ARCHAEO_BOX -#undef ARCHAEO_GASTANK -#undef ARCHAEO_TOOL -#undef ARCHAEO_METAL -#undef ARCHAEO_PEN -#undef ARCHAEO_CRYSTAL -#undef ARCHAEO_CULTBLADE -#undef ARCHAEO_TELEBEACON -#undef ARCHAEO_CLAYMORE -#undef ARCHAEO_CULTROBES -#undef ARCHAEO_SOULSTONE -#undef ARCHAEO_SHARD -#undef ARCHAEO_RODS -#undef ARCHAEO_STOCKPARTS -#undef ARCHAEO_KATANA -#undef ARCHAEO_LASER -#undef ARCHAEO_GUN -#undef ARCHAEO_UNKNOWN -#undef ARCHAEO_FOSSIL -#undef ARCHAEO_SHELL -#undef ARCHAEO_PLANT -#undef ARCHAEO_REMAINS_HUMANOID -#undef ARCHAEO_REMAINS_ROBOT -#undef ARCHAEO_REMAINS_XENO -#undef ARCHAEO_GASMASK -#undef MAX_ARCHAEO - -#undef DIGSITE_GARDEN -#undef DIGSITE_ANIMAL -#undef DIGSITE_HOUSE -#undef DIGSITE_TECHNICAL -#undef DIGSITE_TEMPLE -#undef DIGSITE_WAR diff --git a/code/modules/research/xenoarchaeology/geosample.dm b/code/modules/research/xenoarchaeology/geosample.dm deleted file mode 100644 index 535a0b4f07..0000000000 --- a/code/modules/research/xenoarchaeology/geosample.dm +++ /dev/null @@ -1,129 +0,0 @@ -/* -#define FIND_PLANT 1 -#define FIND_BIO 2 -#define FIND_METEORIC 3 -#define FIND_ICE 4 -#define FIND_CRYSTALLINE 5 -#define FIND_METALLIC 6 -#define FIND_IGNEOUS 7 -#define FIND_METAMORPHIC 8 -#define FIND_SEDIMENTARY 9 -#define FIND_NOTHING 10 -*/ - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Rock sliver - -/obj/item/weapon/rocksliver - name = "rock sliver" - desc = "It looks extremely delicate." - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "sliver1" //0-4 - w_class = 1 - sharp = 1 - //item_state = "electronic" - var/source_rock = "/turf/simulated/mineral/" - var/datum/geosample/geological_data - -/obj/item/weapon/rocksliver/New() - icon_state = "sliver[rand(1,3)]" - pixel_x = rand(0,16)-8 - pixel_y = rand(0,8)-8 - create_reagents(50) - reagents.add_reagent("ground_rock",50) - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Geosample datum - -/datum/geosample - var/age = 0 //age can correspond to different archaeological finds - var/age_thousand = 0 - var/age_million = 0 - var/age_billion = 0 - var/artifact_id = "" //id of a nearby artifact, if there is one - var/artifact_distance = -1 //proportional to distance - var/source_mineral = "chlorine" //machines will pop up a warning telling players that the sample may be confused - // - //var/source_mineral - //all potential finds are initialised to null, so nullcheck before you access them - var/list/find_presence = list() - -/datum/geosample/New(var/turf/simulated/mineral/container) - - UpdateTurf(container) - -//this should only need to be called once -/datum/geosample/proc/UpdateTurf(var/turf/simulated/mineral/container) - set background = 1 - if(!container || !istype(container)) - return - - age = rand(1,999) - - if(container.mineral) - if(islist(container.mineral.xarch_ages)) - var/list/ages = container.mineral.xarch_ages - if(ages["thousand"]) - age_thousand = rand(1,ages["thousand"]) - if(ages["million"]) - age_million = rand(1,ages["million"]) - if(ages["billion"]) - if(ages["billion_lower"]) - age_billion = rand(ages["billion_lower"],ages["billion"]) - else - age_billion = rand(1,ages["billion"]) - if(container.mineral.xarch_source_mineral) - source_mineral = container.mineral.xarch_source_mineral - - if(prob(75)) - find_presence["phosphorus"] = rand(1,500) / 100 - if(prob(25)) - find_presence["mercury"] = rand(1,500) / 100 - find_presence["chlorine"] = rand(500,2500) / 100 - - //loop over finds, grab any relevant stuff - for(var/datum/find/F in container.finds) - var/responsive_reagent = get_responsive_reagent(F.find_type) - find_presence[responsive_reagent] = F.dissonance_spread - - //loop over again to reset values to percentages - var/total_presence = 0 - for(var/carrier in find_presence) - total_presence += find_presence[carrier] - for(var/carrier in find_presence) - find_presence[carrier] = find_presence[carrier] / total_presence - - /*for(var/entry in find_presence) - total_spread += find_presence[entry]*/ - -//have this separate from UpdateTurf() so that we dont have a billion turfs being updated (redundantly) every time an artifact spawns -/datum/geosample/proc/UpdateNearbyArtifactInfo(var/turf/simulated/mineral/container) - if(!container || !istype(container)) - return - - if(container.artifact_find) - artifact_distance = rand() - artifact_id = container.artifact_find.artifact_id - else - if(master_controller) //Sanity check due to runtimes ~Z - for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs) - if(T.artifact_find) - var/cur_dist = get_dist(container, T) * 2 - if( (artifact_distance < 0 || cur_dist < artifact_distance) && cur_dist <= T.artifact_find.artifact_detect_range ) - artifact_distance = cur_dist + rand() * 2 - 1 - artifact_id = T.artifact_find.artifact_id - else - master_controller.artifact_spawning_turfs.Remove(T) - -/* -#undef FIND_PLANT -#undef FIND_BIO -#undef FIND_METEORIC -#undef FIND_ICE -#undef FIND_CRYSTALLINE -#undef FIND_METALLIC -#undef FIND_IGNEOUS -#undef FIND_METAMORPHIC -#undef FIND_SEDIMENTARY -#undef FIND_NOTHING -*/ diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm b/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm deleted file mode 100644 index ebab6fac76..0000000000 --- a/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm +++ /dev/null @@ -1,249 +0,0 @@ - -/obj/machinery/artifact_analyser - name = "Anomaly Analyser" - desc = "Studies the emissions of anomalous materials to discover their uses." - icon = 'icons/obj/virology.dmi' - icon_state = "isolator" - anchored = 1 - density = 1 - var/scan_in_progress = 0 - var/scan_num = 0 - var/obj/scanned_obj - var/obj/machinery/artifact_scanpad/owned_scanner = null - var/scan_completion_time = 0 - var/scan_duration = 120 - var/obj/scanned_object - var/report_num = 0 - -/obj/machinery/artifact_analyser/New() - ..() - reconnect_scanner() - -/obj/machinery/artifact_analyser/proc/reconnect_scanner() - //connect to a nearby scanner pad - owned_scanner = locate(/obj/machinery/artifact_scanpad) in get_step(src, dir) - if(!owned_scanner) - owned_scanner = locate(/obj/machinery/artifact_scanpad) in orange(1, src) - -/obj/machinery/artifact_analyser/attack_hand(var/mob/user as mob) - src.add_fingerprint(user) - interact(user) - -/obj/machinery/artifact_analyser/interact(mob/user) - if(stat & (NOPOWER|BROKEN) || get_dist(src, user) > 1) - user.unset_machine(src) - return - - var/dat = "Anomalous material analyser
" - dat += "
" - if(!owned_scanner) - owned_scanner = locate() in orange(1, src) - - if(!owned_scanner) - dat += "Unable to locate analysis pad.
" - else if(scan_in_progress) - dat += "Please wait. Analysis in progress.
" - dat += "Halt scanning.
" - else - dat += "Scanner is ready.
" - dat += "Begin scanning.
" - - dat += "
" - dat += "
" - dat += "RefreshClose" - user << browse(dat, "window=artanalyser;size=450x500") - user.set_machine(src) - onclose(user, "artanalyser") - -/obj/machinery/artifact_analyser/process() - if(scan_in_progress && world.time > scan_completion_time) - //finish scanning - scan_in_progress = 0 - updateDialog() - - //print results - var/results = "" - if(!owned_scanner) - reconnect_scanner() - if(!owned_scanner) - results = "Error communicating with scanner." - else if(!scanned_object || scanned_object.loc != owned_scanner.loc) - results = "Unable to locate scanned object. Ensure it was not moved in the process." - else - results = get_scan_info(scanned_object) - - src.visible_message("[name] states, \"Scanning complete.\"") - var/obj/item/weapon/paper/P = new(src.loc) - P.name = "[src] report #[++report_num]" - P.info = "[src] analysis report #[report_num]
" - P.info += "
" - P.info += "\icon[scanned_object] [results]" - P.stamped = list(/obj/item/weapon/stamp) - P.overlays = list("paper_stamped") - - if(scanned_object && istype(scanned_object, /obj/machinery/artifact)) - var/obj/machinery/artifact/A = scanned_object - A.anchored = 0 - A.being_used = 0 - scanned_object = null - -/obj/machinery/artifact_analyser/Topic(href, href_list) - if(href_list["begin_scan"]) - if(!owned_scanner) - reconnect_scanner() - if(owned_scanner) - var/artifact_in_use = 0 - for(var/obj/O in owned_scanner.loc) - if(O == owned_scanner) - continue - if(O.invisibility) - continue - if(istype(O, /obj/machinery/artifact)) - var/obj/machinery/artifact/A = O - if(A.being_used) - artifact_in_use = 1 - else - A.anchored = 1 - A.being_used = 1 - - if(artifact_in_use) - src.visible_message("[name] states, \"Cannot harvest. Too much interference.\"") - else - scanned_object = O - scan_in_progress = 1 - scan_completion_time = world.time + scan_duration - src.visible_message("[name] states, \"Scanning begun.\"") - break - if(!scanned_object) - src.visible_message("[name] states, \"Unable to isolate scan target.\"") - if(href_list["halt_scan"]) - scan_in_progress = 0 - src.visible_message("[name] states, \"Scanning halted.\"") - - if(href_list["close"]) - usr.unset_machine(src) - usr << browse(null, "window=artanalyser") - - ..() - updateDialog() - -//hardcoded responses, oh well -/obj/machinery/artifact_analyser/proc/get_scan_info(var/obj/scanned_obj) - switch(scanned_obj.type) - if(/obj/machinery/auto_cloner) - return "Automated cloning pod - appears to rely on organic nanomachines with a self perpetuating \ - ecosystem involving self cannibalism and a symbiotic relationship with the contained liquid.

\ - Structure is composed of a carbo-titanium alloy with interlaced reinforcing energy fields, and the contained liquid \ - resembles proto-plasmic residue supportive of single cellular developmental conditions." - if(/obj/machinery/power/supermatter) - return "Super dense phoron clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\ - Potential application as unrefined phoron source." - if(/obj/machinery/power/supermatter) - return "Super dense phoron clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\ - Potential application as unrefined phoron source." - if(/obj/structure/constructshell) - return "Tribal idol - Item resembles statues/emblems built by superstitious pre-warp civilisations to honour their gods. Material appears to be a \ - rock/plastcrete composite." - if(/obj/machinery/giga_drill) - return "Automated mining drill - structure composed of titanium-carbide alloy, with tip and drill lines edged in an alloy of diamond and phoron." - if(/obj/structure/cult/pylon) - return "Tribal pylon - Item resembles statues/emblems built by cargo cult civilisations to honour energy systems from post-warp civilisations." - if(/obj/machinery/replicator) - return "Automated construction unit - Item appears to be able to synthesize synthetic items, some with simple internal circuitry. Method unknown, \ - phasing suggested?" - if(/obj/structure/crystal) - return "Crystal formation - Pseudo organic crystalline matrix, unlikely to have formed naturally. No known technology exists to synthesize this exact composition." - if(/obj/machinery/artifact) - //the fun one - var/obj/machinery/artifact/A = scanned_obj - var/out = "Anomalous alien device - Composed of an unknown alloy, " - - //primary effect - if(A.my_effect) - //what kind of effect the artifact has - switch(A.my_effect.effect_type) - if(1) - out += "concentrated energy emissions" - if(2) - out += "intermittent psionic wavefront" - if(3) - out += "electromagnetic energy" - if(4) - out += "high frequency particles" - if(5) - out += "organically reactive exotic particles" - if(6) - out += "interdimensional/bluespace? phasing" - if(7) - out += "atomic synthesis" - else - out += "low level energy emissions" - out += " have been detected " - - //how the artifact does it's effect - switch(A.my_effect.effect) - if(1) - out += " emitting in an ambient energy field." - if(2) - out += " emitting in periodic bursts." - else - out += " interspersed throughout substructure and shell." - - if(A.my_effect.trigger >= 0 && A.my_effect.trigger <= 4) - out += " Activation index involves physical interaction with artifact surface." - else if(A.my_effect.trigger >= 5 && A.my_effect.trigger <= 8) - out += " Activation index involves energetic interaction with artifact surface." - else if(A.my_effect.trigger >= 9 && A.my_effect.trigger <= 12) - out += " Activation index involves precise local atmospheric conditions." - else - out += " Unable to determine any data about activation trigger." - - //secondary: - if(A.secondary_effect && A.secondary_effect.activated) - //sciencey words go! - out += "

Warning, internal scans indicate ongoing [pick("subluminous","subcutaneous","superstructural")] activity operating \ - independantly from primary systems. Auxiliary activity involves " - - //what kind of effect the artifact has - switch(A.secondary_effect.effect_type) - if(1) - out += "concentrated energy emissions" - if(2) - out += "intermittent psionic wavefront" - if(3) - out += "electromagnetic energy" - if(4) - out += "high frequency particles" - if(5) - out += "organically reactive exotic particles" - if(6) - out += "interdimensional/bluespace? phasing" - if(7) - out += "atomic synthesis" - else - out += "low level radiation" - - //how the artifact does it's effect - switch(A.secondary_effect.effect) - if(1) - out += " emitting in an ambient energy field." - if(2) - out += " emitting in periodic bursts." - else - out += " interspersed throughout substructure and shell." - - if(A.secondary_effect.trigger >= 0 && A.secondary_effect.trigger <= 4) - out += " Activation index involves physical interaction with artifact surface, but subsystems indicate \ - anomalous interference with standard attempts at triggering." - else if(A.secondary_effect.trigger >= 5 && A.secondary_effect.trigger <= 8) - out += " Activation index involves energetic interaction with artifact surface, but subsystems indicate \ - anomalous interference with standard attempts at triggering." - else if(A.secondary_effect.trigger >= 9 && A.secondary_effect.trigger <= 12) - out += " Activation index involves precise local atmospheric conditions, but subsystems indicate \ - anomalous interference with standard attempts at triggering." - else - out += " Unable to determine any data about activation trigger." - return out - else - //it was an ordinary item - return "[scanned_obj.name] - Mundane application, composed of carbo-ferritic alloy composite." diff --git a/code/modules/research/xenoarchaeology/readme.dm b/code/modules/research/xenoarchaeology/readme.dm deleted file mode 100644 index 2eecadc690..0000000000 --- a/code/modules/research/xenoarchaeology/readme.dm +++ /dev/null @@ -1,5 +0,0 @@ - -//coming soon -//there'll probably be some stuff on the wiki at some point - -//original code from alfie275 / lunacode, artifacts are from isaidno \ No newline at end of file diff --git a/code/modules/research/xenoarchaeology/tools/gearbelt.dm b/code/modules/research/xenoarchaeology/tools/gearbelt.dm deleted file mode 100644 index fa92fa1624..0000000000 --- a/code/modules/research/xenoarchaeology/tools/gearbelt.dm +++ /dev/null @@ -1,29 +0,0 @@ - -/obj/item/weapon/storage/belt/archaeology - name = "excavation gear-belt" - desc = "Can hold various excavation gear." - icon_state = "gearbelt" - can_hold = list( - /obj/item/weapon/storage/box/samplebags, - /obj/item/device/core_sampler, - /obj/item/device/beacon_locator, - /obj/item/device/radio/beacon, - /obj/item/device/gps, - /obj/item/device/measuring_tape, - /obj/item/device/flashlight, - /obj/item/weapon/pickaxe, - /obj/item/device/depth_scanner, - /obj/item/device/camera, - /obj/item/weapon/paper, - /obj/item/weapon/photo, - /obj/item/weapon/folder, - /obj/item/weapon/pen, - /obj/item/weapon/folder, - /obj/item/weapon/clipboard, - /obj/item/weapon/anodevice, - /obj/item/clothing/glasses, - /obj/item/weapon/wrench, - /obj/item/weapon/storage/box/excavation, - /obj/item/weapon/anobattery, - /obj/item/device/ano_scanner - ) diff --git a/code/modules/research/xenoarchaeology/tools/tools.dm b/code/modules/research/xenoarchaeology/tools/tools.dm deleted file mode 100644 index bf320f0cd3..0000000000 --- a/code/modules/research/xenoarchaeology/tools/tools.dm +++ /dev/null @@ -1,35 +0,0 @@ - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Miscellaneous xenoarchaeology tools - -/obj/item/device/gps - name = "relay positioning device" - desc = "Triangulates the approximate co-ordinates using a nearby satellite network." - icon = 'icons/obj/device.dmi' - icon_state = "locator" - item_state = "analyzer" - w_class = 2 - -/obj/item/device/gps/attack_self(var/mob/user as mob) - var/turf/T = get_turf(src) - user << "\blue \icon[src] [src] flashes [T.x].[rand(0,9)]:[T.y].[rand(0,9)]:[T.z].[rand(0,9)]." - -/obj/item/device/measuring_tape - name = "measuring tape" - desc = "A coiled metallic tape used to check dimensions and lengths." - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "measuring" - w_class = 2 - -//todo: dig site tape - -/obj/item/weapon/storage/bag/fossils - name = "Fossil Satchel" - desc = "Transports delicate fossils in suspension so they don't break during transit." - icon = 'icons/obj/mining.dmi' - icon_state = "satchel" - slot_flags = SLOT_BELT | SLOT_POCKET - w_class = 3 - max_storage_space = 100 - max_w_class = 3 - can_hold = list(/obj/item/weapon/fossil) diff --git a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm deleted file mode 100644 index 6f79f8d8ba..0000000000 --- a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm +++ /dev/null @@ -1,51 +0,0 @@ - -/obj/item/device/ano_scanner - name = "Alden-Saraspova counter" - desc = "Aids in triangulation of exotic particles." - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "flashgun" - item_state = "lampgreen" - w_class = 2.0 - slot_flags = SLOT_BELT - var/nearest_artifact_id = "unknown" - var/nearest_artifact_distance = -1 - var/last_scan_time = 0 - var/scan_delay = 25 - -/obj/item/device/ano_scanner/initialize() - scan() - -/obj/item/device/ano_scanner/attack_self(var/mob/user as mob) - return src.interact(user) - -/obj/item/device/ano_scanner/interact(var/mob/user as mob) - if(world.time - last_scan_time >= scan_delay) - spawn(0) - scan() - - if(!user) return - - if(nearest_artifact_distance >= 0) - user << "Exotic energy detected on wavelength '[nearest_artifact_id]' in a radius of [nearest_artifact_distance]m" - else - user << "Background radiation levels detected." - else - user << "Scanning array is recharging." - -/obj/item/device/ano_scanner/proc/scan() - set background = 1 - - last_scan_time = world.time - nearest_artifact_distance = -1 - var/turf/cur_turf = get_turf(src) - if(master_controller) //Sanity check due to runtimes ~Z - for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs) - if(T.artifact_find) - if(T.z == cur_turf.z) - var/cur_dist = get_dist(cur_turf, T) * 2 - if( (nearest_artifact_distance < 0 || cur_dist < nearest_artifact_distance) && cur_dist <= T.artifact_find.artifact_detect_range ) - nearest_artifact_distance = cur_dist + rand() * 2 - 1 - nearest_artifact_id = T.artifact_find.artifact_id - else - master_controller.artifact_spawning_turfs.Remove(T) - cur_turf.visible_message("[src] clicks.") diff --git a/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm b/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm deleted file mode 100644 index 0ed24ad248..0000000000 --- a/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm +++ /dev/null @@ -1,95 +0,0 @@ -//device to take core samples from mineral turfs - used for various types of analysis - -/obj/item/weapon/storage/box/samplebags - name = "sample bag box" - desc = "A box claiming to contain sample bags." - New() - for(var/i=0, i<7, i++) - var/obj/item/weapon/evidencebag/S = new(src) - S.name = "sample bag" - S.desc = "a bag for holding research samples." - ..() - return - -////////////////////////////////////////////////////////////////// - -/obj/item/device/core_sampler - name = "core sampler" - desc = "Used to extract geological core samples." - icon = 'icons/obj/device.dmi' - icon_state = "sampler0" - item_state = "screwdriver_brown" - w_class = 1.0 - //slot_flags = SLOT_BELT - var/sampled_turf = "" - var/num_stored_bags = 10 - var/obj/item/weapon/evidencebag/filled_bag - -/obj/item/device/core_sampler/examine(mob/user) - if(..(user, 2)) - user << "\blue Used to extract geological core samples - this one is [sampled_turf ? "full" : "empty"], and has [num_stored_bags] bag[num_stored_bags != 1 ? "s" : ""] remaining." - -/obj/item/device/core_sampler/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/evidencebag)) - if(num_stored_bags < 10) - qdel(W) - num_stored_bags += 1 - user << "\blue You insert the [W] into the core sampler." - else - user << "\red The core sampler can not fit any more bags!" - else - return ..() - -/obj/item/device/core_sampler/proc/sample_item(var/item_to_sample, var/mob/user as mob) - var/datum/geosample/geo_data - if(istype(item_to_sample, /turf/simulated/mineral)) - var/turf/simulated/mineral/T = item_to_sample - T.geologic_data.UpdateNearbyArtifactInfo(T) - geo_data = T.geologic_data - else if(istype(item_to_sample, /obj/item/weapon/ore)) - var/obj/item/weapon/ore/O = item_to_sample - geo_data = O.geologic_data - - if(geo_data) - if(filled_bag) - user << "\red The core sampler is full!" - else if(num_stored_bags < 1) - user << "\red The core sampler is out of sample bags!" - else - //create a new sample bag which we'll fill with rock samples - filled_bag = new /obj/item/weapon/evidencebag(src) - filled_bag.name = "sample bag" - filled_bag.desc = "a bag for holding research samples." - - icon_state = "sampler1" - num_stored_bags-- - - //put in a rock sliver - var/obj/item/weapon/rocksliver/R = new() - R.geological_data = geo_data - R.loc = filled_bag - - //update the sample bag - filled_bag.icon_state = "evidence" - var/image/I = image("icon"=R, "layer"=FLOAT_LAYER) - filled_bag.overlays += I - filled_bag.overlays += "evidence" - filled_bag.w_class = 1 - - user << "\blue You take a core sample of the [item_to_sample]." - else - user << "\red You are unable to take a sample of [item_to_sample]." - -/obj/item/device/core_sampler/attack_self() - if(filled_bag) - usr << "\blue You eject the full sample bag." - var/success = 0 - if(istype(src.loc, /mob)) - var/mob/M = src.loc - success = M.put_in_inactive_hand(filled_bag) - if(!success) - filled_bag.loc = get_turf(src) - filled_bag = null - icon_state = "sampler0" - else - usr << "\red The core sampler is empty." diff --git a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm deleted file mode 100644 index e242838a1e..0000000000 --- a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm +++ /dev/null @@ -1,130 +0,0 @@ - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Depth scanner - scans rock turfs / boulders and tells players if there is anything interesting inside, logs all finds + coordinates + times - -//also known as the x-ray diffractor -/obj/item/device/depth_scanner - name = "depth analysis scanner" - desc = "Used to check spatial depth and density of rock outcroppings." - icon = 'icons/obj/pda.dmi' - icon_state = "crap" - item_state = "analyzer" - w_class = 2.0 - slot_flags = SLOT_BELT - var/list/positive_locations = list() - var/datum/depth_scan/current - -/datum/depth_scan - var/time = "" - var/coords = "" - var/depth = 0 - var/clearance = 0 - var/record_index = 1 - var/dissonance_spread = 1 - var/material = "unknown" - -/obj/item/device/depth_scanner/proc/scan_atom(var/mob/user, var/atom/A) - user.visible_message("\blue [user] scans [A], the air around them humming gently.") - if(istype(A,/turf/simulated/mineral)) - var/turf/simulated/mineral/M = A - if((M.finds && M.finds.len) || M.artifact_find) - - //create a new scanlog entry - var/datum/depth_scan/D = new() - D.coords = "[M.x].[rand(0,9)]:[M.y].[rand(0,9)]:[10 * M.z].[rand(0,9)]" - D.time = worldtime2text() - D.record_index = positive_locations.len + 1 - D.material = M.mineral ? M.mineral.display_name : "Rock" - - //find the first artifact and store it - if(M.finds.len) - var/datum/find/F = M.finds[1] - D.depth = F.excavation_required * 2 //0-100% and 0-200cm - D.clearance = F.clearance_range * 2 - D.material = get_responsive_reagent(F.find_type) - - positive_locations.Add(D) - - for(var/mob/L in range(src, 1)) - L << "\blue \icon[src] [src] pings." - - else if(istype(A,/obj/structure/boulder)) - var/obj/structure/boulder/B = A - if(B.artifact_find) - //create a new scanlog entry - var/datum/depth_scan/D = new() - D.coords = "[10 * B.x].[rand(0,9)]:[10 * B.y].[rand(0,9)]:[10 * B.z].[rand(0,9)]" - D.time = worldtime2text() - D.record_index = positive_locations.len + 1 - - //these values are arbitrary - D.depth = rand(75,100) - D.clearance = rand(5,25) - D.dissonance_spread = rand(750,2500) / 100 - - positive_locations.Add(D) - - for(var/mob/L in range(src, 1)) - L << "\blue \icon[src] [src] pings [pick("madly","wildly","excitedly","crazily")]!" - -/obj/item/device/depth_scanner/attack_self(var/mob/user as mob) - return src.interact(user) - -/obj/item/device/depth_scanner/interact(var/mob/user as mob) - var/dat = "Co-ordinates with positive matches
" - dat += "== Clear all ==
" - if(current) - dat += "Time: [current.time]
" - dat += "Coords: [current.coords]
" - dat += "Anomaly depth: [current.depth] cm
" - dat += "Clearance above anomaly depth: [current.clearance] cm
" - dat += "Dissonance spread: [current.dissonance_spread]
" - var/index = responsive_carriers.Find(current.material) - if(index > 0 && index <= finds_as_strings.len) - dat += "Anomaly material: [finds_as_strings[index]]
" - else - dat += "Anomaly material: Unknown
" - dat += "clear entry
" - else - dat += "Select an entry from the list
" - dat += "
" - dat += "
" - dat += "
" - dat += "
" - dat += "
" - if(positive_locations.len) - for(var/index=1, index<=positive_locations.len, index++) - var/datum/depth_scan/D = positive_locations[index] - dat += "[D.time], coords: [D.coords]
" - else - dat += "No entries recorded." - dat += "
" - dat += "Refresh
" - dat += "Close
" - user << browse(dat,"window=depth_scanner;size=300x500") - onclose(user, "depth_scanner") - -/obj/item/device/depth_scanner/Topic(href, href_list) - ..() - usr.set_machine(src) - - if(href_list["select"]) - var/index = text2num(href_list["select"]) - if(index && index <= positive_locations.len) - current = positive_locations[index] - else if(href_list["clear"]) - var/index = text2num(href_list["clear"]) - if(index) - if(index <= positive_locations.len) - var/datum/depth_scan/D = positive_locations[index] - positive_locations.Remove(D) - qdel(D) - else - //GC will hopefully pick them up before too long - positive_locations = list() - qdel(current) - else if(href_list["close"]) - usr.unset_machine() - usr << browse(null, "window=depth_scanner") - - updateSelfDialog() diff --git a/code/modules/research/xenoarchaeology/tools/tools_locater.dm b/code/modules/research/xenoarchaeology/tools/tools_locater.dm deleted file mode 100644 index fb6adf795a..0000000000 --- a/code/modules/research/xenoarchaeology/tools/tools_locater.dm +++ /dev/null @@ -1,97 +0,0 @@ - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// GPS Locater - locks into a radio frequency and tracks it - -/obj/item/device/beacon_locator - name = "locater device" - desc = "Used to scan and locate signals on a particular frequency according ." - icon = 'icons/obj/device.dmi' - icon_state = "pinoff" //pinonfar, pinonmedium, pinonclose, pinondirect, pinonnull - item_state = "electronic" - var/frequency = PUB_FREQ - var/scan_ticks = 0 - var/obj/item/device/radio/target_radio - -/obj/item/device/beacon_locator/New() - ..() - processing_objects.Add(src) - -/obj/item/device/beacon_locator/Destroy() - processing_objects.Remove(src) - ..() - -/obj/item/device/beacon_locator/process() - if(target_radio) - set_dir(get_dir(src,target_radio)) - switch(get_dist(src,target_radio)) - if(0 to 3) - icon_state = "pinondirect" - if(4 to 10) - icon_state = "pinonclose" - if(11 to 30) - icon_state = "pinonmedium" - if(31 to INFINITY) - icon_state = "pinonfar" - else - if(scan_ticks) - icon_state = "pinonnull" - scan_ticks++ - if(prob(scan_ticks * 10)) - spawn(0) - set background = 1 - if(processing_objects.Find(src)) - //scan radios in the world to try and find one - var/cur_dist = 999 - for(var/obj/item/device/radio/beacon/R in world) - if(R.z == src.z && R.frequency == src.frequency) - var/check_dist = get_dist(src,R) - if(check_dist < cur_dist) - cur_dist = check_dist - target_radio = R - - scan_ticks = 0 - var/turf/T = get_turf(src) - if(target_radio) - T.visible_message("\icon[src] [src] [pick("chirps","chirrups","cheeps")] happily.") - else - T.visible_message("\icon[src] [src] [pick("chirps","chirrups","cheeps")] sadly.") - else - icon_state = "pinoff" - -/obj/item/device/beacon_locator/attack_self(var/mob/user as mob) - return src.interact(user) - -/obj/item/device/beacon_locator/interact(var/mob/user as mob) - var/dat = "Radio frequency tracker
" - dat += {" - Reset tracker
- Frequency: - - - - - [format_frequency(frequency)] - + - +
- "} - - dat += "Close
" - user << browse(dat,"window=locater;size=300x150") - onclose(user, "locater") - -/obj/item/device/beacon_locator/Topic(href, href_list) - ..() - usr.set_machine(src) - - if(href_list["reset_tracking"]) - scan_ticks = 1 - target_radio = null - else if(href_list["freq"]) - var/new_frequency = (frequency + text2num(href_list["freq"])) - if (frequency < 1200 || frequency > 1600) - new_frequency = sanitize_frequency(new_frequency, 1499) - frequency = new_frequency - - else if(href_list["close"]) - usr.unset_machine() - usr << browse(null, "window=locater") - - updateSelfDialog() diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index ff5682fedd..17729a6304 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -167,10 +167,10 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) if(istype(tool,/obj/item/stack/cable_coil/)) var/obj/item/stack/cable_coil/C = tool - if(!C.can_use(10)) + if(!C.can_use(5)) user << "You need ten or more cable pieces to repair this damage." //usage amount made more consistent with regular cable repair return SURGERY_FAILURE - C.use(10) + C.use(5) return affected && affected.open == 3 && (affected.disfigured || affected.burn_dam > 0) && target_zone != O_MOUTH begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm b/code/modules/xenoarcheaology/artifacts/artifact.dm similarity index 80% rename from code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm rename to code/modules/xenoarcheaology/artifacts/artifact.dm index 2f6cc45e75..a8472245a2 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm +++ b/code/modules/xenoarcheaology/artifacts/artifact.dm @@ -1,366 +1,300 @@ - -#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 -/* -//sleeping gas appears to be bugged, currently -var/list/valid_primary_effect_types = list(\ - /datum/artifact_effect/cellcharge,\ - /datum/artifact_effect/celldrain,\ - /datum/artifact_effect/forcefield,\ - /datum/artifact_effect/gasoxy,\ - /datum/artifact_effect/gasplasma,\ -// /datum/artifact_effect/gassleeping,\ - /datum/artifact_effect/heal,\ - /datum/artifact_effect/hurt,\ - /datum/artifact_effect/emp,\ - /datum/artifact_effect/teleport,\ - /datum/artifact_effect/robohurt,\ - /datum/artifact_effect/roboheal) - -var/list/valid_secondary_effect_types = list(\ - /datum/artifact_effect/cold,\ - /datum/artifact_effect/badfeeling,\ - /datum/artifact_effect/cellcharge,\ - /datum/artifact_effect/celldrain,\ - /datum/artifact_effect/dnaswitch,\ - /datum/artifact_effect/emp,\ - /datum/artifact_effect/gasco2,\ - /datum/artifact_effect/gasnitro,\ - /datum/artifact_effect/gasoxy,\ - /datum/artifact_effect/gasphoron,\ -// /datum/artifact_effect/gassleeping,\ - /datum/artifact_effect/goodfeeling,\ - /datum/artifact_effect/heal,\ - /datum/artifact_effect/hurt,\ - /datum/artifact_effect/radiate,\ - /datum/artifact_effect/roboheal,\ - /datum/artifact_effect/robohurt,\ - /datum/artifact_effect/sleepy,\ - /datum/artifact_effect/stun,\ - /datum/artifact_effect/teleport) - */ - -/obj/machinery/artifact - name = "alien artifact" - desc = "A large alien device." - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "ano00" - var/icon_num = 0 - density = 1 - var/datum/artifact_effect/my_effect - var/datum/artifact_effect/secondary_effect - var/being_used = 0 - -/obj/machinery/artifact/New() - ..() - - //setup primary effect - these are the main ones (mixed) - var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect) - my_effect = new effecttype(src) - - //75% chance to have a secondary stealthy (and mostly bad) effect - if(prob(75)) - effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect) - secondary_effect = new effecttype(src) - if(prob(75)) - secondary_effect.ToggleActivate(0) - - icon_num = rand(0,11) - icon_state = "ano[icon_num]0" - if(icon_num == 7 || icon_num == 8) - name = "large crystal" - desc = pick("It shines faintly as it catches the light.",\ - "It appears to have a faint inner glow.",\ - "It seems to draw you inward as you look it at.",\ - "Something twinkles faintly as you look at it.",\ - "It's mesmerizing to behold.") - if(prob(50)) - my_effect.trigger = TRIGGER_ENERGY - else if(icon_num == 9) - name = "alien computer" - desc = "It is covered in strange markings." - if(prob(75)) - my_effect.trigger = TRIGGER_TOUCH - else if(icon_num == 10) - desc = "A large alien device, there appear to be some kind of vents in the side." - if(prob(50)) - my_effect.trigger = rand(6,12) - else if(icon_num == 11) - name = "sealed alien pod" - desc = "A strange alien device." - if(prob(25)) - my_effect.trigger = rand(1,4) - -#define TRIGGER_PHORON 9 -#define TRIGGER_OXY 10 -#define TRIGGER_CO2 11 -#define TRIGGER_NITRO 12 - -/obj/machinery/artifact/process() - - var/turf/L = loc - if(isnull(L) || !istype(L)) // We're inside a container or on null turf, either way stop processing effects - return - - if(my_effect) - my_effect.process() - if(secondary_effect) - secondary_effect.process() - - if(pulledby) - Bumped(pulledby) - - //if either of our effects rely on environmental factors, work that out - var/trigger_cold = 0 - var/trigger_hot = 0 - var/trigger_phoron = 0 - var/trigger_oxy = 0 - var/trigger_co2 = 0 - var/trigger_nitro = 0 - if( (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) || (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) ) - var/turf/T = get_turf(src) - var/datum/gas_mixture/env = T.return_air() - if(env) - if(env.temperature < 225) - trigger_cold = 1 - else if(env.temperature > 375) - trigger_hot = 1 - - if(env.gas["phoron"] >= 10) - trigger_phoron = 1 - if(env.gas["oxygen"] >= 10) - trigger_oxy = 1 - if(env.gas["carbon_dioxide"] >= 10) - trigger_co2 = 1 - if(env.gas["nitrogen"] >= 10) - trigger_nitro = 1 - - //COLD ACTIVATION - if(trigger_cold) - if(my_effect.trigger == TRIGGER_COLD && !my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - else - if(my_effect.trigger == TRIGGER_COLD && my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - - //HEAT ACTIVATION - if(trigger_hot) - if(my_effect.trigger == TRIGGER_HEAT && !my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - else - if(my_effect.trigger == TRIGGER_HEAT && my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - - //PHORON GAS ACTIVATION - if(trigger_phoron) - if(my_effect.trigger == TRIGGER_PHORON && !my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - else - if(my_effect.trigger == TRIGGER_PHORON && my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - - //OXYGEN GAS ACTIVATION - if(trigger_oxy) - if(my_effect.trigger == TRIGGER_OXY && !my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - else - if(my_effect.trigger == TRIGGER_OXY && my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - - //CO2 GAS ACTIVATION - if(trigger_co2) - if(my_effect.trigger == TRIGGER_CO2 && !my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - else - if(my_effect.trigger == TRIGGER_CO2 && my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - - //NITROGEN GAS ACTIVATION - if(trigger_nitro) - if(my_effect.trigger == TRIGGER_NITRO && !my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - else - if(my_effect.trigger == TRIGGER_NITRO && my_effect.activated) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated) - secondary_effect.ToggleActivate(0) - -/obj/machinery/artifact/attack_hand(var/mob/user as mob) - if (get_dist(user, src) > 1) - user << "\red You can't reach [src] from here." - return - if(ishuman(user) && user:gloves) - user << "You touch [src] with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]." - return - - src.add_fingerprint(user) - - if(my_effect.trigger == TRIGGER_TOUCH) - user << "You touch [src]." - my_effect.ToggleActivate() - else - user << "You touch [src], [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]." - - if(prob(25) && secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH) - secondary_effect.ToggleActivate(0) - - if (my_effect.effect == EFFECT_TOUCH) - my_effect.DoEffectTouch(user) - - if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated) - secondary_effect.DoEffectTouch(user) - -/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob) - - if (istype(W, /obj/item/weapon/reagent_containers/)) - if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1)) - if(my_effect.trigger == TRIGGER_WATER) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_WATER && prob(25)) - secondary_effect.ToggleActivate(0) - else if(W.reagents.has_reagent("sacid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1)) - if(my_effect.trigger == TRIGGER_ACID) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_ACID && prob(25)) - secondary_effect.ToggleActivate(0) - else if(W.reagents.has_reagent("phoron", 1) || W.reagents.has_reagent("thermite", 1)) - if(my_effect.trigger == TRIGGER_VOLATILE) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_VOLATILE && prob(25)) - secondary_effect.ToggleActivate(0) - else if(W.reagents.has_reagent("toxin", 1) || W.reagents.has_reagent("cyanide", 1) || W.reagents.has_reagent("amanitin", 1) || W.reagents.has_reagent("neurotoxin", 1)) - if(my_effect.trigger == TRIGGER_TOXIN) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_TOXIN && prob(25)) - secondary_effect.ToggleActivate(0) - else if(istype(W,/obj/item/weapon/melee/baton) && W:status ||\ - istype(W,/obj/item/weapon/melee/energy) ||\ - istype(W,/obj/item/weapon/melee/cultblade) ||\ - istype(W,/obj/item/weapon/card/emag) ||\ - istype(W,/obj/item/device/multitool)) - if (my_effect.trigger == TRIGGER_ENERGY) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25)) - secondary_effect.ToggleActivate(0) - - else if (istype(W,/obj/item/weapon/flame) && W:lit ||\ - istype(W,/obj/item/weapon/weldingtool) && W:welding) - if(my_effect.trigger == TRIGGER_HEAT) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && prob(25)) - secondary_effect.ToggleActivate(0) - else - ..() - if (my_effect.trigger == TRIGGER_FORCE && W.force >= 10) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25)) - secondary_effect.ToggleActivate(0) - -/obj/machinery/artifact/Bumped(M as mob|obj) - ..() - if(istype(M,/obj)) - if(M:throwforce >= 10) - if(my_effect.trigger == TRIGGER_FORCE) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25)) - secondary_effect.ToggleActivate(0) - else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves)) - var/warn = 0 - - if (my_effect.trigger == TRIGGER_TOUCH && prob(50)) - my_effect.ToggleActivate() - warn = 1 - if(secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH && prob(25)) - secondary_effect.ToggleActivate(0) - warn = 1 - - if (my_effect.effect == EFFECT_TOUCH && prob(50)) - my_effect.DoEffectTouch(M) - warn = 1 - if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated && prob(50)) - secondary_effect.DoEffectTouch(M) - warn = 1 - - if(warn) - M << "You accidentally touch [src]." - ..() - -/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P) - if(istype(P,/obj/item/projectile/bullet) ||\ - istype(P,/obj/item/projectile/hivebotbullet)) - if(my_effect.trigger == TRIGGER_FORCE) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25)) - secondary_effect.ToggleActivate(0) - - else if(istype(P,/obj/item/projectile/beam) ||\ - istype(P,/obj/item/projectile/ion) ||\ - istype(P,/obj/item/projectile/energy)) - if(my_effect.trigger == TRIGGER_ENERGY) - my_effect.ToggleActivate() - if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25)) - secondary_effect.ToggleActivate(0) - -/obj/machinery/artifact/ex_act(severity) - switch(severity) - if(1.0) qdel(src) - if(2.0) - if (prob(50)) - qdel(src) - else - if(my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT) - my_effect.ToggleActivate() - if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25)) - secondary_effect.ToggleActivate(0) - if(3.0) - if (my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT) - my_effect.ToggleActivate() - if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25)) - secondary_effect.ToggleActivate(0) - return - -/obj/machinery/artifact/Move() - ..() - if(my_effect) - my_effect.UpdateMove() - if(secondary_effect) - secondary_effect.UpdateMove() +/obj/machinery/artifact + name = "alien artifact" + desc = "A large alien device." + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "ano00" + var/icon_num = 0 + density = 1 + var/datum/artifact_effect/my_effect + var/datum/artifact_effect/secondary_effect + var/being_used = 0 + +/obj/machinery/artifact/New() + ..() + + var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect) + my_effect = new effecttype(src) + + if(prob(75)) + effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect) + secondary_effect = new effecttype(src) + if(prob(75)) + secondary_effect.ToggleActivate(0) + + icon_num = rand(0, 11) + + icon_state = "ano[icon_num]0" + if(icon_num == 7 || icon_num == 8) + name = "large crystal" + desc = pick("It shines faintly as it catches the light.", + "It appears to have a faint inner glow.", + "It seems to draw you inward as you look it at.", + "Something twinkles faintly as you look at it.", + "It's mesmerizing to behold.") + if(prob(50)) + my_effect.trigger = TRIGGER_ENERGY + else if(icon_num == 9) + name = "alien computer" + desc = "It is covered in strange markings." + if(prob(75)) + my_effect.trigger = TRIGGER_TOUCH + else if(icon_num == 10) + desc = "A large alien device, there appear to be some kind of vents in the side." + if(prob(50)) + my_effect.trigger = pick(TRIGGER_ENERGY, TRIGGER_HEAT, TRIGGER_COLD, TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO) + else if(icon_num == 11) + name = "sealed alien pod" + desc = "A strange alien device." + if(prob(25)) + my_effect.trigger = pick(TRIGGER_WATER, TRIGGER_ACID, TRIGGER_VOLATILE, TRIGGER_TOXIN) + +/obj/machinery/artifact/process() + var/turf/L = loc + if(!istype(L)) // We're inside a container or on null turf, either way stop processing effects + return + + if(my_effect) + my_effect.process() + if(secondary_effect) + secondary_effect.process() + + if(pulledby) + Bumped(pulledby) + + //if either of our effects rely on environmental factors, work that out + var/trigger_cold = 0 + var/trigger_hot = 0 + var/trigger_phoron = 0 + var/trigger_oxy = 0 + var/trigger_co2 = 0 + var/trigger_nitro = 0 + if( (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) || (my_effect.trigger >= TRIGGER_HEAT && my_effect.trigger <= TRIGGER_NITRO) ) + var/turf/T = get_turf(src) + var/datum/gas_mixture/env = T.return_air() + if(env) + if(env.temperature < 225) + trigger_cold = 1 + else if(env.temperature > 375) + trigger_hot = 1 + + if(env.gas["phoron"] >= 10) + trigger_phoron = 1 + if(env.gas["oxygen"] >= 10) + trigger_oxy = 1 + if(env.gas["carbon_dioxide"] >= 10) + trigger_co2 = 1 + if(env.gas["nitrogen"] >= 10) + trigger_nitro = 1 + + //COLD ACTIVATION + if(trigger_cold) + if(my_effect.trigger == TRIGGER_COLD && !my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + else + if(my_effect.trigger == TRIGGER_COLD && my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_COLD && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + + //HEAT ACTIVATION + if(trigger_hot) + if(my_effect.trigger == TRIGGER_HEAT && !my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + else + if(my_effect.trigger == TRIGGER_HEAT && my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + + //PHORON GAS ACTIVATION + if(trigger_phoron) + if(my_effect.trigger == TRIGGER_PHORON && !my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + else + if(my_effect.trigger == TRIGGER_PHORON && my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_PHORON && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + + //OXYGEN GAS ACTIVATION + if(trigger_oxy) + if(my_effect.trigger == TRIGGER_OXY && !my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + else + if(my_effect.trigger == TRIGGER_OXY && my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_OXY && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + + //CO2 GAS ACTIVATION + if(trigger_co2) + if(my_effect.trigger == TRIGGER_CO2 && !my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + else + if(my_effect.trigger == TRIGGER_CO2 && my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_CO2 && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + + //NITROGEN GAS ACTIVATION + if(trigger_nitro) + if(my_effect.trigger == TRIGGER_NITRO && !my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + else + if(my_effect.trigger == TRIGGER_NITRO && my_effect.activated) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_NITRO && !secondary_effect.activated) + secondary_effect.ToggleActivate(0) + +/obj/machinery/artifact/attack_hand(var/mob/user as mob) + if (get_dist(user, src) > 1) + user << "\red You can't reach [src] from here." + return + if(ishuman(user) && user:gloves) + user << "You touch [src] with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]." + return + + src.add_fingerprint(user) + + if(my_effect.trigger == TRIGGER_TOUCH) + user << "You touch [src]." + my_effect.ToggleActivate() + else + user << "You touch [src], [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]." + + if(prob(25) && secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH) + secondary_effect.ToggleActivate(0) + + if (my_effect.effect == EFFECT_TOUCH) + my_effect.DoEffectTouch(user) + + if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated) + secondary_effect.DoEffectTouch(user) + +/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob) + + if (istype(W, /obj/item/weapon/reagent_containers/)) + if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1)) + if(my_effect.trigger == TRIGGER_WATER) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_WATER && prob(25)) + secondary_effect.ToggleActivate(0) + else if(W.reagents.has_reagent("sacid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1)) + if(my_effect.trigger == TRIGGER_ACID) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_ACID && prob(25)) + secondary_effect.ToggleActivate(0) + else if(W.reagents.has_reagent("phoron", 1) || W.reagents.has_reagent("thermite", 1)) + if(my_effect.trigger == TRIGGER_VOLATILE) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_VOLATILE && prob(25)) + secondary_effect.ToggleActivate(0) + else if(W.reagents.has_reagent("toxin", 1) || W.reagents.has_reagent("cyanide", 1) || W.reagents.has_reagent("amatoxin", 1) || W.reagents.has_reagent("neurotoxin", 1)) + if(my_effect.trigger == TRIGGER_TOXIN) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_TOXIN && prob(25)) + secondary_effect.ToggleActivate(0) + else if(istype(W,/obj/item/weapon/melee/baton) && W:status ||\ + istype(W,/obj/item/weapon/melee/energy) ||\ + istype(W,/obj/item/weapon/melee/cultblade) ||\ + istype(W,/obj/item/weapon/card/emag) ||\ + istype(W,/obj/item/device/multitool)) + if (my_effect.trigger == TRIGGER_ENERGY) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25)) + secondary_effect.ToggleActivate(0) + + else if (istype(W,/obj/item/weapon/flame) && W:lit ||\ + istype(W,/obj/item/weapon/weldingtool) && W:welding) + if(my_effect.trigger == TRIGGER_HEAT) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && prob(25)) + secondary_effect.ToggleActivate(0) + else + ..() + if (my_effect.trigger == TRIGGER_FORCE && W.force >= 10) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25)) + secondary_effect.ToggleActivate(0) + +/obj/machinery/artifact/Bumped(M as mob|obj) + ..() + if(istype(M,/obj)) + if(M:throwforce >= 10) + if(my_effect.trigger == TRIGGER_FORCE) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25)) + secondary_effect.ToggleActivate(0) + else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves)) + var/warn = 0 + + if (my_effect.trigger == TRIGGER_TOUCH && prob(50)) + my_effect.ToggleActivate() + warn = 1 + if(secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH && prob(25)) + secondary_effect.ToggleActivate(0) + warn = 1 + + if (my_effect.effect == EFFECT_TOUCH && prob(50)) + my_effect.DoEffectTouch(M) + warn = 1 + if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated && prob(50)) + secondary_effect.DoEffectTouch(M) + warn = 1 + + if(warn) + M << "You accidentally touch [src]." + ..() + +/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P) + if(istype(P,/obj/item/projectile/bullet) ||\ + istype(P,/obj/item/projectile/hivebotbullet)) + if(my_effect.trigger == TRIGGER_FORCE) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25)) + secondary_effect.ToggleActivate(0) + + else if(istype(P,/obj/item/projectile/beam) ||\ + istype(P,/obj/item/projectile/ion) ||\ + istype(P,/obj/item/projectile/energy)) + if(my_effect.trigger == TRIGGER_ENERGY) + my_effect.ToggleActivate() + if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25)) + secondary_effect.ToggleActivate(0) + +/obj/machinery/artifact/ex_act(severity) + switch(severity) + if(1.0) qdel(src) + if(2.0) + if (prob(50)) + qdel(src) + else + if(my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT) + my_effect.ToggleActivate() + if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25)) + secondary_effect.ToggleActivate(0) + if(3.0) + if (my_effect.trigger == TRIGGER_FORCE || my_effect.trigger == TRIGGER_HEAT) + my_effect.ToggleActivate() + if(secondary_effect && (secondary_effect.trigger == TRIGGER_FORCE || secondary_effect.trigger == TRIGGER_HEAT) && prob(25)) + secondary_effect.ToggleActivate(0) + return + +/obj/machinery/artifact/Move() + ..() + if(my_effect) + my_effect.UpdateMove() + if(secondary_effect) + secondary_effect.UpdateMove() diff --git a/code/modules/xenoarcheaology/artifacts/artifact_find.dm b/code/modules/xenoarcheaology/artifacts/artifact_find.dm new file mode 100644 index 0000000000..7cead98237 --- /dev/null +++ b/code/modules/xenoarcheaology/artifacts/artifact_find.dm @@ -0,0 +1,19 @@ +/datum/artifact_find + var/artifact_id + var/artifact_find_type + +/datum/artifact_find/New() + + artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]" + + artifact_find_type = pick( + 5;/obj/machinery/power/supermatter, + 5;/obj/structure/constructshell, + 5;/obj/machinery/syndicate_beacon, + 25;/obj/machinery/power/supermatter/shard, + 50;/obj/structure/cult/pylon, + 100;/obj/machinery/auto_cloner, + 100;/obj/machinery/giga_drill, + 100;/obj/machinery/replicator, + 150;/obj/structure/crystal, +1000;/obj/machinery/artifact) \ No newline at end of file diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_autocloner.dm b/code/modules/xenoarcheaology/artifacts/autocloner.dm similarity index 64% rename from code/modules/research/xenoarchaeology/artifact/artifact_autocloner.dm rename to code/modules/xenoarcheaology/artifacts/autocloner.dm index 4daf56e056..89c653516f 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_autocloner.dm +++ b/code/modules/xenoarcheaology/artifacts/autocloner.dm @@ -1,4 +1,3 @@ - /obj/machinery/auto_cloner name = "mysterious pod" desc = "It's full of a viscous liquid, but appears dark and silent." @@ -22,25 +21,23 @@ //33% chance to spawn nasties if(prob(33)) - spawn_type = pick(\ - /mob/living/simple_animal/hostile/giant_spider/nurse,\ - /mob/living/simple_animal/hostile/alien,\ - /mob/living/simple_animal/hostile/bear,\ - /mob/living/simple_animal/hostile/creature\ - ) + spawn_type = pick( + /mob/living/simple_animal/hostile/giant_spider/nurse, + /mob/living/simple_animal/hostile/alien, + /mob/living/simple_animal/hostile/bear, + /mob/living/simple_animal/hostile/creature) else spawn_type = pick(\ - /mob/living/simple_animal/cat,\ - /mob/living/simple_animal/corgi,\ - /mob/living/simple_animal/corgi/puppy,\ - /mob/living/simple_animal/chicken,\ - /mob/living/simple_animal/cow,\ - /mob/living/simple_animal/parrot,\ - /mob/living/simple_animal/slime,\ - /mob/living/simple_animal/crab,\ - /mob/living/simple_animal/mouse,\ - /mob/living/simple_animal/hostile/retaliate/goat\ - ) + /mob/living/simple_animal/cat, + /mob/living/simple_animal/corgi, + /mob/living/simple_animal/corgi/puppy, + /mob/living/simple_animal/chicken, + /mob/living/simple_animal/cow, + /mob/living/simple_animal/parrot, + /mob/living/simple_animal/slime, + /mob/living/simple_animal/crab, + /mob/living/simple_animal/mouse, + /mob/living/simple_animal/hostile/retaliate/goat) //todo: how the hell is the asteroid permanently powered? /obj/machinery/auto_cloner/process() @@ -48,17 +45,17 @@ if(!previous_power_state) previous_power_state = 1 icon_state = "cellold1" - src.visible_message("\blue \icon[src] [src] suddenly comes to life!") + src.visible_message("\icon[src] [src] suddenly comes to life!") //slowly grow a mob if(prob(5)) - src.visible_message("\blue \icon[src] [src] [pick("gloops","glugs","whirrs","whooshes","hisses","purrs","hums","gushes")].") + src.visible_message("\icon[src] [src] [pick("gloops","glugs","whirrs","whooshes","hisses","purrs","hums","gushes")].") //if we've finished growing... if(time_spent_spawning >= time_per_spawn) time_spent_spawning = 0 use_power = 1 - src.visible_message("\blue \icon[src] [src] pings!") + src.visible_message("\icon[src] [src] pings!") icon_state = "cellold1" desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow." if(spawn_type) @@ -79,7 +76,7 @@ if(previous_power_state) previous_power_state = 0 icon_state = "cellold0" - src.visible_message("\blue \icon[src] [src] suddenly shuts down.") + src.visible_message("\icon[src] [src] suddenly shuts down.") //cloned mob slowly breaks down time_spent_spawning = max(time_spent_spawning + last_process - world.time, 0) diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_crystal.dm b/code/modules/xenoarcheaology/artifacts/crystal.dm similarity index 74% rename from code/modules/research/xenoarchaeology/artifact/artifact_crystal.dm rename to code/modules/xenoarcheaology/artifacts/crystal.dm index 081683b044..1f922c64ba 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_crystal.dm +++ b/code/modules/xenoarcheaology/artifacts/crystal.dm @@ -1,36 +1,35 @@ - -/obj/structure/crystal - name = "large crystal" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "crystal" - density = 1 - -/obj/structure/crystal/New() - ..() - - icon_state = pick("ano70","ano80") - - desc = pick(\ - "It shines faintly as it catches the light.",\ - "It appears to have a faint inner glow.",\ - "It seems to draw you inward as you look it at.",\ - "Something twinkles faintly as you look at it.",\ - "It's mesmerizing to behold.") - -/obj/structure/crystal/Destroy() - src.visible_message("\red[src] shatters!") - if(prob(75)) - new /obj/item/weapon/material/shard/phoron(src.loc) - if(prob(50)) - new /obj/item/weapon/material/shard/phoron(src.loc) - if(prob(25)) - new /obj/item/weapon/material/shard/phoron(src.loc) - if(prob(75)) - new /obj/item/weapon/material/shard(src.loc) - if(prob(50)) - new /obj/item/weapon/material/shard(src.loc) - if(prob(25)) - new /obj/item/weapon/material/shard(src.loc) - ..() - -//todo: laser_act +/obj/structure/crystal + name = "large crystal" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "crystal" + density = 1 + +/obj/structure/crystal/New() + ..() + + icon_state = pick("ano70","ano80") + + desc = pick( + "It shines faintly as it catches the light.", + "It appears to have a faint inner glow.", + "It seems to draw you inward as you look it at.", + "Something twinkles faintly as you look at it.", + "It's mesmerizing to behold.") + +/obj/structure/crystal/Destroy() + src.visible_message("\red[src] shatters!") + if(prob(75)) + new /obj/item/weapon/material/shard/phoron(src.loc) + if(prob(50)) + new /obj/item/weapon/material/shard/phoron(src.loc) + if(prob(25)) + new /obj/item/weapon/material/shard/phoron(src.loc) + if(prob(75)) + new /obj/item/weapon/material/shard(src.loc) + if(prob(50)) + new /obj/item/weapon/material/shard(src.loc) + if(prob(25)) + new /obj/item/weapon/material/shard(src.loc) + ..() + +//todo: laser_act diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_gigadrill.dm b/code/modules/xenoarcheaology/artifacts/gigadrill.dm similarity index 73% rename from code/modules/research/xenoarchaeology/artifact/artifact_gigadrill.dm rename to code/modules/xenoarcheaology/artifacts/gigadrill.dm index c9d14ce237..42c7288d2d 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_gigadrill.dm +++ b/code/modules/xenoarcheaology/artifacts/gigadrill.dm @@ -1,4 +1,3 @@ - /obj/machinery/giga_drill name = "alien drill" desc = "A giant, alien drill mounted on long treads." @@ -14,18 +13,18 @@ if(active) active = 0 icon_state = "gigadrill" - user << "\blue You press a button and [src] slowly spins down." + user << "You press a button and \the [src] slowly spins down." else active = 1 icon_state = "gigadrill_mov" - user << "\blue You press a button and [src] shudders to life." + user << "You press a button and \the [src] shudders to life." /obj/machinery/giga_drill/Bump(atom/A) if(active && !drilling_turf) if(istype(A,/turf/simulated/mineral)) var/turf/simulated/mineral/M = A drilling_turf = get_turf(src) - src.visible_message("\red [src] begins to drill into [M]!") + src.visible_message("\The [src] begins to drill into \the [M].") anchored = 1 spawn(drill_time) if(get_turf(src) == drilling_turf && active) diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm b/code/modules/xenoarcheaology/artifacts/replicator.dm similarity index 63% rename from code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm rename to code/modules/xenoarcheaology/artifacts/replicator.dm index 66b5f7dc7d..a3030b4bf6 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm +++ b/code/modules/xenoarcheaology/artifacts/replicator.dm @@ -1,4 +1,3 @@ - /obj/machinery/replicator name = "alien machine" desc = "It's some kind of pod with strange wires and gadgets all over it." @@ -23,51 +22,50 @@ /obj/machinery/replicator/New() ..() - var/list/viables = list(\ - /obj/item/roller,\ - /obj/structure/closet/crate,\ - /obj/structure/closet/acloset,\ - /mob/living/simple_animal/hostile/mimic,\ - /mob/living/simple_animal/hostile/viscerator,\ - /mob/living/simple_animal/hostile/hivebot,\ - /obj/item/device/analyzer,\ - /obj/item/device/camera,\ - /obj/item/device/flash,\ - /obj/item/device/flashlight,\ - /obj/item/device/healthanalyzer,\ - /obj/item/device/multitool,\ - /obj/item/device/paicard,\ - /obj/item/device/radio,\ - /obj/item/device/radio/headset,\ - /obj/item/device/radio/beacon,\ - /obj/item/weapon/autopsy_scanner,\ - /obj/item/weapon/bikehorn,\ - /obj/item/weapon/bonesetter,\ - /obj/item/weapon/material/knife/butch,\ - /obj/item/weapon/caution,\ - /obj/item/weapon/caution/cone,\ - /obj/item/weapon/crowbar,\ - /obj/item/weapon/clipboard,\ - /obj/item/weapon/cell,\ - /obj/item/weapon/circular_saw,\ - /obj/item/weapon/material/hatchet,\ - /obj/item/weapon/handcuffs,\ - /obj/item/weapon/hemostat,\ - /obj/item/weapon/material/knife,\ - /obj/item/weapon/flame/lighter,\ - /obj/item/weapon/light/bulb,\ - /obj/item/weapon/light/tube,\ - /obj/item/weapon/pickaxe,\ - /obj/item/weapon/shovel,\ - /obj/item/weapon/weldingtool,\ - /obj/item/weapon/wirecutters,\ - /obj/item/weapon/wrench,\ - /obj/item/weapon/screwdriver,\ - /obj/item/weapon/grenade/chem_grenade/cleaner,\ - /obj/item/weapon/grenade/chem_grenade/metalfoam\ - ) + var/list/viables = list( + /obj/item/roller, + /obj/structure/closet/crate, + /obj/structure/closet/acloset, + /mob/living/simple_animal/hostile/mimic, + /mob/living/simple_animal/hostile/viscerator, + /mob/living/simple_animal/hostile/hivebot, + /obj/item/device/analyzer, + /obj/item/device/camera, + /obj/item/device/flash, + /obj/item/device/flashlight, + /obj/item/device/healthanalyzer, + /obj/item/device/multitool, + /obj/item/device/paicard, + /obj/item/device/radio, + /obj/item/device/radio/headset, + /obj/item/device/radio/beacon, + /obj/item/weapon/autopsy_scanner, + /obj/item/weapon/bikehorn, + /obj/item/weapon/bonesetter, + /obj/item/weapon/material/knife/butch, + /obj/item/weapon/caution, + /obj/item/weapon/caution/cone, + /obj/item/weapon/crowbar, + /obj/item/weapon/clipboard, + /obj/item/weapon/cell, + /obj/item/weapon/circular_saw, + /obj/item/weapon/material/hatchet, + /obj/item/weapon/handcuffs, + /obj/item/weapon/hemostat, + /obj/item/weapon/material/knife, + /obj/item/weapon/flame/lighter, + /obj/item/weapon/light/bulb, + /obj/item/weapon/light/tube, + /obj/item/weapon/pickaxe, + /obj/item/weapon/shovel, + /obj/item/weapon/weldingtool, + /obj/item/weapon/wirecutters, + /obj/item/weapon/wrench, + /obj/item/weapon/screwdriver, + /obj/item/weapon/grenade/chem_grenade/cleaner, + /obj/item/weapon/grenade/chem_grenade/metalfoam) - var/quantity = rand(5,15) + var/quantity = rand(5, 15) for(var/i=0, i max_spawn_time) - src.visible_message("\blue \icon[src] [src] pings!") + src.visible_message("\icon[src] [src] pings!") var/obj/source_material = pop(stored_materials) var/spawn_type = pop(spawning_types) @@ -111,7 +109,7 @@ icon_state = "borgcharger0(old)" else if(prob(5)) - src.visible_message("\blue \icon[src] [src] [pick("clicks","whizzes","whirrs","whooshes","clanks","clongs","clonks","bangs")].") + src.visible_message("\icon[src] [src] [pick("clicks","whizzes","whirrs","whooshes","clanks","clongs","clonks","bangs")].") last_process_time = world.time @@ -130,7 +128,7 @@ user.drop_item() W.loc = src stored_materials.Add(W) - src.visible_message("\blue [user] inserts [W] into [src].") + src.visible_message("\The [user] inserts \the [W] into \the [src].") /obj/machinery/replicator/Topic(href, href_list) @@ -139,9 +137,9 @@ if(index > 0 && index <= construction.len) if(stored_materials.len > spawning_types.len) if(spawning_types.len) - src.visible_message("\blue \icon[src] a [pick("light","dial","display","meter","pad")] on [src]'s front [pick("blinks","flashes")] [pick("red","yellow","blue","orange","purple","green","white")].") + src.visible_message("\icon[src] a [pick("light","dial","display","meter","pad")] on [src]'s front [pick("blinks","flashes")] [pick("red","yellow","blue","orange","purple","green","white")].") else - src.visible_message("\blue \icon[src] [src]'s front compartment slides shut.") + src.visible_message("\icon[src] [src]'s front compartment slides shut.") spawning_types.Add(construction[construction[index]]) spawn_progress_time = 0 diff --git a/code/modules/xenoarcheaology/boulder.dm b/code/modules/xenoarcheaology/boulder.dm new file mode 100644 index 0000000000..4c0bafd707 --- /dev/null +++ b/code/modules/xenoarcheaology/boulder.dm @@ -0,0 +1,90 @@ +/obj/structure/boulder + name = "rocky debris" + desc = "Leftover rock from an excavation, it's been partially dug out already but there's still a lot to go." + icon = 'icons/obj/mining.dmi' + icon_state = "boulder1" + density = 1 + opacity = 1 + anchored = 1 + var/excavation_level = 0 + var/datum/geosample/geological_data + var/datum/artifact_find/artifact_find + var/last_act = 0 + +/obj/structure/boulder/New() + icon_state = "boulder[rand(1,4)]" + excavation_level = rand(5, 50) + +/obj/structure/boulder/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/device/core_sampler)) + src.geological_data.artifact_distance = rand(-100,100) / 100 + src.geological_data.artifact_id = artifact_find.artifact_id + + var/obj/item/device/core_sampler/C = I + C.sample_item(src, user) + return + + if(istype(I, /obj/item/device/depth_scanner)) + var/obj/item/device/depth_scanner/C = I + C.scan_atom(user, src) + return + + if(istype(I, /obj/item/device/measuring_tape)) + var/obj/item/device/measuring_tape/P = I + user.visible_message("\The [user] extends \the [P] towards \the [src].", "You extend \the [P] towards \the [src].") + if(do_after(user, 15)) + user << "\The [src] has been excavated to a depth of [2 * src.excavation_level]cm." + return + + if(istype(I, /obj/item/weapon/pickaxe)) + var/obj/item/weapon/pickaxe/P = I + + if(last_act + P.digspeed > world.time)//prevents message spam + return + last_act = world.time + + user << "You start [P.drill_verb] [src]." + + if(!do_after(user, P.digspeed)) + return + + user << "You finish [P.drill_verb] [src]." + excavation_level += P.excavation_amount + + if(excavation_level > 100) + //failure + user.visible_message("\The [src] suddenly crumbles away.", "\The [src] has disintegrated under your onslaught, any secrets it was holding are long gone.") + qdel(src) + return + + if(prob(excavation_level)) + //success + if(artifact_find) + var/spawn_type = artifact_find.artifact_find_type + var/obj/O = new spawn_type(get_turf(src)) + if(istype(O, /obj/machinery/artifact)) + var/obj/machinery/artifact/X = O + if(X.my_effect) + X.my_effect.artifact_id = artifact_find.artifact_id + src.visible_message("\The [src] suddenly crumbles away.") + else + user.visible_message("\The [src] suddenly crumbles away.", "\The [src] has been whittled away under your careful excavation, but there was nothing of interest inside.") + qdel(src) + +/obj/structure/boulder/Bumped(AM) + . = ..() + if(istype(AM,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = AM + var/obj/item/weapon/pickaxe/P = H.get_inactive_hand() + if(istype(P)) + src.attackby(P, H) + + else if(istype(AM,/mob/living/silicon/robot)) + var/mob/living/silicon/robot/R = AM + if(istype(R.module_active,/obj/item/weapon/pickaxe)) + attackby(R.module_active,R) + + else if(istype(AM,/obj/mecha)) + var/obj/mecha/M = AM + if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill)) + M.selected.action(src) \ No newline at end of file diff --git a/code/modules/research/xenoarchaeology/artifact/effect.dm b/code/modules/xenoarcheaology/effect.dm similarity index 66% rename from code/modules/research/xenoarchaeology/artifact/effect.dm rename to code/modules/xenoarcheaology/effect.dm index 23bb649ac7..eaf51f102b 100644 --- a/code/modules/research/xenoarchaeology/artifact/effect.dm +++ b/code/modules/xenoarcheaology/effect.dm @@ -1,7 +1,5 @@ - -//override procs in children as necessary /datum/artifact_effect - var/effecttype = "unknown" //purely used for admin checks ingame, not needed any more + var/name = "unknown" var/effect = EFFECT_TOUCH var/effectrange = 4 var/trigger = TRIGGER_TOUCH @@ -12,20 +10,11 @@ var/artifact_id = "" var/effect_type = 0 -//0 = Unknown / none detectable -//1 = Concentrated energy -//2 = Intermittent psionic wavefront -//3 = Electromagnetic energy -//4 = Particle field -//5 = Organically reactive exotic particles -//6 = Interdimensional/bluespace? phasing -//7 = Atomic synthesis - /datum/artifact_effect/New(var/atom/location) ..() holder = location - effect = rand(0,MAX_EFFECT) - trigger = rand(0,MAX_TRIGGER) + effect = rand(0, MAX_EFFECT) + trigger = rand(0, MAX_TRIGGER) //this will be replaced by the excavation code later, but it's here just in case artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]" @@ -82,9 +71,53 @@ chargelevel = 0 DoEffectPulse() +/datum/artifact_effect/proc/getDescription() + . = "" + switch(effect_type) + if(EFFECT_ENERGY) + . += "Concentrated energy emissions" + if(EFFECT_PSIONIC) + . += "Intermittent psionic wavefront" + if(EFFECT_ELECTRO) + . += "Electromagnetic energy" + if(EFFECT_PARTICLE) + . += "High frequency particles" + if(EFFECT_ORGANIC) + . += "Organically reactive exotic particles" + if(EFFECT_BLUESPACE) + . += "Interdimensional/bluespace? phasing" + if(EFFECT_SYNTH) + . += "Atomic synthesis" + else + . += "Low level energy emissions" + + . += " have been detected " + + switch(effect) + if(EFFECT_TOUCH) + . += "interspersed throughout substructure and shell." + if(EFFECT_AURA) + . += "emitting in an ambient energy field." + if(EFFECT_PULSE) + . += "emitting in periodic bursts." + else + . += "emitting in an unknown way." + + . += "" + + switch(trigger) + if(TRIGGER_TOUCH, TRIGGER_WATER, TRIGGER_ACID, TRIGGER_VOLATILE, TRIGGER_TOXIN) + . += " Activation index involves physical interaction with artifact surface." + if(TRIGGER_FORCE, TRIGGER_ENERGY, TRIGGER_HEAT, TRIGGER_COLD) + . += " Activation index involves energetic interaction with artifact surface." + if(TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO) + . += " Activation index involves precise local atmospheric conditions." + else + . += " Unable to determine any data about activation trigger." + //returns 0..1, with 1 being no protection and 0 being fully protected -proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H) - if(!H || !istype(H)) +/proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H) + if(!istype(H)) return 1 var/protected = 0 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm b/code/modules/xenoarcheaology/effects/badfeeling.dm similarity index 62% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm rename to code/modules/xenoarcheaology/effects/badfeeling.dm index 0d6bd0eb63..60386531d9 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm +++ b/code/modules/xenoarcheaology/effects/badfeeling.dm @@ -1,70 +1,69 @@ - -/datum/artifact_effect/badfeeling - effecttype = "badfeeling" - effect_type = 2 - var/list/messages = list("You feel worried.",\ - "Something doesn't feel right.",\ - "You get a strange feeling in your gut.",\ - "Your instincts are trying to warn you about something.",\ - "Someone just walked over your grave.",\ - "There's a strange feeling in the air.",\ - "There's a strange smell in the air.",\ - "The tips of your fingers feel tingly.",\ - "You feel witchy.",\ - "You have a terrible sense of foreboding.",\ - "You've got a bad feeling about this.",\ - "Your scalp prickles.",\ - "The light seems to flicker.",\ - "The shadows seem to lengthen.",\ - "The walls are getting closer.",\ - "Something is wrong") - - var/list/drastic_messages = list("You've got to get out of here!",\ - "Someone's trying to kill you!",\ - "There's something out there!",\ - "What's happening to you?",\ - "OH GOD!",\ - "HELP ME!") - -/datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user) - if(user) - if (istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - if(prob(50)) - if(prob(75)) - H << "[pick(drastic_messages)]" - else - H << "[pick(messages)]" - - if(prob(50)) - H.dizziness += rand(3,5) - -/datum/artifact_effect/badfeeling/DoEffectAura() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/human/H in range(src.effectrange,T)) - if(prob(5)) - if(prob(75)) - H << "[pick(messages)]" - else - H << "[pick(drastic_messages)]" - - if(prob(10)) - H.dizziness += rand(3,5) - return 1 - -/datum/artifact_effect/badfeeling/DoEffectPulse() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/human/H in range(src.effectrange,T)) - if(prob(50)) - if(prob(95)) - H << "[pick(drastic_messages)]" - else - H << "[pick(messages)]" - - if(prob(50)) - H.dizziness += rand(3,5) - else if(prob(25)) - H.dizziness += rand(5,15) - return 1 +/datum/artifact_effect/badfeeling + name = "badfeeling" + effect_type = EFFECT_PSIONIC + var/list/messages = list("You feel worried.", + "Something doesn't feel right.", + "You get a strange feeling in your gut.", + "Your instincts are trying to warn you about something.", + "Someone just walked over your grave.", + "There's a strange feeling in the air.", + "There's a strange smell in the air.", + "The tips of your fingers feel tingly.", + "You feel witchy.", + "You have a terrible sense of foreboding.", + "You've got a bad feeling about this.", + "Your scalp prickles.", + "The light seems to flicker.", + "The shadows seem to lengthen.", + "The walls are getting closer.", + "Something is wrong") + + var/list/drastic_messages = list("You've got to get out of here!", + "Someone's trying to kill you!", + "There's something out there!", + "What's happening to you?", + "OH GOD!", + "HELP ME!") + +/datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user) + if(user) + if (istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + if(prob(50)) + if(prob(75)) + H << "[pick(drastic_messages)]" + else + H << "[pick(messages)]" + + if(prob(50)) + H.dizziness += rand(3,5) + +/datum/artifact_effect/badfeeling/DoEffectAura() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/human/H in range(src.effectrange,T)) + if(prob(5)) + if(prob(75)) + H << "[pick(messages)]" + else + H << "[pick(drastic_messages)]" + + if(prob(10)) + H.dizziness += rand(3,5) + return 1 + +/datum/artifact_effect/badfeeling/DoEffectPulse() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/human/H in range(src.effectrange,T)) + if(prob(50)) + if(prob(95)) + H << "[pick(drastic_messages)]" + else + H << "[pick(messages)]" + + if(prob(50)) + H.dizziness += rand(3,5) + else if(prob(25)) + H.dizziness += rand(5,15) + return 1 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm b/code/modules/xenoarcheaology/effects/cellcharge.dm similarity index 96% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm rename to code/modules/xenoarcheaology/effects/cellcharge.dm index b6f165ec24..3a30c0646f 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm +++ b/code/modules/xenoarcheaology/effects/cellcharge.dm @@ -1,8 +1,7 @@ - //todo /datum/artifact_effect/cellcharge - effecttype = "cellcharge" - effect_type = 3 + name = "cell charge" + effect_type = EFFECT_ELECTRO var/last_message /datum/artifact_effect/cellcharge/DoEffectTouch(var/mob/user) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_celldrain.dm b/code/modules/xenoarcheaology/effects/celldrain.dm similarity index 96% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_celldrain.dm rename to code/modules/xenoarcheaology/effects/celldrain.dm index fe94dbe155..f988fdf20e 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_celldrain.dm +++ b/code/modules/xenoarcheaology/effects/celldrain.dm @@ -1,8 +1,7 @@ - //todo /datum/artifact_effect/celldrain - effecttype = "celldrain" - effect_type = 3 + name = "cell drain" + effect_type = EFFECT_ELECTRO var/last_message /datum/artifact_effect/celldrain/DoEffectTouch(var/mob/user) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_affect_cold.dm b/code/modules/xenoarcheaology/effects/cold.dm similarity index 88% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_affect_cold.dm rename to code/modules/xenoarcheaology/effects/cold.dm index f8dad2c4d3..b4f7025afb 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_affect_cold.dm +++ b/code/modules/xenoarcheaology/effects/cold.dm @@ -1,14 +1,13 @@ - //inverse of /datum/artifact_effect/heat, the two effects split up for neatness' sake /datum/artifact_effect/cold - effecttype = "cold" + name = "cold" var/target_temp /datum/artifact_effect/cold/New() ..() target_temp = rand(0, 250) effect = pick(EFFECT_TOUCH, EFFECT_AURA) - effect_type = pick(5,6,7) + effect_type = pick(EFFECT_ORGANIC, EFFECT_BLUESPACE, EFFECT_SYNTH) /datum/artifact_effect/cold/DoEffectTouch(var/mob/user) if(holder) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_dnaswitch.dm b/code/modules/xenoarcheaology/effects/dnaswitch.dm similarity index 59% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_dnaswitch.dm rename to code/modules/xenoarcheaology/effects/dnaswitch.dm index b74ab88a9a..82165f6ad8 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_dnaswitch.dm +++ b/code/modules/xenoarcheaology/effects/dnaswitch.dm @@ -1,8 +1,7 @@ - //todo /datum/artifact_effect/dnaswitch - effecttype = "dnaswitch" - effect_type = 5 + name = "dnaswitch" + effect_type = EFFECT_ORGANIC var/severity /datum/artifact_effect/dnaswitch/New() @@ -15,12 +14,12 @@ /datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/toucher) var/weakness = GetAnomalySusceptibility(toucher) if(ishuman(toucher) && prob(weakness * 100)) - toucher << pick("\green You feel a little different.",\ - "\green You feel very strange.",\ - "\green Your stomach churns.",\ - "\green Your skin feels loose.",\ - "\green You feel a stabbing pain in your head.",\ - "\green You feel a tingling sensation in your chest.",\ + toucher << pick("\green You feel a little different.", + "\green You feel very strange.", + "\green Your stomach churns.", + "\green Your skin feels loose.", + "\green You feel a stabbing pain in your head.", + "\green You feel a tingling sensation in your chest.", "\green Your entire body vibrates.") if(prob(75)) scramble(1, toucher, weakness * severity) @@ -35,12 +34,12 @@ var/weakness = GetAnomalySusceptibility(H) if(prob(weakness * 100)) if(prob(30)) - H << pick("\green You feel a little different.",\ - "\green You feel very strange.",\ - "\green Your stomach churns.",\ - "\green Your skin feels loose.",\ - "\green You feel a stabbing pain in your head.",\ - "\green You feel a tingling sensation in your chest.",\ + H << pick("\green You feel a little different.", + "\green You feel very strange.", + "\green Your stomach churns.", + "\green Your skin feels loose.", + "\green You feel a stabbing pain in your head.", + "\green You feel a tingling sensation in your chest.", "\green Your entire body vibrates.") if(prob(50)) scramble(1, H, weakness * severity) @@ -54,12 +53,12 @@ var/weakness = GetAnomalySusceptibility(H) if(prob(weakness * 100)) if(prob(75)) - H << pick("\green You feel a little different.",\ - "\green You feel very strange.",\ - "\green Your stomach churns.",\ - "\green Your skin feels loose.",\ - "\green You feel a stabbing pain in your head.",\ - "\green You feel a tingling sensation in your chest.",\ + H << pick("\green You feel a little different.", + "\green You feel very strange.", + "\green Your stomach churns.", + "\green Your skin feels loose.", + "\green You feel a stabbing pain in your head.", + "\green You feel a tingling sensation in your chest.", "\green Your entire body vibrates.") if(prob(25)) if(prob(75)) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_emp.dm b/code/modules/xenoarcheaology/effects/emp.dm similarity index 83% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_emp.dm rename to code/modules/xenoarcheaology/effects/emp.dm index 18165cf0d4..d6d402efe4 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_emp.dm +++ b/code/modules/xenoarcheaology/effects/emp.dm @@ -1,7 +1,6 @@ - /datum/artifact_effect/emp - effecttype = "emp" - effect_type = 3 + name = "emp" + effect_type = EFFECT_ELECTRO /datum/artifact_effect/emp/New() ..() diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_forcefield.dm b/code/modules/xenoarcheaology/effects/forcefield.dm similarity index 94% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_forcefield.dm rename to code/modules/xenoarcheaology/effects/forcefield.dm index 0139ea935f..6a48620b40 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_forcefield.dm +++ b/code/modules/xenoarcheaology/effects/forcefield.dm @@ -1,80 +1,79 @@ - -/datum/artifact_effect/forcefield - effecttype = "forcefield" - var/list/created_field = list() - effect_type = 4 - -/datum/artifact_effect/forcefield/New() - ..() - trigger = TRIGGER_TOUCH - -/datum/artifact_effect/forcefield/ToggleActivate() - ..() - if(created_field.len) - for(var/obj/effect/energy_field/F in created_field) - created_field.Remove(F) - qdel(F) - else if(holder) - var/turf/T = get_turf(holder) - while(created_field.len < 16) - var/obj/effect/energy_field/E = new (locate(T.x,T.y,T.z)) - created_field.Add(E) - E.strength = 1 - E.density = 1 - E.anchored = 1 - E.invisibility = 0 - spawn(10) - UpdateMove() - return 1 - -/datum/artifact_effect/forcefield/process() - ..() - for(var/obj/effect/energy_field/E in created_field) - if(E.strength < 1) - E.Strengthen(0.15) - else if(E.strength < 5) - E.Strengthen(0.25) - -/datum/artifact_effect/forcefield/UpdateMove() - if(created_field.len && holder) - var/turf/T = get_turf(holder) - while(created_field.len < 16) - //for now, just instantly respawn the fields when they get destroyed - var/obj/effect/energy_field/E = new (locate(T.x,T.y,T)) - created_field.Add(E) - E.anchored = 1 - E.density = 1 - E.invisibility = 0 - - var/obj/effect/energy_field/E = created_field[1] - E.loc = locate(T.x + 2,T.y + 2,T.z) - E = created_field[2] - E.loc = locate(T.x + 2,T.y + 1,T.z) - E = created_field[3] - E.loc = locate(T.x + 2,T.y,T.z) - E = created_field[4] - E.loc = locate(T.x + 2,T.y - 1,T.z) - E = created_field[5] - E.loc = locate(T.x + 2,T.y - 2,T.z) - E = created_field[6] - E.loc = locate(T.x + 1,T.y + 2,T.z) - E = created_field[7] - E.loc = locate(T.x + 1,T.y - 2,T.z) - E = created_field[8] - E.loc = locate(T.x,T.y + 2,T.z) - E = created_field[9] - E.loc = locate(T.x,T.y - 2,T.z) - E = created_field[10] - E.loc = locate(T.x - 1,T.y + 2,T.z) - E = created_field[11] - E.loc = locate(T.x - 1,T.y - 2,T.z) - E = created_field[12] - E.loc = locate(T.x - 2,T.y + 2,T.z) - E = created_field[13] - E.loc = locate(T.x - 2,T.y + 1,T.z) - E = created_field[14] - E.loc = locate(T.x - 2,T.y,T.z) - E = created_field[15] - E.loc = locate(T.x - 2,T.y - 1,T.z) - E = created_field[16] - E.loc = locate(T.x - 2,T.y - 2,T.z) +/datum/artifact_effect/forcefield + name = "force field" + var/list/created_field = list() + effect_type = EFFECT_PARTICLE + +/datum/artifact_effect/forcefield/New() + ..() + trigger = TRIGGER_TOUCH + +/datum/artifact_effect/forcefield/ToggleActivate() + ..() + if(created_field.len) + for(var/obj/effect/energy_field/F in created_field) + created_field.Remove(F) + qdel(F) + else if(holder) + var/turf/T = get_turf(holder) + while(created_field.len < 16) + var/obj/effect/energy_field/E = new (locate(T.x,T.y,T.z)) + created_field.Add(E) + E.strength = 1 + E.density = 1 + E.anchored = 1 + E.invisibility = 0 + spawn(10) + UpdateMove() + return 1 + +/datum/artifact_effect/forcefield/process() + ..() + for(var/obj/effect/energy_field/E in created_field) + if(E.strength < 1) + E.Strengthen(0.15) + else if(E.strength < 5) + E.Strengthen(0.25) + +/datum/artifact_effect/forcefield/UpdateMove() + if(created_field.len && holder) + var/turf/T = get_turf(holder) + while(created_field.len < 16) + //for now, just instantly respawn the fields when they get destroyed + var/obj/effect/energy_field/E = new (locate(T.x,T.y,T)) + created_field.Add(E) + E.anchored = 1 + E.density = 1 + E.invisibility = 0 + + var/obj/effect/energy_field/E = created_field[1] + E.loc = locate(T.x + 2,T.y + 2,T.z) + E = created_field[2] + E.loc = locate(T.x + 2,T.y + 1,T.z) + E = created_field[3] + E.loc = locate(T.x + 2,T.y,T.z) + E = created_field[4] + E.loc = locate(T.x + 2,T.y - 1,T.z) + E = created_field[5] + E.loc = locate(T.x + 2,T.y - 2,T.z) + E = created_field[6] + E.loc = locate(T.x + 1,T.y + 2,T.z) + E = created_field[7] + E.loc = locate(T.x + 1,T.y - 2,T.z) + E = created_field[8] + E.loc = locate(T.x,T.y + 2,T.z) + E = created_field[9] + E.loc = locate(T.x,T.y - 2,T.z) + E = created_field[10] + E.loc = locate(T.x - 1,T.y + 2,T.z) + E = created_field[11] + E.loc = locate(T.x - 1,T.y - 2,T.z) + E = created_field[12] + E.loc = locate(T.x - 2,T.y + 2,T.z) + E = created_field[13] + E.loc = locate(T.x - 2,T.y + 1,T.z) + E = created_field[14] + E.loc = locate(T.x - 2,T.y,T.z) + E = created_field[15] + E.loc = locate(T.x - 2,T.y - 1,T.z) + E = created_field[16] + E.loc = locate(T.x - 2,T.y - 2,T.z) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasco2.dm b/code/modules/xenoarcheaology/effects/gasco2.dm similarity index 72% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasco2.dm rename to code/modules/xenoarcheaology/effects/gasco2.dm index c486959afd..264dca7352 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasco2.dm +++ b/code/modules/xenoarcheaology/effects/gasco2.dm @@ -1,26 +1,19 @@ - -/datum/artifact_effect/gasco2 - effecttype = "gasco2" - var/max_pressure - var/target_percentage - -/datum/artifact_effect/heat/New() - ..() - effect_type = pick(6,7) - -/datum/artifact_effect/gasco2/New() - ..() - effect = pick(EFFECT_TOUCH, EFFECT_AURA) - max_pressure = rand(115,1000) - -/datum/artifact_effect/gasco2/DoEffectTouch(var/mob/user) - if(holder) - var/turf/holder_loc = holder.loc - if(istype(holder_loc)) - holder_loc.assume_gas("carbon_dioxide", rand(2, 15)) - -/datum/artifact_effect/gasco2/DoEffectAura() - if(holder) - var/turf/holder_loc = holder.loc - if(istype(holder_loc)) - holder_loc.assume_gas("carbon_dioxide", pick(0, 0, 0.1, rand())) +/datum/artifact_effect/gasco2 + name = "CO2 creation" + +/datum/artifact_effect/gasco2/New() + ..() + effect = pick(EFFECT_TOUCH, EFFECT_AURA) + effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH) + +/datum/artifact_effect/gasco2/DoEffectTouch(var/mob/user) + if(holder) + var/turf/holder_loc = holder.loc + if(istype(holder_loc)) + holder_loc.assume_gas("carbon_dioxide", rand(2, 15)) + +/datum/artifact_effect/gasco2/DoEffectAura() + if(holder) + var/turf/holder_loc = holder.loc + if(istype(holder_loc)) + holder_loc.assume_gas("carbon_dioxide", pick(0, 0, 0.1, rand())) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasnitro.dm b/code/modules/xenoarcheaology/effects/gasnitro.dm similarity index 76% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasnitro.dm rename to code/modules/xenoarcheaology/effects/gasnitro.dm index 6954ab3c77..42b440fc1c 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasnitro.dm +++ b/code/modules/xenoarcheaology/effects/gasnitro.dm @@ -1,23 +1,19 @@ - -/datum/artifact_effect/gasnitro - effecttype = "gasnitro" - var/max_pressure - var/target_percentage - -/datum/artifact_effect/gasnitro/New() - ..() - effect = pick(EFFECT_TOUCH, EFFECT_AURA) - effect_type = pick(6,7) - max_pressure = rand(115,1000) - -/datum/artifact_effect/gasnitro/DoEffectTouch(var/mob/user) - if(holder) - var/turf/holder_loc = holder.loc - if(istype(holder_loc)) - holder_loc.assume_gas("nitrogen", rand(2, 15)) - -/datum/artifact_effect/gasnitro/DoEffectAura() - if(holder) - var/turf/holder_loc = holder.loc - if(istype(holder_loc)) - holder_loc.assume_gas("nitrogen", pick(0, 0, 0.1, rand())) +/datum/artifact_effect/gasnitro + name = "N2 creation" + +/datum/artifact_effect/gasnitro/New() + ..() + effect = pick(EFFECT_TOUCH, EFFECT_AURA) + effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH) + +/datum/artifact_effect/gasnitro/DoEffectTouch(var/mob/user) + if(holder) + var/turf/holder_loc = holder.loc + if(istype(holder_loc)) + holder_loc.assume_gas("nitrogen", rand(2, 15)) + +/datum/artifact_effect/gasnitro/DoEffectAura() + if(holder) + var/turf/holder_loc = holder.loc + if(istype(holder_loc)) + holder_loc.assume_gas("nitrogen", pick(0, 0, 0.1, rand())) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasoxy.dm b/code/modules/xenoarcheaology/effects/gasoxy.dm similarity index 79% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasoxy.dm rename to code/modules/xenoarcheaology/effects/gasoxy.dm index ae8d253652..bb159509dc 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasoxy.dm +++ b/code/modules/xenoarcheaology/effects/gasoxy.dm @@ -1,23 +1,19 @@ - -/datum/artifact_effect/gasoxy - effecttype = "gasoxy" - var/max_pressure - -/datum/artifact_effect/gasoxy/New() - ..() - effect = pick(EFFECT_TOUCH, EFFECT_AURA) - max_pressure = rand(115,1000) - effect_type = pick(6,7) - - -/datum/artifact_effect/gasoxy/DoEffectTouch(var/mob/user) - if(holder) - var/turf/holder_loc = holder.loc - if(istype(holder_loc)) - holder_loc.assume_gas("oxygen", rand(2, 15)) - -/datum/artifact_effect/gasoxy/DoEffectAura() - if(holder) - var/turf/holder_loc = holder.loc - if(istype(holder_loc)) - holder_loc.assume_gas("oxygen", pick(0, 0, 0.1, rand())) +/datum/artifact_effect/gasoxy + name = "O2 creation" + +/datum/artifact_effect/gasoxy/New() + ..() + effect = pick(EFFECT_TOUCH, EFFECT_AURA) + effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH) + +/datum/artifact_effect/gasoxy/DoEffectTouch(var/mob/user) + if(holder) + var/turf/holder_loc = holder.loc + if(istype(holder_loc)) + holder_loc.assume_gas("oxygen", rand(2, 15)) + +/datum/artifact_effect/gasoxy/DoEffectAura() + if(holder) + var/turf/holder_loc = holder.loc + if(istype(holder_loc)) + holder_loc.assume_gas("oxygen", pick(0, 0, 0.1, rand())) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasplasma.dm b/code/modules/xenoarcheaology/effects/gasphoron.dm similarity index 71% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasplasma.dm rename to code/modules/xenoarcheaology/effects/gasphoron.dm index d470a462b1..b84296fbb8 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gasplasma.dm +++ b/code/modules/xenoarcheaology/effects/gasphoron.dm @@ -1,20 +1,16 @@ - /datum/artifact_effect/gasphoron - effecttype = "gasphoron" - var/max_pressure - var/target_percentage + name = "phoron creation" /datum/artifact_effect/gasphoron/New() ..() effect = pick(EFFECT_TOUCH, EFFECT_AURA) - max_pressure = rand(115,1000) - effect_type = pick(6,7) + effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH) /datum/artifact_effect/gasphoron/DoEffectTouch(var/mob/user) if(holder) var/turf/holder_loc = holder.loc if(istype(holder_loc)) - holder_loc.assume_gas("oxygen", rand(2, 15)) + holder_loc.assume_gas("phoron", rand(2, 15)) /datum/artifact_effect/gasphoron/DoEffectAura() if(holder) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gassleeping.dm b/code/modules/xenoarcheaology/effects/gassleeping.dm similarity index 77% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gassleeping.dm rename to code/modules/xenoarcheaology/effects/gassleeping.dm index afa1d0704c..8537880438 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_gassleeping.dm +++ b/code/modules/xenoarcheaology/effects/gassleeping.dm @@ -1,23 +1,19 @@ - -/datum/artifact_effect/gassleeping - effecttype = "gassleeping" - var/max_pressure - var/target_percentage - -/datum/artifact_effect/gassleeping/New() - ..() - effect = pick(EFFECT_TOUCH, EFFECT_AURA) - max_pressure = rand(115,1000) - effect_type = pick(6,7) - -/datum/artifact_effect/gassleeping/DoEffectTouch(var/mob/user) - if(holder) - var/turf/holder_loc = holder.loc - if(istype(holder_loc)) - holder_loc.assume_gas("sleeping_agent", rand(2, 15)) - -/datum/artifact_effect/gassleeping/DoEffectAura() - if(holder) - var/turf/holder_loc = holder.loc - if(istype(holder_loc)) - holder_loc.assume_gas("sleeping_agent", pick(0, 0, 0.1, rand())) +/datum/artifact_effect/gassleeping + name = "N2O creation" + +/datum/artifact_effect/gassleeping/New() + ..() + effect = pick(EFFECT_TOUCH, EFFECT_AURA) + effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH) + +/datum/artifact_effect/gassleeping/DoEffectTouch(var/mob/user) + if(holder) + var/turf/holder_loc = holder.loc + if(istype(holder_loc)) + holder_loc.assume_gas("sleeping_agent", rand(2, 15)) + +/datum/artifact_effect/gassleeping/DoEffectAura() + if(holder) + var/turf/holder_loc = holder.loc + if(istype(holder_loc)) + holder_loc.assume_gas("sleeping_agent", pick(0, 0, 0.1, rand())) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm b/code/modules/xenoarcheaology/effects/goodfeeling.dm similarity index 70% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm rename to code/modules/xenoarcheaology/effects/goodfeeling.dm index 61719bc916..8086d0e673 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm +++ b/code/modules/xenoarcheaology/effects/goodfeeling.dm @@ -1,68 +1,67 @@ - -/datum/artifact_effect/goodfeeling - effecttype = "goodfeeling" - effect_type = 2 - var/list/messages = list("You feel good.",\ - "Everything seems to be going alright",\ - "You've got a good feeling about this",\ - "Your instincts tell you everything is going to be getting better.",\ - "There's a good feeling in the air.",\ - "Something smells... good.",\ - "The tips of your fingers feel tingly.",\ - "You've got a good feeling about this.",\ - "You feel happy.",\ - "You fight the urge to smile.",\ - "Your scalp prickles.",\ - "All the colours seem a bit more vibrant.",\ - "Everything seems a little lighter.",\ - "The troubles of the world seem to fade away.") - - var/list/drastic_messages = list("You want to hug everyone you meet!",\ - "Everything is going so well!",\ - "You feel euphoric.",\ - "You feel giddy.",\ - "You're so happy suddenly, you almost want to dance and sing.",\ - "You feel like the world is out to help you.") - -/datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user) - if(user) - if (istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - if(prob(50)) - if(prob(75)) - H << "[pick(drastic_messages)]" - else - H << "[pick(messages)]" - - if(prob(50)) - H.dizziness += rand(3,5) - -/datum/artifact_effect/goodfeeling/DoEffectAura() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/human/H in range(src.effectrange,T)) - if(prob(5)) - if(prob(75)) - H << "[pick(messages)]" - else - H << "[pick(drastic_messages)]" - - if(prob(5)) - H.dizziness += rand(3,5) - return 1 - -/datum/artifact_effect/goodfeeling/DoEffectPulse() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/human/H in range(src.effectrange,T)) - if(prob(50)) - if(prob(95)) - H << "[pick(drastic_messages)]" - else - H << "[pick(messages)]" - - if(prob(50)) - H.dizziness += rand(3,5) - else if(prob(25)) - H.dizziness += rand(5,15) - return 1 +/datum/artifact_effect/goodfeeling + name = "good feeling" + effect_type = EFFECT_PSIONIC + var/list/messages = list("You feel good.", + "Everything seems to be going alright", + "You've got a good feeling about this", + "Your instincts tell you everything is going to be getting better.", + "There's a good feeling in the air.", + "Something smells... good.", + "The tips of your fingers feel tingly.", + "You've got a good feeling about this.", + "You feel happy.", + "You fight the urge to smile.", + "Your scalp prickles.", + "All the colours seem a bit more vibrant.", + "Everything seems a little lighter.", + "The troubles of the world seem to fade away.") + + var/list/drastic_messages = list("You want to hug everyone you meet!", + "Everything is going so well!", + "You feel euphoric.", + "You feel giddy.", + "You're so happy suddenly, you almost want to dance and sing.", + "You feel like the world is out to help you.") + +/datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user) + if(user) + if (istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + if(prob(50)) + if(prob(75)) + H << "[pick(drastic_messages)]" + else + H << "[pick(messages)]" + + if(prob(50)) + H.dizziness += rand(3,5) + +/datum/artifact_effect/goodfeeling/DoEffectAura() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/human/H in range(src.effectrange,T)) + if(prob(5)) + if(prob(75)) + H << "[pick(messages)]" + else + H << "[pick(drastic_messages)]" + + if(prob(5)) + H.dizziness += rand(3,5) + return 1 + +/datum/artifact_effect/goodfeeling/DoEffectPulse() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/human/H in range(src.effectrange,T)) + if(prob(50)) + if(prob(95)) + H << "[pick(drastic_messages)]" + else + H << "[pick(messages)]" + + if(prob(50)) + H.dizziness += rand(3,5) + else if(prob(25)) + H.dizziness += rand(5,15) + return 1 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_heal.dm b/code/modules/xenoarcheaology/effects/heal.dm similarity index 97% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_heal.dm rename to code/modules/xenoarcheaology/effects/heal.dm index 5a6e8a46db..275f25e3d3 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_heal.dm +++ b/code/modules/xenoarcheaology/effects/heal.dm @@ -1,7 +1,6 @@ - /datum/artifact_effect/heal - effecttype = "heal" - effect_type = 5 + name = "heal" + effect_type = EFFECT_ORGANIC /datum/artifact_effect/heal/DoEffectTouch(var/mob/toucher) //todo: check over this properly diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_heat.dm b/code/modules/xenoarcheaology/effects/heat.dm similarity index 84% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_heat.dm rename to code/modules/xenoarcheaology/effects/heat.dm index 21304df408..00d57ff40a 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_heat.dm +++ b/code/modules/xenoarcheaology/effects/heat.dm @@ -1,17 +1,13 @@ - //inverse of /datum/artifact_effect/cold, the two effects split up for neatness' sake /datum/artifact_effect/heat - effecttype = "heat" + name = "heat" var/target_temp /datum/artifact_effect/heat/New() ..() - effect_type = pick(5,6,7) - -/datum/artifact_effect/heat/New() - ..() - target_temp = rand(300,600) effect = pick(EFFECT_TOUCH, EFFECT_AURA) + effect_type = pick(EFFECT_ORGANIC, EFFECT_BLUESPACE, EFFECT_SYNTH) + target_temp = rand(300, 600) /datum/artifact_effect/heat/DoEffectTouch(var/mob/user) if(holder) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm b/code/modules/xenoarcheaology/effects/hurt.dm similarity index 95% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm rename to code/modules/xenoarcheaology/effects/hurt.dm index 5bdb39a87c..db8732294d 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm +++ b/code/modules/xenoarcheaology/effects/hurt.dm @@ -1,49 +1,48 @@ - -/datum/artifact_effect/hurt - effecttype = I_HURT - effect_type = 5 - -/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher) - if(toucher) - var/weakness = GetAnomalySusceptibility(toucher) - if(iscarbon(toucher) && prob(weakness * 100)) - var/mob/living/carbon/C = toucher - C << "A painful discharge of energy strikes you!" - C.adjustOxyLoss(rand(5,25) * weakness) - C.adjustToxLoss(rand(5,25) * weakness) - C.adjustBruteLoss(rand(5,25) * weakness) - C.adjustFireLoss(rand(5,25) * weakness) - C.adjustBrainLoss(rand(1,5) * weakness) - C.apply_effect(25 * weakness, IRRADIATE) - C.nutrition -= min(50 * weakness, C.nutrition) - C.make_dizzy(6 * weakness) - C.weakened += 6 * weakness - -/datum/artifact_effect/hurt/DoEffectAura() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/C in range(src.effectrange,T)) - var/weakness = GetAnomalySusceptibility(C) - if(prob(weakness * 100)) - if(prob(10)) - C << "You feel a painful force radiating from something nearby." - C.adjustBruteLoss(1 * weakness) - C.adjustFireLoss(1 * weakness) - C.adjustToxLoss(1 * weakness) - C.adjustOxyLoss(1 * weakness) - C.adjustBrainLoss(0.1 * weakness) - C.updatehealth() - -/datum/artifact_effect/hurt/DoEffectPulse() - if(holder) - var/turf/T = get_turf(holder) - for (var/mob/living/carbon/C in range(effectrange, T)) - var/weakness = GetAnomalySusceptibility(C) - if(prob(weakness * 100)) - C << "A wave of painful energy strikes you!" - C.adjustBruteLoss(3 * weakness) - C.adjustFireLoss(3 * weakness) - C.adjustToxLoss(3 * weakness) - C.adjustOxyLoss(3 * weakness) - C.adjustBrainLoss(0.1 * weakness) - C.updatehealth() +/datum/artifact_effect/hurt + name = "hurt" + effect_type = EFFECT_ORGANIC + +/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher) + if(toucher) + var/weakness = GetAnomalySusceptibility(toucher) + if(iscarbon(toucher) && prob(weakness * 100)) + var/mob/living/carbon/C = toucher + C << "A painful discharge of energy strikes you!" + C.adjustOxyLoss(rand(5,25) * weakness) + C.adjustToxLoss(rand(5,25) * weakness) + C.adjustBruteLoss(rand(5,25) * weakness) + C.adjustFireLoss(rand(5,25) * weakness) + C.adjustBrainLoss(rand(1,5) * weakness) + C.apply_effect(25 * weakness, IRRADIATE) + C.nutrition -= min(50 * weakness, C.nutrition) + C.make_dizzy(6 * weakness) + C.weakened += 6 * weakness + +/datum/artifact_effect/hurt/DoEffectAura() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/C in range(src.effectrange,T)) + var/weakness = GetAnomalySusceptibility(C) + if(prob(weakness * 100)) + if(prob(10)) + C << "You feel a painful force radiating from something nearby." + C.adjustBruteLoss(1 * weakness) + C.adjustFireLoss(1 * weakness) + C.adjustToxLoss(1 * weakness) + C.adjustOxyLoss(1 * weakness) + C.adjustBrainLoss(0.1 * weakness) + C.updatehealth() + +/datum/artifact_effect/hurt/DoEffectPulse() + if(holder) + var/turf/T = get_turf(holder) + for (var/mob/living/carbon/C in range(effectrange, T)) + var/weakness = GetAnomalySusceptibility(C) + if(prob(weakness * 100)) + C << "A wave of painful energy strikes you!" + C.adjustBruteLoss(3 * weakness) + C.adjustFireLoss(3 * weakness) + C.adjustToxLoss(3 * weakness) + C.adjustOxyLoss(3 * weakness) + C.adjustBrainLoss(0.1 * weakness) + C.updatehealth() diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_radiate.dm b/code/modules/xenoarcheaology/effects/radiate.dm similarity index 91% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_radiate.dm rename to code/modules/xenoarcheaology/effects/radiate.dm index 4310ffb2e7..7816409757 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_radiate.dm +++ b/code/modules/xenoarcheaology/effects/radiate.dm @@ -1,12 +1,11 @@ - /datum/artifact_effect/radiate - effecttype = "radiate" + name = "radiation" var/radiation_amount /datum/artifact_effect/radiate/New() ..() radiation_amount = rand(1, 10) - effect_type = pick(4,5) + effect_type = pick(EFFECT_PARTICLE, EFFECT_ORGANIC) /datum/artifact_effect/radiate/DoEffectTouch(var/mob/living/user) if(user) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_roboheal.dm b/code/modules/xenoarcheaology/effects/roboheal.dm similarity index 93% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_roboheal.dm rename to code/modules/xenoarcheaology/effects/roboheal.dm index 96e20fd3d1..4f852869a4 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_roboheal.dm +++ b/code/modules/xenoarcheaology/effects/roboheal.dm @@ -1,11 +1,10 @@ - /datum/artifact_effect/roboheal - effecttype = "roboheal" + name = "robotic healing" var/last_message /datum/artifact_effect/roboheal/New() ..() - effect_type = pick(3,4) + effect_type = pick(EFFECT_ELECTRO, EFFECT_PARTICLE) /datum/artifact_effect/roboheal/DoEffectTouch(var/mob/user) if(user) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_robohurt.dm b/code/modules/xenoarcheaology/effects/robohurt.dm similarity index 93% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_robohurt.dm rename to code/modules/xenoarcheaology/effects/robohurt.dm index aab220cff7..3487bf7a4e 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_robohurt.dm +++ b/code/modules/xenoarcheaology/effects/robohurt.dm @@ -1,11 +1,10 @@ - /datum/artifact_effect/robohurt - effecttype = "robohurt" + name = "robotic harm" var/last_message /datum/artifact_effect/robohurt/New() ..() - effect_type = pick(3,4) + effect_type = pick(EFFECT_ELECTRO, EFFECT_PARTICLE) /datum/artifact_effect/robohurt/DoEffectTouch(var/mob/user) if(user) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm b/code/modules/xenoarcheaology/effects/sleepy.dm similarity index 96% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm rename to code/modules/xenoarcheaology/effects/sleepy.dm index 61979c5f69..bcdd736ebc 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm +++ b/code/modules/xenoarcheaology/effects/sleepy.dm @@ -1,11 +1,10 @@ - //todo /datum/artifact_effect/sleepy - effecttype = "sleepy" + name = "sleepy" /datum/artifact_effect/sleepy/New() ..() - effect_type = pick(5,2) + effect_type = pick(EFFECT_PSIONIC, EFFECT_ORGANIC) /datum/artifact_effect/sleepy/DoEffectTouch(var/mob/toucher) if(toucher) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_stun.dm b/code/modules/xenoarcheaology/effects/stun.dm similarity index 95% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_stun.dm rename to code/modules/xenoarcheaology/effects/stun.dm index b7b2864de4..adecc65086 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_stun.dm +++ b/code/modules/xenoarcheaology/effects/stun.dm @@ -1,10 +1,9 @@ - /datum/artifact_effect/stun - effecttype = "stun" + name = "stun" /datum/artifact_effect/stun/New() ..() - effect_type = pick(2,5) + effect_type = pick(EFFECT_PSIONIC, EFFECT_ORGANIC) /datum/artifact_effect/stun/DoEffectTouch(var/mob/toucher) if(toucher && iscarbon(toucher)) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_teleport.dm b/code/modules/xenoarcheaology/effects/teleport.dm similarity index 97% rename from code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_teleport.dm rename to code/modules/xenoarcheaology/effects/teleport.dm index 5df1a33f66..a050d6c249 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_teleport.dm +++ b/code/modules/xenoarcheaology/effects/teleport.dm @@ -1,7 +1,6 @@ - /datum/artifact_effect/teleport - effecttype = "teleport" - effect_type = 6 + name = "teleport" + effect_type = EFFECT_BLUESPACE /datum/artifact_effect/teleport/DoEffectTouch(var/mob/user) var/weakness = GetAnomalySusceptibility(user) diff --git a/code/modules/research/xenoarchaeology/finds/finds_eguns.dm b/code/modules/xenoarcheaology/finds/eguns.dm similarity index 100% rename from code/modules/research/xenoarchaeology/finds/finds_eguns.dm rename to code/modules/xenoarcheaology/finds/eguns.dm diff --git a/code/modules/research/xenoarchaeology/finds/finds.dm b/code/modules/xenoarcheaology/finds/find_spawning.dm similarity index 84% rename from code/modules/research/xenoarchaeology/finds/finds.dm rename to code/modules/xenoarcheaology/finds/find_spawning.dm index 33cb2d52ff..3be0dfbca2 100644 --- a/code/modules/research/xenoarchaeology/finds/finds.dm +++ b/code/modules/xenoarcheaology/finds/find_spawning.dm @@ -1,83 +1,3 @@ -//original code and idea from Alfie275 (luna era) and ISaidNo (goonservers) - with thanks - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Xenoarchaeological finds - -/datum/find - var/find_type = 0 //random according to the digsite type - var/excavation_required = 0 //random 5-95% - var/view_range = 20 //how close excavation has to come to show an overlay on the turf - var/clearance_range = 3 //how close excavation has to come to extract the item - //if excavation hits var/excavation_required exactly, it's contained find is extracted cleanly without the ore - var/prob_delicate = 90 //probability it requires an active suspension field to not insta-crumble - var/dissonance_spread = 1 //proportion of the tile that is affected by this find - //used in conjunction with analysis machines to determine correct suspension field type - -/datum/find/New(var/digsite, var/exc_req) - excavation_required = exc_req - find_type = get_random_find_type(digsite) - clearance_range = rand(2,6) - dissonance_spread = rand(1500,2500) / 100 - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Strange rocks - -//have all strange rocks be cleared away using welders for now -/obj/item/weapon/ore/strangerock - name = "Strange rock" - desc = "Seems to have some unusal strata evident throughout it." - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "strange" - var/obj/item/weapon/inside - var/method = 0// 0 = fire, 1 = brush, 2 = pick - origin_tech = list(TECH_MATERIAL = 5) - -/obj/item/weapon/ore/strangerock/New(loc, var/inside_item_type = 0) - ..(loc) - - //method = rand(0,2) - if(inside_item_type) - inside = new/obj/item/weapon/archaeological_find(src, new_item_type = inside_item_type) - if(!inside) - inside = locate() in contents - -/*/obj/item/weapon/ore/strangerock/ex_act(var/severity) - if(severity && prob(30)) - src.visible_message("The [src] crumbles away, leaving some dust and gravel behind.")*/ - -/obj/item/weapon/ore/strangerock/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/weldingtool/)) - var/obj/item/weapon/weldingtool/w = W - if(w.isOn()) - if(w.get_fuel() >= 4 && !src.method) - if(inside) - inside.loc = get_turf(src) - for(var/mob/M in viewers(world.view, user)) - M.show_message("[src] burns away revealing [inside].",1) - else - for(var/mob/M in viewers(world.view, user)) - M.show_message("[src] burns away into nothing.",1) - qdel(src) - w.remove_fuel(4) - else - for(var/mob/M in viewers(world.view, user)) - M.show_message("A few sparks fly off [src], but nothing else happens.",1) - w.remove_fuel(1) - return - - else if(istype(W,/obj/item/device/core_sampler/)) - var/obj/item/device/core_sampler/S = W - S.sample_item(src, user) - return - - ..() - if(prob(33)) - src.visible_message("[src] crumbles away, leaving some dust and gravel behind.") - qdel(src) - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Archaeological finds - /obj/item/weapon/archaeological_find name = "object" icon = 'icons/obj/xenoarchaeology.dmi' @@ -88,7 +8,7 @@ if(new_item_type) find_type = new_item_type else - find_type = rand(1,34) //update this when you add new find types + find_type = rand(1, MAX_ARCHAEO) var/item_type = "object" icon_state = "unknown[rand(1,4)]" @@ -99,6 +19,7 @@ var/apply_image_decorations = 0 var/material_descriptor = "" var/apply_prefix = 1 + if(prob(40)) material_descriptor = pick("rusted ","dusty ","archaic ","fragile ") source_material = pick("cordite","quadrinium",DEFAULT_WALL_MATERIAL,"titanium","aluminium","ferritic-alloy","plasteel","duranium") diff --git a/code/modules/xenoarcheaology/finds/finds.dm b/code/modules/xenoarcheaology/finds/finds.dm new file mode 100644 index 0000000000..ab5d00e786 --- /dev/null +++ b/code/modules/xenoarcheaology/finds/finds.dm @@ -0,0 +1,67 @@ +/datum/find + var/find_type = 0 //random according to the digsite type + var/excavation_required = 0 //random 10 - 190 + var/view_range = 40 //how close excavation has to come to show an overlay on the turf + var/clearance_range = 3 //how close excavation has to come to extract the item + //if excavation hits var/excavation_required exactly, it's contained find is extracted cleanly without the ore + var/prob_delicate = 90 //probability it requires an active suspension field to not insta-crumble + var/dissonance_spread = 1 //proportion of the tile that is affected by this find + //used in conjunction with analysis machines to determine correct suspension field type + +/datum/find/New(var/digsite, var/exc_req) + excavation_required = exc_req + find_type = get_random_find_type(digsite) + clearance_range = rand(4, 12) + dissonance_spread = rand(1500, 2500) / 100 + +/obj/item/weapon/ore/strangerock + name = "Strange rock" + desc = "Seems to have some unusal strata evident throughout it." + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "strange" + origin_tech = list(TECH_MATERIAL = 5) + +/obj/item/weapon/ore/strangerock/New(loc, var/inside_item_type = 0) + ..(loc) + + if(inside_item_type) + new /obj/item/weapon/archaeological_find(src, new_item_type = inside_item_type) + +/obj/item/weapon/ore/strangerock/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/weapon/pickaxe/brush)) + var/obj/item/inside = locate() in src + if(inside) + inside.loc = get_turf(src) + visible_message("\The [src] is brushed away, revealing \the [inside].") + else + visible_message("\The [src] is brushed away into nothing.") + qdel(src) + return + + if(istype(I, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/W = I + if(W.isOn()) + if(W.get_fuel() >= 2) + var/obj/item/inside = locate() in src + if(inside) + inside.loc = get_turf(src) + visible_message("\The [src] burns away revealing \the [inside].") + else + visible_message("\The [src] burns away into nothing.") + qdel(src) + W.remove_fuel(2) + else + visible_message("A few sparks fly off \the [src], but nothing else happens.") + W.remove_fuel(1) + return + + else if(istype(I, /obj/item/device/core_sampler)) + var/obj/item/device/core_sampler/S = I + S.sample_item(src, user) + return + + ..() + + if(prob(33)) + src.visible_message("[src] crumbles away, leaving some dust and gravel behind.") + qdel(src) diff --git a/code/modules/xenoarcheaology/finds/finds_defines.dm b/code/modules/xenoarcheaology/finds/finds_defines.dm new file mode 100644 index 0000000000..060119c7ce --- /dev/null +++ b/code/modules/xenoarcheaology/finds/finds_defines.dm @@ -0,0 +1,116 @@ +var/global/list/responsive_carriers = list( + "carbon", + "potassium", + "hydrogen", + "nitrogen", + "mercury", + "iron", + "chlorine", + "phosphorus", + "phoron") + +var/global/list/finds_as_strings = list( + "Trace organic cells", + "Long exposure particles", + "Trace water particles", + "Crystalline structures", + "Metallic derivative", + "Metallic composite", + "Metamorphic/igneous rock composite", + "Metamorphic/sedimentary rock composite", + "Anomalous material") + +/proc/get_responsive_reagent(var/find_type) + switch(find_type) + if(ARCHAEO_BOWL, ARCHAEO_URN, ARCHAEO_CUTLERY, ARCHAEO_STATUETTE, ARCHAEO_INSTRUMENT, ARCHAEO_HANDCUFFS, ARCHAEO_BEARTRAP, ARCHAEO_LIGHTER, ARCHAEO_BOX, ARCHAEO_GASTANK, ARCHAEO_PEN, ARCHAEO_UNKNOWN) + return "mercury" + if(ARCHAEO_COIN, ARCHAEO_KNIFE, ARCHAEO_TOOL, ARCHAEO_METAL, ARCHAEO_CLAYMORE, ARCHAEO_RODS, ARCHAEO_KATANA, ARCHAEO_LASER, ARCHAEO_GUN) + return "iron" + if(ARCHAEO_CRYSTAL, ARCHAEO_SHARD, ARCHAEO_SOULSTONE) + return "nitrogen" + if(ARCHAEO_CULTBLADE, ARCHAEO_TELEBEACON, ARCHAEO_CULTROBES, ARCHAEO_STOCKPARTS) + return "potassium" + if(ARCHAEO_FOSSIL, ARCHAEO_SHELL, ARCHAEO_PLANT, ARCHAEO_REMAINS_HUMANOID, ARCHAEO_REMAINS_ROBOT, ARCHAEO_REMAINS_XENO, ARCHAEO_GASMASK) + return "carbon" + return "phoron" + +/proc/get_random_digsite_type() + return pick(100;DIGSITE_GARDEN, 95;DIGSITE_ANIMAL, 90;DIGSITE_HOUSE, 85;DIGSITE_TECHNICAL, 80;DIGSITE_TEMPLE, 75;DIGSITE_WAR) + +/proc/get_random_find_type(var/digsite) + . = 0 + switch(digsite) + if(DIGSITE_GARDEN) + . = pick( + 100;ARCHAEO_PLANT, + 25;ARCHAEO_SHELL, + 25;ARCHAEO_FOSSIL, + 5;ARCHAEO_BEARTRAP) + if(DIGSITE_ANIMAL) + . = pick( + 100;ARCHAEO_FOSSIL, + 50;ARCHAEO_SHELL, + 50;ARCHAEO_PLANT, + 25;ARCHAEO_BEARTRAP) + if(DIGSITE_HOUSE) + . = pick( + 100;ARCHAEO_BOWL, + 100;ARCHAEO_URN, + 100;ARCHAEO_CUTLERY, + 100;ARCHAEO_STATUETTE, + 100;ARCHAEO_INSTRUMENT, + 100;ARCHAEO_PEN, + 100;ARCHAEO_LIGHTER, + 100;ARCHAEO_BOX, + 75;ARCHAEO_GASMASK, + 75;ARCHAEO_COIN, + 75;ARCHAEO_UNKNOWN, + 50;ARCHAEO_SHARD, + 50;ARCHAEO_RODS, + 25;ARCHAEO_METAL) + if(DIGSITE_TECHNICAL) + . = pick( + 125;ARCHAEO_GASMASK, + 100;ARCHAEO_METAL, + 100;ARCHAEO_GASTANK, + 100;ARCHAEO_TELEBEACON, + 100;ARCHAEO_TOOL, + 100;ARCHAEO_STOCKPARTS, + 75;ARCHAEO_SHARD, + 75;ARCHAEO_RODS, + 75;ARCHAEO_UNKNOWN, + 50;ARCHAEO_HANDCUFFS, + 50;ARCHAEO_BEARTRAP) + if(DIGSITE_TEMPLE) + . = pick( + 200;ARCHAEO_CULTROBES, + 200;ARCHAEO_STATUETTE, + 100;ARCHAEO_URN, + 100;ARCHAEO_BOWL, + 100;ARCHAEO_KNIFE, + 100;ARCHAEO_CRYSTAL, + 75;ARCHAEO_CULTBLADE, + 50;ARCHAEO_SOULSTONE, + 50;ARCHAEO_UNKNOWN, + 25;ARCHAEO_HANDCUFFS, + 25;ARCHAEO_BEARTRAP, + 10;ARCHAEO_KATANA, + 10;ARCHAEO_CLAYMORE, + 10;ARCHAEO_SHARD, + 10;ARCHAEO_RODS, + 10;ARCHAEO_METAL, + 10;ARCHAEO_GASMASK) + if(DIGSITE_WAR) + . = pick( + 100;ARCHAEO_GUN, + 100;ARCHAEO_KNIFE, + 75;ARCHAEO_LASER, + 75;ARCHAEO_KATANA, + 75;ARCHAEO_CLAYMORE, + 50;ARCHAEO_UNKNOWN, + 50;ARCHAEO_CULTROBES, + 50;ARCHAEO_CULTBLADE, + 50;ARCHAEO_GASMASK, + 25;ARCHAEO_HANDCUFFS, + 25;ARCHAEO_BEARTRAP, + 25;ARCHAEO_TOOL) diff --git a/code/modules/research/xenoarchaeology/finds/finds_fossils.dm b/code/modules/xenoarcheaology/finds/fossils.dm similarity index 100% rename from code/modules/research/xenoarchaeology/finds/finds_fossils.dm rename to code/modules/xenoarcheaology/finds/fossils.dm diff --git a/code/modules/research/xenoarchaeology/finds/finds_misc.dm b/code/modules/xenoarcheaology/finds/misc.dm similarity index 97% rename from code/modules/research/xenoarchaeology/finds/finds_misc.dm rename to code/modules/xenoarcheaology/finds/misc.dm index 90afe5a737..4037de5176 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_misc.dm +++ b/code/modules/xenoarcheaology/finds/misc.dm @@ -1,33 +1,33 @@ - -// Phoron shards have been moved to code/game/objects/items/weapons/shards.dm - -//legacy crystal -/obj/machinery/crystal - name = "Crystal" - icon = 'icons/obj/mining.dmi' - icon_state = "crystal" - -/obj/machinery/crystal/New() - if(prob(50)) - icon_state = "crystal2" - -//large finds - /* - obj/machinery/syndicate_beacon - obj/machinery/wish_granter - if(18) - item_type = "jagged green crystal" - additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.") - icon_state = "crystal" - apply_material_decorations = 0 - if(prob(10)) - apply_image_decorations = 1 - if(19) - item_type = "jagged pink crystal" - additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.") - icon_state = "crystal2" - apply_material_decorations = 0 - if(prob(10)) - apply_image_decorations = 1 - */ - //machinery type artifacts? + +// Phoron shards have been moved to code/game/objects/items/weapons/shards.dm + +//legacy crystal +/obj/machinery/crystal + name = "Crystal" + icon = 'icons/obj/mining.dmi' + icon_state = "crystal" + +/obj/machinery/crystal/New() + if(prob(50)) + icon_state = "crystal2" + +//large finds + /* + obj/machinery/syndicate_beacon + obj/machinery/wish_granter + if(18) + item_type = "jagged green crystal" + additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.") + icon_state = "crystal" + apply_material_decorations = 0 + if(prob(10)) + apply_image_decorations = 1 + if(19) + item_type = "jagged pink crystal" + additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.") + icon_state = "crystal2" + apply_material_decorations = 0 + if(prob(10)) + apply_image_decorations = 1 + */ + //machinery type artifacts? diff --git a/code/modules/research/xenoarchaeology/finds/finds_special.dm b/code/modules/xenoarcheaology/finds/special.dm similarity index 100% rename from code/modules/research/xenoarchaeology/finds/finds_special.dm rename to code/modules/xenoarcheaology/finds/special.dm diff --git a/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm b/code/modules/xenoarcheaology/finds/talking.dm similarity index 86% rename from code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm rename to code/modules/xenoarcheaology/finds/talking.dm index 69aaac47c0..0baa9586dd 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm +++ b/code/modules/xenoarcheaology/finds/talking.dm @@ -1,10 +1,3 @@ - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Formerly talking crystals - these procs are now modular so that you can make any /obj/item/weapon 'parrot' player speech back to them -// This could be extended to atoms, but it's bad enough as is -// I genuinely tried to Add and Remove them from var and proc lists, but just couldn't get it working - -//for easy reference /obj/var/datum/talking_atom/talking_atom /datum/talking_atom diff --git a/code/modules/research/xenoarchaeology/manuals.dm b/code/modules/xenoarcheaology/manuals.dm similarity index 100% rename from code/modules/research/xenoarchaeology/manuals.dm rename to code/modules/xenoarcheaology/manuals.dm diff --git a/code/modules/research/xenoarchaeology/master_controller.dm b/code/modules/xenoarcheaology/master_controller.dm similarity index 58% rename from code/modules/research/xenoarchaeology/master_controller.dm rename to code/modules/xenoarcheaology/master_controller.dm index 65f4b9f1fc..a6689e36b6 100644 --- a/code/modules/research/xenoarchaeology/master_controller.dm +++ b/code/modules/xenoarcheaology/master_controller.dm @@ -1,85 +1,95 @@ - -/datum/controller/game_controller - var/list/artifact_spawning_turfs = list() - var/list/digsite_spawning_turfs = list() - -#define XENOARCH_SPAWN_CHANCE 0.5 -#define DIGSITESIZE_LOWER 4 -#define DIGSITESIZE_UPPER 12 -#define ARTIFACTSPAWNNUM_LOWER 6 -#define ARTIFACTSPAWNNUM_UPPER 12 - -/datum/controller/game_controller/proc/SetupXenoarch() - //create digsites - for(var/turf/simulated/mineral/M in block(locate(1,1,1), locate(world.maxx, world.maxy, world.maxz))) - if(!(M.density)) - continue - - if(isnull(M.geologic_data)) - M.geologic_data = new/datum/geosample(M) - - if(!prob(XENOARCH_SPAWN_CHANCE)) - continue - - digsite_spawning_turfs.Add(M) - var/digsite = get_random_digsite_type() - var/target_digsite_size = rand(DIGSITESIZE_LOWER, DIGSITESIZE_UPPER) - var/list/processed_turfs = list() - var/list/turfs_to_process = list(M) - while(turfs_to_process.len) - var/turf/simulated/mineral/archeo_turf = pop(turfs_to_process) - - if(target_digsite_size > 1) - var/list/viable_adjacent_turfs = orange(1, archeo_turf) - for(var/turf/simulated/mineral/T in orange(1, archeo_turf)) - if(T.finds) - continue - if(T in processed_turfs) - continue - viable_adjacent_turfs.Add(T) - - for(var/turf/simulated/mineral/T in viable_adjacent_turfs) - if(prob(target_digsite_size/viable_adjacent_turfs.len)) - turfs_to_process.Add(T) - target_digsite_size -= 1 - if(target_digsite_size <= 0) - break - - processed_turfs.Add(archeo_turf) - if(isnull(archeo_turf.finds)) - archeo_turf.finds = list() - if(prob(50)) - archeo_turf.finds.Add(new /datum/find(digsite, rand(5,95))) - else if(prob(75)) - archeo_turf.finds.Add(new /datum/find(digsite, rand(5,45))) - archeo_turf.finds.Add(new /datum/find(digsite, rand(55,95))) - else - archeo_turf.finds.Add(new /datum/find(digsite, rand(5,30))) - archeo_turf.finds.Add(new /datum/find(digsite, rand(35,75))) - archeo_turf.finds.Add(new /datum/find(digsite, rand(75,95))) - - //sometimes a find will be close enough to the surface to show - var/datum/find/F = archeo_turf.finds[1] - if(F.excavation_required <= F.view_range) - archeo_turf.archaeo_overlay = "overlay_archaeo[rand(1,3)]" - archeo_turf.overlays += archeo_turf.archaeo_overlay - - //have a chance for an artifact to spawn here, but not in animal or plant digsites - if(isnull(M.artifact_find) && digsite != 1 && digsite != 2) - artifact_spawning_turfs.Add(archeo_turf) - - //create artifact machinery - var/num_artifacts_spawn = rand(ARTIFACTSPAWNNUM_LOWER, ARTIFACTSPAWNNUM_UPPER) - while(artifact_spawning_turfs.len > num_artifacts_spawn) - pick_n_take(artifact_spawning_turfs) - - var/list/artifacts_spawnturf_temp = artifact_spawning_turfs.Copy() - while(artifacts_spawnturf_temp.len > 0) - var/turf/simulated/mineral/artifact_turf = pop(artifacts_spawnturf_temp) - artifact_turf.artifact_find = new() - -#undef XENOARCH_SPAWN_CHANCE -#undef DIGSITESIZE_LOWER -#undef DIGSITESIZE_UPPER -#undef ARTIFACTSPAWNNUM_LOWER -#undef ARTIFACTSPAWNNUM_UPPER +/datum/controller/game_controller + var/list/artifact_spawning_turfs = list() + var/list/digsite_spawning_turfs = list() + +#define XENOARCH_SPAWN_CHANCE 0.5 +#define DIGSITESIZE_LOWER 4 +#define DIGSITESIZE_UPPER 12 +#define ARTIFACTSPAWNNUM_LOWER 6 +#define ARTIFACTSPAWNNUM_UPPER 12 + +/datum/controller/game_controller/proc/SetupXenoarch() + for(var/turf/simulated/mineral/M in world) + if(!M.density) + continue + + if(isnull(M.geologic_data)) + M.geologic_data = new /datum/geosample(M) + + if(!prob(XENOARCH_SPAWN_CHANCE)) + continue + + var/farEnough = 1 + for(var/A in digsite_spawning_turfs) + var/turf/T = A + if(T in range(5, M)) + farEnough = 0 + break + if(!farEnough) + continue + + digsite_spawning_turfs.Add(M) + + var/digsite = get_random_digsite_type() + var/target_digsite_size = rand(DIGSITESIZE_LOWER, DIGSITESIZE_UPPER) + + var/list/processed_turfs = list() + var/list/turfs_to_process = list(M) + + var/list/viable_adjacent_turfs = list() + if(target_digsite_size > 1) + for(var/turf/simulated/mineral/T in orange(2, M)) + if(!T.density) + continue + if(T.finds) + continue + if(T in processed_turfs) + continue + viable_adjacent_turfs.Add(T) + + target_digsite_size = min(target_digsite_size, viable_adjacent_turfs.len) + + for(var/i = 1 to target_digsite_size) + turfs_to_process += pick_n_take(viable_adjacent_turfs) + + while(turfs_to_process.len) + var/turf/simulated/mineral/archeo_turf = pop(turfs_to_process) + + processed_turfs.Add(archeo_turf) + if(isnull(archeo_turf.finds)) + archeo_turf.finds = list() + if(prob(50)) + archeo_turf.finds.Add(new /datum/find(digsite, rand(10, 190))) + else if(prob(75)) + archeo_turf.finds.Add(new /datum/find(digsite, rand(10, 90))) + archeo_turf.finds.Add(new /datum/find(digsite, rand(110, 190))) + else + archeo_turf.finds.Add(new /datum/find(digsite, rand(10, 50))) + archeo_turf.finds.Add(new /datum/find(digsite, rand(60, 140))) + archeo_turf.finds.Add(new /datum/find(digsite, rand(150, 190))) + + //sometimes a find will be close enough to the surface to show + var/datum/find/F = archeo_turf.finds[1] + if(F.excavation_required <= F.view_range) + archeo_turf.archaeo_overlay = "overlay_archaeo[rand(1,3)]" + archeo_turf.update_icon() + + //have a chance for an artifact to spawn here, but not in animal or plant digsites + if(isnull(M.artifact_find) && digsite != DIGSITE_GARDEN && digsite != DIGSITE_ANIMAL) + artifact_spawning_turfs.Add(archeo_turf) + + //create artifact machinery + var/num_artifacts_spawn = rand(ARTIFACTSPAWNNUM_LOWER, ARTIFACTSPAWNNUM_UPPER) + while(artifact_spawning_turfs.len > num_artifacts_spawn) + pick_n_take(artifact_spawning_turfs) + + var/list/artifacts_spawnturf_temp = artifact_spawning_turfs.Copy() + while(artifacts_spawnturf_temp.len > 0) + var/turf/simulated/mineral/artifact_turf = pop(artifacts_spawnturf_temp) + artifact_turf.artifact_find = new() + +#undef XENOARCH_SPAWN_CHANCE +#undef DIGSITESIZE_LOWER +#undef DIGSITESIZE_UPPER +#undef ARTIFACTSPAWNNUM_LOWER +#undef ARTIFACTSPAWNNUM_UPPER diff --git a/code/modules/research/xenoarchaeology/misc.dm b/code/modules/xenoarcheaology/misc.dm similarity index 68% rename from code/modules/research/xenoarchaeology/misc.dm rename to code/modules/xenoarcheaology/misc.dm index b2d8cef42c..c85c89ee49 100644 --- a/code/modules/research/xenoarchaeology/misc.dm +++ b/code/modules/xenoarcheaology/misc.dm @@ -1,12 +1,8 @@ - -//---- Noticeboard - /obj/structure/noticeboard/anomaly notices = 5 icon_state = "nboard05" /obj/structure/noticeboard/anomaly/New() - //add some memos var/obj/item/weapon/paper/P = new() P.name = "Memo RE: proper analysis procedure" P.info = "
We keep test dummies in pens here for a reason, so standard procedure should be to activate newfound alien artifacts and place the two in close proximity. Promising items I might even approve monkey testing on." @@ -42,22 +38,18 @@ P.overlays = list("paper_stamped_rd") src.contents += P -//---- Bookcase - /obj/structure/bookcase/manuals/xenoarchaeology name = "Xenoarchaeology Manuals bookcase" - New() - ..() - new /obj/item/weapon/book/manual/excavation(src) - new /obj/item/weapon/book/manual/mass_spectrometry(src) - new /obj/item/weapon/book/manual/materials_chemistry_analysis(src) - new /obj/item/weapon/book/manual/anomaly_testing(src) - new /obj/item/weapon/book/manual/anomaly_spectroscopy(src) - new /obj/item/weapon/book/manual/stasis(src) - update_icon() - -//---- Lockers and closets +/obj/structure/bookcase/manuals/xenoarchaeology/New() + ..() + new /obj/item/weapon/book/manual/excavation(src) + new /obj/item/weapon/book/manual/mass_spectrometry(src) + new /obj/item/weapon/book/manual/materials_chemistry_analysis(src) + new /obj/item/weapon/book/manual/anomaly_testing(src) + new /obj/item/weapon/book/manual/anomaly_spectroscopy(src) + new /obj/item/weapon/book/manual/stasis(src) + update_icon() /obj/structure/closet/secure_closet/xenoarchaeologist name = "Xenoarchaeologist Locker" @@ -69,17 +61,15 @@ icon_broken = "secureresbroken" icon_off = "secureresoff" - New() - ..() - sleep(2) - new /obj/item/clothing/under/rank/scientist(src) - new /obj/item/clothing/suit/storage/toggle/labcoat(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/glasses/science(src) - new /obj/item/device/radio/headset/headset_sci(src) - new /obj/item/weapon/storage/belt/archaeology(src) - new /obj/item/weapon/storage/box/excavation(src) - return +/obj/structure/closet/secure_closet/xenoarchaeologist/New() + ..() + new /obj/item/clothing/under/rank/scientist(src) + new /obj/item/clothing/suit/storage/toggle/labcoat(src) + new /obj/item/clothing/shoes/white(src) + new /obj/item/clothing/glasses/science(src) + new /obj/item/device/radio/headset/headset_sci(src) + new /obj/item/weapon/storage/belt/archaeology(src) + new /obj/item/weapon/storage/excavation(src) /obj/structure/closet/excavation name = "Excavation tools" @@ -87,27 +77,23 @@ icon_closed = "toolcloset" icon_opened = "toolclosetopen" - New() - ..() - sleep(2) - new /obj/item/weapon/storage/belt/archaeology(src) - new /obj/item/weapon/storage/box/excavation(src) - new /obj/item/device/flashlight/lantern(src) - new /obj/item/device/ano_scanner(src) - new /obj/item/device/depth_scanner(src) - new /obj/item/device/core_sampler(src) - new /obj/item/device/gps(src) - new /obj/item/device/beacon_locator(src) - new /obj/item/device/radio/beacon(src) - new /obj/item/clothing/glasses/meson(src) - new /obj/item/weapon/pickaxe(src) - new /obj/item/device/measuring_tape(src) - new /obj/item/weapon/pickaxe/hand(src) - new /obj/item/weapon/storage/bag/fossils(src) - new /obj/item/weapon/hand_labeler(src) - return - -//---- Isolation room air alarms +/obj/structure/closet/excavation/New() + ..() + new /obj/item/weapon/storage/belt/archaeology(src) + new /obj/item/weapon/storage/excavation(src) + new /obj/item/device/flashlight/lantern(src) + new /obj/item/device/ano_scanner(src) + new /obj/item/device/depth_scanner(src) + new /obj/item/device/core_sampler(src) + new /obj/item/device/gps(src) + new /obj/item/device/beacon_locator(src) + new /obj/item/device/radio/beacon(src) + new /obj/item/clothing/glasses/meson(src) + new /obj/item/weapon/pickaxe(src) + new /obj/item/device/measuring_tape(src) + new /obj/item/weapon/pickaxe/hand(src) + new /obj/item/weapon/storage/bag/fossils(src) + new /obj/item/weapon/hand_labeler(src) /obj/machinery/alarm/isolation req_one_access = list(access_research, access_atmospherics, access_engine_equip) diff --git a/code/modules/xenoarcheaology/sampling.dm b/code/modules/xenoarcheaology/sampling.dm new file mode 100644 index 0000000000..fa0d54a9a7 --- /dev/null +++ b/code/modules/xenoarcheaology/sampling.dm @@ -0,0 +1,165 @@ +/obj/item/weapon/rocksliver + name = "rock sliver" + desc = "It looks extremely delicate." + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "sliver1" + w_class = 1 + sharp = 1 + var/datum/geosample/geological_data + +/obj/item/weapon/rocksliver/New() + icon_state = "sliver[rand(1, 3)]" + pixel_x = rand(-8, 8) + pixel_y = rand(-8 ,0) + +/datum/geosample + var/age = 0 + var/age_thousand = 0 + var/age_million = 0 + var/age_billion = 0 + var/artifact_id = "" + var/artifact_distance = -1 + var/source_mineral = "chlorine" + var/list/find_presence = list() + +/datum/geosample/New(var/turf/simulated/mineral/container) + UpdateTurf(container) + +/datum/geosample/proc/UpdateTurf(var/turf/simulated/mineral/container) + if(!istype(container)) + return + + age = rand(1, 999) + + if(container.mineral) + if(islist(container.mineral.xarch_ages)) + var/list/ages = container.mineral.xarch_ages + if(ages["thousand"]) + age_thousand = rand(1, ages["thousand"]) + if(ages["million"]) + age_million = rand(1, ages["million"]) + if(ages["billion"]) + if(ages["billion_lower"]) + age_billion = rand(ages["billion_lower"], ages["billion"]) + else + age_billion = rand(1, ages["billion"]) + if(container.mineral.xarch_source_mineral) + source_mineral = container.mineral.xarch_source_mineral + + if(prob(75)) + find_presence["phosphorus"] = rand(1, 500) / 100 + if(prob(25)) + find_presence["mercury"] = rand(1, 500) / 100 + find_presence["chlorine"] = rand(500, 2500) / 100 + + for(var/datum/find/F in container.finds) + var/responsive_reagent = get_responsive_reagent(F.find_type) + find_presence[responsive_reagent] = F.dissonance_spread + + var/total_presence = 0 + for(var/carrier in find_presence) + total_presence += find_presence[carrier] + for(var/carrier in find_presence) + find_presence[carrier] = find_presence[carrier] / total_presence + +/datum/geosample/proc/UpdateNearbyArtifactInfo(var/turf/simulated/mineral/container) + if(!container || !istype(container)) + return + + if(container.artifact_find) + artifact_distance = rand() + artifact_id = container.artifact_find.artifact_id + else + if(master_controller) //Sanity check due to runtimes ~Z + for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs) + if(T.artifact_find) + var/cur_dist = get_dist(container, T) * 2 + if( (artifact_distance < 0 || cur_dist < artifact_distance)) + artifact_distance = cur_dist + rand() * 2 - 1 + artifact_id = T.artifact_find.artifact_id + else + master_controller.artifact_spawning_turfs.Remove(T) + +/obj/item/device/core_sampler + name = "core sampler" + desc = "Used to extract geological core samples." + icon = 'icons/obj/device.dmi' + icon_state = "sampler0" + item_state = "screwdriver_brown" + w_class = 1 + + var/sampled_turf = "" + var/num_stored_bags = 10 + var/obj/item/weapon/evidencebag/filled_bag + +/obj/item/device/core_sampler/examine(var/mob/user) + if(..(user, 2)) + user << "Used to extract geological core samples - this one is [sampled_turf ? "full" : "empty"], and has [num_stored_bags] bag[num_stored_bags != 1 ? "s" : ""] remaining." + +/obj/item/device/core_sampler/attackby(var/obj/item/I, var/mob/living/user) + if(istype(I, /obj/item/weapon/evidencebag)) + if(I.contents.len) + user << "\The [I] is full." + return + if(num_stored_bags < 10) + qdel(I) + num_stored_bags += 1 + user << "You insert \the [I] into \the [src]." + else + user << "\The [src] can not fit any more bags." + else + return ..() + +/obj/item/device/core_sampler/proc/sample_item(var/item_to_sample, var/mob/user) + var/datum/geosample/geo_data + + if(istype(item_to_sample, /turf/simulated/mineral)) + var/turf/simulated/mineral/T = item_to_sample + T.geologic_data.UpdateNearbyArtifactInfo(T) + geo_data = T.geologic_data + else if(istype(item_to_sample, /obj/item/weapon/ore)) + var/obj/item/weapon/ore/O = item_to_sample + geo_data = O.geologic_data + + if(geo_data) + if(filled_bag) + user << "The core sampler is full." + else if(num_stored_bags < 1) + user << "The core sampler is out of sample bags." + else + //create a new sample bag which we'll fill with rock samples + filled_bag = new /obj/item/weapon/evidencebag(src) + filled_bag.name = "sample bag" + filled_bag.desc = "a bag for holding research samples." + + icon_state = "sampler1" + --num_stored_bags + + //put in a rock sliver + var/obj/item/weapon/rocksliver/R = new(filled_bag) + R.geological_data = geo_data + + //update the sample bag + filled_bag.icon_state = "evidence" + var/image/I = image("icon"=R, "layer"=FLOAT_LAYER) + filled_bag.overlays += I + filled_bag.overlays += "evidence" + filled_bag.w_class = 1 + + user << "You take a core sample of the [item_to_sample]." + else + user << "You are unable to take a sample of [item_to_sample]." + +/obj/item/device/core_sampler/attack_self(var/mob/living/user) + if(filled_bag) + user << "You eject the full sample bag." + var/success = 0 + if(istype(src.loc, /mob)) + var/mob/M = src.loc + success = M.put_in_inactive_hand(filled_bag) + if(!success) + filled_bag.loc = get_turf(src) + filled_bag = null + icon_state = "sampler0" + else + user << "The core sampler is empty." diff --git a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm b/code/modules/xenoarcheaology/tools/ano_device_battery.dm similarity index 98% rename from code/modules/research/xenoarchaeology/tools/ano_device_battery.dm rename to code/modules/xenoarcheaology/tools/ano_device_battery.dm index fc50c956e7..85376724ea 100644 --- a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm +++ b/code/modules/xenoarcheaology/tools/ano_device_battery.dm @@ -1,4 +1,3 @@ - /obj/item/weapon/anobattery name = "Anomaly power battery" icon = 'icons/obj/xenoarchaeology.dmi' @@ -210,6 +209,6 @@ M.lastattacker = user if(inserted_battery.battery_effect) - user.attack_log += "\[[time_stamp()]\] Tapped [M.name] ([M.ckey]) with [name] (EFFECT: [inserted_battery.battery_effect.effecttype])" - M.attack_log += "\[[time_stamp()]\] Tapped by [user.name] ([user.ckey]) with [name] (EFFECT: [inserted_battery.battery_effect.effecttype])" - msg_admin_attack("[key_name(user)] tapped [key_name(M)] with [name] (EFFECT: [inserted_battery.battery_effect.effecttype])" ) + user.attack_log += "\[[time_stamp()]\] Tapped [M.name] ([M.ckey]) with [name] (EFFECT: [inserted_battery.battery_effect.name])" + M.attack_log += "\[[time_stamp()]\] Tapped by [user.name] ([user.ckey]) with [name] (EFFECT: [inserted_battery.battery_effect.name])" + msg_admin_attack("[key_name(user)] tapped [key_name(M)] with [name] (EFFECT: [inserted_battery.battery_effect.name])" ) diff --git a/code/modules/xenoarcheaology/tools/artifact_analyser.dm b/code/modules/xenoarcheaology/tools/artifact_analyser.dm new file mode 100644 index 0000000000..553b6674df --- /dev/null +++ b/code/modules/xenoarcheaology/tools/artifact_analyser.dm @@ -0,0 +1,157 @@ +/obj/machinery/artifact_analyser + name = "Anomaly Analyser" + desc = "Studies the emissions of anomalous materials to discover their uses." + icon = 'icons/obj/virology.dmi' + icon_state = "isolator" + anchored = 1 + density = 1 + var/scan_in_progress = 0 + var/scan_num = 0 + var/obj/scanned_obj + var/obj/machinery/artifact_scanpad/owned_scanner = null + var/scan_completion_time = 0 + var/scan_duration = 50 + var/obj/scanned_object + var/report_num = 0 + +/obj/machinery/artifact_analyser/initialize() + ..() + reconnect_scanner() + +/obj/machinery/artifact_analyser/proc/reconnect_scanner() + //connect to a nearby scanner pad + owned_scanner = locate(/obj/machinery/artifact_scanpad) in get_step(src, dir) + if(!owned_scanner) + owned_scanner = locate(/obj/machinery/artifact_scanpad) in orange(1, src) + +/obj/machinery/artifact_analyser/attack_hand(var/mob/user as mob) + src.add_fingerprint(user) + interact(user) + +/obj/machinery/artifact_analyser/interact(mob/user) + if(stat & (NOPOWER|BROKEN) || get_dist(src, user) > 1) + user.unset_machine(src) + return + + var/dat = "Anomalous material analyser
" + dat += "
" + if(!owned_scanner) + reconnect_scanner() + + if(!owned_scanner) + dat += "Unable to locate analysis pad.
" + else if(scan_in_progress) + dat += "Please wait. Analysis in progress.
" + dat += "Halt scanning.
" + else + dat += "Scanner is ready.
" + dat += "Begin scanning.
" + + dat += "
" + dat += "
" + dat += "Refresh Close" + user << browse(dat, "window=artanalyser;size=450x500") + user.set_machine(src) + onclose(user, "artanalyser") + +/obj/machinery/artifact_analyser/process() + if(scan_in_progress && world.time > scan_completion_time) + scan_in_progress = 0 + updateDialog() + + var/results = "" + if(!owned_scanner) + reconnect_scanner() + if(!owned_scanner) + results = "Error communicating with scanner." + else if(!scanned_object || scanned_object.loc != owned_scanner.loc) + results = "Unable to locate scanned object. Ensure it was not moved in the process." + else + results = get_scan_info(scanned_object) + + src.visible_message("[name] states, \"Scanning complete.\"") + var/obj/item/weapon/paper/P = new(src.loc) + P.name = "[src] report #[++report_num]" + P.info = "[src] analysis report #[report_num]
" + P.info += "
" + P.info += "\icon[scanned_object] [results]" + P.stamped = list(/obj/item/weapon/stamp) + P.overlays = list("paper_stamped") + + if(scanned_object && istype(scanned_object, /obj/machinery/artifact)) + var/obj/machinery/artifact/A = scanned_object + A.anchored = 0 + A.being_used = 0 + scanned_object = null + +/obj/machinery/artifact_analyser/Topic(href, href_list) + if(href_list["begin_scan"]) + if(!owned_scanner) + reconnect_scanner() + if(owned_scanner) + var/artifact_in_use = 0 + for(var/obj/O in owned_scanner.loc) + if(O == owned_scanner) + continue + if(O.invisibility) + continue + if(istype(O, /obj/machinery/artifact)) + var/obj/machinery/artifact/A = O + if(A.being_used) + artifact_in_use = 1 + else + A.anchored = 1 + A.being_used = 1 + + if(artifact_in_use) + src.visible_message("[name] states, \"Cannot scan. Too much interference.\"") + else + scanned_object = O + scan_in_progress = 1 + scan_completion_time = world.time + scan_duration + src.visible_message("[name] states, \"Scanning begun.\"") + break + if(!scanned_object) + src.visible_message("[name] states, \"Unable to isolate scan target.\"") + if(href_list["halt_scan"]) + scan_in_progress = 0 + src.visible_message("[name] states, \"Scanning halted.\"") + + if(href_list["close"]) + usr.unset_machine(src) + usr << browse(null, "window=artanalyser") + + ..() + updateDialog() + +//hardcoded responses, oh well +/obj/machinery/artifact_analyser/proc/get_scan_info(var/obj/scanned_obj) + switch(scanned_obj.type) + if(/obj/machinery/auto_cloner) + return "Automated cloning pod - appears to rely on an artificial ecosystem formed by semi-organic nanomachines and the contained liquid.
The liquid resembles protoplasmic residue supportive of unicellular organism developmental conditions.
The structure is composed of a titanium alloy." + if(/obj/machinery/power/supermatter) + return "Superdense phoron clump - appears to have been shaped or hewn, structure is composed of matter aproximately 20 times denser than ordinary refined phoron." + if(/obj/structure/constructshell) + return "Tribal idol - subject resembles statues/emblems built by superstitious pre-warp civilisations to honour their gods. Material appears to be a rock/plastcrete composite." + if(/obj/machinery/giga_drill) + return "Automated mining drill - structure composed of titanium-carbide alloy, with tip and drill lines edged in an alloy of diamond and phoron." + if(/obj/structure/cult/pylon) + return "Tribal pylon - subject resembles statues/emblems built by cargo cult civilisations to honour energy systems from post-warp civilisations." + if(/obj/machinery/replicator) + return "Automated construction unit - subject appears to be able to synthesize various objects given a material, some with simple internal circuitry. Method unknown." + if(/obj/structure/crystal) + return "Crystal formation - pseudo-organic crystalline matrix, unlikely to have formed naturally. No known technology exists to synthesize this exact composition." + if(/obj/machinery/artifact) + var/obj/machinery/artifact/A = scanned_obj + var/out = "Anomalous alien device - composed of an unknown alloy.

" + + if(A.my_effect) + out += A.my_effect.getDescription() + + if(A.secondary_effect && A.secondary_effect.activated) + out += "

Internal scans indicate ongoing secondary activity operating independently from primary systems.

" + out += A.secondary_effect.getDescription() + + return out + else + return "[scanned_obj.name] - mundane application." diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm b/code/modules/xenoarcheaology/tools/artifact_harvester.dm similarity index 99% rename from code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm rename to code/modules/xenoarcheaology/tools/artifact_harvester.dm index 912d0a062e..23ff59799e 100644 --- a/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm +++ b/code/modules/xenoarcheaology/tools/artifact_harvester.dm @@ -1,4 +1,3 @@ - /obj/machinery/artifact_harvester name = "Exotic Particle Harvester" icon = 'icons/obj/virology.dmi' diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_scanner.dm b/code/modules/xenoarcheaology/tools/artifact_scanner.dm similarity index 99% rename from code/modules/research/xenoarchaeology/machinery/artifact_scanner.dm rename to code/modules/xenoarcheaology/tools/artifact_scanner.dm index 3d440bf85a..c5bdfe015a 100644 --- a/code/modules/research/xenoarchaeology/machinery/artifact_scanner.dm +++ b/code/modules/xenoarcheaology/tools/artifact_scanner.dm @@ -1,4 +1,3 @@ - /obj/machinery/artifact_scanpad name = "Anomaly Scanner Pad" desc = "Place things here for scanning." diff --git a/code/modules/research/xenoarchaeology/machinery/coolant.dm b/code/modules/xenoarcheaology/tools/coolant_tank.dm similarity index 81% rename from code/modules/research/xenoarchaeology/machinery/coolant.dm rename to code/modules/xenoarcheaology/tools/coolant_tank.dm index ad44c7d2ce..1ee02211cf 100644 --- a/code/modules/research/xenoarchaeology/machinery/coolant.dm +++ b/code/modules/xenoarcheaology/tools/coolant_tank.dm @@ -1,16 +1,17 @@ /obj/structure/reagent_dispensers/coolanttank name = "coolant tank" - desc = "A tank of industrial coolant." + desc = "A tank of industrial coolant" icon = 'icons/obj/objects.dmi' icon_state = "coolanttank" amount_per_transfer_from_this = 10 - New() - ..() - reagents.add_reagent("coolant",1000) + +/obj/structure/reagent_dispensers/coolanttank/New() + ..() + reagents.add_reagent("coolant", 1000) /obj/structure/reagent_dispensers/coolanttank/bullet_act(var/obj/item/projectile/Proj) if(Proj.get_structure_damage()) - if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) + if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) // TODO: make this not terrible explode() /obj/structure/reagent_dispensers/coolanttank/ex_act() @@ -18,7 +19,6 @@ /obj/structure/reagent_dispensers/coolanttank/proc/explode() var/datum/effect/effect/system/smoke_spread/S = new /datum/effect/effect/system/smoke_spread - //S.attach(src) S.set_up(5, 0, src.loc) playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) diff --git a/code/modules/research/xenoarchaeology/tools/anomaly_suit.dm b/code/modules/xenoarcheaology/tools/equipment.dm similarity index 77% rename from code/modules/research/xenoarchaeology/tools/anomaly_suit.dm rename to code/modules/xenoarcheaology/tools/equipment.dm index f6bbeed769..2913c1bbac 100644 --- a/code/modules/research/xenoarchaeology/tools/anomaly_suit.dm +++ b/code/modules/xenoarcheaology/tools/equipment.dm @@ -1,21 +1,22 @@ - -//changes: rad protection up to 100 from 20/50 respectively /obj/item/clothing/suit/bio_suit/anomaly name = "Anomaly suit" desc = "A sealed bio suit capable of insulating against exotic alien energies." icon_state = "engspace_suit" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 100) + item_state = "engspace_suit" + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100) /obj/item/clothing/head/bio_hood/anomaly name = "Anomaly hood" desc = "A sealed bio hood capable of insulating against exotic alien energies." icon_state = "engspace_helmet" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 100) + item_state = "engspace_helmet" + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100) /obj/item/clothing/suit/space/anomaly name = "Excavation suit" desc = "A pressure resistant excavation suit partially capable of insulating against exotic alien energies." icon_state = "cespace_suit" + item_state = "cespace_suit" armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 100) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit) @@ -23,4 +24,5 @@ name = "Excavation hood" desc = "A pressure resistant excavation hood partially capable of insulating against exotic alien energies." icon_state = "cespace_helmet" + item_state = "cespace_helmet" armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 100) diff --git a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm b/code/modules/xenoarcheaology/tools/geosample_scanner.dm similarity index 99% rename from code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm rename to code/modules/xenoarcheaology/tools/geosample_scanner.dm index ed23b965df..dde5a3058e 100644 --- a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm +++ b/code/modules/xenoarcheaology/tools/geosample_scanner.dm @@ -1,4 +1,3 @@ - /obj/machinery/radiocarbon_spectrometer name = "radiocarbon spectrometer" desc = "A specialised, complex scanner for gleaning information on all manner of small things." diff --git a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm similarity index 62% rename from code/modules/research/xenoarchaeology/tools/suspension_generator.dm rename to code/modules/xenoarcheaology/tools/suspension_generator.dm index 6b77e800eb..c68d06a1ba 100644 --- a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm +++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm @@ -8,54 +8,34 @@ var/obj/item/weapon/cell/cell var/obj/item/weapon/card/id/auth_card var/locked = 1 - var/open = 0 - var/screwed = 1 - var/field_type = "" - var/power_use = 25 + var/power_use = 5 var/obj/effect/suspension_field/suspension_field - var/list/secured_mobs = list() /obj/machinery/suspension_gen/New() - src.cell = new/obj/item/weapon/cell/high(src) ..() + src.cell = new /obj/item/weapon/cell/high(src) /obj/machinery/suspension_gen/process() - set background = 1 - - if (suspension_field) + if(suspension_field) cell.charge -= power_use var/turf/T = get_turf(suspension_field) - if(field_type == "carbon") - for(var/mob/living/carbon/M in T) - M.weakened = max(M.weakened, 3) - cell.charge -= power_use - if(prob(5)) - M << "\blue [pick("You feel tingly.","You feel like floating.","It is hard to speak.","You can barely move.")]" - - if(field_type == "iron") - for(var/mob/living/silicon/M in T) - M.weakened = max(M.weakened, 3) - cell.charge -= power_use - if(prob(5)) - M << "\blue [pick("You feel tingly.","You feel like floating.","It is hard to speak.","You can barely move.")]" + for(var/mob/living/M in T) + M.weakened = max(M.weakened, 3) + cell.charge -= power_use + if(prob(5)) + M << "[pick("You feel tingly","You feel like floating","It is hard to speak","You can barely move")]." for(var/obj/item/I in T) if(!suspension_field.contents.len) suspension_field.icon_state = "energynet" suspension_field.overlays += "shield2" - I.loc = suspension_field - - for(var/mob/living/simple_animal/M in T) - M.weakened = max(M.weakened, 3) - cell.charge -= power_use - if(prob(5)) - M << "\blue [pick("You feel tingly.","You feel like floating.","It is hard to speak.","You can barely move.")]" + I.forceMove(suspension_field) if(cell.charge <= 0) deactivate() -/obj/machinery/suspension_gen/interact(mob/user as mob) +/obj/machinery/suspension_gen/interact(var/mob/user) var/dat = "Multi-phase mobile suspension field generator MK II \"Steadfast\"
" if(cell) var/colour = "red" @@ -80,25 +60,6 @@ dat += "Enter your ID to begin.
" dat += "
" - if(!locked) - dat += "Select field mode
" - dat += "[field_type=="carbon"?"":"" ]Diffracted carbon dioxide laser
" - dat += "[field_type=="nitrogen"?"":"" ]Nitrogen tracer field
" - dat += "[field_type=="potassium"?"":"" ]Potassium refrigerant cloud
" - dat += "[field_type=="mercury"?"":"" ]Mercury dispersion wave
" - dat += "[field_type=="iron"?"":"" ]Iron wafer conduction field
" - dat += "[field_type=="calcium"?"":"" ]Calcium binary deoxidiser
" - dat += "[field_type=="phoron"?"":"" ]Chlorine diffusion emissions
" - dat += "[field_type=="phoron"?"":"" ]Phoron saturated field
" - else - dat += "
" - dat += "
" - dat += "
" - dat += "
" - dat += "
" - dat += "
" - dat += "
" - dat += "
" dat += "
" dat += "Always wear safety gear and consult a field manual before operation.
" if(!locked) @@ -123,8 +84,6 @@ usr << "You are unable to activate [src] until it is properly secured on the ground." else deactivate() - if(href_list["select_field"]) - field_type = href_list["select_field"] else if(href_list["insertcard"]) var/obj/item/I = usr.get_active_hand() if (istype(I, /obj/item/weapon/card)) @@ -153,8 +112,8 @@ updateUsrDialog() -/obj/machinery/suspension_gen/attack_hand(mob/user as mob) - if(!open) +/obj/machinery/suspension_gen/attack_hand(var/mob/user) + if(!panel_open) interact(user) else if(cell) cell.loc = loc @@ -166,29 +125,8 @@ user << "You remove the power cell" /obj/machinery/suspension_gen/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/screwdriver)) - if(!open) - if(screwed) - screwed = 0 - else - screwed = 1 - user << "You [screwed ? "screw" : "unscrew"] the battery panel." - else if (istype(W, /obj/item/weapon/crowbar)) - if(!locked) - if(!screwed) - if(!suspension_field) - if(open) - open = 0 - else - open = 1 - user << "You crowbar the battery panel [open ? "open" : "in place"]." - icon_state = "suspension[open ? (cell ? "1" : "0") : "2"]" - else - user << "[src]'s safety locks are engaged, shut it down first." - else - user << "Unscrew [src]'s battery panel first." - else - user << "[src]'s security locks are engaged." + if(!locked && !suspension_field && default_deconstruction_screwdriver(user, W)) + return else if (istype(W, /obj/item/weapon/wrench)) if(!suspension_field) if(anchored) @@ -203,7 +141,7 @@ else user << "You are unable to secure [src] while it is active!" else if (istype(W, /obj/item/weapon/cell)) - if(open) + if(panel_open) if(cell) user << "There is a power cell already installed." else @@ -223,7 +161,7 @@ user << "Remove [auth_card] first." /obj/machinery/suspension_gen/proc/attempt_unlock(var/obj/item/weapon/card/C, var/mob/user) - if(!open) + if(!panel_open) if(istype(C, /obj/item/weapon/card/emag)) C.resolve_attackby(src, user) else if(istype(C, /obj/item/weapon/card/id) && check_access(C)) @@ -238,50 +176,14 @@ //checks for whether the machine can be activated or not should already have occurred by this point /obj/machinery/suspension_gen/proc/activate() - //depending on the field type, we might pickup certain items var/turf/T = get_turf(get_step(src,dir)) - var/success = 0 var/collected = 0 - switch(field_type) - if("carbon") - success = 1 - for(var/mob/living/carbon/C in T) - C.weakened += 5 - C.visible_message("\blue \icon[C] [C] begins to float in the air!","You feel tingly and light, but it is difficult to move.") - if("nitrogen") - success = 1 - // - if("mercury") - success = 1 - // - if("chlorine") - success = 1 - // - if("potassium") - success = 1 - // - if("phoron") - success = 1 - // - if("calcium") - success = 1 - // - if("iron") - success = 1 - for(var/mob/living/silicon/R in T) - R.weakened += 5 - R.visible_message("\blue \icon[R] [R] begins to float in the air!","You feel tingly and light, but it is difficult to move.") - // - //in case we have a bad field type - if(!success) - return - for(var/mob/living/simple_animal/C in T) - C.visible_message("\blue \icon[C] [C] begins to float in the air!","You feel tingly and light, but it is difficult to move.") - C.weakened += 5 + for(var/mob/living/M in T) + M.weakened += 5 + M.visible_message("\blue \icon[M] [M] begins to float in the air!","You feel tingly and light, but it is difficult to move.") suspension_field = new(T) - suspension_field.field_type = field_type src.visible_message("\blue \icon[src] [src] activates with a low hum.") icon_state = "suspension3" @@ -303,16 +205,16 @@ //drop anything we picked up var/turf/T = get_turf(suspension_field) - for(var/mob/M in T) + for(var/mob/living/M in T) M << "You no longer feel like floating." M.weakened = min(M.weakened, 3) src.visible_message("\blue \icon[src] [src] deactivates with a gentle shudder.") qdel(suspension_field) + suspension_field = null icon_state = "suspension2" /obj/machinery/suspension_gen/Destroy() - //safety checks: clear the field and drop anything it's holding deactivate() ..() @@ -341,9 +243,8 @@ icon = 'icons/effects/effects.dmi' anchored = 1 density = 1 - var/field_type = "chlorine" /obj/effect/suspension_field/Destroy() - for(var/obj/I in src) + for(var/atom/movable/I in src) I.loc = src.loc ..() diff --git a/code/modules/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm new file mode 100644 index 0000000000..42b8e692ec --- /dev/null +++ b/code/modules/xenoarcheaology/tools/tools.dm @@ -0,0 +1,316 @@ +/obj/item/device/gps + name = "relay positioning device" + desc = "Triangulates the approximate co-ordinates using a nearby satellite network." + icon = 'icons/obj/device.dmi' + icon_state = "locator" + item_state = "locator" + w_class = 2 + +/obj/item/device/gps/attack_self(var/mob/user as mob) + var/turf/T = get_turf(src) + user << "\icon[src] \The [src] flashes [T.x]:[T.y]:[T.z]." + +/obj/item/device/measuring_tape + name = "measuring tape" + desc = "A coiled metallic tape used to check dimensions and lengths." + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "measuring" + w_class = 2 + +/obj/item/weapon/storage/bag/fossils + name = "Fossil Satchel" + desc = "Transports delicate fossils in suspension so they don't break during transit." + icon = 'icons/obj/mining.dmi' + icon_state = "satchel" + slot_flags = SLOT_BELT | SLOT_POCKET + w_class = 3 + storage_slots = 50 + max_storage_space = 200 + max_w_class = 3 + can_hold = list(/obj/item/weapon/fossil) + +/obj/item/weapon/storage/box/samplebags + name = "sample bag box" + desc = "A box claiming to contain sample bags." + +/obj/item/weapon/storage/box/samplebags/New() + ..() + for(var/i = 1 to 7) + var/obj/item/weapon/evidencebag/S = new(src) + S.name = "sample bag" + S.desc = "a bag for holding research samples." + +/obj/item/device/ano_scanner + name = "Alden-Saraspova counter" + desc = "Aids in triangulation of exotic particles." + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "flashgun" + item_state = "lampgreen" + w_class = 2.0 + slot_flags = SLOT_BELT + + var/last_scan_time = 0 + var/scan_delay = 25 + +/obj/item/device/ano_scanner/attack_self(var/mob/living/user) + interact(user) + +/obj/item/device/ano_scanner/interact(var/mob/living/user) + if(world.time - last_scan_time >= scan_delay) + last_scan_time = world.time + + var/nearestTargetDist = -1 + var/nearestTargetId + + var/nearestSimpleTargetDist = -1 + var/turf/cur_turf = get_turf(src) + + if(master_controller) //Sanity check due to runtimes ~Z + for(var/A in master_controller.artifact_spawning_turfs) + var/turf/simulated/mineral/T = A + if(T.density && T.artifact_find) + if(T.z == cur_turf.z) + var/cur_dist = get_dist(cur_turf, T) * 2 + if(nearestTargetDist < 0 || cur_dist < nearestTargetDist) + nearestTargetDist = cur_dist + rand() * 2 - 1 + nearestTargetId = T.artifact_find.artifact_id + else + master_controller.artifact_spawning_turfs.Remove(T) + + for(var/A in master_controller.digsite_spawning_turfs) + var/turf/simulated/mineral/T = A + if(T.density && T.finds && T.finds.len) + if(T.z == cur_turf.z) + var/cur_dist = get_dist(cur_turf, T) * 2 + if(nearestSimpleTargetDist < 0 || cur_dist < nearestSimpleTargetDist) + nearestSimpleTargetDist = cur_dist + rand() * 2 - 1 + else + master_controller.digsite_spawning_turfs.Remove(T) + + if(nearestTargetDist >= 0) + user << "Exotic energy detected on wavelength '[nearestTargetId]' in a radius of [nearestTargetDist]m[nearestSimpleTargetDist > 0 ? "; small anomaly detected in a radius of [nearestSimpleTargetDist]m" : ""]" + else if(nearestSimpleTargetDist >= 0) + user << "Small anomaly detected in a radius of [nearestSimpleTargetDist]m." + else + user << "Background radiation levels detected." + else + user << "Scanning array is recharging." + +/obj/item/device/depth_scanner + name = "depth analysis scanner" + desc = "Used to check spatial depth and density of rock outcroppings." + icon = 'icons/obj/pda.dmi' + icon_state = "crap" + item_state = "analyzer" + w_class = 2 + slot_flags = SLOT_BELT + var/list/positive_locations = list() + var/datum/depth_scan/current + +/datum/depth_scan + var/time = "" + var/coords = "" + var/depth = "" + var/clearance = 0 + var/record_index = 1 + var/dissonance_spread = 1 + var/material = "unknown" + +/obj/item/device/depth_scanner/proc/scan_atom(var/mob/user, var/atom/A) + user.visible_message("\The [user] scans \the [A], the air around them humming gently.") + + if(istype(A, /turf/simulated/mineral)) + var/turf/simulated/mineral/M = A + if((M.finds && M.finds.len) || M.artifact_find) + + //create a new scanlog entry + var/datum/depth_scan/D = new() + D.coords = "[M.x]:[M.y]:[M.z]" + D.time = stationtime2text() + D.record_index = positive_locations.len + 1 + D.material = M.mineral ? M.mineral.display_name : "Rock" + + //find the first artifact and store it + if(M.finds.len) + var/datum/find/F = M.finds[1] + D.depth = "[F.excavation_required - F.clearance_range] - [F.excavation_required]" + D.clearance = F.clearance_range + D.material = get_responsive_reagent(F.find_type) + + positive_locations.Add(D) + + user << "\icon[src] [src] pings." + + else if(istype(A, /obj/structure/boulder)) + var/obj/structure/boulder/B = A + if(B.artifact_find) + //create a new scanlog entry + var/datum/depth_scan/D = new() + D.coords = "[B.x]:[B.y]:[B.z]" + D.time = stationtime2text() + D.record_index = positive_locations.len + 1 + + //these values are arbitrary + D.depth = rand(150, 200) + D.clearance = rand(10, 50) + D.dissonance_spread = rand(750, 2500) / 100 + + positive_locations.Add(D) + + user << "\icon[src] [src] pings [pick("madly","wildly","excitedly","crazily")]!" + +/obj/item/device/depth_scanner/attack_self(var/mob/living/user) + interact(user) + +/obj/item/device/depth_scanner/interact(var/mob/user as mob) + var/dat = "Coordinates with positive matches
" + + dat += "== Clear all ==
" + + if(current) + dat += "Time: [current.time]
" + dat += "Coords: [current.coords]
" + dat += "Anomaly depth: [current.depth] cm
" + dat += "Anomaly size: [current.clearance] cm
" + dat += "Dissonance spread: [current.dissonance_spread]
" + var/index = responsive_carriers.Find(current.material) + if(index > 0 && index <= finds_as_strings.len) + dat += "Anomaly material: [finds_as_strings[index]]
" + else + dat += "Anomaly material: Unknown
" + dat += "clear entry
" + else + dat += "Select an entry from the list
" + dat += "



" + dat += "
" + if(positive_locations.len) + for(var/index = 1 to positive_locations.len) + var/datum/depth_scan/D = positive_locations[index] + dat += "[D.time], coords: [D.coords]
" + else + dat += "No entries recorded." + + dat += "
" + dat += "Refresh
" + dat += "Close
" + user << browse(dat,"window=depth_scanner;size=300x500") + onclose(user, "depth_scanner") + +/obj/item/device/depth_scanner/Topic(href, href_list) + ..() + usr.set_machine(src) + + if(href_list["select"]) + var/index = text2num(href_list["select"]) + if(index && index <= positive_locations.len) + current = positive_locations[index] + else if(href_list["clear"]) + var/index = text2num(href_list["clear"]) + if(index) + if(index <= positive_locations.len) + var/datum/depth_scan/D = positive_locations[index] + positive_locations.Remove(D) + qdel(D) + else + //GC will hopefully pick them up before too long + positive_locations = list() + qdel(current) + else if(href_list["close"]) + usr.unset_machine() + usr << browse(null, "window=depth_scanner") + + updateSelfDialog() + +/obj/item/device/beacon_locator + name = "locater device" + desc = "Used to scan and locate signals on a particular frequency." + icon = 'icons/obj/device.dmi' + icon_state = "pinoff" //pinonfar, pinonmedium, pinonclose, pinondirect, pinonnull + item_state = "electronic" + var/frequency = PUB_FREQ + var/scan_ticks = 0 + var/obj/item/device/radio/target_radio + +/obj/item/device/beacon_locator/New() + ..() + processing_objects.Add(src) + +/obj/item/device/beacon_locator/Destroy() + processing_objects.Remove(src) + ..() + +/obj/item/device/beacon_locator/process() + if(target_radio) + set_dir(get_dir(src,target_radio)) + switch(get_dist(src,target_radio)) + if(0 to 3) + icon_state = "pinondirect" + if(4 to 10) + icon_state = "pinonclose" + if(11 to 30) + icon_state = "pinonmedium" + if(31 to INFINITY) + icon_state = "pinonfar" + else + if(scan_ticks) + icon_state = "pinonnull" + scan_ticks++ + if(prob(scan_ticks * 10)) + spawn(0) + set background = 1 + if(processing_objects.Find(src)) + //scan radios in the world to try and find one + var/cur_dist = 999 + for(var/obj/item/device/radio/beacon/R in world) + if(R.z == src.z && R.frequency == src.frequency) + var/check_dist = get_dist(src,R) + if(check_dist < cur_dist) + cur_dist = check_dist + target_radio = R + + scan_ticks = 0 + var/turf/T = get_turf(src) + if(target_radio) + T.visible_message("\icon[src] [src] [pick("chirps","chirrups","cheeps")] happily.") + else + T.visible_message("\icon[src] [src] [pick("chirps","chirrups","cheeps")] sadly.") + else + icon_state = "pinoff" + +/obj/item/device/beacon_locator/attack_self(var/mob/user as mob) + return src.interact(user) + +/obj/item/device/beacon_locator/interact(var/mob/user as mob) + var/dat = "Radio frequency tracker
" + dat += {" + Reset tracker
+ Frequency: + - + - + [format_frequency(frequency)] + + + +
+ "} + + dat += "Close
" + user << browse(dat,"window=locater;size=300x150") + onclose(user, "locater") + +/obj/item/device/beacon_locator/Topic(href, href_list) + ..() + usr.set_machine(src) + + if(href_list["reset_tracking"]) + scan_ticks = 1 + target_radio = null + else if(href_list["freq"]) + var/new_frequency = (frequency + text2num(href_list["freq"])) + if (frequency < 1200 || frequency > 1600) + new_frequency = sanitize_frequency(new_frequency, 1499) + frequency = new_frequency + + else if(href_list["close"]) + usr.unset_machine() + usr << browse(null, "window=locater") + + updateSelfDialog() diff --git a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm similarity index 71% rename from code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm rename to code/modules/xenoarcheaology/tools/tools_pickaxe.dm index e8bedc0987..a8bf853e82 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm @@ -1,132 +1,151 @@ - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Excavation pickaxes - sorted in order of delicacy. Players will have to choose the right one for each part of excavation. - -/obj/item/weapon/pickaxe/brush - name = "brush" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "pick_brush" - item_state = "syringe_0" - digspeed = 20 - desc = "Thick metallic wires for clearing away dust and loose scree (1 centimetre excavation depth)." - excavation_amount = 0.5 - drill_sound = 'sound/weapons/thudswoosh.ogg' - drill_verb = "brushing" - w_class = 2 - -/obj/item/weapon/pickaxe/one_pick - name = "1/6 pick" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "pick1" - item_state = "syringe_0" - digspeed = 20 - desc = "A miniature excavation tool for precise digging (2 centimetre excavation depth)." - excavation_amount = 1 - drill_sound = 'sound/items/Screwdriver.ogg' - drill_verb = "delicately picking" - w_class = 2 - -/obj/item/weapon/pickaxe/two_pick - name = "1/3 pick" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "pick2" - item_state = "syringe_0" - digspeed = 20 - desc = "A miniature excavation tool for precise digging (4 centimetre excavation depth)." - excavation_amount = 2 - drill_sound = 'sound/items/Screwdriver.ogg' - drill_verb = "delicately picking" - w_class = 2 - -/obj/item/weapon/pickaxe/three_pick - name = "1/2 pick" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "pick3" - item_state = "syringe_0" - digspeed = 20 - desc = "A miniature excavation tool for precise digging (6 centimetre excavation depth)." - excavation_amount = 3 - drill_sound = 'sound/items/Screwdriver.ogg' - drill_verb = "delicately picking" - w_class = 2 - -/obj/item/weapon/pickaxe/four_pick - name = "2/3 pick" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "pick4" - item_state = "syringe_0" - digspeed = 20 - desc = "A miniature excavation tool for precise digging (8 centimetre excavation depth)." - excavation_amount = 4 - drill_sound = 'sound/items/Screwdriver.ogg' - drill_verb = "delicately picking" - w_class = 2 - -/obj/item/weapon/pickaxe/five_pick - name = "5/6 pick" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "pick5" - item_state = "syringe_0" - digspeed = 20 - desc = "A miniature excavation tool for precise digging (10 centimetre excavation depth)." - excavation_amount = 5 - drill_sound = 'sound/items/Screwdriver.ogg' - drill_verb = "delicately picking" - w_class = 2 - -/obj/item/weapon/pickaxe/six_pick - name = "1/1 pick" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "pick6" - item_state = "syringe_0" - digspeed = 20 - desc = "A miniature excavation tool for precise digging (12 centimetre excavation depth)." - excavation_amount = 6 - drill_sound = 'sound/items/Screwdriver.ogg' - drill_verb = "delicately picking" - w_class = 2 - -/obj/item/weapon/pickaxe/hand - name = "hand pickaxe" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "pick_hand" - item_state = "syringe_0" - digspeed = 30 - desc = "A smaller, more precise version of the pickaxe (30 centimetre excavation depth)." - excavation_amount = 15 - drill_sound = 'sound/items/Crowbar.ogg' - drill_verb = "clearing" - w_class = 3 - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Pack for holding pickaxes - -/obj/item/weapon/storage/box/excavation - name = "excavation pick set" - icon = 'icons/obj/storage.dmi' - icon_state = "excavation" - desc = "A set of picks for excavation." - item_state = "syringe_kit" - foldable = /obj/item/stack/material/cardboard //BubbleWrap - storage_slots = 7 - w_class = 2 - can_hold = list(/obj/item/weapon/pickaxe/brush,\ - /obj/item/weapon/pickaxe/one_pick,\ - /obj/item/weapon/pickaxe/two_pick,\ - /obj/item/weapon/pickaxe/three_pick,\ - /obj/item/weapon/pickaxe/four_pick,\ - /obj/item/weapon/pickaxe/five_pick,\ - /obj/item/weapon/pickaxe/six_pick) - max_storage_space = 18 - max_w_class = 3 - use_to_pickup = 1 // for picking up broken bulbs, not that most people will try - -/obj/item/weapon/storage/box/excavation/New() - ..() - new /obj/item/weapon/pickaxe/brush(src) - new /obj/item/weapon/pickaxe/one_pick(src) - new /obj/item/weapon/pickaxe/two_pick(src) - new /obj/item/weapon/pickaxe/three_pick(src) - new /obj/item/weapon/pickaxe/four_pick(src) - new /obj/item/weapon/pickaxe/five_pick(src) - new /obj/item/weapon/pickaxe/six_pick(src) +/obj/item/weapon/pickaxe/brush + name = "brush" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "pick_brush" + item_state = "syringe_0" + slot_flags = SLOT_EARS + digspeed = 20 + desc = "Thick metallic wires for clearing away dust and loose scree (1 centimetre excavation depth)." + excavation_amount = 1 + drill_sound = 'sound/weapons/thudswoosh.ogg' + drill_verb = "brushing" + w_class = 2 + +/obj/item/weapon/pickaxe/one_pick + name = "2cm pick" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "pick1" + item_state = "syringe_0" + digspeed = 20 + desc = "A miniature excavation tool for precise digging (2 centimetre excavation depth)." + excavation_amount = 2 + drill_sound = 'sound/items/Screwdriver.ogg' + drill_verb = "delicately picking" + w_class = 2 + +/obj/item/weapon/pickaxe/two_pick + name = "4cm pick" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "pick2" + item_state = "syringe_0" + digspeed = 20 + desc = "A miniature excavation tool for precise digging (4 centimetre excavation depth)." + excavation_amount = 4 + drill_sound = 'sound/items/Screwdriver.ogg' + drill_verb = "delicately picking" + w_class = 2 + +/obj/item/weapon/pickaxe/three_pick + name = "6cm pick" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "pick3" + item_state = "syringe_0" + digspeed = 20 + desc = "A miniature excavation tool for precise digging (6 centimetre excavation depth)." + excavation_amount = 6 + drill_sound = 'sound/items/Screwdriver.ogg' + drill_verb = "delicately picking" + w_class = 2 + +/obj/item/weapon/pickaxe/four_pick + name = "8cm pick" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "pick4" + item_state = "syringe_0" + digspeed = 20 + desc = "A miniature excavation tool for precise digging (8 centimetre excavation depth)." + excavation_amount = 8 + drill_sound = 'sound/items/Screwdriver.ogg' + drill_verb = "delicately picking" + w_class = 2 + +/obj/item/weapon/pickaxe/five_pick + name = "10cm pick" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "pick5" + item_state = "syringe_0" + digspeed = 20 + desc = "A miniature excavation tool for precise digging (10 centimetre excavation depth)." + excavation_amount = 10 + drill_sound = 'sound/items/Screwdriver.ogg' + drill_verb = "delicately picking" + w_class = 2 + +/obj/item/weapon/pickaxe/six_pick + name = "12cm pick" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "pick6" + item_state = "syringe_0" + digspeed = 20 + desc = "A miniature excavation tool for precise digging (12 centimetre excavation depth)." + excavation_amount = 12 + drill_sound = 'sound/items/Screwdriver.ogg' + drill_verb = "delicately picking" + w_class = 2 + +/obj/item/weapon/pickaxe/hand + name = "hand pickaxe" + icon = 'icons/obj/xenoarchaeology.dmi' + icon_state = "pick_hand" + item_state = "syringe_0" + digspeed = 30 + desc = "A smaller, more precise version of the pickaxe (30 centimetre excavation depth)." + excavation_amount = 30 + drill_sound = 'sound/items/Crowbar.ogg' + drill_verb = "clearing" + w_class = 2 + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Pack for holding pickaxes + +/obj/item/weapon/storage/excavation + name = "excavation pick set" + icon = 'icons/obj/storage.dmi' + icon_state = "excavation" + desc = "A set of picks for excavation." + item_state = "syringe_kit" + storage_slots = 7 + w_class = 2 + can_hold = list(/obj/item/weapon/pickaxe/brush, + /obj/item/weapon/pickaxe/one_pick, + /obj/item/weapon/pickaxe/two_pick, + /obj/item/weapon/pickaxe/three_pick, + /obj/item/weapon/pickaxe/four_pick, + /obj/item/weapon/pickaxe/five_pick, + /obj/item/weapon/pickaxe/six_pick, + /obj/item/weapon/pickaxe/hand) + max_storage_space = 18 + max_w_class = 2 + use_to_pickup = 1 + +/obj/item/weapon/storage/excavation/New() + ..() + new /obj/item/weapon/pickaxe/brush(src) + new /obj/item/weapon/pickaxe/one_pick(src) + new /obj/item/weapon/pickaxe/two_pick(src) + new /obj/item/weapon/pickaxe/three_pick(src) + new /obj/item/weapon/pickaxe/four_pick(src) + new /obj/item/weapon/pickaxe/five_pick(src) + new /obj/item/weapon/pickaxe/six_pick(src) + +/obj/item/weapon/storage/excavation/handle_item_insertion() + ..() + sort_picks() + +/obj/item/weapon/storage/excavation/proc/sort_picks() + var/list/obj/item/weapon/pickaxe/picksToSort = list() + for(var/obj/item/weapon/pickaxe/P in src) + picksToSort += P + P.loc = null + while(picksToSort.len) + var/min = 200 // No pick is bigger than 200 + var/selected = 0 + for(var/i = 1 to picksToSort.len) + var/obj/item/weapon/pickaxe/current = picksToSort[i] + if(current.excavation_amount <= min) + selected = i + min = current.excavation_amount + var/obj/item/weapon/pickaxe/smallest = picksToSort[selected] + smallest.loc = src + picksToSort -= smallest + orient2hud() diff --git a/code/unit_tests/unit_test.dm b/code/unit_tests/unit_test.dm index b8acf60c21..a090548623 100644 --- a/code/unit_tests/unit_test.dm +++ b/code/unit_tests/unit_test.dm @@ -75,7 +75,7 @@ var/total_unit_tests = 0 // // Check the async tests to see if they are finished. - // + // while(async_test.len) for(var/datum/unit_test/test in async_test) diff --git a/code/world.dm b/code/world.dm index 1d439428d2..672715baf5 100644 --- a/code/world.dm +++ b/code/world.dm @@ -157,8 +157,8 @@ var/world_topic_spam_protect_time = world.timeofday // This is dumb, but spacestation13.com's banners break if player count isn't the 8th field of the reply, so... this has to go here. s["players"] = 0 - s["stationtime"] = worldtime2text() - s["roundduration"] = round_duration_as_text() + s["stationtime"] = stationtime2text() + s["roundduration"] = roundduration2text() if(input["status"] == "2") var/list/players = list() diff --git a/html/changelog.html b/html/changelog.html index 0d63159fdb..b7c652a4a3 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -53,6 +53,108 @@ -->
+

08 August 2016

+

Kelenius updated:

+ +

Sin4 updated:

+ +

Yoshax updated:

+ + +

07 August 2016

+

HarpyEagle updated:

+ +

Sin4 updated:

+ +

Yoshax updated:

+ + +

05 August 2016

+

Anewbe updated:

+ +

Hubblenaut updated:

+ +

Sin4 updated:

+ +

Yoshax updated:

+ + +

31 July 2016

+

Anewbe updated:

+ +

Yoshax updated:

+ +

25 July 2016

PsiOmegaDelta updated:

[severity_to_string[severity]][worldtime2text(max(EC.next_event_time, world.time))][worldtime2stationtime(max(EC.next_event_time, world.time))][round(next_event_at / 600, 0.1)]" html += "--" @@ -178,7 +178,7 @@ html += "
[severity_to_string[EM.severity]][EM.name][worldtime2text(ends_at)][worldtime2stationtime(ends_at)][ends_in]Stop