diff --git a/baystation12.dme b/baystation12.dme index 11ee57779c8..9f4d2008ca9 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1192,18 +1192,17 @@ #include "code\modules\research\research.dm" #include "code\modules\research\research_shuttle.dm" #include "code\modules\research\server.dm" -#include "code\modules\research\xenoarchaeology\analysis_machinery.dm" -#include "code\modules\research\xenoarchaeology\archaeo_analysis.dm" #include "code\modules\research\xenoarchaeology\archaeo_chem.dm" #include "code\modules\research\xenoarchaeology\archaeo_excavate.dm" +#include "code\modules\research\xenoarchaeology\archaeo_machinery.dm" #include "code\modules\research\xenoarchaeology\archaeo_tools.dm" +#include "code\modules\research\xenoarchaeology\artifact.dm" #include "code\modules\research\xenoarchaeology\artifact_analysis.dm" #include "code\modules\research\xenoarchaeology\artifact_db.dm" #include "code\modules\research\xenoarchaeology\artifact_effect.dm" #include "code\modules\research\xenoarchaeology\artifact_harvester.dm" #include "code\modules\research\xenoarchaeology\artifact_misc.dm" #include "code\modules\research\xenoarchaeology\artifact_synthetic.dm" -#include "code\modules\research\xenoarchaeology\artifacts.dm" #include "code\modules\research\xenoarchaeology\core_sampler.dm" #include "code\modules\research\xenoarchaeology\finds.dm" #include "code\modules\research\xenoarchaeology\geosample.dm" diff --git a/code/defines/area/Space Station 13 areas.dm b/code/defines/area/Space Station 13 areas.dm index 910b1927613..d141e48bc9e 100755 --- a/code/defines/area/Space Station 13 areas.dm +++ b/code/defines/area/Space Station 13 areas.dm @@ -297,6 +297,16 @@ proc/process_ghost_teleport_locs() icon_state = "shuttlered2" // === Trying to remove these areas: +/area/shuttle/research + name = "\improper Research Shuttle" + music = "music/escape.ogg" + +/area/shuttle/research/station + icon_state = "shuttle2" + +/area/shuttle/research/outpost + icon_state = "shuttle" + /area/airtunnel1/ // referenced in airtunnel.dm:759 /area/dummy/ // Referenced in engine.dm:261 diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 9fa08592620..5f591491aaa 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -156,6 +156,10 @@ build_path = "/obj/machinery/computer/supplycomp" origin_tech = "programming=3" var/contraband_enabled = 0 +/obj/item/weapon/circuitboard/research_shuttle + name = "Circuit board (Research Shuttle)" + build_path = "/obj/machinery/computer/research_shuttle" + origin_tech = "programming=2" /obj/item/weapon/circuitboard/operating name = "Circuit board (Operating Computer)" build_path = "/obj/machinery/computer/operating" diff --git a/code/modules/research/research_shuttle.dm b/code/modules/research/research_shuttle.dm index f65e751b108..ea907516d4a 100644 --- a/code/modules/research/research_shuttle.dm +++ b/code/modules/research/research_shuttle.dm @@ -61,7 +61,7 @@ proc/move_research_shuttle() name = "Research Shuttle Console" icon = 'computer.dmi' icon_state = "shuttle" - req_access = list(ACCESS_RESEARCH) + req_access = list(access_research) circuit = "/obj/item/weapon/circuitboard/research_shuttle" var/hacked = 0 var/location = 0 //0 = station, 1 = research base diff --git a/code/modules/research/xenoarchaeology/archaeo_analysis.dm b/code/modules/research/xenoarchaeology/archaeo_analysis.dm deleted file mode 100644 index 643481e33cd..00000000000 --- a/code/modules/research/xenoarchaeology/archaeo_analysis.dm +++ /dev/null @@ -1,119 +0,0 @@ -obj/machinery/gas_chromatography - name = "Gas Chromatography Spectrometer" - desc = "A specialised mass spectrometer." - icon = 'virology.dmi' - icon_state = "analyser" - -obj/machinery/gas_chromatography/Topic(href, href_list) - if(href_list["close"]) - usr << browse(null, "window=artanalyser") - usr.machine = null - - updateDialog() - -obj/machinery/gas_chromatography/attack_hand(var/mob/user as mob) - if(stat & (NOPOWER|BROKEN)) - return - user.machine = src - var/dat = "Gas Chromatography Spectrometer
" - dat += "
" - dat += "Refresh
" - dat += "
Close
" - user << browse(dat, "window=artanalyser;size=450x500") - onclose(user, "artanalyser") - -obj/machinery/accelerator - name = "Accelerator Spectrometer" - desc = "A specialised mass spectrometer." - icon = 'virology.dmi' - icon_state = "analyser" - -obj/machinery/accelerator/Topic(href, href_list) - if(href_list["close"]) - usr << browse(null, "window=artanalyser") - usr.machine = null - - updateDialog() - -obj/machinery/accelerator/attack_hand(var/mob/user as mob) - if(stat & (NOPOWER|BROKEN)) - return - user.machine = src - var/dat = "Accelerator Spectrometer
" - dat += "
" - dat += "
Refresh
" - dat += "
Close
" - user << browse(dat, "window=artanalyser;size=450x500") - onclose(user, "artanalyser") - -obj/machinery/fourier_transform - name = "Fourier Transform Spectroscope" - desc = "A specialised geochemical analysis device." - icon = 'virology.dmi' - icon_state = "analyser" - -obj/machinery/fourier_transform/Topic(href, href_list) - if(href_list["close"]) - usr << browse(null, "window=artanalyser") - usr.machine = null - - updateDialog() - -obj/machinery/fourier_transform/attack_hand(var/mob/user as mob) - if(stat & (NOPOWER|BROKEN)) - return - user.machine = src - var/dat = "Fourier Transform Spectroscope
" - dat += "
" - dat += "
Refresh
" - dat += "
Close
" - user << browse(dat, "window=artanalyser;size=450x500") - onclose(user, "artanalyser") - -obj/machinery/radiometric - name = "Radiometric Exposure Spectrometer" - desc = "A specialised mass spectrometer, able to radiometrically date inserted materials." - icon = 'virology.dmi' - icon_state = "analyser" - -obj/machinery/radiometric/Topic(href, href_list) - if(href_list["close"]) - usr << browse(null, "window=artanalyser") - usr.machine = null - - updateDialog() - -obj/machinery/radiometric/attack_hand(var/mob/user as mob) - if(stat & (NOPOWER|BROKEN)) - return - user.machine = src - var/dat = "Radiometric Exposure Spectrometer
" - dat += "
" - dat += "
Refresh
" - dat += "
Close
" - user << browse(dat, "window=artanalyser;size=450x500") - onclose(user, "artanalyser") - -obj/machinery/ion_mobility - name = "Ion Mobility Spectrometer" - desc = "A specialised mass spectrometer." - icon = 'virology.dmi' - icon_state = "analyser" - -obj/machinery/ion_mobility/Topic(href, href_list) - if(href_list["close"]) - usr << browse(null, "window=artanalyser") - usr.machine = null - - updateDialog() - -obj/machinery/ion_mobility/attack_hand(var/mob/user as mob) - if(stat & (NOPOWER|BROKEN)) - return - user.machine = src - var/dat = "Ion Mobility Spectrometer
" - dat += "
" - dat += "
Refresh
" - dat += "
Close
" - user << browse(dat, "window=artanalyser;size=450x500") - onclose(user, "artanalyser") diff --git a/code/modules/research/xenoarchaeology/archaeo_chem.dm b/code/modules/research/xenoarchaeology/archaeo_chem.dm index 527f8b89deb..4b81fd774b1 100644 --- a/code/modules/research/xenoarchaeology/archaeo_chem.dm +++ b/code/modules/research/xenoarchaeology/archaeo_chem.dm @@ -1,5 +1,6 @@ //chemistry stuff here so that it can be easily viewed/modified +/* datum reagent tungsten //used purely to make lith-sodi-tungs @@ -73,3 +74,4 @@ datum required_reagents = list("density_separated_sample" = 5) result_amount = 4 requires_heating = 1 +*/ \ No newline at end of file diff --git a/code/modules/research/xenoarchaeology/archaeo_excavate.dm b/code/modules/research/xenoarchaeology/archaeo_excavate.dm index e69de29bb2d..51955b740d4 100644 --- a/code/modules/research/xenoarchaeology/archaeo_excavate.dm +++ b/code/modules/research/xenoarchaeology/archaeo_excavate.dm @@ -0,0 +1 @@ +//todo: tape, methods for excavation? \ No newline at end of file diff --git a/code/modules/research/xenoarchaeology/analysis_machinery.dm b/code/modules/research/xenoarchaeology/archaeo_machinery.dm similarity index 100% rename from code/modules/research/xenoarchaeology/analysis_machinery.dm rename to code/modules/research/xenoarchaeology/archaeo_machinery.dm diff --git a/code/modules/research/xenoarchaeology/artifacts.dm b/code/modules/research/xenoarchaeology/artifact.dm similarity index 97% rename from code/modules/research/xenoarchaeology/artifacts.dm rename to code/modules/research/xenoarchaeology/artifact.dm index 2c94c630c5d..8c63e2667aa 100644 --- a/code/modules/research/xenoarchaeology/artifacts.dm +++ b/code/modules/research/xenoarchaeology/artifact.dm @@ -1,249 +1,249 @@ -//Part of ISaidNo's public release around July 2011(ish), multiple changes -//many thanks - -/obj/machinery/artifact - name = "alien artifact" - desc = "A large alien device." - icon = 'anomaly.dmi' - icon_state = "ano00" - var/icon_num = 0 - anchored = 0 - density = 1 - var/origin = null // Used in the randomisation/research of the artifact. - var/activated = 0 // Whether or not the artifact has been unlocked. - var/charged = 1 // Whether the artifact is ready to have it's effect. - var/chargetime = 0 // How much time until the artifact is charged. - var/recharge = 5 // How long does it take this artifact to recharge? - var/display_id = "" // Artifact ID to display once successfully scanned - var/datum/artifact_effect/my_effect = null - var/being_used = 0 - -/obj/machinery/artifact/New() - ..() - // Origin and appearance randomisation - // cael - need some more icons - - my_effect = new() - - src.origin = pick("ancient","martian","wizard","eldritch","precursor") - switch(src.origin) - if("ancient") icon_num = pick(2)//src.icon_state = pick("ano2") - if("martian") icon_num = pick(4)//src.icon_state = pick("ano4") - if("wizard") icon_num = pick(0,1)//src.icon_state = pick("ano0","ano1") - if("eldritch") icon_num = pick(3)//src.icon_state = pick("ano3") - if("precursor") icon_num = pick(5)//src.icon_state = pick("ano5") - icon_state = "ano[icon_num]0" - - // Low-ish random chance to not look like it's origin - if(prob(20)) src.icon_state = pick("ano00","ano10","ano20","ano30","ano40","ano50") - - // Power randomisation - my_effect.trigger = pick("force","energy","chemical","heat","touch") - if (my_effect.trigger == "chemical") my_effect.triggerX = pick("hydrogen","corrosive","volatile","toxic") - - // Ancient Artifacts focus on robotic/technological effects - // Martian Artifacts focus on biological effects - // Wizard Artifacts focus on weird shit - // Eldritch Artifacts are 100% bad news - // Precursor Artifacts do everything - switch(src.origin) - if("ancient") my_effect.effecttype = pick("roboheal","robohurt","cellcharge","celldrain") - if("martian") my_effect.effecttype = pick("healing","injure"/*,"stun"*/,"planthelper") - if("wizard") my_effect.effecttype = pick(/*"stun",*/"forcefield","teleport") - if("eldritch") my_effect.effecttype = pick("injure",/*"stun",*/"robohurt","celldrain") - if("precursor") my_effect.effecttype = pick("healing","injure",/*"stun",*/"roboheal","robohurt","cellcharge","celldrain","planthelper","forcefield","teleport") - - // Select range based on the power - var/canworldpulse = 1 - switch(my_effect.effecttype) - if("healing") my_effect.effectmode = pick("aura","pulse","contact") - if("injure") my_effect.effectmode = pick("aura","pulse","contact") - // if("stun") my_effect.effectmode = pick("aura","pulse","contact") - if("roboheal") my_effect.effectmode = pick("aura","pulse","contact") - if("robohurt") my_effect.effectmode = pick("aura","pulse","contact") - if("cellcharge") my_effect.effectmode = pick("aura","pulse") - if("celldrain") my_effect.effectmode = pick("aura","pulse") - if("planthelper") - my_effect.effectmode = pick("aura","pulse") - canworldpulse = 0 - if("forcefield") - my_effect.effectmode = "contact" - canworldpulse = 0 - if("teleport") my_effect.effectmode = pick("pulse","contact") - - // Recharge timer & range setup - if (my_effect.effectmode == "aura") - my_effect.aurarange = rand(1,4) - if (my_effect.effectmode == "contact") - src.recharge = rand(5,15) - if (my_effect.effectmode == "pulse") - my_effect.aurarange = rand(2,14) - src.recharge = rand(5,20) - if (canworldpulse == 1 && prob(1)) - my_effect.effectmode = "worldpulse" - src.recharge = rand(40,120) - - display_id += pick("kappa","sigma","antaeres","beta","lorard","omicron","iota","upsilon","omega","gamma","delta") - display_id += "-" - display_id += num2text(rand(100,999)) - -/obj/machinery/artifact/Del() - ..() - my_effect.HaltEffect() - -/obj/machinery/artifact/attack_hand(var/mob/user as mob) - if (istype(user, /mob/living/silicon/ai) || istype(user, /mob/dead/)) return - if (istype(user, /mob/living/silicon/robot)) - if (get_dist(user, src) > 1) - user << "\red You can't reach [src] from here." - return - if(ishuman(user) && istype(user:gloves,/obj/item/clothing/gloves)) - return ..() - for(var/mob/O in viewers(src, null)) - O.show_message(text("[] touches [].", user, src), 1) - src.add_fingerprint(user) - src.Artifact_Contact(user) - -/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob) - /*if (istype(W, /obj/item/weapon/cargotele)) - W:cargoteleport(src, user) - return*/ - if (my_effect.trigger == "chemical" && istype(W, /obj/item/weapon/reagent_containers/)) - switch(my_effect.triggerX) - if("hydrogen") - if (W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1)) - src.Artifact_Activate() - return - if("corrosive") - if (W.reagents.has_reagent("acid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1)) - src.Artifact_Activate() - return - if("volatile") - if (W.reagents.has_reagent("plasma", 1) || W.reagents.has_reagent("thermite", 1)) - src.Artifact_Activate() - return - if("toxic") - 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)) - src.Artifact_Activate() - return - ..() - if (my_effect.trigger == "force" && W.force >= 10 && !src.activated) src.Artifact_Activate() - if (my_effect.trigger == "energy") - if (istype(W,/obj/item/weapon/melee/baton) && W:status) src.Artifact_Activate() - if (istype(W,/obj/item/weapon/melee/energy)) src.Artifact_Activate() - if (istype(W,/obj/item/weapon/melee/cultblade)) src.Artifact_Activate() - if (istype(W,/obj/item/weapon/gun/energy/)) src.Artifact_Activate() - if (istype(W,/obj/item/device/multitool)) src.Artifact_Activate() - if (istype(W,/obj/item/weapon/card/emag)) src.Artifact_Activate() - if (my_effect.trigger == "heat") - if (istype(W,/obj/item/weapon/match) && W:lit) src.Artifact_Activate() - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) src.Artifact_Activate() - if (istype(W, /obj/item/weapon/lighter) && W:lit) src.Artifact_Activate() - - //Bump(atom/A) - -/obj/machinery/artifact/Bumped(M as mob|obj) - if (istype(M,/obj/item/weapon/) && my_effect.trigger == "force" && M:throwforce >= 10) src.Artifact_Activate() - -/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P) - if (my_effect.trigger == "force") - if(istype(P,/obj/item/projectile/bullet)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/hivebotbullet)) src.Artifact_Activate() - if (my_effect.trigger == "energy") - if(istype(P,/obj/item/projectile/beam)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/ion)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/energy)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/bluetag)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/redtag)) src.Artifact_Activate() - if (my_effect.trigger == "heat") - if(istype(P,/obj/item/projectile/temp)) src.Artifact_Activate() - -/obj/machinery/artifact/ex_act(severity) - switch(severity) - if(1.0) del src - if(2.0) - if (prob(50)) del src - if (my_effect.trigger == "force") src.Artifact_Activate() - if (my_effect.trigger == "heat") src.Artifact_Activate() - if(3.0) - if (my_effect.trigger == "force") src.Artifact_Activate() - if (my_effect.trigger == "heat") src.Artifact_Activate() - return - -/obj/machinery/artifact/temperature_expose(null, temp, volume) - if (my_effect.trigger == "heat") src.Artifact_Activate() - -/obj/machinery/artifact/process() - if (!src.activated) - return - if (chargetime > 0) - chargetime -= 1 - else - src.charged = 1 - - my_effect.UpdateEffect(src.loc) - - //activate - if( (my_effect.effectmode == "pulse" || my_effect.effecttype == "worldpulse") && activated) - if(src.charged && my_effect.DoEffect(src)) - src.charged = 0 - src.chargetime = src.recharge - -/obj/machinery/artifact/proc/Artifact_Activate() - src.activated = !src.activated - var/display_msg = "" - if(activated) - switch(rand(4)) - if(0) - display_msg = "momentarily glows brightly!" - if(1) - display_msg = "distorts slightly for a moment!" - if(2) - display_msg = "makes a slightly clicking noise!" - if(3) - display_msg = "flickers slightly!" - if(4) - display_msg = "vibrates!" - else - switch(rand(2)) - if(0) - display_msg = "grows dull!" - if(1) - display_msg = "fades in intensity!" - if(2) - display_msg = "suddenly becomes very quiet!" - - icon_state = "ano[icon_num][activated]" - for(var/mob/O in viewers(src, null)) - O.show_message(text("[] [display_msg]", src), 1) - -/obj/machinery/artifact/proc/Artifact_Contact(var/mob/user as mob) - // Trigger Code - if (istype (user,/mob/living/carbon/) && my_effect.trigger == "touch" && !src.activated) src.Artifact_Activate() - else if (my_effect.trigger != "touch" && !src.activated) user << "Nothing happens." - - if (my_effect.effectmode == "contact" && src.activated && src.charged) - my_effect.DoEffect(src) - src.charged = 0 - src.chargetime = src.recharge - -// this was used in QM for a time but it fell into disuse and wasn't removed, the purpose being to check if an artifact -// was benevolent or malicious, to determine whether QMs would be paid or punished for shipping it - -/obj/machinery/artifact/Move() - ..() - my_effect.update_move(src, src.loc) - - -/proc/artifact_checkgood(var/datum/artifact_effect/A) - switch(A.effecttype) - if("healing") return 1 - if("injure") return 0 - // if("stun") return 0 - if("roboheal") return 1 - if("robohurt") return 0 - if("cellcharge") return 1 - if("celldrain") return 1 - if("planthelper") return 1 - if("forcefield") return 1 +//Part of ISaidNo's public release around July 2011(ish), multiple changes +//many thanks + +/obj/machinery/artifact + name = "alien artifact" + desc = "A large alien device." + icon = 'anomaly.dmi' + icon_state = "ano00" + var/icon_num = 0 + anchored = 0 + density = 1 + var/origin = null // Used in the randomisation/research of the artifact. + var/activated = 0 // Whether or not the artifact has been unlocked. + var/charged = 1 // Whether the artifact is ready to have it's effect. + var/chargetime = 0 // How much time until the artifact is charged. + var/recharge = 5 // How long does it take this artifact to recharge? + var/display_id = "" // Artifact ID to display once successfully scanned + var/datum/artifact_effect/my_effect = null + var/being_used = 0 + +/obj/machinery/artifact/New() + ..() + // Origin and appearance randomisation + // cael - need some more icons + + my_effect = new() + + src.origin = pick("ancient","martian","wizard","eldritch","precursor") + switch(src.origin) + if("ancient") icon_num = pick(2)//src.icon_state = pick("ano2") + if("martian") icon_num = pick(4)//src.icon_state = pick("ano4") + if("wizard") icon_num = pick(0,1)//src.icon_state = pick("ano0","ano1") + if("eldritch") icon_num = pick(3)//src.icon_state = pick("ano3") + if("precursor") icon_num = pick(5)//src.icon_state = pick("ano5") + icon_state = "ano[icon_num]0" + + // Low-ish random chance to not look like it's origin + if(prob(20)) src.icon_state = pick("ano00","ano10","ano20","ano30","ano40","ano50") + + // Power randomisation + my_effect.trigger = pick("force","energy","chemical","heat","touch") + if (my_effect.trigger == "chemical") my_effect.triggerX = pick("hydrogen","corrosive","volatile","toxic") + + // Ancient Artifacts focus on robotic/technological effects + // Martian Artifacts focus on biological effects + // Wizard Artifacts focus on weird shit + // Eldritch Artifacts are 100% bad news + // Precursor Artifacts do everything + switch(src.origin) + if("ancient") my_effect.effecttype = pick("roboheal","robohurt","cellcharge","celldrain") + if("martian") my_effect.effecttype = pick("healing","injure"/*,"stun"*/,"planthelper") + if("wizard") my_effect.effecttype = pick(/*"stun",*/"forcefield","teleport") + if("eldritch") my_effect.effecttype = pick("injure",/*"stun",*/"robohurt","celldrain") + if("precursor") my_effect.effecttype = pick("healing","injure",/*"stun",*/"roboheal","robohurt","cellcharge","celldrain","planthelper","forcefield","teleport") + + // Select range based on the power + var/canworldpulse = 1 + switch(my_effect.effecttype) + if("healing") my_effect.effectmode = pick("aura","pulse","contact") + if("injure") my_effect.effectmode = pick("aura","pulse","contact") + // if("stun") my_effect.effectmode = pick("aura","pulse","contact") + if("roboheal") my_effect.effectmode = pick("aura","pulse","contact") + if("robohurt") my_effect.effectmode = pick("aura","pulse","contact") + if("cellcharge") my_effect.effectmode = pick("aura","pulse") + if("celldrain") my_effect.effectmode = pick("aura","pulse") + if("planthelper") + my_effect.effectmode = pick("aura","pulse") + canworldpulse = 0 + if("forcefield") + my_effect.effectmode = "contact" + canworldpulse = 0 + if("teleport") my_effect.effectmode = pick("pulse","contact") + + // Recharge timer & range setup + if (my_effect.effectmode == "aura") + my_effect.aurarange = rand(1,4) + if (my_effect.effectmode == "contact") + src.recharge = rand(5,15) + if (my_effect.effectmode == "pulse") + my_effect.aurarange = rand(2,14) + src.recharge = rand(5,20) + if (canworldpulse == 1 && prob(1)) + my_effect.effectmode = "worldpulse" + src.recharge = rand(40,120) + + display_id += pick("kappa","sigma","antaeres","beta","lorard","omicron","iota","upsilon","omega","gamma","delta") + display_id += "-" + display_id += num2text(rand(100,999)) + +/obj/machinery/artifact/Del() + ..() + my_effect.HaltEffect() + +/obj/machinery/artifact/attack_hand(var/mob/user as mob) + if (istype(user, /mob/living/silicon/ai) || istype(user, /mob/dead/)) return + if (istype(user, /mob/living/silicon/robot)) + if (get_dist(user, src) > 1) + user << "\red You can't reach [src] from here." + return + if(ishuman(user) && istype(user:gloves,/obj/item/clothing/gloves)) + return ..() + for(var/mob/O in viewers(src, null)) + O.show_message(text("[] touches [].", user, src), 1) + src.add_fingerprint(user) + src.Artifact_Contact(user) + +/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob) + /*if (istype(W, /obj/item/weapon/cargotele)) + W:cargoteleport(src, user) + return*/ + if (my_effect.trigger == "chemical" && istype(W, /obj/item/weapon/reagent_containers/)) + switch(my_effect.triggerX) + if("hydrogen") + if (W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1)) + src.Artifact_Activate() + return + if("corrosive") + if (W.reagents.has_reagent("acid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1)) + src.Artifact_Activate() + return + if("volatile") + if (W.reagents.has_reagent("plasma", 1) || W.reagents.has_reagent("thermite", 1)) + src.Artifact_Activate() + return + if("toxic") + 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)) + src.Artifact_Activate() + return + ..() + if (my_effect.trigger == "force" && W.force >= 10 && !src.activated) src.Artifact_Activate() + if (my_effect.trigger == "energy") + if (istype(W,/obj/item/weapon/melee/baton) && W:status) src.Artifact_Activate() + if (istype(W,/obj/item/weapon/melee/energy)) src.Artifact_Activate() + if (istype(W,/obj/item/weapon/melee/cultblade)) src.Artifact_Activate() + if (istype(W,/obj/item/weapon/gun/energy/)) src.Artifact_Activate() + if (istype(W,/obj/item/device/multitool)) src.Artifact_Activate() + if (istype(W,/obj/item/weapon/card/emag)) src.Artifact_Activate() + if (my_effect.trigger == "heat") + if (istype(W,/obj/item/weapon/match) && W:lit) src.Artifact_Activate() + if (istype(W, /obj/item/weapon/weldingtool) && W:welding) src.Artifact_Activate() + if (istype(W, /obj/item/weapon/lighter) && W:lit) src.Artifact_Activate() + + //Bump(atom/A) + +/obj/machinery/artifact/Bumped(M as mob|obj) + if (istype(M,/obj/item/weapon/) && my_effect.trigger == "force" && M:throwforce >= 10) src.Artifact_Activate() + +/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P) + if (my_effect.trigger == "force") + if(istype(P,/obj/item/projectile/bullet)) src.Artifact_Activate() + else if(istype(P,/obj/item/projectile/hivebotbullet)) src.Artifact_Activate() + if (my_effect.trigger == "energy") + if(istype(P,/obj/item/projectile/beam)) src.Artifact_Activate() + else if(istype(P,/obj/item/projectile/ion)) src.Artifact_Activate() + else if(istype(P,/obj/item/projectile/energy)) src.Artifact_Activate() + else if(istype(P,/obj/item/projectile/bluetag)) src.Artifact_Activate() + else if(istype(P,/obj/item/projectile/redtag)) src.Artifact_Activate() + if (my_effect.trigger == "heat") + if(istype(P,/obj/item/projectile/temp)) src.Artifact_Activate() + +/obj/machinery/artifact/ex_act(severity) + switch(severity) + if(1.0) del src + if(2.0) + if (prob(50)) del src + if (my_effect.trigger == "force") src.Artifact_Activate() + if (my_effect.trigger == "heat") src.Artifact_Activate() + if(3.0) + if (my_effect.trigger == "force") src.Artifact_Activate() + if (my_effect.trigger == "heat") src.Artifact_Activate() + return + +/obj/machinery/artifact/temperature_expose(null, temp, volume) + if (my_effect.trigger == "heat") src.Artifact_Activate() + +/obj/machinery/artifact/process() + if (!src.activated) + return + if (chargetime > 0) + chargetime -= 1 + else + src.charged = 1 + + my_effect.UpdateEffect(src.loc) + + //activate + if( (my_effect.effectmode == "pulse" || my_effect.effecttype == "worldpulse") && activated) + if(src.charged && my_effect.DoEffect(src)) + src.charged = 0 + src.chargetime = src.recharge + +/obj/machinery/artifact/proc/Artifact_Activate() + src.activated = !src.activated + var/display_msg = "" + if(activated) + switch(rand(4)) + if(0) + display_msg = "momentarily glows brightly!" + if(1) + display_msg = "distorts slightly for a moment!" + if(2) + display_msg = "makes a slightly clicking noise!" + if(3) + display_msg = "flickers slightly!" + if(4) + display_msg = "vibrates!" + else + switch(rand(2)) + if(0) + display_msg = "grows dull!" + if(1) + display_msg = "fades in intensity!" + if(2) + display_msg = "suddenly becomes very quiet!" + + icon_state = "ano[icon_num][activated]" + for(var/mob/O in viewers(src, null)) + O.show_message(text("[] [display_msg]", src), 1) + +/obj/machinery/artifact/proc/Artifact_Contact(var/mob/user as mob) + // Trigger Code + if (istype (user,/mob/living/carbon/) && my_effect.trigger == "touch" && !src.activated) src.Artifact_Activate() + else if (my_effect.trigger != "touch" && !src.activated) user << "Nothing happens." + + if (my_effect.effectmode == "contact" && src.activated && src.charged) + my_effect.DoEffect(src) + src.charged = 0 + src.chargetime = src.recharge + +// this was used in QM for a time but it fell into disuse and wasn't removed, the purpose being to check if an artifact +// was benevolent or malicious, to determine whether QMs would be paid or punished for shipping it + +/obj/machinery/artifact/Move() + ..() + my_effect.update_move(src, src.loc) + + +/proc/artifact_checkgood(var/datum/artifact_effect/A) + switch(A.effecttype) + if("healing") return 1 + if("injure") return 0 + // if("stun") return 0 + if("roboheal") return 1 + if("robohurt") return 0 + if("cellcharge") return 1 + if("celldrain") return 1 + if("planthelper") return 1 + if("forcefield") return 1 if("teleport") return 0 \ No newline at end of file diff --git a/code/modules/research/xenoarchaeology/artifact_effect.dm b/code/modules/research/xenoarchaeology/artifact_effect.dm index 3b76ef742eb..6c3cf944a0a 100644 --- a/code/modules/research/xenoarchaeology/artifact_effect.dm +++ b/code/modules/research/xenoarchaeology/artifact_effect.dm @@ -54,6 +54,8 @@ return switch(src.effecttype) if("healing") + //caeltodo + /* if (istype(user, /mob/living/carbon/human/)) user << "\blue You feel a soothing energy invigorate you." @@ -106,7 +108,7 @@ user.weakened += 6 return 1 else user << "Nothing happens." - /*if("stun") + if("stun") if (istype(user, /mob/living/carbon/)) user << "\red A powerful force overwhelms your consciousness." user.paralysis += 30 @@ -114,7 +116,7 @@ user.weakened += 45 user.stuttering += 45 return 1 - else user << "Nothing happens."*/ + else user << "Nothing happens." if("roboheal") if (istype(user, /mob/living/silicon/robot)) user << "\blue Your systems report damaged components mending by themselves!" @@ -129,6 +131,7 @@ user.adjustFireLoss(40) return 1 else user << "Nothing happens." + */ if("forcefield") while(created_field.len < 16) var/obj/effect/energy_field/E = new (locate(user.x,user.y,user.z)) @@ -136,69 +139,6 @@ E.strength = 1 E.density = 1 E.invisibility = 0 - /*var/obj/effect/energy_field/E = new /obj/effect/energy_field(locate(user.x + 2,user.y,user.z)) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x + 2,user.y + 1,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x + 2,user.y + 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x + 2,user.y - 1,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x + 2,user.y - 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x - 2,user.y,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x - 2,user.y + 1,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x - 2,user.y + 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x - 2,user.y - 1,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x - 2,user.y - 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x,user.y + 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x + 1,user.y + 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x - 1,user.y + 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x,user.y - 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x + 1,user.y - 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0 - E = new /obj/effect/energy_field(locate(user.x - 1,user.y - 2,user.z)) - created_field.Add(E) - E.strength = 1 - E.invisibility = 0*/ return 1 if("teleport") var/list/randomturfs = new/list() @@ -215,6 +155,8 @@ return 1 else if (src.effectmode == "aura") switch(src.effecttype) + //caeltodo + /* if("healing") for (var/mob/living/carbon/M in range(src.aurarange,originator)) if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) @@ -239,7 +181,7 @@ M.adjustBrainLoss(1) M.updatehealth() return 1 - /*if("stun") + if("stun") for (var/mob/living/carbon/M in range(src.aurarange,originator)) if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) continue @@ -249,7 +191,7 @@ M.stunned += 2 M.weakened += 2 M.stuttering += 2 - return 1*/ + return 1 if("roboheal") for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) if(prob(10)) M << "\blue SYSTEM ALERT: Beneficial energy field detected!" @@ -284,6 +226,7 @@ D.charge -= 10 if(prob(10)) M << "\red SYSTEM ALERT: Energy draining field detected!" return 1 + */ if("planthelper") for (var/obj/machinery/hydroponics/H in range(src.aurarange,originator)) //makes weeds and shrooms and stuff more potent too @@ -303,6 +246,8 @@ for(var/mob/O in viewers(originator, null)) O.show_message(text("[] emits a pulse of energy!", originator), 1) switch(src.effecttype) + //caeltodo + /* if("healing") for (var/mob/living/carbon/M in range(src.aurarange,originator)) if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) @@ -329,7 +274,7 @@ M.weakened += 3 M.updatehealth() return 1 - /*if("stun") + if("stun") for (var/mob/living/carbon/M in range(src.aurarange,originator)) if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) continue @@ -338,7 +283,7 @@ M.stunned += 4 M.weakened += 4 M.stuttering += 4 - return 1*/ + return 1 if("roboheal") for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) M << "\blue SYSTEM ALERT: Structural damage has been repaired by energy pulse!" @@ -353,6 +298,7 @@ M.adjustFireLoss(10) M.updatehealth() return 1 + */ if("cellcharge") for (var/obj/machinery/power/apc/C in range(src.aurarange,originator)) for (var/obj/item/weapon/cell/B in C.contents) @@ -406,6 +352,8 @@ for(var/mob/O in viewers(originator, null)) O.show_message(text("[] emits a powerful burst of energy!", originator), 1) switch(src.effecttype) + //caeltodo + /* if("healing") for (var/mob/living/carbon/M in world) if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) @@ -428,7 +376,7 @@ M.adjustBrainLoss(3) M.updatehealth() return 1 - /*if("stun") + if("stun") for (var/mob/living/carbon/M in world) if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) continue @@ -437,7 +385,7 @@ M.stunned += 8 M.weakened += 8 M.stuttering += 8 - return 1*/ + return 1 if("roboheal") for (var/mob/living/silicon/robot/M in world) M << "\blue SYSTEM ALERT: Structural damage has been repaired by energy pulse!" @@ -452,6 +400,7 @@ M.adjustFireLoss(5) M.updatehealth() return 1 + */ if("cellcharge") for (var/obj/machinery/power/apc/C in world) for (var/obj/item/weapon/cell/B in C.contents) diff --git a/code/modules/research/xenoarchaeology/artifact_misc.dm b/code/modules/research/xenoarchaeology/artifact_misc.dm index 96db5876114..657ae2a3c00 100644 --- a/code/modules/research/xenoarchaeology/artifact_misc.dm +++ b/code/modules/research/xenoarchaeology/artifact_misc.dm @@ -4,8 +4,6 @@ desc = "A sealed bio suit capable of resisting exotic alien energies and low pressure environments." icon_state = "engspace_suit" item_state = "engspace_suit" - heat_transfer_coefficient = 0.02 - protective_temperature = 1000 allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/pickaxe/hand_pick) /obj/item/clothing/head/bio_hood/anomaly @@ -13,8 +11,6 @@ desc = "A sealed bio hood capable of resisting exotic alien energies and low pressure environments." icon_state = "engspace_helmet" item_state = "engspace_helmet" - heat_transfer_coefficient = 0.02 - protective_temperature = 1000 /obj/structure/noticeboard/anomaly/New() notices = 5 diff --git a/code/modules/research/xenoarchaeology/core_sampler.dm b/code/modules/research/xenoarchaeology/core_sampler.dm index 2422edca3aa..c9adaf51af1 100644 --- a/code/modules/research/xenoarchaeology/core_sampler.dm +++ b/code/modules/research/xenoarchaeology/core_sampler.dm @@ -11,6 +11,11 @@ ////////////////////////////////////////////////////////////////// +/turf/simulated/mineral + var/datum/geosample/geological_data + +////////////////////////////////////////////////////////////////// + /obj/item/device/core_sampler name = "core sampler" desc = "Used to extract geological core samples." @@ -24,10 +29,6 @@ var/num_stored_bags = 10 var/obj/item/weapon/storage/samplebag/filled_bag -/obj/item/device/core_sampler/New() - /*for(var/i=0, i