diff --git a/baystation12.dme b/baystation12.dme
index ecc43c2a84d..a60303f0d05 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -1126,24 +1126,30 @@
#include "code\modules\research\xenoarchaeology\analysis_ion_mobility.dm"
#include "code\modules\research\xenoarchaeology\analysis_isotope_ratio.dm"
#include "code\modules\research\xenoarchaeology\analysis_scanner.dm"
-#include "code\modules\research\xenoarchaeology\archaeo_excavate.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\artifact_autocloner.dm"
+#include "code\modules\research\xenoarchaeology\artifact_gigadrill.dm"
+#include "code\modules\research\xenoarchaeology\artifact_hoverpod.dm"
+#include "code\modules\research\xenoarchaeology\artifact_replicator.dm"
#include "code\modules\research\xenoarchaeology\bunsen_burner.dm"
#include "code\modules\research\xenoarchaeology\chemistry.dm"
#include "code\modules\research\xenoarchaeology\core_sampler.dm"
#include "code\modules\research\xenoarchaeology\finds.dm"
-#include "code\modules\research\xenoarchaeology\fossils.dm"
+#include "code\modules\research\xenoarchaeology\finds_defines.dm"
+#include "code\modules\research\xenoarchaeology\finds_fossils.dm"
+#include "code\modules\research\xenoarchaeology\finds_misc.dm"
+#include "code\modules\research\xenoarchaeology\finds_talking_item.dm"
#include "code\modules\research\xenoarchaeology\geosample.dm"
-#include "code\modules\research\xenoarchaeology\misc_tools.dm"
+#include "code\modules\research\xenoarchaeology\misc.dm"
#include "code\modules\research\xenoarchaeology\readme.dm"
+#include "code\modules\research\xenoarchaeology\spacesuit.dm"
#include "code\modules\research\xenoarchaeology\suspension_generator.dm"
-#include "code\modules\research\xenoarchaeology\talking_item.dm"
+#include "code\modules\research\xenoarchaeology\tools.dm"
+#include "code\modules\research\xenoarchaeology\unknown.dm"
+#include "code\modules\research\xenoarchaeology\unknown_analysis.dm"
+#include "code\modules\research\xenoarchaeology\unknown_db.dm"
+#include "code\modules\research\xenoarchaeology\unknown_effect.dm"
+#include "code\modules\research\xenoarchaeology\unknown_harvester.dm"
+#include "code\modules\research\xenoarchaeology\unknown_synthetic.dm"
#include "code\modules\scripting\Errors.dm"
#include "code\modules\scripting\IDE.dm"
#include "code\modules\scripting\Options.dm"
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index 835666b7fe4..0169f5d894c 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -287,7 +287,7 @@
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(affecting.status & ORGAN_ROBOT)
return
-
+
H.Weaken(3)
if(affecting.take_damage(5, 0))
H.UpdateDamageIcon()
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index a7944ca8968..27222b680e4 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -28,6 +28,7 @@
var/archaeo_overlay = ""
var/excav_overlay = ""
var/obj/item/weapon/last_find
+ var/datum/find/artifact_find
/turf/simulated/mineral/Del()
return
@@ -282,6 +283,7 @@ commented out in r5061, I left it because of the shroom thingies
return
if (istype(W, /obj/item/device/core_sampler))
+ src.geological_data.UpdateNearbyArtifactInfo(src)
var/obj/item/device/core_sampler/C = W
C.sample_item(src, user)
return
@@ -395,6 +397,7 @@ commented out in r5061, I left it because of the shroom thingies
while(next_rock > 100)
next_rock -= 100
var/obj/item/weapon/ore/O = new(src)
+ src.geological_data.UpdateNearbyArtifactInfo(src)
O.geological_data = src.geological_data
else
@@ -425,6 +428,7 @@ commented out in r5061, I left it because of the shroom thingies
if (src.mineralName == "Clown")
O = new /obj/item/weapon/ore/clown(src)
if(O)
+ src.geological_data.UpdateNearbyArtifactInfo(src)
O.geological_data = src.geological_data
return O
@@ -464,6 +468,8 @@ commented out in r5061, I left it because of the shroom thingies
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)
+ src.geological_data.UpdateNearbyArtifactInfo(src)
+ X:geological_data = src.geological_data
//some find types delete the /obj/item/weapon/archaeological_find and replace it with something else, this handles when that happens
//yuck
diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm
index 68457fa7fca..8232cfa3d0e 100644
--- a/code/modules/mining/ores_coins.dm
+++ b/code/modules/mining/ores_coins.dm
@@ -6,7 +6,6 @@
icon_state = "ore2"
var/datum/geosample/geological_data
-
/obj/item/weapon/ore/uranium
name = "Uranium ore"
icon_state = "Uranium ore"
diff --git a/code/modules/research/xenoarchaeology/archaeo_excavate.dm b/code/modules/research/xenoarchaeology/archaeo_excavate.dm
deleted file mode 100644
index 51955b740d4..00000000000
--- a/code/modules/research/xenoarchaeology/archaeo_excavate.dm
+++ /dev/null
@@ -1 +0,0 @@
-//todo: tape, methods for excavation?
\ No newline at end of file
diff --git a/code/modules/research/xenoarchaeology/artifact_autocloner.dm b/code/modules/research/xenoarchaeology/artifact_autocloner.dm
new file mode 100644
index 00000000000..e602e4363f6
--- /dev/null
+++ b/code/modules/research/xenoarchaeology/artifact_autocloner.dm
@@ -0,0 +1,87 @@
+
+/obj/machinery/auto_cloner
+ name = "mysterious pod"
+ desc = "It's full of a viscous liquid, but appears dark and silent."
+ icon = 'icons/obj/cryogenics.dmi'
+ icon_state = "cellold0"
+ var/spawn_type
+ var/current_ticks_spawning = 0
+ var/ticks_required_to_spawn
+ density = 1
+ var/previous_power_state = 0
+
+ use_power = 1
+ active_power_usage = 2000
+ idle_power_usage = 1000
+
+/obj/machinery/auto_cloner/New()
+ ..()
+
+ ticks_required_to_spawn = rand(240,1440)
+
+ //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,\
+ /mob/living/simple_animal/hostile/panther,\
+ /mob/living/simple_animal/hostile/snake\
+ )
+ 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/carbon/monkey\
+ )
+
+//todo: how the hell is the asteroid permanently powered?
+/obj/machinery/auto_cloner/process()
+ if(powered(power_channel))
+ if(!previous_power_state)
+ previous_power_state = 1
+ icon_state = "cellold1"
+ src.visible_message("\blue \icon[src] [src] suddenly comes to life!")
+
+ //slowly grow a mob
+ current_ticks_spawning++
+ if(prob(5))
+ src.visible_message("\blue \icon[src] [src] [pick("gloops","glugs","whirrs","whooshes","hisses","purrs","hums","gushes")].")
+
+ //if we've finished growing...
+ if(current_ticks_spawning >= ticks_required_to_spawn)
+ current_ticks_spawning = 0
+ use_power = 1
+ src.visible_message("\blue \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)
+ new spawn_type(src.loc)
+
+ //if we're getting close to finished, kick into overdrive power usage
+ if(current_ticks_spawning / ticks_required_to_spawn > 0.75)
+ use_power = 2
+ icon_state = "cellold2"
+ desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow. A dark shape appears to be forming inside..."
+ else
+ use_power = 1
+ icon_state = "cellold1"
+ desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow."
+ else
+ if(previous_power_state)
+ previous_power_state = 0
+ icon_state = "cellold0"
+ src.visible_message("\blue \icon[src] [src] suddenly shuts down.")
+
+ //cloned mob slowly breaks down
+ if(current_ticks_spawning > 0)
+ current_ticks_spawning--
diff --git a/code/modules/research/xenoarchaeology/artifact_gigadrill.dm b/code/modules/research/xenoarchaeology/artifact_gigadrill.dm
new file mode 100644
index 00000000000..9d52c9c2dc0
--- /dev/null
+++ b/code/modules/research/xenoarchaeology/artifact_gigadrill.dm
@@ -0,0 +1,35 @@
+
+/obj/machinery/giga_drill
+ name = "alien drill"
+ desc = "A giant, alien drill mounted on long treads."
+ icon = 'icons/obj/mining.dmi'
+ icon_state = "gigadrill"
+ var/active = 0
+ var/drill_time = 10
+ var/turf/drilling_turf
+ density = 1
+ layer = 3.1 //to go over ores
+
+/obj/machinery/giga_drill/attack_hand(mob/user as mob)
+ if(active)
+ active = 0
+ icon_state = "gigadrill"
+ user << "\blue You press a button and [src] slowly spins down."
+ else
+ active = 1
+ icon_state = "gigadrill_mov"
+ user << "\blue You press a button and [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]!")
+ anchored = 1
+ spawn(drill_time)
+ if(get_turf(src) == drilling_turf && active)
+ M.gets_drilled()
+ src.loc = M
+ drilling_turf = null
+ anchored = 0
diff --git a/code/modules/research/xenoarchaeology/artifact_hoverpod.dm b/code/modules/research/xenoarchaeology/artifact_hoverpod.dm
new file mode 100644
index 00000000000..04b68a3dbd3
--- /dev/null
+++ b/code/modules/research/xenoarchaeology/artifact_hoverpod.dm
@@ -0,0 +1,52 @@
+
+/obj/mecha/working/hoverpod
+ name = "hover pod"
+ icon = 'icons/obj/vehicles.dmi'
+ icon_state = "engineering_pod"
+ desc = "Stubby and round, it has a human sized access hatch on the top."
+
+//duplicate of parent proc, but without space drifting
+/obj/mecha/working/hoverpod/dyndomove(direction)
+ if(!can_move)
+ return 0
+ if(src.pr_inertial_movement.active())
+ return 0
+ if(!has_charge(step_energy_drain))
+ return 0
+ var/move_result = 0
+ if(hasInternalDamage(MECHA_INT_CONTROL_LOST))
+ move_result = mechsteprand()
+ else if(src.dir!=direction)
+ move_result = mechturn(direction)
+ else
+ move_result = mechstep(direction)
+ if(move_result)
+ can_move = 0
+ use_power(step_energy_drain)
+ /*if(istype(src.loc, /turf/space))
+ if(!src.check_for_support())
+ src.pr_inertial_movement.start(list(src,direction))
+ src.log_message("Movement control lost. Inertial movement started.")*/
+ if(do_after(step_in))
+ can_move = 1
+ return 1
+ return 0
+
+//these three procs overriden to play different sounds
+/obj/mecha/mechturn(direction)
+ dir = direction
+ //playsound(src,'sound/machines/hiss.ogg',40,1)
+ return 1
+
+/obj/mecha/mechstep(direction)
+ var/result = step(src,direction)
+ if(result)
+ playsound(src,'sound/machines/hiss.ogg',40,1)
+ return result
+
+
+/obj/mecha/mechsteprand()
+ var/result = step_rand(src)
+ if(result)
+ playsound(src,'sound/machines/hiss.ogg',40,1)
+ return result
diff --git a/code/modules/research/xenoarchaeology/artifact_replicator.dm b/code/modules/research/xenoarchaeology/artifact_replicator.dm
new file mode 100644
index 00000000000..a52a12ebaf1
--- /dev/null
+++ b/code/modules/research/xenoarchaeology/artifact_replicator.dm
@@ -0,0 +1,120 @@
+
+/obj/machinery/replicator
+ name = "alien machine"
+ desc = "It's some kind of pod with strange wires and gadgets all over it."
+ icon = 'xenoarchaeology.dmi'
+ icon_state = "borgcharger0(old)"
+ density = 1
+
+ idle_power_usage = 100
+ active_power_usage = 1000
+ use_power = 1
+
+ var/spawn_progress = 0
+ var/max_spawn_ticks = 5
+ var/list/construction = list()
+ var/list/spawning_types = list()
+
+/obj/machinery/replicator/New()
+ ..()
+
+ var/list/viables = list(\
+ /obj/item/roller,\
+ /obj/structure/cult/pylon,\
+ /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/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/hatchet,\
+ /obj/item/weapon/handcuffs,\
+ /obj/item/weapon/hemostat,\
+ /obj/item/weapon/kitchenknife,\
+ /obj/item/weapon/lighter,\
+ /obj/item/weapon/lighter,\
+ /obj/item/weapon/light/bulb,\
+ /obj/item/weapon/light/tube,\
+ /obj/item/weapon/pickaxe,\
+ /obj/item/weapon/shovel,\
+ /obj/item/weapon/table_parts,\
+ /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)
+ for(var/i=0, i max_spawn_ticks)
+ src.visible_message("\blue \icon[src] [src] pings!")
+ var/spawn_type = spawning_types[1]
+ new spawn_type(src.loc)
+
+ spawning_types.Remove(spawning_types[1])
+ spawn_progress = 0
+ max_spawn_ticks = rand(5,30)
+
+ if(!spawning_types.len)
+ use_power = 1
+ icon_state = "borgcharger0(old)"
+
+ else if(prob(5))
+ src.visible_message("\blue \icon[src] [src] [pick("clicks","whizzes","whirrs","whooshes","clanks","clongs","clonks","bangs")].")
+
+/obj/machinery/replicator/attack_hand(mob/user as mob)
+ interact(user)
+
+/obj/machinery/replicator/interact(mob/user)
+ var/dat = "The control panel displays an incomprehensible selection of controls, many with unusual markings or text around them.
"
+ dat += "
"
+ for(var/index=1, index<=construction.len, index++)
+ dat += "\[[construction[index]]\]
"
+
+ user << browse(dat, "window=alien_replicator")
+
+/obj/machinery/replicator/Topic(href, href_list)
+
+ if(href_list["activate"])
+ var/index = text2num(href_list["activate"])
+ if(index > 0 && index <= construction.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")].")
+ else
+ src.visible_message("\blue \icon[src] [src]'s front compartment slides shut.")
+
+ spawning_types.Add(construction[construction[index]])
+ spawn_progress = 0
+ use_power = 2
+ icon_state = "borgcharger1(old)"
diff --git a/code/modules/research/xenoarchaeology/finds.dm b/code/modules/research/xenoarchaeology/finds.dm
index fbdb6f8ceef..10c2af2a156 100644
--- a/code/modules/research/xenoarchaeology/finds.dm
+++ b/code/modules/research/xenoarchaeology/finds.dm
@@ -1,224 +1,9 @@
//original code and idea from Alfie275 (luna era) and ISaidNo (goonservers) - with thanks
-#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
-//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 "aluminium"
- if(ARCHAEO_URN)
- return "aluminium"
- if(ARCHAEO_CUTLERY)
- return "aluminium"
- if(ARCHAEO_STATUETTE)
- return "aluminium"
- if(ARCHAEO_INSTRUMENT)
- return "aluminium"
- if(ARCHAEO_COIN)
- return "silicon"
- if(ARCHAEO_HANDCUFFS)
- return "aluminium"
- if(ARCHAEO_BEARTRAP)
- return "aluminium"
- if(ARCHAEO_LIGHTER)
- return "aluminium"
- if(ARCHAEO_BOX)
- return "aluminium"
- if(ARCHAEO_GASTANK)
- return "aluminium"
- if(ARCHAEO_TOOL)
- return "silicon"
- if(ARCHAEO_METAL)
- return "silicon"
- if(ARCHAEO_PEN)
- return "aluminium"
- if(ARCHAEO_CRYSTAL)
- return "helium"
- if(ARCHAEO_CULTBLADE)
- return "neon"
- if(ARCHAEO_TELEBEACON)
- return "neon"
- if(ARCHAEO_CLAYMORE)
- return "silicon"
- if(ARCHAEO_CULTROBES)
- return "neon"
- if(ARCHAEO_SOULSTONE)
- return "helium"
- if(ARCHAEO_SHARD)
- return "helium"
- if(ARCHAEO_RODS)
- return "silicon"
- if(ARCHAEO_STOCKPARTS)
- return "neon"
- if(ARCHAEO_KATANA)
- return "silicon"
- if(ARCHAEO_LASER)
- return "silicon"
- if(ARCHAEO_GUN)
- return "silicon"
- if(ARCHAEO_UNKNOWN)
- return "beryllium"
- if(ARCHAEO_FOSSIL)
- 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"
- return "chlorine"
-
-//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,\
- 10;ARCHAEO_REMAINS_XENO,\
- 5;ARCHAEO_BEARTRAP\
- )
- if(DIGSITE_ANIMAL)
- find_type = pick(\
- 100;ARCHAEO_FOSSIL,\
- 50;ARCHAEO_SHELL,\
- 50;ARCHAEO_PLANT,\
- 50;ARCHAEO_REMAINS_XENO,\
- 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_COIN,\
- 75;ARCHAEO_UNKNOWN,\
- 75;ARCHAEO_REMAINS_HUMANOID,\
- 75;ARCHAEO_REMAINS_ROBOT,\
- 75;ARCHAEO_REMAINS_XENO,\
- 50;ARCHAEO_SHARD,\
- 50;ARCHAEO_RODS,\
- 25;ARCHAEO_METAL\
- )
- if(DIGSITE_TECHNICAL)
- find_type = pick(\
- 100;ARCHAEO_METAL,\
- 100;ARCHAEO_GASTANK,\
- 100;ARCHAEO_TELEBEACON,\
- 100;ARCHAEO_TOOL,\
- 100;ARCHAEO_STOCKPARTS,\
- 100;ARCHAEO_REMAINS_ROBOT,\
- 75;ARCHAEO_SHARD,\
- 75;ARCHAEO_RODS,\
- 75;ARCHAEO_UNKNOWN,\
- 50;ARCHAEO_HANDCUFFS,\
- 50;ARCHAEO_BEARTRAP,\
- 25;ARCHAEO_REMAINS_HUMANOID,\
- 25;ARCHAEO_REMAINS_XENO\
- )
- if(DIGSITE_TEMPLE)
- find_type = pick(\
- 200;ARCHAEO_CULTROBES,\
- 100;ARCHAEO_URN,\
- 100;ARCHAEO_BOWL,\
- 100;ARCHAEO_KNIFE,\
- 100;ARCHAEO_CRYSTAL,\
- 75;ARCHAEO_CULTBLADE,\
- 75;ARCHAEO_REMAINS_HUMANOID,\
- 75;ARCHAEO_REMAINS_XENO,\
- 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\
- )
- if(DIGSITE_WAR)
- find_type = pick(\
- 100;ARCHAEO_GUN,\
- 100;ARCHAEO_KNIFE,\
- 75;ARCHAEO_LASER,\
- 75;ARCHAEO_KATANA,\
- 75;ARCHAEO_CLAYMORE,\
- 75;ARCHAEO_REMAINS_HUMANOID,\
- 75;ARCHAEO_REMAINS_XENO,\
- 50;ARCHAEO_UNKNOWN,\
- 50;ARCHAEO_CULTROBES,\
- 50;ARCHAEO_CULTBLADE,\
- 50;ARCHAEO_REMAINS_ROBOT,\
- 25;ARCHAEO_HANDCUFFS,\
- 25;ARCHAEO_BEARTRAP,\
- 25;ARCHAEO_TOOL\
- )
- return find_type
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Xenoarchaeological finds
-datum/find
+/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
@@ -228,30 +13,12 @@ datum/find
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)
+/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
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Rock sliver
-
-/obj/item/weapon/rocksliver
- name = "rock sliver"
- desc = "It looks extremely delicate."
- icon = 'xenoarchaeology.dmi'
- icon_state = "sliver1" //0-4
- w_class = 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
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Strange rocks
@@ -266,6 +33,7 @@ datum/find/New(var/digsite, var/exc_req)
/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)
@@ -306,6 +74,9 @@ datum/find/New(var/digsite, var/exc_req)
src.visible_message("[src] crumbles away, leaving some dust and gravel behind.")
del(src)
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Archaeological finds
+
/obj/item/weapon/archaeological_find
name = "object"
icon = 'xenoarchaeology.dmi'
@@ -468,12 +239,15 @@ datum/find/New(var/digsite, var/exc_req)
if(prob(30))
apply_image_decorations = 1
if(16)
- if(prob(50))
+ if(prob(33))
item_type = "smooth green crystal"
icon_state = "Green lump"
- else
+ else if(prob(50))
item_type = "irregular purple crystal"
icon_state = "Phazon"
+ else
+ item_type = "smooth red crystal"
+ icon_state = "ore"
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.")
apply_material_decorations = 0
@@ -507,7 +281,9 @@ datum/find/New(var/digsite, var/exc_req)
new_item = new /obj/item/device/soulstone(src.loc)
apply_material_decorations = 0
if(22)
- new_item = new /obj/item/weapon/shard(src.loc)
+ if(prob(50))
+ new_item = new /obj/item/weapon/shard(src.loc)
+ new_item = new /obj/item/weapon/shard/plasma(src.loc)
apply_image_decorations = 0
apply_material_decorations = 0
if(23)
@@ -723,30 +499,3 @@ datum/find/New(var/digsite, var/exc_req)
if(prob(25))
speaking_to_players = 1
processing_objects.Add(src)
-
-//legacy crystal
-/obj/item/weapon/crystal
- name = "Crystal"
- icon = 'mining.dmi'
- icon_state = "crystal"
-
-//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?
\ No newline at end of file
diff --git a/code/modules/research/xenoarchaeology/finds_defines.dm b/code/modules/research/xenoarchaeology/finds_defines.dm
new file mode 100644
index 00000000000..b2aebc52fa2
--- /dev/null
+++ b/code/modules/research/xenoarchaeology/finds_defines.dm
@@ -0,0 +1,258 @@
+
+#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
+//eggs
+//droppings
+//footprints
+//alien clothing
+
+//DNA sampling from fossils, or a new archaeo type specifically for it?
+
+#define ARTIFACT_REMAINS_HUMANOID 1
+#define ARTIFACT_REMAINS_ROBOT 2
+#define ARTIFACT_REMAINS_XENO 3
+#define ARTIFACT_MACHINERY 4
+#define ARTIFACT_OCCULT 5
+#define ARTIFACT_SYNDBEACON 6
+
+//?
+#define ARTIFACT_HEAL 4
+#define ARTIFACT_BIODAM 5
+#define ARTIFACT_POWERCHARGE 6
+#define ARTIFACT_POWERDRAIN 7
+#define ARTIFACT_EMP 8
+#define ARTIFACT_PLANTGROW 9
+#define ARTIFACT_WEAKEN 10
+#define ARTIFACT_SLEEPY 11
+#define ARTIFACT_TELEPORT 12
+#define ARTIFACT_ROBOHURT 13
+#define ARTIFACT_ROBOHEAL 14
+#define ARTIFACT_DNASWITCH 15
+#define ARTIFACT_
+#define ARTIFACT_
+
+//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 "aluminium"
+ if(ARCHAEO_URN)
+ return "aluminium"
+ if(ARCHAEO_CUTLERY)
+ return "aluminium"
+ if(ARCHAEO_STATUETTE)
+ return "aluminium"
+ if(ARCHAEO_INSTRUMENT)
+ return "aluminium"
+ if(ARCHAEO_COIN)
+ return "silicon"
+ if(ARCHAEO_HANDCUFFS)
+ return "aluminium"
+ if(ARCHAEO_BEARTRAP)
+ return "aluminium"
+ if(ARCHAEO_LIGHTER)
+ return "aluminium"
+ if(ARCHAEO_BOX)
+ return "aluminium"
+ if(ARCHAEO_GASTANK)
+ return "aluminium"
+ if(ARCHAEO_TOOL)
+ return "silicon"
+ if(ARCHAEO_METAL)
+ return "silicon"
+ if(ARCHAEO_PEN)
+ return "aluminium"
+ if(ARCHAEO_CRYSTAL)
+ return "helium"
+ if(ARCHAEO_CULTBLADE)
+ return "neon"
+ if(ARCHAEO_TELEBEACON)
+ return "neon"
+ if(ARCHAEO_CLAYMORE)
+ return "silicon"
+ if(ARCHAEO_CULTROBES)
+ return "neon"
+ if(ARCHAEO_SOULSTONE)
+ return "helium"
+ if(ARCHAEO_SHARD)
+ return "helium"
+ if(ARCHAEO_RODS)
+ return "silicon"
+ if(ARCHAEO_STOCKPARTS)
+ return "neon"
+ if(ARCHAEO_KATANA)
+ return "silicon"
+ if(ARCHAEO_LASER)
+ return "silicon"
+ if(ARCHAEO_GUN)
+ return "silicon"
+ if(ARCHAEO_UNKNOWN)
+ return "beryllium"
+ if(ARCHAEO_FOSSIL)
+ return "carbon"
+ if(ARCHAEO_PLANT)
+ return "carbon"
+ return "chlorine"
+
+//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_COIN,\
+ 75;ARCHAEO_UNKNOWN,\
+ 50;ARCHAEO_SHARD,\
+ 50;ARCHAEO_RODS,\
+ 25;ARCHAEO_METAL\
+ )
+ if(DIGSITE_TECHNICAL)
+ find_type = pick(\
+ 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,\
+ 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\
+ )
+ 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,\
+ 25;ARCHAEO_HANDCUFFS,\
+ 25;ARCHAEO_BEARTRAP,\
+ 25;ARCHAEO_TOOL\
+ )
+ return find_type
+
+#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 DIGSITE_GARDEN
+#undef DIGSITE_ANIMAL
+#undef DIGSITE_HOUSE
+#undef DIGSITE_TECHNICAL
+#undef DIGSITE_TEMPLE
+#undef DIGSITE_WAR
diff --git a/code/modules/research/xenoarchaeology/fossils.dm b/code/modules/research/xenoarchaeology/finds_fossils.dm
similarity index 100%
rename from code/modules/research/xenoarchaeology/fossils.dm
rename to code/modules/research/xenoarchaeology/finds_fossils.dm
diff --git a/code/modules/research/xenoarchaeology/finds_misc.dm b/code/modules/research/xenoarchaeology/finds_misc.dm
new file mode 100644
index 00000000000..6b995deff42
--- /dev/null
+++ b/code/modules/research/xenoarchaeology/finds_misc.dm
@@ -0,0 +1,69 @@
+
+/obj/item/weapon/shard/plasma
+ name = "plasma shard"
+ icon_state = "plasmalarge"
+
+/obj/item/weapon/shard/plasma/New()
+
+ src.icon_state = pick("plasmalarge", "plasmamedium", "plasmasmall")
+ switch(src.icon_state)
+ if("plasmasmall")
+ src.pixel_x = rand(-12, 12)
+ src.pixel_y = rand(-12, 12)
+ if("plasmamedium")
+ src.pixel_x = rand(-8, 8)
+ src.pixel_y = rand(-8, 8)
+ if("plasmalarge")
+ src.pixel_x = rand(-5, 5)
+ src.pixel_y = rand(-5, 5)
+ else
+ return
+
+/obj/item/weapon/shard/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ ..()
+ if ( istype(W, /obj/item/weapon/weldingtool))
+ var/obj/item/weapon/weldingtool/WT = W
+ if(WT.remove_fuel(0, user))
+ var/obj/item/stack/sheet/mineral/plasma/NG = new (user.loc)
+ for (var/obj/item/stack/sheet/mineral/plasma/G in user.loc)
+ if(G==NG)
+ continue
+ if(G.amount>=G.max_amount)
+ continue
+ G.attackby(NG, user)
+ usr << "You add the newly-formed plasma to the stack. It now contains [NG.amount] sheets."
+ //SN src = null
+ del(src)
+ return
+ return ..()
+
+//legacy crystal
+/obj/machinery/crystal
+ name = "Crystal"
+ icon = '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/talking_item.dm b/code/modules/research/xenoarchaeology/finds_talking_item.dm
similarity index 100%
rename from code/modules/research/xenoarchaeology/talking_item.dm
rename to code/modules/research/xenoarchaeology/finds_talking_item.dm
diff --git a/code/modules/research/xenoarchaeology/geosample.dm b/code/modules/research/xenoarchaeology/geosample.dm
index 72c454148d1..1ecc347f6da 100644
--- a/code/modules/research/xenoarchaeology/geosample.dm
+++ b/code/modules/research/xenoarchaeology/geosample.dm
@@ -1,4 +1,4 @@
-
+/*
#define FIND_PLANT 1
#define FIND_BIO 2
#define FIND_METEORIC 3
@@ -9,6 +9,25 @@
#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 = 'xenoarchaeology.dmi'
+ icon_state = "sliver1" //0-4
+ w_class = 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
var/list/responsive_carriers = list( \
"carbon", \
@@ -34,7 +53,12 @@ var/list/finds_as_strings = list( \
"Sedimentary/generic rock", \
"Anomalous material" )
-datum/geosample
+var/list/artifact_spawning_turfs = list()
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Geosample datum
+
+/datum/geosample
var/age = 0 //age can correspond to different archaeological finds
var/age_thousand = 0
var/age_million = 0
@@ -48,12 +72,15 @@ datum/geosample
//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)
+/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)
+/datum/geosample/proc/UpdateTurf(var/turf/simulated/mineral/container)
+ if(!container || !istype(container))
+ return
+
//source_mineral = container.mineralName
age = rand(1,999)
@@ -128,3 +155,25 @@ datum/geosample/proc/UpdateTurf(var/turf/simulated/mineral/container)
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
+
+ for(var/turf/simulated/mineral/holder in artifact_spawning_turfs)
+ var/dist = get_dist(container, holder)
+ if(dist < artifact_distance)
+ artifact_distance = dist
+ //artifact_id = A.display_id
+/*
+#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
+*/
\ No newline at end of file
diff --git a/code/modules/research/xenoarchaeology/artifact_misc.dm b/code/modules/research/xenoarchaeology/misc.dm
similarity index 82%
rename from code/modules/research/xenoarchaeology/artifact_misc.dm
rename to code/modules/research/xenoarchaeology/misc.dm
index e30bba2f890..7d72b417c8e 100644
--- a/code/modules/research/xenoarchaeology/artifact_misc.dm
+++ b/code/modules/research/xenoarchaeology/misc.dm
@@ -1,67 +1,54 @@
-
-/obj/item/clothing/suit/bio_suit/anomaly
- name = "Anomaly Suit"
- desc = "A sealed bio suit capable of resisting exotic alien energies and low pressure environments."
- icon_state = "engspace_suit"
- item_state = "engspace_suit"
- allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
-
-/obj/item/clothing/head/bio_hood/anomaly
- name = "Anomaly Hood"
- desc = "A sealed bio hood capable of resisting exotic alien energies and low pressure environments."
- icon_state = "engspace_helmet"
- item_state = "engspace_helmet"
-
-/obj/structure/noticeboard/anomaly/New()
- notices = 5
- icon_state = "nboard05"
-
- //add some memos
- var/obj/item/weapon/paper/P = new()
- P.name = "Memo RE: proper analysis procedure"
- P.info = "Rose,
activate then analyse the anomalies, your results will come so much quicker. Remember to employ basic quasi-elemental forces such as heat, energy, force and various chemical mixes - who knows why those ancient aliens made such obscure activation indices.
And don't forget your suit this time, I can't afford to have any researchers out of commision for as long as that again!.
Ward"
- P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
- src.contents += P
-
- P = new()
- P.name = "Memo RE: materials gathering"
- P.info = "Corasang,
the hands-on approach to gathering our samples may very well be slow at times, but it's safer than allowing the blundering miners to roll willy-nilly over our dig sites in their mechs, destroying everything in the process. And don't forget the escavation tools on your way out there!
- R.W"
- P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
- src.contents += P
-
- P = new()
- P.name = "Memo RE: ethical quandaries"
- P.info = "Darion-
I don't care what his rank is, our business is that of science and knowledge - questions of moral application do not come into this. Sure, so there are those who would employ the energy-wave particles my modified device has managed to abscond for their own personal gain, but I can hardly see the practical benefits of some of those things our benefactors left behind. Ward--"
- P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
- src.contents += P
-
- P = new()
- P.name = "READ ME! Before you people destroy any more samples"
- P.info = "how many times do i have to tell you people, these xeno-arch samples are del-i-cate, and should be handled so! careful application of a focussed, ceoncentrated heat or some corrosive liquids should clear away the extraneous carbon matter, while application of an energy beam will most decidedly destroy it entirely! W, the one who signs your paychecks"
- P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
- src.contents += P
-
- P = new()
- P.name = "Reminder regarding the anomalous material suits"
- P.info = "Do you people think the anomaly suits are cheap to come by? I'm about a hair trigger away from instituting a log book for the damn things. Only wear them if you're going out for a dig, and for god's sake don't go tramping around the station in them unless you're field testing something, R"
- P.stamped = list(/obj/item/weapon/stamp/rd)
- P.overlays = list("paper_stamped_rd")
- src.contents += P
-
-//Anomaly
-
-/area/anomaly
- icon_state = "anomaly"
-
-/area/anomaly/hallway
- name = "Anomaly Hallway"
-
-/area/anomaly/lab
- name = "Anomaly Lab"
-
-/area/anomaly/outpost
- name = "Research Outpost"
+
+/obj/structure/noticeboard/anomaly/New()
+ notices = 5
+ icon_state = "nboard05"
+
+ //add some memos
+ var/obj/item/weapon/paper/P = new()
+ P.name = "Memo RE: proper analysis procedure"
+ P.info = "Rose,
activate then analyse the anomalies, your results will come so much quicker. Remember to employ basic quasi-elemental forces such as heat, energy, force and various chemical mixes - who knows why those ancient aliens made such obscure activation indices.
And don't forget your suit this time, I can't afford to have any researchers out of commision for as long as that again!.
Ward"
+ P.stamped = list(/obj/item/weapon/stamp/rd)
+ P.overlays = list("paper_stamped_rd")
+ src.contents += P
+
+ P = new()
+ P.name = "Memo RE: materials gathering"
+ P.info = "Corasang,
the hands-on approach to gathering our samples may very well be slow at times, but it's safer than allowing the blundering miners to roll willy-nilly over our dig sites in their mechs, destroying everything in the process. And don't forget the escavation tools on your way out there!
- R.W"
+ P.stamped = list(/obj/item/weapon/stamp/rd)
+ P.overlays = list("paper_stamped_rd")
+ src.contents += P
+
+ P = new()
+ P.name = "Memo RE: ethical quandaries"
+ P.info = "Darion-
I don't care what his rank is, our business is that of science and knowledge - questions of moral application do not come into this. Sure, so there are those who would employ the energy-wave particles my modified device has managed to abscond for their own personal gain, but I can hardly see the practical benefits of some of those things our benefactors left behind. Ward--"
+ P.stamped = list(/obj/item/weapon/stamp/rd)
+ P.overlays = list("paper_stamped_rd")
+ src.contents += P
+
+ P = new()
+ P.name = "READ ME! Before you people destroy any more samples"
+ P.info = "how many times do i have to tell you people, these xeno-arch samples are del-i-cate, and should be handled so! careful application of a focussed, ceoncentrated heat or some corrosive liquids should clear away the extraneous carbon matter, while application of an energy beam will most decidedly destroy it entirely! W, the one who signs your paychecks"
+ P.stamped = list(/obj/item/weapon/stamp/rd)
+ P.overlays = list("paper_stamped_rd")
+ src.contents += P
+
+ P = new()
+ P.name = "Reminder regarding the anomalous material suits"
+ P.info = "Do you people think the anomaly suits are cheap to come by? I'm about a hair trigger away from instituting a log book for the damn things. Only wear them if you're going out for a dig, and for god's sake don't go tramping around the station in them unless you're field testing something, R"
+ P.stamped = list(/obj/item/weapon/stamp/rd)
+ P.overlays = list("paper_stamped_rd")
+ src.contents += P
+
+//Anomaly
+
+/area/anomaly
+ icon_state = "anomaly"
+
+/area/anomaly/hallway
+ name = "Anomaly Hallway"
+
+/area/anomaly/lab
+ name = "Anomaly Lab"
+
+/area/anomaly/outpost
+ name = "Research Outpost"
diff --git a/code/modules/research/xenoarchaeology/spacesuit.dm b/code/modules/research/xenoarchaeology/spacesuit.dm
new file mode 100644
index 00000000000..66c9dedb22d
--- /dev/null
+++ b/code/modules/research/xenoarchaeology/spacesuit.dm
@@ -0,0 +1,13 @@
+
+/obj/item/clothing/suit/space/anomaly
+ name = "Anomaly Suit"
+ desc = "A sealed bio suit capable of resisting exotic alien energies and low pressure environments."
+ icon_state = "engspace_suit"
+ item_state = "engspace_suit"
+ allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
+
+/obj/item/clothing/head/helmet/space/anomaly
+ name = "Anomaly Hood"
+ desc = "A sealed bio hood capable of resisting exotic alien energies and low pressure environments."
+ icon_state = "engspace_helmet"
+ item_state = "engspace_helmet"
diff --git a/code/modules/research/xenoarchaeology/suspension_generator.dm b/code/modules/research/xenoarchaeology/suspension_generator.dm
index 3c1449f6b49..b24080df2ff 100644
--- a/code/modules/research/xenoarchaeology/suspension_generator.dm
+++ b/code/modules/research/xenoarchaeology/suspension_generator.dm
@@ -1,5 +1,3 @@
-//these are probably broken
-
/obj/machinery/suspension_gen
name = "suspension field generator"
desc = "It has stubby legs bolted up against it's body for stabilising."
@@ -32,14 +30,14 @@
for(var/mob/living/carbon/M in T)
M.weakened = max(M.weakened, 3)
cell.charge -= power_use
- if(prob(10))
+ 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 == "silicon")
for(var/mob/living/silicon/M in T)
M.weakened = max(M.weakened, 3)
cell.charge -= power_use
- if(prob(10))
+ if(prob(5))
M << "\blue [pick("You feel tingly.","You feel like floating.","It is hard to speak.","You can barely move.")]"
for(var/obj/item/I in T)
@@ -51,7 +49,7 @@
for(var/mob/living/simple_animal/M in T)
M.weakened = max(M.weakened, 3)
cell.charge -= power_use
- if(prob(10))
+ if(prob(5))
M << "\blue [pick("You feel tingly.","You feel like floating.","It is hard to speak.","You can barely move.")]"
if(cell.charge <= 0)
diff --git a/code/modules/research/xenoarchaeology/misc_tools.dm b/code/modules/research/xenoarchaeology/tools.dm
similarity index 100%
rename from code/modules/research/xenoarchaeology/misc_tools.dm
rename to code/modules/research/xenoarchaeology/tools.dm
diff --git a/code/modules/research/xenoarchaeology/artifact.dm b/code/modules/research/xenoarchaeology/unknown.dm
similarity index 100%
rename from code/modules/research/xenoarchaeology/artifact.dm
rename to code/modules/research/xenoarchaeology/unknown.dm
diff --git a/code/modules/research/xenoarchaeology/artifact_analysis.dm b/code/modules/research/xenoarchaeology/unknown_analysis.dm
similarity index 97%
rename from code/modules/research/xenoarchaeology/artifact_analysis.dm
rename to code/modules/research/xenoarchaeology/unknown_analysis.dm
index 5225b650e7f..706343e8f62 100644
--- a/code/modules/research/xenoarchaeology/artifact_analysis.dm
+++ b/code/modules/research/xenoarchaeology/unknown_analysis.dm
@@ -1,318 +1,318 @@
-
-//cael - some changes here. the analysis pad is entirely new
-
-/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/working = 0
- var/accuO = 0
- var/accuT = 0
- var/accuE1 = 0
- var/accuE2 = 0
- var/aorigin = "None"
- var/atrigger = "None"
- var/aeffect1 = "None"
- var/aeffect2 = "None"
- var/list/origin_bonuses
- var/list/trigger_bonuses
- var/list/function_bonuses
- var/list/range_bonuses
- var/cur_id = ""
- var/scan_num = 0
- var/obj/machinery/artifact/cur_artifact = null
- var/obj/machinery/analyser_pad/owned_pad = null
- var/list/allorigins = list("Ancient Robots","Martian","Wizard Federation","Extradimensional","Precursor")
- var/list/alltriggers = list("Contact with Living Organism","Heavy Impact","Contact with Energy Source","Contact with Hydrogen","Contact with Corrosive Substance","Contact with Volatile Substance","Contact with Toxins","Exposure to Heat")
- var/list/alleffects = list("Healing Device","Anti-biological Weapon","Non-lethal Stunning Trap","Mechanoid Repair Module","Mechanoid Deconstruction Device","Power Generator","Power Drain","Stellar Mineral Attractor","Agriculture Regulator","Shield Generator","Space-Time Displacer")
- var/list/allranges = list("Constant Short-Range Energy Field","Medium Range Energy Pulses","Long Range Energy Pulses","Extreme Range Energy Pulses","Requires contact with subject")
-
-/obj/machinery/artifact_analyser/New()
- ..()
- origin_bonuses = new/list()
- origin_bonuses["ancient"] = 0
- origin_bonuses["martian"] = 0
- origin_bonuses["wizard"] = 0
- origin_bonuses["eldritch"] = 0
- origin_bonuses["precursor"] = 0
- trigger_bonuses = new/list()
- trigger_bonuses["ancient"] = 0
- trigger_bonuses["martian"] = 0
- trigger_bonuses["wizard"] = 0
- trigger_bonuses["eldritch"] = 0
- trigger_bonuses["precursor"] = 0
- function_bonuses = new/list()
- function_bonuses["ancient"] = 0
- function_bonuses["martian"] = 0
- function_bonuses["wizard"] = 0
- function_bonuses["eldritch"] = 0
- function_bonuses["precursor"] = 0
- range_bonuses = new/list()
- range_bonuses["ancient"] = 0
- range_bonuses["martian"] = 0
- range_bonuses["wizard"] = 0
- range_bonuses["eldritch"] = 0
- range_bonuses["precursor"] = 0
- //
- spawn(10)
- owned_pad = locate() in orange(1, src)
-
-/obj/machinery/artifact_analyser/attack_hand(var/mob/user as mob)
- if(stat & (NOPOWER|BROKEN))
- return
- user.machine = src
- var/dat = "Artifact Analyser
"
- dat += "
"
- if(!owned_pad)
- dat += "Unable to locate analysis pad.
"
- dat += "
"
- else if (!src.working)
- dat += "Artifact ID: [cur_id]
"
- dat += "Artifact Origin: [aorigin] ([accuO]%)
"
- dat += "Activation Trigger: [atrigger] ([accuT]%)
"
- dat += "Artifact Function: [aeffect1] ([accuE1]%)
"
- dat += "Artifact Range: [aeffect2] ([accuE2]%)
"
- dat += "
"
- dat += "Artifact ID is determined from unique energy emission signatures.
"
- dat += "Analyse Artifact (Scan number #[scan_num+1])
"
- dat += "Upload/update artifact scan
"
- dat += "Print Page
"
- else
- dat += "Please wait. Analysis in progress.
"
- dat += "
"
- //
- dat += "Close
"
- user << browse(dat, "window=artanalyser;size=450x500")
- onclose(user, "artanalyser")
-
-/obj/machinery/artifact_analyser/process()
- if(stat & (NOPOWER|BROKEN))
- return
- use_power(350)
- //
- if(!owned_pad)
- for(var/obj/machinery/analyser_pad/pad in range(1))
- owned_pad = pad
- break
-
-/obj/machinery/artifact_analyser/proc/AA_FailedAnalysis(var/failtype)
- switch(failtype)
- if(1)
- src.aorigin = "Failed to Identify"
- if (prob(20)) src.aorigin = pick(src.allorigins)
- if(2)
- src.atrigger = "Failed to Identify"
- if (prob(20)) src.atrigger = pick(src.alltriggers)
- if(3)
- src.aeffect1 = "Failed to Identify"
- if (prob(20)) src.aeffect1 = pick(src.alleffects)
- if(4)
- src.aeffect2 = "Failed to Identify"
- if (prob(20)) src.aeffect2 = pick(src.allranges)
-
-/obj/machinery/artifact_analyser/proc/AA_Analyse()
- if(!cur_artifact)
- return
- src.accuO = 5 + rand(0,10) + origin_bonuses[cur_artifact.origin] + cur_artifact.activated * 50
- src.accuT = 5 + rand(0,10) + trigger_bonuses[cur_artifact.origin] + cur_artifact.activated * 50
- src.accuE1 = 5 + rand(0,10) + function_bonuses[cur_artifact.origin] + cur_artifact.activated * 50
- src.accuE2 = 5 + rand(0,10) + range_bonuses[cur_artifact.origin] + cur_artifact.activated * 50
-
- //keep any correctly determined properties the same
- var/origin_correct = 0
- var/trigger_correct = 0
- var/function_correct = 0
- var/range_correct = 0
- if(cur_id == cur_artifact.display_id)
- if(src.aorigin == cur_artifact.origin)
- origin_correct = 1
-
- if(src.atrigger == cur_artifact.my_effect.trigger)
- trigger_correct = 1
- else if(src.atrigger == cur_artifact.my_effect.triggerX)
- trigger_correct = 1
-
- if(src.aeffect1 == cur_artifact.my_effect.effecttype)
- function_correct = 1
-
- if(src.aeffect2 == cur_artifact.my_effect.effectmode)
- range_correct = 1
-
- if (src.accuO > 100) src.accuO = 100
- if (src.accuT > 100) src.accuT = 100
- if (src.accuE1 > 100) src.accuE1 = 100
- if (src.accuE2 > 100) src.accuE2 = 100
- // Roll to generate report
- if (prob(accuO) || origin_correct)
- switch(cur_artifact.origin)
- if("ancient") src.aorigin = "Ancient Robots"
- if("martian") src.aorigin = "Martian"
- if("wizard") src.aorigin = "Wizard Federation"
- if("eldritch") src.aorigin = "Extradimensional"
- if("precursor") src.aorigin = "Precursor"
- else src.aorigin = "Unknown Origin"
- origin_bonuses[cur_artifact.origin] += 10
- else
- AA_FailedAnalysis(1)
- origin_bonuses[cur_artifact.origin] += 5
- if (prob(accuT) || trigger_correct)
- switch(cur_artifact.my_effect.trigger)
- if("touch") src.atrigger = "Contact with Living Organism"
- if("force") src.atrigger = "Heavy Impact"
- if("energy") src.atrigger = "Contact with Energy Source"
- if("chemical")
- switch(cur_artifact.my_effect.triggerX)
- if("hydrogen") src.atrigger = "Contact with Hydrogen"
- if("corrosive") src.atrigger = "Contact with Corrosive Substance"
- if("volatile") src.atrigger = "Contact with Volatile Substance"
- if("toxin") src.atrigger = "Contact with Toxins"
- if("heat") src.atrigger = "Exposure to Heat"
- else src.atrigger = "Unknown Trigger"
- trigger_bonuses[cur_artifact.origin] += 5
- else
- AA_FailedAnalysis(2)
- trigger_bonuses[cur_artifact.origin] += 1
- if (prob(accuE1) || function_correct)
- switch(cur_artifact.my_effect.effecttype)
- if("healing") src.aeffect1 = "Healing Device"
- if("injure") src.aeffect1 = "Anti-biological Weapon"
- // if("stun") src.aeffect1 = "Non-lethal Stunning Trap"
- if("roboheal") src.aeffect1 = "Mechanoid Repair Module"
- if("robohurt") src.aeffect1 = "Mechanoid Deconstruction Device"
- if("cellcharge") src.aeffect1 = "Power Generator"
- if("celldrain") src.aeffect1 = "Power Drain"
- if("planthelper") src.aeffect1 = "Agriculture Regulator"
- if("forcefield") src.aeffect1 = "Shield Generator"
- if("teleport") src.aeffect1 = "Space-Time Displacer"
- else src.aeffect1 = "Unknown Effect"
- function_bonuses[cur_artifact.origin] += 5
- else
- AA_FailedAnalysis(3)
- function_bonuses[cur_artifact.origin] += 1
- if (prob(accuE2) || range_correct)
- switch(cur_artifact.my_effect.effectmode)
- if("aura") src.aeffect2 = "Constant Short-Range Energy Field"
- if("pulse")
- if(cur_artifact.my_effect.aurarange > 7) src.aeffect2 = "Long Range Energy Pulses"
- else src.aeffect2 = "Medium Range Energy Pulses"
- if("worldpulse") src.aeffect2 = "Extreme Range Energy Pulses"
- if("contact") src.aeffect2 = "Requires contact with subject"
- else src.aeffect2 = "Unknown Range"
- range_bonuses[cur_artifact.origin] += 5
- else
- AA_FailedAnalysis(4)
- range_bonuses[cur_artifact.origin] += 1
-
- cur_artifact.name = "alien artifact ([cur_artifact.display_id])"
- cur_artifact.desc = "A large alien device. It has a small tag near the bottom that reads \"[cur_artifact.display_id]\"."
- cur_id = cur_artifact.display_id
- cur_artifact.my_effect.artifact_id = cur_artifact.display_id
-
-/obj/machinery/artifact_analyser/Topic(href, href_list)
-
- if(href_list["analyse"])
- if(owned_pad)
- var/turf/pad_turf = get_turf(owned_pad)
- var/findarti = 0
- for(var/obj/machinery/artifact/A in pad_turf.contents)
- findarti++
- cur_artifact = A
- if (findarti == 1)
- if(cur_artifact && cur_artifact.being_used)
- var/message = "[src] states, \"Cannot analyse. Excess energy drain is disrupting signal.\""
- src.visible_message(message, message)
- else
- cur_artifact.anchored = 1
- cur_artifact.being_used = 1
- src.working = 1
- src.icon_state = "analyser_processing"
- var/time = rand(30,50) + max(0, 300 - scan_num * 10)
- /*for(var/i = artifact_research.starting_tier, i <= artifact_research.max_tiers, i++)
- for(var/datum/artiresearch/R in artifact_research.researched_items[i])
- if (R.bonustype == "analyser") time -= R.bonusTime*/
- time *= 10
- var/message = "[src] states, \"Commencing analysis.\""
- src.visible_message(message, message)
- use_power(500)
- spawn(time)
- src.working = 0
- icon_state = "analyser"
- cur_artifact.anchored = 0
- cur_artifact.being_used = 0
- if(cur_artifact.loc == pad_turf)
- AA_Analyse()
- scan_num++
- message = "[src] states, \"Analysis complete.\""
- src.visible_message(message, message)
- use_power(500)
- else if (findarti > 1)
- var/message = "[src] states, \"Cannot analyse. Error isolating energy signature.\""
- src.visible_message(message, message)
- else
- var/message = "[src] states, \"Cannot analyse. No noteworthy energy signature isolated.\""
- src.visible_message(message, message)
-
- if(href_list["upload"] && cur_id != "")
- //add new datum to every DB in the world
- for(var/obj/machinery/computer/artifact_database/DB in world)
- var/update = 0
- for(var/datum/catalogued_artifact/CA in DB.catalogued_artifacts)
- if(CA.display_id == cur_id)
- //already there, so update it
- update = 1
- CA.origin = aorigin + " ([accuO]%)"
- CA.trigger = atrigger + " ([accuT]%)"
- CA.effecttype = aeffect1 + " ([accuE1]%)"
- CA.effectmode = aeffect2 + " ([accuE2]%)"
- if(!update)
- //not there, so add it
- var/datum/catalogued_artifact/CA = new()
- CA.display_id = cur_id
- CA.origin = aorigin + " ([accuO]%)"
- CA.trigger = atrigger + " ([accuT]%)"
- CA.effecttype = aeffect1 + " ([accuE1]%)"
- CA.effectmode = aeffect2 + " ([accuE2]%)"
- DB.catalogued_artifacts.Add(CA)
- use_power(100)
-
- if(href_list["print"])
- var/r = "Artifact Analysis Report (Scan #[scan_num])
"
- r += "Artifact ID: [cur_id] (determined from unique energy emission signatures)
"
- r += "Artifact Origin: [aorigin] ([accuO]%)
"
- r += "Activation Trigger: [atrigger] ([accuT]%)
"
- r += "Artifact Function: [aeffect1] ([accuE1]%)
"
- r += "Artifact Range: [aeffect2] ([accuE2]%)
"
- var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc)
- P.name = "Artifact Analysis Report #[scan_num]"
- P.info = r
- for(var/mob/O in hearers(src, null))
- O.show_message("\icon[src] \blue The [src.name] prints a sheet of paper", 3)
- use_power(10)
-
- if(href_list["close"])
- usr << browse(null, "window=artanalyser")
- usr.machine = null
-
- src.updateDialog()
-
-//stick artifacts onto this then switch the analyser on
-/obj/machinery/analyser_pad
- name = "artifact analysis pad"
- desc = "Studies the structure of artifacts to discover their uses."
- icon = 'stationobjs.dmi'
- icon_state = "tele0"
- anchored = 1
- density = 0
-
-/obj/machinery/analyser_pad/New()
- ..()
- /*spawn(10)
- for(var/obj/machinery/artifact_analyser/analyser in orange(1))
- world << "pad found analyser"
- if(!analyser.owned_pad)
- analyser.owned_pad = src
- world << "pad set analyser to self"
- break*/
+
+//cael - some changes here. the analysis pad is entirely new
+
+/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/working = 0
+ var/accuO = 0
+ var/accuT = 0
+ var/accuE1 = 0
+ var/accuE2 = 0
+ var/aorigin = "None"
+ var/atrigger = "None"
+ var/aeffect1 = "None"
+ var/aeffect2 = "None"
+ var/list/origin_bonuses
+ var/list/trigger_bonuses
+ var/list/function_bonuses
+ var/list/range_bonuses
+ var/cur_id = ""
+ var/scan_num = 0
+ var/obj/machinery/artifact/cur_artifact = null
+ var/obj/machinery/analyser_pad/owned_pad = null
+ var/list/allorigins = list("Ancient Robots","Martian","Wizard Federation","Extradimensional","Precursor")
+ var/list/alltriggers = list("Contact with Living Organism","Heavy Impact","Contact with Energy Source","Contact with Hydrogen","Contact with Corrosive Substance","Contact with Volatile Substance","Contact with Toxins","Exposure to Heat")
+ var/list/alleffects = list("Healing Device","Anti-biological Weapon","Non-lethal Stunning Trap","Mechanoid Repair Module","Mechanoid Deconstruction Device","Power Generator","Power Drain","Stellar Mineral Attractor","Agriculture Regulator","Shield Generator","Space-Time Displacer")
+ var/list/allranges = list("Constant Short-Range Energy Field","Medium Range Energy Pulses","Long Range Energy Pulses","Extreme Range Energy Pulses","Requires contact with subject")
+
+/obj/machinery/artifact_analyser/New()
+ ..()
+ origin_bonuses = new/list()
+ origin_bonuses["ancient"] = 0
+ origin_bonuses["martian"] = 0
+ origin_bonuses["wizard"] = 0
+ origin_bonuses["eldritch"] = 0
+ origin_bonuses["precursor"] = 0
+ trigger_bonuses = new/list()
+ trigger_bonuses["ancient"] = 0
+ trigger_bonuses["martian"] = 0
+ trigger_bonuses["wizard"] = 0
+ trigger_bonuses["eldritch"] = 0
+ trigger_bonuses["precursor"] = 0
+ function_bonuses = new/list()
+ function_bonuses["ancient"] = 0
+ function_bonuses["martian"] = 0
+ function_bonuses["wizard"] = 0
+ function_bonuses["eldritch"] = 0
+ function_bonuses["precursor"] = 0
+ range_bonuses = new/list()
+ range_bonuses["ancient"] = 0
+ range_bonuses["martian"] = 0
+ range_bonuses["wizard"] = 0
+ range_bonuses["eldritch"] = 0
+ range_bonuses["precursor"] = 0
+ //
+ spawn(10)
+ owned_pad = locate() in orange(1, src)
+
+/obj/machinery/artifact_analyser/attack_hand(var/mob/user as mob)
+ if(stat & (NOPOWER|BROKEN))
+ return
+ user.machine = src
+ var/dat = "Artifact Analyser
"
+ dat += "
"
+ if(!owned_pad)
+ dat += "Unable to locate analysis pad.
"
+ dat += "
"
+ else if (!src.working)
+ dat += "Artifact ID: [cur_id]
"
+ dat += "Artifact Origin: [aorigin] ([accuO]%)
"
+ dat += "Activation Trigger: [atrigger] ([accuT]%)
"
+ dat += "Artifact Function: [aeffect1] ([accuE1]%)
"
+ dat += "Artifact Range: [aeffect2] ([accuE2]%)
"
+ dat += "
"
+ dat += "Artifact ID is determined from unique energy emission signatures.
"
+ dat += "Analyse Artifact (Scan number #[scan_num+1])
"
+ dat += "Upload/update artifact scan
"
+ dat += "Print Page
"
+ else
+ dat += "Please wait. Analysis in progress.
"
+ dat += "
"
+ //
+ dat += "Close
"
+ user << browse(dat, "window=artanalyser;size=450x500")
+ onclose(user, "artanalyser")
+
+/obj/machinery/artifact_analyser/process()
+ if(stat & (NOPOWER|BROKEN))
+ return
+ use_power(350)
+ //
+ if(!owned_pad)
+ for(var/obj/machinery/analyser_pad/pad in range(1))
+ owned_pad = pad
+ break
+
+/obj/machinery/artifact_analyser/proc/AA_FailedAnalysis(var/failtype)
+ switch(failtype)
+ if(1)
+ src.aorigin = "Failed to Identify"
+ if (prob(20)) src.aorigin = pick(src.allorigins)
+ if(2)
+ src.atrigger = "Failed to Identify"
+ if (prob(20)) src.atrigger = pick(src.alltriggers)
+ if(3)
+ src.aeffect1 = "Failed to Identify"
+ if (prob(20)) src.aeffect1 = pick(src.alleffects)
+ if(4)
+ src.aeffect2 = "Failed to Identify"
+ if (prob(20)) src.aeffect2 = pick(src.allranges)
+
+/obj/machinery/artifact_analyser/proc/AA_Analyse()
+ if(!cur_artifact)
+ return
+ src.accuO = 5 + rand(0,10) + origin_bonuses[cur_artifact.origin] + cur_artifact.activated * 50
+ src.accuT = 5 + rand(0,10) + trigger_bonuses[cur_artifact.origin] + cur_artifact.activated * 50
+ src.accuE1 = 5 + rand(0,10) + function_bonuses[cur_artifact.origin] + cur_artifact.activated * 50
+ src.accuE2 = 5 + rand(0,10) + range_bonuses[cur_artifact.origin] + cur_artifact.activated * 50
+
+ //keep any correctly determined properties the same
+ var/origin_correct = 0
+ var/trigger_correct = 0
+ var/function_correct = 0
+ var/range_correct = 0
+ if(cur_id == cur_artifact.display_id)
+ if(src.aorigin == cur_artifact.origin)
+ origin_correct = 1
+
+ if(src.atrigger == cur_artifact.my_effect.trigger)
+ trigger_correct = 1
+ else if(src.atrigger == cur_artifact.my_effect.triggerX)
+ trigger_correct = 1
+
+ if(src.aeffect1 == cur_artifact.my_effect.effecttype)
+ function_correct = 1
+
+ if(src.aeffect2 == cur_artifact.my_effect.effectmode)
+ range_correct = 1
+
+ if (src.accuO > 100) src.accuO = 100
+ if (src.accuT > 100) src.accuT = 100
+ if (src.accuE1 > 100) src.accuE1 = 100
+ if (src.accuE2 > 100) src.accuE2 = 100
+ // Roll to generate report
+ if (prob(accuO) || origin_correct)
+ switch(cur_artifact.origin)
+ if("ancient") src.aorigin = "Ancient Robots"
+ if("martian") src.aorigin = "Martian"
+ if("wizard") src.aorigin = "Wizard Federation"
+ if("eldritch") src.aorigin = "Extradimensional"
+ if("precursor") src.aorigin = "Precursor"
+ else src.aorigin = "Unknown Origin"
+ origin_bonuses[cur_artifact.origin] += 10
+ else
+ AA_FailedAnalysis(1)
+ origin_bonuses[cur_artifact.origin] += 5
+ if (prob(accuT) || trigger_correct)
+ switch(cur_artifact.my_effect.trigger)
+ if("touch") src.atrigger = "Contact with Living Organism"
+ if("force") src.atrigger = "Heavy Impact"
+ if("energy") src.atrigger = "Contact with Energy Source"
+ if("chemical")
+ switch(cur_artifact.my_effect.triggerX)
+ if("hydrogen") src.atrigger = "Contact with Hydrogen"
+ if("corrosive") src.atrigger = "Contact with Corrosive Substance"
+ if("volatile") src.atrigger = "Contact with Volatile Substance"
+ if("toxin") src.atrigger = "Contact with Toxins"
+ if("heat") src.atrigger = "Exposure to Heat"
+ else src.atrigger = "Unknown Trigger"
+ trigger_bonuses[cur_artifact.origin] += 5
+ else
+ AA_FailedAnalysis(2)
+ trigger_bonuses[cur_artifact.origin] += 1
+ if (prob(accuE1) || function_correct)
+ switch(cur_artifact.my_effect.effecttype)
+ if("healing") src.aeffect1 = "Healing Device"
+ if("injure") src.aeffect1 = "Anti-biological Weapon"
+ // if("stun") src.aeffect1 = "Non-lethal Stunning Trap"
+ if("roboheal") src.aeffect1 = "Mechanoid Repair Module"
+ if("robohurt") src.aeffect1 = "Mechanoid Deconstruction Device"
+ if("cellcharge") src.aeffect1 = "Power Generator"
+ if("celldrain") src.aeffect1 = "Power Drain"
+ if("planthelper") src.aeffect1 = "Agriculture Regulator"
+ if("forcefield") src.aeffect1 = "Shield Generator"
+ if("teleport") src.aeffect1 = "Space-Time Displacer"
+ else src.aeffect1 = "Unknown Effect"
+ function_bonuses[cur_artifact.origin] += 5
+ else
+ AA_FailedAnalysis(3)
+ function_bonuses[cur_artifact.origin] += 1
+ if (prob(accuE2) || range_correct)
+ switch(cur_artifact.my_effect.effectmode)
+ if("aura") src.aeffect2 = "Constant Short-Range Energy Field"
+ if("pulse")
+ if(cur_artifact.my_effect.aurarange > 7) src.aeffect2 = "Long Range Energy Pulses"
+ else src.aeffect2 = "Medium Range Energy Pulses"
+ if("worldpulse") src.aeffect2 = "Extreme Range Energy Pulses"
+ if("contact") src.aeffect2 = "Requires contact with subject"
+ else src.aeffect2 = "Unknown Range"
+ range_bonuses[cur_artifact.origin] += 5
+ else
+ AA_FailedAnalysis(4)
+ range_bonuses[cur_artifact.origin] += 1
+
+ cur_artifact.name = "alien artifact ([cur_artifact.display_id])"
+ cur_artifact.desc = "A large alien device. It has a small tag near the bottom that reads \"[cur_artifact.display_id]\"."
+ cur_id = cur_artifact.display_id
+ cur_artifact.my_effect.artifact_id = cur_artifact.display_id
+
+/obj/machinery/artifact_analyser/Topic(href, href_list)
+
+ if(href_list["analyse"])
+ if(owned_pad)
+ var/turf/pad_turf = get_turf(owned_pad)
+ var/findarti = 0
+ for(var/obj/machinery/artifact/A in pad_turf.contents)
+ findarti++
+ cur_artifact = A
+ if (findarti == 1)
+ if(cur_artifact && cur_artifact.being_used)
+ var/message = "[src] states, \"Cannot analyse. Excess energy drain is disrupting signal.\""
+ src.visible_message(message, message)
+ else
+ cur_artifact.anchored = 1
+ cur_artifact.being_used = 1
+ src.working = 1
+ src.icon_state = "analyser_processing"
+ var/time = rand(30,50) + max(0, 300 - scan_num * 10)
+ /*for(var/i = artifact_research.starting_tier, i <= artifact_research.max_tiers, i++)
+ for(var/datum/artiresearch/R in artifact_research.researched_items[i])
+ if (R.bonustype == "analyser") time -= R.bonusTime*/
+ time *= 10
+ var/message = "[src] states, \"Commencing analysis.\""
+ src.visible_message(message, message)
+ use_power(500)
+ spawn(time)
+ src.working = 0
+ icon_state = "analyser"
+ cur_artifact.anchored = 0
+ cur_artifact.being_used = 0
+ if(cur_artifact.loc == pad_turf)
+ AA_Analyse()
+ scan_num++
+ message = "[src] states, \"Analysis complete.\""
+ src.visible_message(message, message)
+ use_power(500)
+ else if (findarti > 1)
+ var/message = "[src] states, \"Cannot analyse. Error isolating energy signature.\""
+ src.visible_message(message, message)
+ else
+ var/message = "[src] states, \"Cannot analyse. No noteworthy energy signature isolated.\""
+ src.visible_message(message, message)
+
+ if(href_list["upload"] && cur_id != "")
+ //add new datum to every DB in the world
+ for(var/obj/machinery/computer/artifact_database/DB in world)
+ var/update = 0
+ for(var/datum/catalogued_artifact/CA in DB.catalogued_artifacts)
+ if(CA.display_id == cur_id)
+ //already there, so update it
+ update = 1
+ CA.origin = aorigin + " ([accuO]%)"
+ CA.trigger = atrigger + " ([accuT]%)"
+ CA.effecttype = aeffect1 + " ([accuE1]%)"
+ CA.effectmode = aeffect2 + " ([accuE2]%)"
+ if(!update)
+ //not there, so add it
+ var/datum/catalogued_artifact/CA = new()
+ CA.display_id = cur_id
+ CA.origin = aorigin + " ([accuO]%)"
+ CA.trigger = atrigger + " ([accuT]%)"
+ CA.effecttype = aeffect1 + " ([accuE1]%)"
+ CA.effectmode = aeffect2 + " ([accuE2]%)"
+ DB.catalogued_artifacts.Add(CA)
+ use_power(100)
+
+ if(href_list["print"])
+ var/r = "Artifact Analysis Report (Scan #[scan_num])
"
+ r += "Artifact ID: [cur_id] (determined from unique energy emission signatures)
"
+ r += "Artifact Origin: [aorigin] ([accuO]%)
"
+ r += "Activation Trigger: [atrigger] ([accuT]%)
"
+ r += "Artifact Function: [aeffect1] ([accuE1]%)
"
+ r += "Artifact Range: [aeffect2] ([accuE2]%)
"
+ var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc)
+ P.name = "Artifact Analysis Report #[scan_num]"
+ P.info = r
+ for(var/mob/O in hearers(src, null))
+ O.show_message("\icon[src] \blue The [src.name] prints a sheet of paper", 3)
+ use_power(10)
+
+ if(href_list["close"])
+ usr << browse(null, "window=artanalyser")
+ usr.machine = null
+
+ src.updateDialog()
+
+//stick artifacts onto this then switch the analyser on
+/obj/machinery/analyser_pad
+ name = "artifact analysis pad"
+ desc = "Studies the structure of artifacts to discover their uses."
+ icon = 'stationobjs.dmi'
+ icon_state = "tele0"
+ anchored = 1
+ density = 0
+
+/obj/machinery/analyser_pad/New()
+ ..()
+ /*spawn(10)
+ for(var/obj/machinery/artifact_analyser/analyser in orange(1))
+ world << "pad found analyser"
+ if(!analyser.owned_pad)
+ analyser.owned_pad = src
+ world << "pad set analyser to self"
+ break*/
diff --git a/code/modules/research/xenoarchaeology/artifact_db.dm b/code/modules/research/xenoarchaeology/unknown_db.dm
similarity index 97%
rename from code/modules/research/xenoarchaeology/artifact_db.dm
rename to code/modules/research/xenoarchaeology/unknown_db.dm
index 5bdb66d71fd..c6e0d1fb3fa 100644
--- a/code/modules/research/xenoarchaeology/artifact_db.dm
+++ b/code/modules/research/xenoarchaeology/unknown_db.dm
@@ -1,58 +1,58 @@
-
-/datum/catalogued_artifact
- var/trigger = "touch" // What activates it?
- var/effecttype = "healing" // What does it do?
- var/effectmode = "aura" // How does it carry out the effect?
- var/display_id = "" // Artifact ID to display once successfully scanned
- var/origin = ""
-
-/obj/machinery/computer/artifact_database
- name = "Artifact Database"
- icon_state = "rdcomp"
- var/list/catalogued_artifacts
-
-/obj/machinery/computer/artifact_database/New()
- ..()
- catalogued_artifacts = new/list
-
-/obj/machinery/computer/artifact_database/Topic(href, href_list)
- ..()
- if( href_list["close"] )
- usr << browse(null, "window=artifact_db")
- usr.machine = null
- updateDialog()
-
-/obj/machinery/computer/artifact_database/process()
- ..()
- updateDialog()
-
-/obj/machinery/computer/artifact_database/interact(mob/user)
- if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
- if (!istype(user, /mob/living/silicon))
- user.machine = null
- user << browse(null, "window=artifact_db")
- return
- var/t = "Artifact Database
"
- t += "
"
- for(var/datum/catalogued_artifact/CA in catalogued_artifacts)
- t += "Artifact ID: [CA.display_id] (determined from unique energy emission signatures)
"
- t += "Artifact Origin: [CA.origin]
"
- t += "Activation Trigger: [CA.trigger]
"
- t += "Artifact Function: [CA.effecttype]
"
- t += "Artifact Range: [CA.effectmode]
"
- t += "
"
- t += "Refresh Close
"
- user << browse(t, "window=artifact_db;size=500x800")
- user.machine = src
-
-/*
-/datum/artifact_effect
- var/origin = null // Used in the randomisation/research of the artifact.
- var/trigger = "touch" // What activates it?
- var/triggerX = "none" // Used for more varied triggers
- var/effecttype = "healing" // What does it do?
- var/effectmode = "aura" // How does it carry out the effect?
- var/aurarange = 4 // How far the artifact will extend an aura effect.
- var/display_id = "" // Artifact ID to display once successfully scanned
- var/list/created_field
+
+/datum/catalogued_artifact
+ var/trigger = "touch" // What activates it?
+ var/effecttype = "healing" // What does it do?
+ var/effectmode = "aura" // How does it carry out the effect?
+ var/display_id = "" // Artifact ID to display once successfully scanned
+ var/origin = ""
+
+/obj/machinery/computer/artifact_database
+ name = "Artifact Database"
+ icon_state = "rdcomp"
+ var/list/catalogued_artifacts
+
+/obj/machinery/computer/artifact_database/New()
+ ..()
+ catalogued_artifacts = new/list
+
+/obj/machinery/computer/artifact_database/Topic(href, href_list)
+ ..()
+ if( href_list["close"] )
+ usr << browse(null, "window=artifact_db")
+ usr.machine = null
+ updateDialog()
+
+/obj/machinery/computer/artifact_database/process()
+ ..()
+ updateDialog()
+
+/obj/machinery/computer/artifact_database/interact(mob/user)
+ if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
+ if (!istype(user, /mob/living/silicon))
+ user.machine = null
+ user << browse(null, "window=artifact_db")
+ return
+ var/t = "Artifact Database
"
+ t += "
"
+ for(var/datum/catalogued_artifact/CA in catalogued_artifacts)
+ t += "Artifact ID: [CA.display_id] (determined from unique energy emission signatures)
"
+ t += "Artifact Origin: [CA.origin]
"
+ t += "Activation Trigger: [CA.trigger]
"
+ t += "Artifact Function: [CA.effecttype]
"
+ t += "Artifact Range: [CA.effectmode]
"
+ t += "
"
+ t += "Refresh Close
"
+ user << browse(t, "window=artifact_db;size=500x800")
+ user.machine = src
+
+/*
+/datum/artifact_effect
+ var/origin = null // Used in the randomisation/research of the artifact.
+ var/trigger = "touch" // What activates it?
+ var/triggerX = "none" // Used for more varied triggers
+ var/effecttype = "healing" // What does it do?
+ var/effectmode = "aura" // How does it carry out the effect?
+ var/aurarange = 4 // How far the artifact will extend an aura effect.
+ var/display_id = "" // Artifact ID to display once successfully scanned
+ var/list/created_field
*/
\ No newline at end of file
diff --git a/code/modules/research/xenoarchaeology/artifact_effect.dm b/code/modules/research/xenoarchaeology/unknown_effect.dm
similarity index 97%
rename from code/modules/research/xenoarchaeology/artifact_effect.dm
rename to code/modules/research/xenoarchaeology/unknown_effect.dm
index 118e94adc17..092cb0d0f58 100644
--- a/code/modules/research/xenoarchaeology/artifact_effect.dm
+++ b/code/modules/research/xenoarchaeology/unknown_effect.dm
@@ -1,542 +1,542 @@
-//
-
-/datum/artifact_effect
- var/artifact_id = "" // Display ID of the spawning artifact
- var/trigger = "touch" // What activates it?
- var/triggerX = "none" // Used for more varied triggers
- var/effecttype = "healing" // What does it do?
- var/effectmode = "aura" // How does it carry out the effect?
- var/aurarange = 4 // How far the artifact will extend an aura effect.
- var/list/created_field
- var/archived_loc
-
-/datum/artifact_effect/New()
- //
- created_field = new()
-
-/datum/artifact_effect/proc/GetOriginString(var/origin)
-
-/datum/artifact_effect/proc/GetEffectString(var/effect)
-
-/datum/artifact_effect/proc/GetTriggerString(var/trigger)
-
-/datum/artifact_effect/proc/GetRangeString(var/range)
- switch(effectmode)
- if("aura") return "Constant Short-Range Energy Field"
- if("pulse")
- if(aurarange > 7) return "Long Range Energy Pulses"
- else return "Medium Range Energy Pulses"
- if("worldpulse") return "Extreme Range Energy Pulses"
- if("contact") return "Requires contact with subject"
- else return "Unknown Range"
-
-/datum/artifact_effect/proc/HaltEffect()
- for(var/obj/effect/energy_field/F in created_field)
- created_field.Remove(F)
- del F
-
-/datum/artifact_effect/proc/UpdateEffect(var/atom/originator)
- /*for(var/obj/effect/energy_field/F in created_field)
- created_field.Remove(F)
- del F*/
- if(originator.loc != archived_loc)
- archived_loc = originator.loc
- update_move(originator)
-
- for(var/obj/effect/energy_field/E in created_field)
- if(E.strength < 5)
- E.Strengthen(0.2)
-
-/datum/artifact_effect/proc/DoEffect(var/atom/originator)
- archived_loc = originator.loc
- if (src.effectmode == "contact")
- var/mob/living/user = originator
- if(!user)
- return
- switch(src.effecttype)
- if("healing")
- //caeltodo
- if (istype(user, /mob/living/carbon/human/))
- user << "\blue You feel a soothing energy invigorate you."
-
- var/mob/living/carbon/human/H = user
- for(var/datum/organ/external/affecting in H.organs)
- if(!affecting) continue
- if(!istype(affecting, /datum/organ/external)) continue
- affecting.heal_damage(25, 25) //fixes getting hit after ingestion, killing you when game updates organ health
- //user:heal_organ_damage(25, 25)
- //
- user.adjustOxyLoss(-25)
- user.adjustToxLoss(-25)
- user.adjustBruteLoss(-25)
- user.adjustFireLoss(-25)
- user.adjustBrainLoss(-25)
- user.radiation -= min(user.radiation, 25)
- user.nutrition += 50
- H.bodytemperature = initial(H.bodytemperature)
- //
- H.vessel.add_reagent("blood",50)
- spawn(1)
- H.fixblood()
- H.regenerate_icons()
- return 1
- //
- if (istype(user, /mob/living/carbon/monkey/))
- user << "\blue You feel a soothing energy invigorate you."
- user.adjustOxyLoss(-25)
- user.adjustToxLoss(-25)
- user.adjustBruteLoss(-25)
- user.adjustFireLoss(-25)
- user.adjustBrainLoss(-25)
- return 1
- else user << "Nothing happens."
- if("injure")
- if (istype(user, /mob/living/carbon/))
- user << "\red A painful discharge of energy strikes you!"
- user.adjustOxyLoss(rand(5,25))
- user.adjustToxLoss(rand(5,25))
- user.adjustBruteLoss(rand(5,25))
- user.adjustFireLoss(rand(5,25))
- user.adjustBrainLoss(rand(5,25))
- user.radiation += 25
- user.nutrition -= min(50, user.nutrition)
- user.make_dizzy(6)
- user.weakened += 6
- return 1
- else user << "Nothing happens."
- if("stun")
- if (istype(user, /mob/living/carbon/))
- user << "\red A powerful force overwhelms your consciousness."
- user.weakened += 45
- user.stuttering += 45
- if(prob(50))
- user.stunned += rand(1,10)
- return 1
- else user << "Nothing happens."
- if("roboheal")
- if (istype(user, /mob/living/silicon/robot))
- user << "\blue Your systems report damaged components mending by themselves!"
- user.adjustBruteLoss(rand(-10,-30))
- user.adjustFireLoss(rand(-10,-30))
- return 1
- else user << "Nothing happens."
- if("robohurt")
- if (istype(user, /mob/living/silicon/robot))
- user << "\red Your systems report severe damage has been inflicted!"
- user.adjustBruteLoss(rand(10,50))
- user.adjustFireLoss(rand(10,50))
- 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))
- created_field.Add(E)
- E.strength = 1
- E.density = 1
- E.anchored = 1
- E.invisibility = 0
- return 1
- if("teleport")
- var/list/randomturfs = new/list()
- for(var/turf/T in orange(user, 50))
- if(!istype(T, /turf/simulated/floor) || T.density)
- continue
- randomturfs.Add(T)
- if(randomturfs.len > 0)
- user << "\red You are suddenly zapped away elsewhere!"
- if (user.buckled)
- user.buckled.unbuckle()
- user.loc = pick(randomturfs)
- var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
- sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is
- sparks.start()
- return 1
- if("sleepy")
- user << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
- user.drowsyness = min(user.drowsyness + rand(5,25), 50)
- user.eye_blurry = min(user.eye_blurry + rand(1,3), 50)
- 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))
- continue
- if(prob(10)) M << "\blue You feel a soothing energy radiating from something nearby."
- M.adjustBruteLoss(-1)
- M.adjustFireLoss(-1)
- M.adjustToxLoss(-1)
- M.adjustOxyLoss(-1)
- M.adjustBrainLoss(-1)
- M.updatehealth()
- return 1
- if("injure")
- 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
- if(prob(10)) M << "\red You feel a painful force radiating from something nearby."
- M.adjustBruteLoss(1)
- M.adjustFireLoss(1)
- M.adjustToxLoss(1)
- M.adjustOxyLoss(1)
- M.adjustBrainLoss(1)
- M.updatehealth()
- return 1
- 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
- if(prob(10)) M << "\red Energy radiating from the [originator] is making you feel numb."
- if(prob(20))
- M << "\red Your body goes numb for a moment."
- M.stunned += 2
- M.weakened += 2
- M.stuttering += 2
- 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!"
- M.adjustBruteLoss(-1)
- M.adjustFireLoss(-1)
- M.updatehealth()
- return 1
- if("robohurt")
- for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
- if(prob(10)) M << "\red SYSTEM ALERT: Harmful energy field detected!"
- M.adjustBruteLoss(1)
- M.adjustFireLoss(1)
- 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)
- B.charge += 10
- for (var/obj/machinery/power/smes/S in range (src.aurarange,originator)) S.charge += 20
- for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
- for (var/obj/item/weapon/cell/D in M.contents)
- D.charge += 10
- if(prob(10)) M << "\blue SYSTEM ALERT: Energy boosting field detected!"
- return 1
- if("celldrain")
- for (var/obj/machinery/power/apc/C in range(src.aurarange,originator))
- for (var/obj/item/weapon/cell/B in C.contents)
- B.charge = max(B.charge-10,0)
- for (var/obj/machinery/power/smes/S in range (src.aurarange,originator))
- S.charge = max(S.charge-20,0)
- for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
- for (var/obj/item/weapon/cell/D in M.contents)
- D.charge = max(D.charge-10,0)
- 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
- if(H.planted)
- H.waterlevel += 2
- H.nutrilevel += 2
- if(H.toxic > 0)
- H.toxic -= 1
- H.health += 1
- if(H.pestlevel > 0)
- H.pestlevel -= 1
- if(H.weedlevel > 0)
- H.weedlevel -= 1
- H.lastcycle += 5
- return 1
- if("sleepy")
- for (var/mob/living/carbon/M in range(src.aurarange,originator))
- if(prob(10))
- M << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
- M.drowsyness = min(M.drowsyness + 1, 25)
- M.eye_blurry = min(M.eye_blurry + 1, 25)
- return 1
- else if (src.effectmode == "pulse")
- 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))
- continue
- M << "\blue A wave of energy invigorates you."
- M.adjustBruteLoss(-5)
- M.adjustFireLoss(-5)
- M.adjustToxLoss(-5)
- M.adjustOxyLoss(-5)
- M.adjustBrainLoss(-5)
- M.updatehealth()
- return 1
- if("injure")
- 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
- M << "\red A wave of energy causes you great pain!"
- M.adjustBruteLoss(5)
- M.adjustFireLoss(5)
- M.adjustToxLoss(5)
- M.adjustOxyLoss(5)
- M.adjustBrainLoss(5)
- M.make_dizzy(6)
- M.weakened += 3
- M.updatehealth()
- return 1
- 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
- M << "\red A wave of energy overwhelms your senses!"
- M.paralysis += 3
- M.weakened += 4
- M.stuttering += 4
- 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!"
- M.adjustBruteLoss(-10)
- M.adjustFireLoss(-10)
- M.updatehealth()
- return 1
- if("robohurt")
- for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
- M << "\red SYSTEM ALERT: Structural damage inflicted by energy pulse!"
- M.adjustBruteLoss(10)
- 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)
- B.charge += 250
- for (var/obj/machinery/power/smes/S in range (src.aurarange,originator)) S.charge += 400
- for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
- for (var/obj/item/weapon/cell/D in M.contents)
- D.charge += 250
- M << "\blue SYSTEM ALERT: Large energy boost detected!"
- return 1
- if("celldrain")
- for (var/obj/machinery/power/apc/C in range(src.aurarange,originator))
- for (var/obj/item/weapon/cell/B in C.contents)
- B.charge = max(B.charge-500,0)
- for (var/obj/machinery/power/smes/S in range (src.aurarange,originator))
- S.charge = max(S.charge-400,0)
- for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
- for (var/obj/item/weapon/cell/D in M.contents)
- D.charge = max(D.charge-500,0)
- M << "\red SYSTEM ALERT: Severe energy drain detected!"
- return 1
- if("planthelper")
- //makes weeds and shrooms and stuff more potent too
- for (var/obj/machinery/hydroponics/H in range(src.aurarange,originator))
- if(H.planted)
- H.dead = 0
- H.waterlevel = 200
- H.nutrilevel = 200
- H.toxic = 0
- H.health = 100
- H.pestlevel = 0
- H.weedlevel = 0
- H.lastcycle = H.cycledelay
- return 1
- if("teleport")
- for (var/mob/living/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
- var/list/randomturfs = new/list()
- for(var/turf/T in orange(M, 30))
- if(!istype(T, /turf/simulated/floor) || T.density)
- continue
- randomturfs.Add(T)
- if(randomturfs.len > 0)
- M << "\red You are displaced by a strange force!"
- if(M.buckled)
- M.buckled.unbuckle()
- M.loc = pick(randomturfs)
- var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
- sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is
- sparks.start()
- return 1
- if("dnaswitch")
- for(var/mob/living/H in range(src.aurarange,originator))
- if(ishuman(H) && istype(H:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(H:head,/obj/item/clothing/head/bio_hood/anomaly))
- continue
-
- if(prob(30))
- H << pick("\green You feel a little different.","\green You feel strange.","\green You feel different.")
- //todo
- if (H.gender == FEMALE)
- H.gender = MALE
- else
- H.gender = FEMALE
- /*H.dna.ready_dna(H)
- H.update_body()
- H.update_face()*/
- return 1
- if("emp")
- empulse(get_turf(originator), aurarange/2, aurarange)
- return 1
- if("sleepy")
- for (var/mob/living/carbon/M in range(src.aurarange,originator))
- if(prob(30))
- M << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
- if(prob(50))
- M.drowsyness = min(M.drowsyness + rand(1,5), 25)
- if(prob(50))
- M.eye_blurry = min(M.eye_blurry + rand(1,5), 25)
- return 1
- else if (src.effectmode == "worldpulse")
- for(var/mob/O in viewers(originator, null))
- O.show_message(text("[] emits a powerful burst of energy!", originator), 1)
- switch(src.effecttype)
- if("healing")
- for (var/mob/living/carbon/M in range(200, 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
- M << "\blue Waves of soothing energy wash over you."
- M.adjustBruteLoss(-3)
- M.adjustFireLoss(-3)
- M.adjustToxLoss(-3)
- M.adjustOxyLoss(-3)
- M.adjustBrainLoss(-3)
- M.updatehealth()
- return 1
- if("injure")
- for (var/mob/living/carbon/human/M in range(200, originator))
- M << "\red A wave of painful energy strikes you!"
- M.adjustBruteLoss(3)
- M.adjustFireLoss(3)
- M.adjustToxLoss(3)
- M.adjustOxyLoss(3)
- M.adjustBrainLoss(3)
- M.updatehealth()
- return 1
- if("stun")
- for (var/mob/living/carbon/M in range(200, 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
- M << "\red A powerful force causes you to black out momentarily."
- M.paralysis += 5
- M.weakened += 8
- M.stuttering += 8
- return 1
- if("roboheal")
- for (var/mob/living/silicon/robot/M in range(200, originator))
- M << "\blue SYSTEM ALERT: Structural damage has been repaired by energy pulse!"
- M.adjustBruteLoss(-5)
- M.adjustFireLoss(-5)
- M.updatehealth()
- return 1
- if("robohurt")
- for (var/mob/living/silicon/robot/M in range(200, originator))
- M << "\red SYSTEM ALERT: Structural damage inflicted by energy pulse!"
- M.adjustBruteLoss(5)
- M.adjustFireLoss(5)
- M.updatehealth()
- return 1
- if("cellcharge")
- for (var/obj/machinery/power/apc/C in range(200, originator))
- for (var/obj/item/weapon/cell/B in C.contents)
- B.charge += 100
- for (var/obj/machinery/power/smes/S in range (src.aurarange,src)) S.charge += 250
- for (var/mob/living/silicon/robot/M in world)
- for (var/obj/item/weapon/cell/D in M.contents)
- D.charge += 100
- M << "\blue SYSTEM ALERT: Energy boost detected!"
- return 1
- if("celldrain")
- for (var/obj/machinery/power/apc/C in range(200, originator))
- for (var/obj/item/weapon/cell/B in C.contents)
- B.charge = max(B.charge-250,0)
- for (var/obj/machinery/power/smes/S in range (src.aurarange,src))
- S.charge = max(S.charge-250,0)
- for (var/mob/living/silicon/robot/M in world)
- for (var/obj/item/weapon/cell/D in M.contents)
- D.charge = max(D.charge-250,0)
- M << "\red SYSTEM ALERT: Energy drain detected!"
- return 1
- if("teleport")
- for (var/mob/living/M in range(200, 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
- var/list/randomturfs = new/list()
- for(var/turf/T in orange(M, 15))
- if(!istype(T, /turf/simulated/floor) || T.density)
- continue
- randomturfs.Add(T)
- if(randomturfs.len > 0)
- M << "\red You are displaced by a strange force!"
- if(M.buckled)
- M.buckled.unbuckle()
- M.loc = pick(randomturfs)
- var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
- sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is
- sparks.start()
- return 1
- if("dnaswitch")
- for(var/mob/living/H in range(200, originator))
- if(ishuman(H) && istype(H:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(H:head,/obj/item/clothing/head/bio_hood/anomaly))
- continue
-
- if(prob(30))
- H << pick("\green You feel a little different.","\green You feel strange.","\green You feel different.")
- //todo
- if (H.gender == FEMALE)
- H.gender = MALE
- else
- H.gender = FEMALE
- /*H.dna.ready_dna(H)
- H.update_body()
- H.update_face()*/
- return 1
- if("sleepy")
- for(var/mob/living/H in range(200, originator))
- H.drowsyness = min(H.drowsyness + rand(5,15), 50)
- H.eye_blurry = min(H.eye_blurry + rand(5,15), 50)
- return 1
-
-//initially for the force field artifact
-/datum/artifact_effect/proc/update_move(var/atom/originator)
- switch(effecttype)
- if("forcefield")
- while(created_field.len < 16)
- //for now, just instantly respawn the fields when they get destroyed
- var/obj/effect/energy_field/E = new (locate(originator.x,originator.y,originator))
- created_field.Add(E)
- E.strength = 1
- E.density = 1
- E.anchored = 1
- E.invisibility = 0
-
- var/obj/effect/energy_field/E = created_field[1]
- E.loc = locate(originator.x + 2,originator.y + 2,originator.z)
- E = created_field[2]
- E.loc = locate(originator.x + 2,originator.y + 1,originator.z)
- E = created_field[3]
- E.loc = locate(originator.x + 2,originator.y,originator.z)
- E = created_field[4]
- E.loc = locate(originator.x + 2,originator.y - 1,originator.z)
- E = created_field[5]
- E.loc = locate(originator.x + 2,originator.y - 2,originator.z)
- E = created_field[6]
- E.loc = locate(originator.x + 1,originator.y + 2,originator.z)
- E = created_field[7]
- E.loc = locate(originator.x + 1,originator.y - 2,originator.z)
- E = created_field[8]
- E.loc = locate(originator.x,originator.y + 2,originator.z)
- E = created_field[9]
- E.loc = locate(originator.x,originator.y - 2,originator.z)
- E = created_field[10]
- E.loc = locate(originator.x - 1,originator.y + 2,originator.z)
- E = created_field[11]
- E.loc = locate(originator.x - 1,originator.y - 2,originator.z)
- E = created_field[12]
- E.loc = locate(originator.x - 2,originator.y + 2,originator.z)
- E = created_field[13]
- E.loc = locate(originator.x - 2,originator.y + 1,originator.z)
- E = created_field[14]
- E.loc = locate(originator.x - 2,originator.y,originator.z)
- E = created_field[15]
- E.loc = locate(originator.x - 2,originator.y - 1,originator.z)
- E = created_field[16]
- E.loc = locate(originator.x - 2,originator.y - 2,originator.z)
+//
+
+/datum/artifact_effect
+ var/artifact_id = "" // Display ID of the spawning artifact
+ var/trigger = "touch" // What activates it?
+ var/triggerX = "none" // Used for more varied triggers
+ var/effecttype = "healing" // What does it do?
+ var/effectmode = "aura" // How does it carry out the effect?
+ var/aurarange = 4 // How far the artifact will extend an aura effect.
+ var/list/created_field
+ var/archived_loc
+
+/datum/artifact_effect/New()
+ //
+ created_field = new()
+
+/datum/artifact_effect/proc/GetOriginString(var/origin)
+
+/datum/artifact_effect/proc/GetEffectString(var/effect)
+
+/datum/artifact_effect/proc/GetTriggerString(var/trigger)
+
+/datum/artifact_effect/proc/GetRangeString(var/range)
+ switch(effectmode)
+ if("aura") return "Constant Short-Range Energy Field"
+ if("pulse")
+ if(aurarange > 7) return "Long Range Energy Pulses"
+ else return "Medium Range Energy Pulses"
+ if("worldpulse") return "Extreme Range Energy Pulses"
+ if("contact") return "Requires contact with subject"
+ else return "Unknown Range"
+
+/datum/artifact_effect/proc/HaltEffect()
+ for(var/obj/effect/energy_field/F in created_field)
+ created_field.Remove(F)
+ del F
+
+/datum/artifact_effect/proc/UpdateEffect(var/atom/originator)
+ /*for(var/obj/effect/energy_field/F in created_field)
+ created_field.Remove(F)
+ del F*/
+ if(originator.loc != archived_loc)
+ archived_loc = originator.loc
+ update_move(originator)
+
+ for(var/obj/effect/energy_field/E in created_field)
+ if(E.strength < 5)
+ E.Strengthen(0.2)
+
+/datum/artifact_effect/proc/DoEffect(var/atom/originator)
+ archived_loc = originator.loc
+ if (src.effectmode == "contact")
+ var/mob/living/user = originator
+ if(!user)
+ return
+ switch(src.effecttype)
+ if("healing")
+ //caeltodo
+ if (istype(user, /mob/living/carbon/human/))
+ user << "\blue You feel a soothing energy invigorate you."
+
+ var/mob/living/carbon/human/H = user
+ for(var/datum/organ/external/affecting in H.organs)
+ if(!affecting) continue
+ if(!istype(affecting, /datum/organ/external)) continue
+ affecting.heal_damage(25, 25) //fixes getting hit after ingestion, killing you when game updates organ health
+ //user:heal_organ_damage(25, 25)
+ //
+ user.adjustOxyLoss(-25)
+ user.adjustToxLoss(-25)
+ user.adjustBruteLoss(-25)
+ user.adjustFireLoss(-25)
+ user.adjustBrainLoss(-25)
+ user.radiation -= min(user.radiation, 25)
+ user.nutrition += 50
+ H.bodytemperature = initial(H.bodytemperature)
+ //
+ H.vessel.add_reagent("blood",50)
+ spawn(1)
+ H.fixblood()
+ H.regenerate_icons()
+ return 1
+ //
+ if (istype(user, /mob/living/carbon/monkey/))
+ user << "\blue You feel a soothing energy invigorate you."
+ user.adjustOxyLoss(-25)
+ user.adjustToxLoss(-25)
+ user.adjustBruteLoss(-25)
+ user.adjustFireLoss(-25)
+ user.adjustBrainLoss(-25)
+ return 1
+ else user << "Nothing happens."
+ if("injure")
+ if (istype(user, /mob/living/carbon/))
+ user << "\red A painful discharge of energy strikes you!"
+ user.adjustOxyLoss(rand(5,25))
+ user.adjustToxLoss(rand(5,25))
+ user.adjustBruteLoss(rand(5,25))
+ user.adjustFireLoss(rand(5,25))
+ user.adjustBrainLoss(rand(5,25))
+ user.radiation += 25
+ user.nutrition -= min(50, user.nutrition)
+ user.make_dizzy(6)
+ user.weakened += 6
+ return 1
+ else user << "Nothing happens."
+ if("stun")
+ if (istype(user, /mob/living/carbon/))
+ user << "\red A powerful force overwhelms your consciousness."
+ user.weakened += 45
+ user.stuttering += 45
+ if(prob(50))
+ user.stunned += rand(1,10)
+ return 1
+ else user << "Nothing happens."
+ if("roboheal")
+ if (istype(user, /mob/living/silicon/robot))
+ user << "\blue Your systems report damaged components mending by themselves!"
+ user.adjustBruteLoss(rand(-10,-30))
+ user.adjustFireLoss(rand(-10,-30))
+ return 1
+ else user << "Nothing happens."
+ if("robohurt")
+ if (istype(user, /mob/living/silicon/robot))
+ user << "\red Your systems report severe damage has been inflicted!"
+ user.adjustBruteLoss(rand(10,50))
+ user.adjustFireLoss(rand(10,50))
+ 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))
+ created_field.Add(E)
+ E.strength = 1
+ E.density = 1
+ E.anchored = 1
+ E.invisibility = 0
+ return 1
+ if("teleport")
+ var/list/randomturfs = new/list()
+ for(var/turf/T in orange(user, 50))
+ if(!istype(T, /turf/simulated/floor) || T.density)
+ continue
+ randomturfs.Add(T)
+ if(randomturfs.len > 0)
+ user << "\red You are suddenly zapped away elsewhere!"
+ if (user.buckled)
+ user.buckled.unbuckle()
+ user.loc = pick(randomturfs)
+ var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
+ sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is
+ sparks.start()
+ return 1
+ if("sleepy")
+ user << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
+ user.drowsyness = min(user.drowsyness + rand(5,25), 50)
+ user.eye_blurry = min(user.eye_blurry + rand(1,3), 50)
+ 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))
+ continue
+ if(prob(10)) M << "\blue You feel a soothing energy radiating from something nearby."
+ M.adjustBruteLoss(-1)
+ M.adjustFireLoss(-1)
+ M.adjustToxLoss(-1)
+ M.adjustOxyLoss(-1)
+ M.adjustBrainLoss(-1)
+ M.updatehealth()
+ return 1
+ if("injure")
+ 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
+ if(prob(10)) M << "\red You feel a painful force radiating from something nearby."
+ M.adjustBruteLoss(1)
+ M.adjustFireLoss(1)
+ M.adjustToxLoss(1)
+ M.adjustOxyLoss(1)
+ M.adjustBrainLoss(1)
+ M.updatehealth()
+ return 1
+ 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
+ if(prob(10)) M << "\red Energy radiating from the [originator] is making you feel numb."
+ if(prob(20))
+ M << "\red Your body goes numb for a moment."
+ M.stunned += 2
+ M.weakened += 2
+ M.stuttering += 2
+ 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!"
+ M.adjustBruteLoss(-1)
+ M.adjustFireLoss(-1)
+ M.updatehealth()
+ return 1
+ if("robohurt")
+ for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
+ if(prob(10)) M << "\red SYSTEM ALERT: Harmful energy field detected!"
+ M.adjustBruteLoss(1)
+ M.adjustFireLoss(1)
+ 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)
+ B.charge += 10
+ for (var/obj/machinery/power/smes/S in range (src.aurarange,originator)) S.charge += 20
+ for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
+ for (var/obj/item/weapon/cell/D in M.contents)
+ D.charge += 10
+ if(prob(10)) M << "\blue SYSTEM ALERT: Energy boosting field detected!"
+ return 1
+ if("celldrain")
+ for (var/obj/machinery/power/apc/C in range(src.aurarange,originator))
+ for (var/obj/item/weapon/cell/B in C.contents)
+ B.charge = max(B.charge-10,0)
+ for (var/obj/machinery/power/smes/S in range (src.aurarange,originator))
+ S.charge = max(S.charge-20,0)
+ for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
+ for (var/obj/item/weapon/cell/D in M.contents)
+ D.charge = max(D.charge-10,0)
+ 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
+ if(H.planted)
+ H.waterlevel += 2
+ H.nutrilevel += 2
+ if(H.toxic > 0)
+ H.toxic -= 1
+ H.health += 1
+ if(H.pestlevel > 0)
+ H.pestlevel -= 1
+ if(H.weedlevel > 0)
+ H.weedlevel -= 1
+ H.lastcycle += 5
+ return 1
+ if("sleepy")
+ for (var/mob/living/carbon/M in range(src.aurarange,originator))
+ if(prob(10))
+ M << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
+ M.drowsyness = min(M.drowsyness + 1, 25)
+ M.eye_blurry = min(M.eye_blurry + 1, 25)
+ return 1
+ else if (src.effectmode == "pulse")
+ 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))
+ continue
+ M << "\blue A wave of energy invigorates you."
+ M.adjustBruteLoss(-5)
+ M.adjustFireLoss(-5)
+ M.adjustToxLoss(-5)
+ M.adjustOxyLoss(-5)
+ M.adjustBrainLoss(-5)
+ M.updatehealth()
+ return 1
+ if("injure")
+ 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
+ M << "\red A wave of energy causes you great pain!"
+ M.adjustBruteLoss(5)
+ M.adjustFireLoss(5)
+ M.adjustToxLoss(5)
+ M.adjustOxyLoss(5)
+ M.adjustBrainLoss(5)
+ M.make_dizzy(6)
+ M.weakened += 3
+ M.updatehealth()
+ return 1
+ 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
+ M << "\red A wave of energy overwhelms your senses!"
+ M.paralysis += 3
+ M.weakened += 4
+ M.stuttering += 4
+ 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!"
+ M.adjustBruteLoss(-10)
+ M.adjustFireLoss(-10)
+ M.updatehealth()
+ return 1
+ if("robohurt")
+ for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
+ M << "\red SYSTEM ALERT: Structural damage inflicted by energy pulse!"
+ M.adjustBruteLoss(10)
+ 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)
+ B.charge += 250
+ for (var/obj/machinery/power/smes/S in range (src.aurarange,originator)) S.charge += 400
+ for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
+ for (var/obj/item/weapon/cell/D in M.contents)
+ D.charge += 250
+ M << "\blue SYSTEM ALERT: Large energy boost detected!"
+ return 1
+ if("celldrain")
+ for (var/obj/machinery/power/apc/C in range(src.aurarange,originator))
+ for (var/obj/item/weapon/cell/B in C.contents)
+ B.charge = max(B.charge-500,0)
+ for (var/obj/machinery/power/smes/S in range (src.aurarange,originator))
+ S.charge = max(S.charge-400,0)
+ for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
+ for (var/obj/item/weapon/cell/D in M.contents)
+ D.charge = max(D.charge-500,0)
+ M << "\red SYSTEM ALERT: Severe energy drain detected!"
+ return 1
+ if("planthelper")
+ //makes weeds and shrooms and stuff more potent too
+ for (var/obj/machinery/hydroponics/H in range(src.aurarange,originator))
+ if(H.planted)
+ H.dead = 0
+ H.waterlevel = 200
+ H.nutrilevel = 200
+ H.toxic = 0
+ H.health = 100
+ H.pestlevel = 0
+ H.weedlevel = 0
+ H.lastcycle = H.cycledelay
+ return 1
+ if("teleport")
+ for (var/mob/living/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
+ var/list/randomturfs = new/list()
+ for(var/turf/T in orange(M, 30))
+ if(!istype(T, /turf/simulated/floor) || T.density)
+ continue
+ randomturfs.Add(T)
+ if(randomturfs.len > 0)
+ M << "\red You are displaced by a strange force!"
+ if(M.buckled)
+ M.buckled.unbuckle()
+ M.loc = pick(randomturfs)
+ var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
+ sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is
+ sparks.start()
+ return 1
+ if("dnaswitch")
+ for(var/mob/living/H in range(src.aurarange,originator))
+ if(ishuman(H) && istype(H:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(H:head,/obj/item/clothing/head/bio_hood/anomaly))
+ continue
+
+ if(prob(30))
+ H << pick("\green You feel a little different.","\green You feel strange.","\green You feel different.")
+ //todo
+ if (H.gender == FEMALE)
+ H.gender = MALE
+ else
+ H.gender = FEMALE
+ /*H.dna.ready_dna(H)
+ H.update_body()
+ H.update_face()*/
+ return 1
+ if("emp")
+ empulse(get_turf(originator), aurarange/2, aurarange)
+ return 1
+ if("sleepy")
+ for (var/mob/living/carbon/M in range(src.aurarange,originator))
+ if(prob(30))
+ M << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
+ if(prob(50))
+ M.drowsyness = min(M.drowsyness + rand(1,5), 25)
+ if(prob(50))
+ M.eye_blurry = min(M.eye_blurry + rand(1,5), 25)
+ return 1
+ else if (src.effectmode == "worldpulse")
+ for(var/mob/O in viewers(originator, null))
+ O.show_message(text("[] emits a powerful burst of energy!", originator), 1)
+ switch(src.effecttype)
+ if("healing")
+ for (var/mob/living/carbon/M in range(200, 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
+ M << "\blue Waves of soothing energy wash over you."
+ M.adjustBruteLoss(-3)
+ M.adjustFireLoss(-3)
+ M.adjustToxLoss(-3)
+ M.adjustOxyLoss(-3)
+ M.adjustBrainLoss(-3)
+ M.updatehealth()
+ return 1
+ if("injure")
+ for (var/mob/living/carbon/human/M in range(200, originator))
+ M << "\red A wave of painful energy strikes you!"
+ M.adjustBruteLoss(3)
+ M.adjustFireLoss(3)
+ M.adjustToxLoss(3)
+ M.adjustOxyLoss(3)
+ M.adjustBrainLoss(3)
+ M.updatehealth()
+ return 1
+ if("stun")
+ for (var/mob/living/carbon/M in range(200, 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
+ M << "\red A powerful force causes you to black out momentarily."
+ M.paralysis += 5
+ M.weakened += 8
+ M.stuttering += 8
+ return 1
+ if("roboheal")
+ for (var/mob/living/silicon/robot/M in range(200, originator))
+ M << "\blue SYSTEM ALERT: Structural damage has been repaired by energy pulse!"
+ M.adjustBruteLoss(-5)
+ M.adjustFireLoss(-5)
+ M.updatehealth()
+ return 1
+ if("robohurt")
+ for (var/mob/living/silicon/robot/M in range(200, originator))
+ M << "\red SYSTEM ALERT: Structural damage inflicted by energy pulse!"
+ M.adjustBruteLoss(5)
+ M.adjustFireLoss(5)
+ M.updatehealth()
+ return 1
+ if("cellcharge")
+ for (var/obj/machinery/power/apc/C in range(200, originator))
+ for (var/obj/item/weapon/cell/B in C.contents)
+ B.charge += 100
+ for (var/obj/machinery/power/smes/S in range (src.aurarange,src)) S.charge += 250
+ for (var/mob/living/silicon/robot/M in world)
+ for (var/obj/item/weapon/cell/D in M.contents)
+ D.charge += 100
+ M << "\blue SYSTEM ALERT: Energy boost detected!"
+ return 1
+ if("celldrain")
+ for (var/obj/machinery/power/apc/C in range(200, originator))
+ for (var/obj/item/weapon/cell/B in C.contents)
+ B.charge = max(B.charge-250,0)
+ for (var/obj/machinery/power/smes/S in range (src.aurarange,src))
+ S.charge = max(S.charge-250,0)
+ for (var/mob/living/silicon/robot/M in world)
+ for (var/obj/item/weapon/cell/D in M.contents)
+ D.charge = max(D.charge-250,0)
+ M << "\red SYSTEM ALERT: Energy drain detected!"
+ return 1
+ if("teleport")
+ for (var/mob/living/M in range(200, 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
+ var/list/randomturfs = new/list()
+ for(var/turf/T in orange(M, 15))
+ if(!istype(T, /turf/simulated/floor) || T.density)
+ continue
+ randomturfs.Add(T)
+ if(randomturfs.len > 0)
+ M << "\red You are displaced by a strange force!"
+ if(M.buckled)
+ M.buckled.unbuckle()
+ M.loc = pick(randomturfs)
+ var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
+ sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is
+ sparks.start()
+ return 1
+ if("dnaswitch")
+ for(var/mob/living/H in range(200, originator))
+ if(ishuman(H) && istype(H:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(H:head,/obj/item/clothing/head/bio_hood/anomaly))
+ continue
+
+ if(prob(30))
+ H << pick("\green You feel a little different.","\green You feel strange.","\green You feel different.")
+ //todo
+ if (H.gender == FEMALE)
+ H.gender = MALE
+ else
+ H.gender = FEMALE
+ /*H.dna.ready_dna(H)
+ H.update_body()
+ H.update_face()*/
+ return 1
+ if("sleepy")
+ for(var/mob/living/H in range(200, originator))
+ H.drowsyness = min(H.drowsyness + rand(5,15), 50)
+ H.eye_blurry = min(H.eye_blurry + rand(5,15), 50)
+ return 1
+
+//initially for the force field artifact
+/datum/artifact_effect/proc/update_move(var/atom/originator)
+ switch(effecttype)
+ if("forcefield")
+ while(created_field.len < 16)
+ //for now, just instantly respawn the fields when they get destroyed
+ var/obj/effect/energy_field/E = new (locate(originator.x,originator.y,originator))
+ created_field.Add(E)
+ E.strength = 1
+ E.density = 1
+ E.anchored = 1
+ E.invisibility = 0
+
+ var/obj/effect/energy_field/E = created_field[1]
+ E.loc = locate(originator.x + 2,originator.y + 2,originator.z)
+ E = created_field[2]
+ E.loc = locate(originator.x + 2,originator.y + 1,originator.z)
+ E = created_field[3]
+ E.loc = locate(originator.x + 2,originator.y,originator.z)
+ E = created_field[4]
+ E.loc = locate(originator.x + 2,originator.y - 1,originator.z)
+ E = created_field[5]
+ E.loc = locate(originator.x + 2,originator.y - 2,originator.z)
+ E = created_field[6]
+ E.loc = locate(originator.x + 1,originator.y + 2,originator.z)
+ E = created_field[7]
+ E.loc = locate(originator.x + 1,originator.y - 2,originator.z)
+ E = created_field[8]
+ E.loc = locate(originator.x,originator.y + 2,originator.z)
+ E = created_field[9]
+ E.loc = locate(originator.x,originator.y - 2,originator.z)
+ E = created_field[10]
+ E.loc = locate(originator.x - 1,originator.y + 2,originator.z)
+ E = created_field[11]
+ E.loc = locate(originator.x - 1,originator.y - 2,originator.z)
+ E = created_field[12]
+ E.loc = locate(originator.x - 2,originator.y + 2,originator.z)
+ E = created_field[13]
+ E.loc = locate(originator.x - 2,originator.y + 1,originator.z)
+ E = created_field[14]
+ E.loc = locate(originator.x - 2,originator.y,originator.z)
+ E = created_field[15]
+ E.loc = locate(originator.x - 2,originator.y - 1,originator.z)
+ E = created_field[16]
+ E.loc = locate(originator.x - 2,originator.y - 2,originator.z)
diff --git a/code/modules/research/xenoarchaeology/artifact_harvester.dm b/code/modules/research/xenoarchaeology/unknown_harvester.dm
similarity index 97%
rename from code/modules/research/xenoarchaeology/artifact_harvester.dm
rename to code/modules/research/xenoarchaeology/unknown_harvester.dm
index 4aba7ae2c1f..39463888c59 100644
--- a/code/modules/research/xenoarchaeology/artifact_harvester.dm
+++ b/code/modules/research/xenoarchaeology/unknown_harvester.dm
@@ -1,150 +1,150 @@
-
-/obj/machinery/artifact_harvester
- name = "Anomaly Power Collector"
- icon = 'virology.dmi'
- icon_state = "incubator" //incubator_on
- anchored = 1
- density = 1
- var/harvesting = 0
- var/obj/item/weapon/anobattery/inserted_battery
- var/obj/machinery/artifact/cur_artifact
- var/obj/machinery/analyser_pad/owned_pad = null
-
-/obj/machinery/artifact_harvester/New()
- ..()
- spawn(10)
- owned_pad = locate() in orange(1, src)
-
-/obj/machinery/artifact_harvester/attackby(var/obj/I as obj, var/mob/user as mob)
- if(istype(I,/obj/item/weapon/anobattery))
- if(!inserted_battery)
- user << "You insert the battery."
- user.drop_item()
- I.loc = src
- src.inserted_battery = I
- return
- else
- return..()
-
-/obj/machinery/artifact_harvester/process()
- if(stat & (NOPOWER|BROKEN))
- return
- use_power(350)
-
- if(harvesting)
- use_power(250)
- inserted_battery.stored_charge += 10
- if(inserted_battery.stored_charge >= inserted_battery.capacity)
- inserted_battery.stored_charge = inserted_battery.capacity
- harvesting = 0
- cur_artifact.anchored = 0
- cur_artifact.being_used = 0
- src.visible_message("[name] states, \"Battery is full.\"")
- icon_state = "incubator"
- return
-
-/obj/machinery/artifact_harvester/interact(var/mob/user as mob)
- if(stat & (NOPOWER|BROKEN))
- return
- user.machine = src
- var/dat = "Artifact Power Harvester
"
- dat += "
"
- //
- if(owned_pad)
- if(harvesting)
- dat += "Please wait. Harvesting in progress ([(inserted_battery.stored_charge/inserted_battery.capacity)*100]%).
"
- dat += "Halt early
"
- else
- if(inserted_battery)
- dat += "[inserted_battery.name] inserted, charge level: [inserted_battery.stored_charge]/[inserted_battery.capacity] ([(inserted_battery.stored_charge/inserted_battery.capacity)*100]%)
"
- dat += "Energy signature ID:[inserted_battery.battery_effect.artifact_id == "" ? "???" : "[inserted_battery.battery_effect.artifact_id]"]
"
- dat += "Eject battery
"
- dat += "Drain battery of all charge
"
- dat += "Begin harvesting
"
-
- else
- dat += "No battery inserted.
"
- else
- dat += "Unable to locate analysis pad.
"
- //
- dat += "
"
- dat += "Refresh Close
"
- user << browse(dat, "window=artharvester;size=450x500")
- onclose(user, "artharvester")
-
-/obj/machinery/artifact_harvester/Topic(href, href_list)
-
- if (href_list["harvest"])
- //locate artifact on analysis pad
- cur_artifact = null
- var/articount = 0
- var/obj/machinery/artifact/analysed
- for(var/obj/machinery/artifact/A in get_turf(owned_pad))
- analysed = A
- articount++
-
- var/mundane = 0
- for(var/obj/O in get_turf(owned_pad))
- if(!istype(O, /obj/machinery/artifact) && !istype(O, /obj/machinery/analyser_pad))
- mundane++
- break
- for(var/mob/O in get_turf(owned_pad))
- if(!istype(O, /obj/machinery/artifact))
- mundane++
- break
-
- if(articount == 1 && !mundane)
- cur_artifact = analysed
- //check to see if the battery is compatible
- if(inserted_battery)
- if(inserted_battery.battery_effect.artifact_id == cur_artifact.my_effect.artifact_id || inserted_battery.stored_charge == 0)
- harvesting = 1
- cur_artifact.anchored = 1
- cur_artifact.being_used = 1
- icon_state = "incubator_on"
- var/message = "[src] states, \"Beginning artifact energy harvesting.\""
- src.visible_message(message, message)
- //
- inserted_battery.battery_effect = cur_artifact.my_effect
- else
- var/message = "[src] states, \"Cannot harvest. Incompatible energy signatures detected.\""
- src.visible_message(message, message)
- else if(cur_artifact)
- var/message = "[src] states, \"Cannot harvest. No battery inserted.\""
- src.visible_message(message, message)
- else if(articount > 1 || mundane)
- var/message = "[src] states, \"Cannot harvest. Error isolating energy signature.\""
- src.visible_message(message, message)
- else if(!articount)
- var/message = "[src] states, \"Cannot harvest. No noteworthy energy signature isolated.\""
- src.visible_message(message, message)
- else if (cur_artifact.being_used)
- var/message = "[src] states, \"Cannot harvest. Too much interferance from energy scan.\""
- src.visible_message(message, message)
-
- if (href_list["stopharvest"])
- if(harvesting)
- harvesting = 0
- cur_artifact.anchored = 0
- cur_artifact.being_used = 0
- src.visible_message("[name] states, \"Harvesting interrupted.\"")
- icon_state = "incubator"
-
-
- if (href_list["ejectbattery"])
- src.inserted_battery.loc = src.loc
- src.inserted_battery = null
-
- if (href_list["drainbattery"])
- use_power(100)
- src.inserted_battery.battery_effect.artifact_id = ""
- src.inserted_battery.stored_charge = 0
- var/message = "[src] states, \"Battery drained of all charge.\""
- src.visible_message(message, message)
-
- if(href_list["close"])
- usr << browse(null, "window=artharvester")
- usr.machine = null
-
- src.updateDialog()
- return
+
+/obj/machinery/artifact_harvester
+ name = "Anomaly Power Collector"
+ icon = 'virology.dmi'
+ icon_state = "incubator" //incubator_on
+ anchored = 1
+ density = 1
+ var/harvesting = 0
+ var/obj/item/weapon/anobattery/inserted_battery
+ var/obj/machinery/artifact/cur_artifact
+ var/obj/machinery/analyser_pad/owned_pad = null
+
+/obj/machinery/artifact_harvester/New()
+ ..()
+ spawn(10)
+ owned_pad = locate() in orange(1, src)
+
+/obj/machinery/artifact_harvester/attackby(var/obj/I as obj, var/mob/user as mob)
+ if(istype(I,/obj/item/weapon/anobattery))
+ if(!inserted_battery)
+ user << "You insert the battery."
+ user.drop_item()
+ I.loc = src
+ src.inserted_battery = I
+ return
+ else
+ return..()
+
+/obj/machinery/artifact_harvester/process()
+ if(stat & (NOPOWER|BROKEN))
+ return
+ use_power(350)
+
+ if(harvesting)
+ use_power(250)
+ inserted_battery.stored_charge += 10
+ if(inserted_battery.stored_charge >= inserted_battery.capacity)
+ inserted_battery.stored_charge = inserted_battery.capacity
+ harvesting = 0
+ cur_artifact.anchored = 0
+ cur_artifact.being_used = 0
+ src.visible_message("[name] states, \"Battery is full.\"")
+ icon_state = "incubator"
+ return
+
+/obj/machinery/artifact_harvester/interact(var/mob/user as mob)
+ if(stat & (NOPOWER|BROKEN))
+ return
+ user.machine = src
+ var/dat = "Artifact Power Harvester
"
+ dat += "
"
+ //
+ if(owned_pad)
+ if(harvesting)
+ dat += "Please wait. Harvesting in progress ([(inserted_battery.stored_charge/inserted_battery.capacity)*100]%).
"
+ dat += "Halt early
"
+ else
+ if(inserted_battery)
+ dat += "[inserted_battery.name] inserted, charge level: [inserted_battery.stored_charge]/[inserted_battery.capacity] ([(inserted_battery.stored_charge/inserted_battery.capacity)*100]%)
"
+ dat += "Energy signature ID:[inserted_battery.battery_effect.artifact_id == "" ? "???" : "[inserted_battery.battery_effect.artifact_id]"]
"
+ dat += "Eject battery
"
+ dat += "Drain battery of all charge
"
+ dat += "Begin harvesting
"
+
+ else
+ dat += "No battery inserted.
"
+ else
+ dat += "Unable to locate analysis pad.
"
+ //
+ dat += "
"
+ dat += "Refresh Close
"
+ user << browse(dat, "window=artharvester;size=450x500")
+ onclose(user, "artharvester")
+
+/obj/machinery/artifact_harvester/Topic(href, href_list)
+
+ if (href_list["harvest"])
+ //locate artifact on analysis pad
+ cur_artifact = null
+ var/articount = 0
+ var/obj/machinery/artifact/analysed
+ for(var/obj/machinery/artifact/A in get_turf(owned_pad))
+ analysed = A
+ articount++
+
+ var/mundane = 0
+ for(var/obj/O in get_turf(owned_pad))
+ if(!istype(O, /obj/machinery/artifact) && !istype(O, /obj/machinery/analyser_pad))
+ mundane++
+ break
+ for(var/mob/O in get_turf(owned_pad))
+ if(!istype(O, /obj/machinery/artifact))
+ mundane++
+ break
+
+ if(articount == 1 && !mundane)
+ cur_artifact = analysed
+ //check to see if the battery is compatible
+ if(inserted_battery)
+ if(inserted_battery.battery_effect.artifact_id == cur_artifact.my_effect.artifact_id || inserted_battery.stored_charge == 0)
+ harvesting = 1
+ cur_artifact.anchored = 1
+ cur_artifact.being_used = 1
+ icon_state = "incubator_on"
+ var/message = "[src] states, \"Beginning artifact energy harvesting.\""
+ src.visible_message(message, message)
+ //
+ inserted_battery.battery_effect = cur_artifact.my_effect
+ else
+ var/message = "[src] states, \"Cannot harvest. Incompatible energy signatures detected.\""
+ src.visible_message(message, message)
+ else if(cur_artifact)
+ var/message = "[src] states, \"Cannot harvest. No battery inserted.\""
+ src.visible_message(message, message)
+ else if(articount > 1 || mundane)
+ var/message = "[src] states, \"Cannot harvest. Error isolating energy signature.\""
+ src.visible_message(message, message)
+ else if(!articount)
+ var/message = "[src] states, \"Cannot harvest. No noteworthy energy signature isolated.\""
+ src.visible_message(message, message)
+ else if (cur_artifact.being_used)
+ var/message = "[src] states, \"Cannot harvest. Too much interferance from energy scan.\""
+ src.visible_message(message, message)
+
+ if (href_list["stopharvest"])
+ if(harvesting)
+ harvesting = 0
+ cur_artifact.anchored = 0
+ cur_artifact.being_used = 0
+ src.visible_message("[name] states, \"Harvesting interrupted.\"")
+ icon_state = "incubator"
+
+
+ if (href_list["ejectbattery"])
+ src.inserted_battery.loc = src.loc
+ src.inserted_battery = null
+
+ if (href_list["drainbattery"])
+ use_power(100)
+ src.inserted_battery.battery_effect.artifact_id = ""
+ src.inserted_battery.stored_charge = 0
+ var/message = "[src] states, \"Battery drained of all charge.\""
+ src.visible_message(message, message)
+
+ if(href_list["close"])
+ usr << browse(null, "window=artharvester")
+ usr.machine = null
+
+ src.updateDialog()
+ return
diff --git a/code/modules/research/xenoarchaeology/artifact_synthetic.dm b/code/modules/research/xenoarchaeology/unknown_synthetic.dm
similarity index 96%
rename from code/modules/research/xenoarchaeology/artifact_synthetic.dm
rename to code/modules/research/xenoarchaeology/unknown_synthetic.dm
index 3b21ac36f85..24bd324e4c0 100644
--- a/code/modules/research/xenoarchaeology/artifact_synthetic.dm
+++ b/code/modules/research/xenoarchaeology/unknown_synthetic.dm
@@ -1,144 +1,144 @@
-
-/obj/item/weapon/anobattery
- name = "Anomaly power battery"
- icon = 'xenoarchaeology.dmi'
- icon_state = "anobattery0"
- var/datum/artifact_effect/battery_effect
- var/capacity = 200
- var/stored_charge = 0
-
-/obj/item/weapon/anobattery/New()
- battery_effect = new()
-
-/obj/item/weapon/anobattery/proc/UpdateSprite()
- var/p = (stored_charge/capacity)*100
- icon_state = "anobattery[round(p,25)]"
-
-/obj/item/weapon/anodevice
- name = "Anomaly power utilizer"
- icon = 'xenoarchaeology.dmi'
- icon_state = "anodev"
- var/cooldown = 0
- var/activated = 0
- var/time = 50
- var/obj/item/weapon/anobattery/inserted_battery
-
-/obj/item/weapon/anodevice/New()
- spawn(10)
- pulse()
-
-/obj/item/weapon/anodevice/proc/UpdateSprite()
- if(!inserted_battery)
- icon_state = "anodev"
- return
- var/p = (inserted_battery.stored_charge/inserted_battery.capacity)*100
- var/s = round(p,25)
- icon_state = "anodev[s]"
-
-/obj/item/weapon/anodevice/interact(var/mob/user)
- user.machine = src
- var/dat = "Anomalous Materials Energy Utiliser
"
- if(activated)
- dat += "Device active, stand by.
"
- else if(cooldown)
- dat += "Cooldown in progress, please wait.
"
- else
- if(!inserted_battery)
- dat += "Please insert battery
"
- else
- dat += "[inserted_battery] inserted, anomaly ID: [inserted_battery.battery_effect.artifact_id == "" ? "???" : "[inserted_battery.battery_effect.artifact_id]"]
"
- dat += "Total Power: [inserted_battery.stored_charge]/[inserted_battery.capacity]
"
- dat += "Timed activation: -- - [time >= 1000 ? "[time/10]" : time >= 100 ? " [time/10]" : " [time/10]" ] + ++
"
- if(cooldown && !activated)
- dat += "Cooldown in progress.
"
- else if(activated)
- dat += "Stop timer
"
- else
- dat += "Start timer
"
- dat += "Eject battery
"
- dat += "Refresh
"
- dat += "Close
"
-
- user << browse(dat, "window=anodevice;size=400x500")
- onclose(user, "anodevice")
- return
-
-/obj/item/weapon/anodevice/attackby(var/obj/I as obj, var/mob/user as mob)
- if(istype(I, /obj/item/weapon/anobattery))
- if(!inserted_battery)
- user << "\blue You insert the battery."
- user.drop_item()
- I.loc = src
- inserted_battery = I
- UpdateSprite()
- else
- return ..()
-
-/obj/item/weapon/anodevice/attack_self(var/mob/user as mob)
- return src.interact(user)
-
-/obj/item/weapon/anodevice/proc/pulse()
- if(activated)
- if(time <= 0 || !inserted_battery)
- time = 0
- activated = 0
- var/turf/T = get_turf(src)
- T.visible_message("\icon[src]\blue The utiliser device buzzes.", "\icon[src]\blue You hear something buzz.")
- else
- inserted_battery.battery_effect.DoEffect(src)
- time -= 10
- inserted_battery.stored_charge -= 10 + rand(-1,1)
- cooldown += 10
- else if(cooldown > 0)
- cooldown -= 10
- if(cooldown <= 0)
- cooldown = 0
- var/turf/T = get_turf(src)
- T.visible_message("\icon[src]\blue The utiliser device chimes.", "\icon[src]\blue You hear something chime.")
-
- spawn(10)
- pulse()
-
-/obj/item/weapon/anodevice/Topic(href, href_list)
-
- if(href_list["neg_changetime_max"])
- time += -100
- if(time > inserted_battery.capacity)
- time = inserted_battery.capacity
- else if (time < 0)
- time = 0
- if(href_list["neg_changetime"])
- time += -10
- if(time > inserted_battery.capacity)
- time = inserted_battery.capacity
- else if (time < 0)
- time = 0
- if(href_list["changetime"])
- time += 10
- if(time > inserted_battery.capacity)
- time = inserted_battery.capacity
- else if (time < 0)
- time = 0
- if(href_list["changetime_max"])
- time += 100
- if(time > inserted_battery.capacity)
- time = inserted_battery.capacity
- else if (time < 0)
- time = 0
-
- if(href_list["stoptimer"])
- activated = 0
-
- if(href_list["starttimer"])
- activated = 1
-
- if(href_list["ejectbattery"])
- inserted_battery.loc = get_turf(src)
- inserted_battery = null
- UpdateSprite()
-
- if(href_list["close"])
- usr << browse(null, "window=anodevice")
- usr.machine = null
- else if(usr)
- src.interact(usr)
+
+/obj/item/weapon/anobattery
+ name = "Anomaly power battery"
+ icon = 'xenoarchaeology.dmi'
+ icon_state = "anobattery0"
+ var/datum/artifact_effect/battery_effect
+ var/capacity = 200
+ var/stored_charge = 0
+
+/obj/item/weapon/anobattery/New()
+ battery_effect = new()
+
+/obj/item/weapon/anobattery/proc/UpdateSprite()
+ var/p = (stored_charge/capacity)*100
+ icon_state = "anobattery[round(p,25)]"
+
+/obj/item/weapon/anodevice
+ name = "Anomaly power utilizer"
+ icon = 'xenoarchaeology.dmi'
+ icon_state = "anodev"
+ var/cooldown = 0
+ var/activated = 0
+ var/time = 50
+ var/obj/item/weapon/anobattery/inserted_battery
+
+/obj/item/weapon/anodevice/New()
+ spawn(10)
+ pulse()
+
+/obj/item/weapon/anodevice/proc/UpdateSprite()
+ if(!inserted_battery)
+ icon_state = "anodev"
+ return
+ var/p = (inserted_battery.stored_charge/inserted_battery.capacity)*100
+ var/s = round(p,25)
+ icon_state = "anodev[s]"
+
+/obj/item/weapon/anodevice/interact(var/mob/user)
+ user.machine = src
+ var/dat = "Anomalous Materials Energy Utiliser
"
+ if(activated)
+ dat += "Device active, stand by.
"
+ else if(cooldown)
+ dat += "Cooldown in progress, please wait.
"
+ else
+ if(!inserted_battery)
+ dat += "Please insert battery
"
+ else
+ dat += "[inserted_battery] inserted, anomaly ID: [inserted_battery.battery_effect.artifact_id == "" ? "???" : "[inserted_battery.battery_effect.artifact_id]"]
"
+ dat += "Total Power: [inserted_battery.stored_charge]/[inserted_battery.capacity]
"
+ dat += "Timed activation: -- - [time >= 1000 ? "[time/10]" : time >= 100 ? " [time/10]" : " [time/10]" ] + ++
"
+ if(cooldown && !activated)
+ dat += "Cooldown in progress.
"
+ else if(activated)
+ dat += "Stop timer
"
+ else
+ dat += "Start timer
"
+ dat += "Eject battery
"
+ dat += "Refresh
"
+ dat += "Close
"
+
+ user << browse(dat, "window=anodevice;size=400x500")
+ onclose(user, "anodevice")
+ return
+
+/obj/item/weapon/anodevice/attackby(var/obj/I as obj, var/mob/user as mob)
+ if(istype(I, /obj/item/weapon/anobattery))
+ if(!inserted_battery)
+ user << "\blue You insert the battery."
+ user.drop_item()
+ I.loc = src
+ inserted_battery = I
+ UpdateSprite()
+ else
+ return ..()
+
+/obj/item/weapon/anodevice/attack_self(var/mob/user as mob)
+ return src.interact(user)
+
+/obj/item/weapon/anodevice/proc/pulse()
+ if(activated)
+ if(time <= 0 || !inserted_battery)
+ time = 0
+ activated = 0
+ var/turf/T = get_turf(src)
+ T.visible_message("\icon[src]\blue The utiliser device buzzes.", "\icon[src]\blue You hear something buzz.")
+ else
+ inserted_battery.battery_effect.DoEffect(src)
+ time -= 10
+ inserted_battery.stored_charge -= 10 + rand(-1,1)
+ cooldown += 10
+ else if(cooldown > 0)
+ cooldown -= 10
+ if(cooldown <= 0)
+ cooldown = 0
+ var/turf/T = get_turf(src)
+ T.visible_message("\icon[src]\blue The utiliser device chimes.", "\icon[src]\blue You hear something chime.")
+
+ spawn(10)
+ pulse()
+
+/obj/item/weapon/anodevice/Topic(href, href_list)
+
+ if(href_list["neg_changetime_max"])
+ time += -100
+ if(time > inserted_battery.capacity)
+ time = inserted_battery.capacity
+ else if (time < 0)
+ time = 0
+ if(href_list["neg_changetime"])
+ time += -10
+ if(time > inserted_battery.capacity)
+ time = inserted_battery.capacity
+ else if (time < 0)
+ time = 0
+ if(href_list["changetime"])
+ time += 10
+ if(time > inserted_battery.capacity)
+ time = inserted_battery.capacity
+ else if (time < 0)
+ time = 0
+ if(href_list["changetime_max"])
+ time += 100
+ if(time > inserted_battery.capacity)
+ time = inserted_battery.capacity
+ else if (time < 0)
+ time = 0
+
+ if(href_list["stoptimer"])
+ activated = 0
+
+ if(href_list["starttimer"])
+ activated = 1
+
+ if(href_list["ejectbattery"])
+ inserted_battery.loc = get_turf(src)
+ inserted_battery = null
+ UpdateSprite()
+
+ if(href_list["close"])
+ usr << browse(null, "window=anodevice")
+ usr.machine = null
+ else if(usr)
+ src.interact(usr)
diff --git a/icons/obj/cryogenics.dmi b/icons/obj/cryogenics.dmi
index 5b5e55ca48b..e063421fd52 100644
Binary files a/icons/obj/cryogenics.dmi and b/icons/obj/cryogenics.dmi differ
diff --git a/icons/obj/mining.dmi b/icons/obj/mining.dmi
index a2ae3e00fd6..1cfdb8384b6 100644
Binary files a/icons/obj/mining.dmi and b/icons/obj/mining.dmi differ
diff --git a/icons/obj/vehicles.dmi b/icons/obj/vehicles.dmi
index 1ba74f830a8..a2950c0b0e6 100644
Binary files a/icons/obj/vehicles.dmi and b/icons/obj/vehicles.dmi differ
diff --git a/icons/obj/xenoarchaeology.dmi b/icons/obj/xenoarchaeology.dmi
index 71e6f773c8f..6806854a242 100644
Binary files a/icons/obj/xenoarchaeology.dmi and b/icons/obj/xenoarchaeology.dmi differ