mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
fleshed out artifact analysis, added effect types to all the effects
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -1,27 +1,37 @@
|
||||
|
||||
//cael - some changes here. the analysis pad is entirely new
|
||||
|
||||
/obj/machinery/anomaly/artifact_analyser
|
||||
/obj/machinery/artifact_analyser
|
||||
name = "Artifact Analyser"
|
||||
desc = "Studies the structure of artifacts to discover their uses."
|
||||
icon = 'virology.dmi'
|
||||
icon_state = "analyser"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/scan_progress = 0
|
||||
var/scan_in_progress = 0
|
||||
var/scan_num = 0
|
||||
var/obj/scanned_obj
|
||||
var/obj/machinery/scanner/owned_scanner = null
|
||||
var/scan_completion_time = 0
|
||||
var/scan_duration = 50
|
||||
var/obj/scanned_object
|
||||
var/report_num = 0
|
||||
|
||||
/obj/machinery/anomaly/artifact_analyser/New()
|
||||
/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/scanner) in get_step(src, dir)
|
||||
if(!owned_scanner)
|
||||
owned_scanner = locate(/obj/machinery/scanner) in orange(1, src)
|
||||
|
||||
/obj/machinery/anomaly/artifact_analyser/attack_hand(var/mob/user as mob)
|
||||
/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
|
||||
@@ -33,13 +43,191 @@
|
||||
|
||||
if(!owned_scanner)
|
||||
dat += "<b><font color=red>Unable to locate analysis pad.</font></b><br>"
|
||||
else if(scan_progress)
|
||||
dat += "<b>Please wait. Analysis in progress.</b><br>"
|
||||
else if(scan_in_progress)
|
||||
dat += "Please wait. Analysis in progress.<br>"
|
||||
dat += "<a href='?src=\ref[src];halt_scan=1'>Halt scanning.</a><br>"
|
||||
else
|
||||
dat += "Place an item to be scanned on the pad to begin."
|
||||
dat += "Scanner is ready.<br>"
|
||||
dat += "<a href='?src=\ref[src];begin_scan=1'>Begin scanning.</a><br>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<hr>"
|
||||
dat += "<a href='?src=\ref[src]'>Refresh</a> <a href='?src=\ref[src];close=1'>Close</a>"
|
||||
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("\blue \icon[src] makes an insistent chime.", 2)
|
||||
var/obj/item/weapon/paper/P = new(src.loc)
|
||||
P.name = "[src] report #[++report_num]"
|
||||
P.info = "<b>[src] analysis report #[report_num]</b><br>"
|
||||
P.info += "<br>"
|
||||
P.info += "\icon[scanned_object] [results]"
|
||||
P.stamped = list(/obj/item/weapon/stamp)
|
||||
P.overlays = list("paper_stamped")
|
||||
|
||||
/obj/machinery/artifact_analyser/Topic(href, href_list)
|
||||
if(href_list["begin_scan"])
|
||||
if(!owned_scanner)
|
||||
reconnect_scanner()
|
||||
if(owned_scanner)
|
||||
for(var/obj/O in owned_scanner.loc)
|
||||
if(O == owned_scanner)
|
||||
continue
|
||||
if(O.invisibility)
|
||||
continue
|
||||
scanned_object = O
|
||||
scan_in_progress = 1
|
||||
scan_completion_time = world.time + scan_duration
|
||||
break
|
||||
if(href_list["halt_scan"])
|
||||
scan_in_progress = 0
|
||||
src.visible_message("\blue \icon[src] bleets rudely.", 2)
|
||||
|
||||
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.<br><br>\
|
||||
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 plasma clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\
|
||||
Potential application as unrefined plasma source."
|
||||
if(/obj/machinery/power/supermatter)
|
||||
return "Super dense plasma clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\
|
||||
Potential application as unrefined plasma 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 plasma."
|
||||
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/mecha/working/hoverpod)
|
||||
return "Vacuum capable repair pod - Item is a remarkably intact single man repair craft capable of flight in a vacuum. Outer shell composed of primarily \
|
||||
post-warp hull alloys, with internal wiring and circuitry consistent with modern electronics and engineering."
|
||||
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_type)
|
||||
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 += "<br><br>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_type)
|
||||
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."
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
..()
|
||||
target_temp = rand(0, 250)
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
effect_type = pick(5,6,7)
|
||||
|
||||
/datum/artifact_effect/cold/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
/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.",\
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
//todo
|
||||
/datum/artifact_effect/cellcharge
|
||||
effecttype = "cellcharge"
|
||||
effect_type = 3
|
||||
|
||||
/datum/artifact_effect/cellcharge/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
//todo
|
||||
/datum/artifact_effect/celldrain
|
||||
effecttype = "celldrain"
|
||||
effect_type = 3
|
||||
|
||||
/datum/artifact_effect/celldrain/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
//todo
|
||||
/datum/artifact_effect/dnaswitch
|
||||
effecttype = "dnaswitch"
|
||||
effect_type = 5
|
||||
var/severity
|
||||
|
||||
/datum/artifact_effect/dnaswitch/New()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
/datum/artifact_effect/emp
|
||||
effecttype = "emp"
|
||||
effect_type = 3
|
||||
|
||||
/datum/artifact_effect/emp/New()
|
||||
..()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/datum/artifact_effect/forcefield
|
||||
effecttype = "forcefield"
|
||||
var/list/created_field = list()
|
||||
effect_type = 4
|
||||
|
||||
/datum/artifact_effect/forcefield/New()
|
||||
..()
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
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)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
/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)
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
..()
|
||||
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)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
max_pressure = rand(115,1000)
|
||||
effect_type = pick(6,7)
|
||||
|
||||
/datum/artifact_effect/gasplasma/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
..()
|
||||
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)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
/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",\
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
/datum/artifact_effect/heal
|
||||
effecttype = "heal"
|
||||
effect_type = 5
|
||||
|
||||
/datum/artifact_effect/heal/DoEffectTouch(var/mob/toucher)
|
||||
//todo: check over this properly
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
effecttype = "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)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
/datum/artifact_effect/hurt
|
||||
effecttype = "hurt"
|
||||
effect_type = 5
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher)
|
||||
//caeltodo
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/datum/artifact_effect/radiate/New()
|
||||
..()
|
||||
radiation_amount = rand(1, 10)
|
||||
effect_type = pick(4,5)
|
||||
|
||||
/datum/artifact_effect/radiate/DoEffectTouch(var/mob/living/user)
|
||||
if(user)
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
/datum/artifact_effect/roboheal
|
||||
effecttype = "roboheal"
|
||||
|
||||
/datum/artifact_effect/roboheal/New()
|
||||
..()
|
||||
effect_type = pick(3,4)
|
||||
|
||||
/datum/artifact_effect/roboheal/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if (istype(user, /mob/living/silicon/robot))
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
/datum/artifact_effect/robohurt
|
||||
effecttype = "robohurt"
|
||||
|
||||
/datum/artifact_effect/robohurt/New()
|
||||
..()
|
||||
effect_type = pick(3,4)
|
||||
|
||||
/datum/artifact_effect/robohurt/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if (istype(user, /mob/living/silicon/robot))
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
/datum/artifact_effect/sleepy
|
||||
effecttype = "sleepy"
|
||||
|
||||
/datum/artifact_effect/sleepy/New()
|
||||
..()
|
||||
effect_type = pick(5,2)
|
||||
|
||||
/datum/artifact_effect/sleepy/DoEffectTouch(var/mob/toucher)
|
||||
if(toucher)
|
||||
var/weakness = GetAnomalySusceptibility(toucher)
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
/datum/artifact_effect/stun
|
||||
effecttype = "stun"
|
||||
|
||||
/datum/artifact_effect/stun/New()
|
||||
..()
|
||||
effect_type = pick(2,5)
|
||||
|
||||
/datum/artifact_effect/stun/DoEffectTouch(var/mob/toucher)
|
||||
if(toucher && iscarbon(toucher))
|
||||
var/mob/living/carbon/C = toucher
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
/datum/artifact_effect/teleport
|
||||
effecttype = "teleport"
|
||||
effect_type = 6
|
||||
|
||||
/datum/artifact_effect/teleport/DoEffectTouch(var/mob/user)
|
||||
var/weakness = GetAnomalySusceptibility(user)
|
||||
|
||||
@@ -10,6 +10,16 @@
|
||||
var/chargelevel = 0
|
||||
var/chargelevelmax = 10
|
||||
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)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user