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:
Cael_Aislinn
2013-03-10 14:55:04 +10:00
parent e27d7b2aeb
commit 46761b14f8
24 changed files with 246 additions and 7 deletions

View File

@@ -1,27 +1,37 @@
//cael - some changes here. the analysis pad is entirely new //cael - some changes here. the analysis pad is entirely new
/obj/machinery/anomaly/artifact_analyser /obj/machinery/artifact_analyser
name = "Artifact Analyser" name = "Artifact Analyser"
desc = "Studies the structure of artifacts to discover their uses." desc = "Studies the structure of artifacts to discover their uses."
icon = 'virology.dmi' icon = 'virology.dmi'
icon_state = "analyser" icon_state = "analyser"
anchored = 1 anchored = 1
density = 1 density = 1
var/scan_progress = 0 var/scan_in_progress = 0
var/scan_num = 0 var/scan_num = 0
var/obj/scanned_obj var/obj/scanned_obj
var/obj/machinery/scanner/owned_scanner = null 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 //connect to a nearby scanner pad
owned_scanner = locate(/obj/machinery/scanner) in get_step(src, dir) owned_scanner = locate(/obj/machinery/scanner) in get_step(src, dir)
if(!owned_scanner) if(!owned_scanner)
owned_scanner = locate(/obj/machinery/scanner) in orange(1, src) 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) if(stat & (NOPOWER|BROKEN) || get_dist(src, user) > 1)
user.unset_machine(src) user.unset_machine(src)
return return
@@ -33,13 +43,191 @@
if(!owned_scanner) if(!owned_scanner)
dat += "<b><font color=red>Unable to locate analysis pad.</font></b><br>" dat += "<b><font color=red>Unable to locate analysis pad.</font></b><br>"
else if(scan_progress) else if(scan_in_progress)
dat += "<b>Please wait. Analysis in progress.</b><br>" dat += "Please wait. Analysis in progress.<br>"
dat += "<a href='?src=\ref[src];halt_scan=1'>Halt scanning.</a><br>"
else 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 += "<hr>"
dat += "<a href='?src=\ref[src]'>Refresh</a> <a href='?src=\ref[src];close=1'>Close</a>" 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 << browse(dat, "window=artanalyser;size=450x500")
user.set_machine(src) user.set_machine(src)
onclose(user, "artanalyser") 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."

View File

@@ -8,6 +8,7 @@
..() ..()
target_temp = rand(0, 250) target_temp = rand(0, 250)
effect = pick(EFFECT_TOUCH, EFFECT_AURA) effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(5,6,7)
/datum/artifact_effect/cold/DoEffectTouch(var/mob/user) /datum/artifact_effect/cold/DoEffectTouch(var/mob/user)
if(holder) if(holder)

View File

@@ -1,6 +1,7 @@
/datum/artifact_effect/badfeeling /datum/artifact_effect/badfeeling
effecttype = "badfeeling" effecttype = "badfeeling"
effect_type = 2
var/list/messages = list("You feel worried.",\ var/list/messages = list("You feel worried.",\
"Something doesn't feel right.",\ "Something doesn't feel right.",\
"You get a strange feeling in your gut.",\ "You get a strange feeling in your gut.",\

View File

@@ -2,6 +2,7 @@
//todo //todo
/datum/artifact_effect/cellcharge /datum/artifact_effect/cellcharge
effecttype = "cellcharge" effecttype = "cellcharge"
effect_type = 3
/datum/artifact_effect/cellcharge/DoEffectTouch(var/mob/user) /datum/artifact_effect/cellcharge/DoEffectTouch(var/mob/user)
if(user) if(user)

View File

@@ -2,6 +2,7 @@
//todo //todo
/datum/artifact_effect/celldrain /datum/artifact_effect/celldrain
effecttype = "celldrain" effecttype = "celldrain"
effect_type = 3
/datum/artifact_effect/celldrain/DoEffectTouch(var/mob/user) /datum/artifact_effect/celldrain/DoEffectTouch(var/mob/user)
if(user) if(user)

View File

@@ -2,6 +2,7 @@
//todo //todo
/datum/artifact_effect/dnaswitch /datum/artifact_effect/dnaswitch
effecttype = "dnaswitch" effecttype = "dnaswitch"
effect_type = 5
var/severity var/severity
/datum/artifact_effect/dnaswitch/New() /datum/artifact_effect/dnaswitch/New()

View File

@@ -1,6 +1,7 @@
/datum/artifact_effect/emp /datum/artifact_effect/emp
effecttype = "emp" effecttype = "emp"
effect_type = 3
/datum/artifact_effect/emp/New() /datum/artifact_effect/emp/New()
..() ..()

View File

@@ -2,6 +2,7 @@
/datum/artifact_effect/forcefield /datum/artifact_effect/forcefield
effecttype = "forcefield" effecttype = "forcefield"
var/list/created_field = list() var/list/created_field = list()
effect_type = 4
/datum/artifact_effect/forcefield/New() /datum/artifact_effect/forcefield/New()
..() ..()

View File

@@ -4,6 +4,10 @@
var/max_pressure var/max_pressure
var/target_percentage var/target_percentage
/datum/artifact_effect/heat/New()
..()
effect_type = pick(6,7)
/datum/artifact_effect/gasco2/New() /datum/artifact_effect/gasco2/New()
..() ..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA) effect = pick(EFFECT_TOUCH, EFFECT_AURA)

View File

@@ -7,6 +7,7 @@
/datum/artifact_effect/gasnitro/New() /datum/artifact_effect/gasnitro/New()
..() ..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA) effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(6,7)
max_pressure = rand(115,1000) max_pressure = rand(115,1000)
/datum/artifact_effect/gasnitro/DoEffectTouch(var/mob/user) /datum/artifact_effect/gasnitro/DoEffectTouch(var/mob/user)

View File

@@ -7,6 +7,8 @@
..() ..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA) effect = pick(EFFECT_TOUCH, EFFECT_AURA)
max_pressure = rand(115,1000) max_pressure = rand(115,1000)
effect_type = pick(6,7)
/datum/artifact_effect/gasoxy/DoEffectTouch(var/mob/user) /datum/artifact_effect/gasoxy/DoEffectTouch(var/mob/user)
if(holder) if(holder)

View File

@@ -8,6 +8,7 @@
..() ..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA) effect = pick(EFFECT_TOUCH, EFFECT_AURA)
max_pressure = rand(115,1000) max_pressure = rand(115,1000)
effect_type = pick(6,7)
/datum/artifact_effect/gasplasma/DoEffectTouch(var/mob/user) /datum/artifact_effect/gasplasma/DoEffectTouch(var/mob/user)
if(holder) if(holder)

View File

@@ -8,6 +8,7 @@
..() ..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA) effect = pick(EFFECT_TOUCH, EFFECT_AURA)
max_pressure = rand(115,1000) max_pressure = rand(115,1000)
effect_type = pick(6,7)
/datum/artifact_effect/gassleeping/DoEffectTouch(var/mob/user) /datum/artifact_effect/gassleeping/DoEffectTouch(var/mob/user)
if(holder) if(holder)

View File

@@ -1,6 +1,7 @@
/datum/artifact_effect/goodfeeling /datum/artifact_effect/goodfeeling
effecttype = "goodfeeling" effecttype = "goodfeeling"
effect_type = 2
var/list/messages = list("You feel good.",\ var/list/messages = list("You feel good.",\
"Everything seems to be going alright",\ "Everything seems to be going alright",\
"You've got a good feeling about this",\ "You've got a good feeling about this",\

View File

@@ -1,6 +1,7 @@
/datum/artifact_effect/heal /datum/artifact_effect/heal
effecttype = "heal" effecttype = "heal"
effect_type = 5
/datum/artifact_effect/heal/DoEffectTouch(var/mob/toucher) /datum/artifact_effect/heal/DoEffectTouch(var/mob/toucher)
//todo: check over this properly //todo: check over this properly

View File

@@ -4,6 +4,10 @@
effecttype = "heat" effecttype = "heat"
var/target_temp var/target_temp
/datum/artifact_effect/heat/New()
..()
effect_type = pick(5,6,7)
/datum/artifact_effect/heat/New() /datum/artifact_effect/heat/New()
..() ..()
target_temp = rand(300,600) target_temp = rand(300,600)

View File

@@ -1,6 +1,7 @@
/datum/artifact_effect/hurt /datum/artifact_effect/hurt
effecttype = "hurt" effecttype = "hurt"
effect_type = 5
/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher) /datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher)
//caeltodo //caeltodo

View File

@@ -6,6 +6,7 @@
/datum/artifact_effect/radiate/New() /datum/artifact_effect/radiate/New()
..() ..()
radiation_amount = rand(1, 10) radiation_amount = rand(1, 10)
effect_type = pick(4,5)
/datum/artifact_effect/radiate/DoEffectTouch(var/mob/living/user) /datum/artifact_effect/radiate/DoEffectTouch(var/mob/living/user)
if(user) if(user)

View File

@@ -2,6 +2,10 @@
/datum/artifact_effect/roboheal /datum/artifact_effect/roboheal
effecttype = "roboheal" effecttype = "roboheal"
/datum/artifact_effect/roboheal/New()
..()
effect_type = pick(3,4)
/datum/artifact_effect/roboheal/DoEffectTouch(var/mob/user) /datum/artifact_effect/roboheal/DoEffectTouch(var/mob/user)
if(user) if(user)
if (istype(user, /mob/living/silicon/robot)) if (istype(user, /mob/living/silicon/robot))

View File

@@ -2,6 +2,10 @@
/datum/artifact_effect/robohurt /datum/artifact_effect/robohurt
effecttype = "robohurt" effecttype = "robohurt"
/datum/artifact_effect/robohurt/New()
..()
effect_type = pick(3,4)
/datum/artifact_effect/robohurt/DoEffectTouch(var/mob/user) /datum/artifact_effect/robohurt/DoEffectTouch(var/mob/user)
if(user) if(user)
if (istype(user, /mob/living/silicon/robot)) if (istype(user, /mob/living/silicon/robot))

View File

@@ -3,6 +3,10 @@
/datum/artifact_effect/sleepy /datum/artifact_effect/sleepy
effecttype = "sleepy" effecttype = "sleepy"
/datum/artifact_effect/sleepy/New()
..()
effect_type = pick(5,2)
/datum/artifact_effect/sleepy/DoEffectTouch(var/mob/toucher) /datum/artifact_effect/sleepy/DoEffectTouch(var/mob/toucher)
if(toucher) if(toucher)
var/weakness = GetAnomalySusceptibility(toucher) var/weakness = GetAnomalySusceptibility(toucher)

View File

@@ -2,6 +2,10 @@
/datum/artifact_effect/stun /datum/artifact_effect/stun
effecttype = "stun" effecttype = "stun"
/datum/artifact_effect/stun/New()
..()
effect_type = pick(2,5)
/datum/artifact_effect/stun/DoEffectTouch(var/mob/toucher) /datum/artifact_effect/stun/DoEffectTouch(var/mob/toucher)
if(toucher && iscarbon(toucher)) if(toucher && iscarbon(toucher))
var/mob/living/carbon/C = toucher var/mob/living/carbon/C = toucher

View File

@@ -1,6 +1,7 @@
/datum/artifact_effect/teleport /datum/artifact_effect/teleport
effecttype = "teleport" effecttype = "teleport"
effect_type = 6
/datum/artifact_effect/teleport/DoEffectTouch(var/mob/user) /datum/artifact_effect/teleport/DoEffectTouch(var/mob/user)
var/weakness = GetAnomalySusceptibility(user) var/weakness = GetAnomalySusceptibility(user)

View File

@@ -10,6 +10,16 @@
var/chargelevel = 0 var/chargelevel = 0
var/chargelevelmax = 10 var/chargelevelmax = 10
var/artifact_id = "" 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) /datum/artifact_effect/New(var/atom/location)
..() ..()