Skip to content

Commit

Permalink
xenoarchaeology part code readability, some artifact changes (#7933)
Browse files Browse the repository at this point in the history
* makes effect code worse

* makes artifact code worse, also some effects touches

* little accident after testing prev commit

* DoEffectDestroy and final touches

* Update artifact_unknown.dm

* why that was deleted

* i forgor

* renames stuff around, max_charge for pulse effect, no holder checks in base procs

* Update taucetistation.dme

* buffs second effect spawn rate

* more coode + relic water + chem var + gas/poltergeist dead talk no more

* adds more effects, renames stuff around, changes code little bit, changes valid effects spawn pool

* 9 + 10

* adds mecha wreckage to a artifact_find poool

* Update artifact_unknown.dm

* linter time

* Update artifact_unknown.dm

* heal_overall_damage revert, moods for artifact effects

rimworld moment

* Update taucetistation.dme

* mood_event better type

* sprite doesnt change trigger method, remove the comment

* trailing spaces and requested stuff

Co-Authored-By: KIBORG04 <bossmira4@gmail.com>

* returns in a concrete procs, var/used_power = ;more whitespace removal

Co-Authored-By: KIBORG04 <bossmira4@gmail.com>

* removes invoke_async in ToggleActivate, grav change to range, removes clown healthupdate, removes healthupdate

Co-Authored-By: KIBORG04 <bossmira4@gmail.com>

* проверку не прошел

* timer

* removes scan delay in a trigger_proxy thing in a process

* tab

* bugs, pick_n_take to pick cos i messed up

* its like console print testing here

* base procs were made wrong and i was blind okay? thanking visual studio plugins for fixing this

* turf to step

* Update code/datums/mood_events/artifact_events.dm

Co-authored-by: LudwigVonChesterfield <andreydell@yahoo.com>

* requested stuff

removes random_unrestricted
creates list define for relic water
turfs orange to RANGE_TURFS
clear zone on move start

* blind

* blind x2

* no ecs but ill do the rest

* ... as anything ...

* idk ill move this define to relic water

* timeout to mood_events

* renames stuff around, rnd points for artifact paper scans, deletes not working code for finds points

not going to implement /list/artifact_types giving extra points, it wasnt working anyway...

* type_name moving

* oaky this thing works again

* oopsie whoopsie

* Update artifact_harvester.dm

Co-authored-by: KIBORG04 <bossmira4@gmail.com>
Co-authored-by: LudwigVonChesterfield <andreydell@yahoo.com>
  • Loading branch information
3 people committed Sep 14, 2021
1 parent dc488db commit a0f68ba
Show file tree
Hide file tree
Showing 50 changed files with 1,698 additions and 1,657 deletions.
59 changes: 44 additions & 15 deletions code/__DEFINES/xenoarchaeology.dm
@@ -1,10 +1,15 @@
// Artifact effect type (based on range) defines
///artifact energy release method
#define ARTIFACT_EFFECT_TOUCH 0
#define ARTIFACT_EFFECT_AURA 1
#define ARTIFACT_EFFECT_PULSE 2
#define ARTIFACT_MAX_EFFECT 2

// Artifact trigger defines
///list of possible release methods to get
#define ARTIFACT_ALL_RELEASE_METHODS list(\
ARTIFACT_EFFECT_TOUCH,\
ARTIFACT_EFFECT_AURA,\
ARTIFACT_EFFECT_PULSE)

///artifact trigger types
#define TRIGGER_TOUCH 0
#define TRIGGER_WATER 1
#define TRIGGER_ACID 2
Expand All @@ -18,10 +23,25 @@
#define TRIGGER_OXY 10
#define TRIGGER_CO2 11
#define TRIGGER_NITRO 12
#define TRIGGER_VIEW 13
#define MAX_TRIGGER 13
#define TRIGGER_PROXY 13

///list of possible artifact triggers
#define ARTIFACT_POSSIBLE_TRIGGERS list(\
TRIGGER_TOUCH,\
TRIGGER_WATER,\
TRIGGER_ACID,\
TRIGGER_VOLATILE,\
TRIGGER_TOXIN,\
TRIGGER_FORCE,\
TRIGGER_ENERGY,\
TRIGGER_HEAT,\
TRIGGER_COLD,\
TRIGGER_PHORON,\
TRIGGER_OXY,\
TRIGGER_CO2,\
TRIGGER_NITRO)

// Artifact icon_num defines
///artifact icon_num defines
#define ARTIFACT_WIZARD_LARGE 1
#define ARTIFACT_WIZARD_SMALL 2
#define ARTIFACT_MARTIAN_LARGE 3
Expand All @@ -36,12 +56,21 @@
#define ARTIFACT_CRYSTAL_PURPLE 12
#define ARTIFACT_CRYSTAL_BLUE 13

// Artifact effect_type
#define ARTIFACT_EFFECT_UNKNOWN 0 // Unknown / none detectable
#define ARTIFACT_EFFECT_ENERGY 1 // Concentrated energy
#define ARTIFACT_EFFECT_PSIONIC 2 // Intermittent psionic wavefront
#define ARTIFACT_EFFECT_ELECTRO 3 // Electromagnetic energy
#define ARTIFACT_EFFECT_PARTICLE 4 // Particle field
#define ARTIFACT_EFFECT_ORGANIC 5 // Organically reactive exotic particles
#define ARTIFACT_EFFECT_BLUESPACE 6 // Interdimensional/bluespace? phasing
#define ARTIFACT_EFFECT_SYNTH 7 // Atomic synthesis
///artifact type_name

///unknown/none
#define ARTIFACT_EFFECT_UNKNOWN 0
///concentrated energy
#define ARTIFACT_EFFECT_ENERGY 1
///untermittent psionic wavefront
#define ARTIFACT_EFFECT_PSIONIC 2
///electromagnetic energy
#define ARTIFACT_EFFECT_ELECTRO 3
///particle field
#define ARTIFACT_EFFECT_PARTICLE 4
///organically reactive exotic particles
#define ARTIFACT_EFFECT_ORGANIC 5
///bluespace
#define ARTIFACT_EFFECT_BLUESPACE 6
///atomic synthesis
#define ARTIFACT_EFFECT_SYNTH 7
53 changes: 22 additions & 31 deletions code/_globalvars/lists/misc.dm
Expand Up @@ -38,66 +38,57 @@ var/list/roles_ingame_minute_unlock = list(
var/global/list/datum_alarm_list = list()

var/global/list/all_artifact_effect_types = list(
/datum/artifact_effect/cold,
/datum/artifact_effect/badfeeling,
/datum/artifact_effect/temperature/cold,
/datum/artifact_effect/feelings/bad,
/datum/artifact_effect/cellcharge,
/datum/artifact_effect/celldrain,
/datum/artifact_effect/dnaswitch,
/datum/artifact_effect/emp,
/datum/artifact_effect/gasco2,
/datum/artifact_effect/gas,
/datum/artifact_effect/forcefield,
/datum/artifact_effect/gasnitro,
/datum/artifact_effect/gasoxy,
/datum/artifact_effect/gasphoron,
/datum/artifact_effect/gassleeping,
/datum/artifact_effect/goodfeeling,
/datum/artifact_effect/feelings/good,
/datum/artifact_effect/heal,
/datum/artifact_effect/heat,
/datum/artifact_effect/temperature/heat,
/datum/artifact_effect/hurt,
/datum/artifact_effect/radiate,
/datum/artifact_effect/roboheal,
/datum/artifact_effect/robohurt,
/datum/artifact_effect/sleepy,
/datum/artifact_effect/stun,
/datum/artifact_effect/tesla,
/datum/artifact_effect/teleport)
/datum/artifact_effect/teleport,
/datum/artifact_effect/light,
/datum/artifact_effect/light/darkness,
/datum/artifact_effect/gravity,
/datum/artifact_effect/noise,
/datum/artifact_effect/powernet)

var/global/list/valid_primary_effect_types = list(
/datum/artifact_effect/cold,
/datum/artifact_effect/cellcharge,
/datum/artifact_effect/celldrain,
/datum/artifact_effect/temperature/cold,
/datum/artifact_effect/temperature/heat,
/datum/artifact_effect/dnaswitch,
/datum/artifact_effect/emp,
/datum/artifact_effect/gasco2,
/datum/artifact_effect/gas,
/datum/artifact_effect/forcefield,
/datum/artifact_effect/gasnitro,
/datum/artifact_effect/gasoxy,
/datum/artifact_effect/gasphoron,
/datum/artifact_effect/gassleeping,
/datum/artifact_effect/heal,
/datum/artifact_effect/heat,
/datum/artifact_effect/hurt,
/datum/artifact_effect/radiate,
/datum/artifact_effect/sleepy,
/datum/artifact_effect/stun,
/datum/artifact_effect/tesla,
/datum/artifact_effect/teleport)

var/global/list/valid_secondary_effect_types = list(
/datum/artifact_effect/cold,
/datum/artifact_effect/badfeeling,
/datum/artifact_effect/feelings/bad,
/datum/artifact_effect/feelings/good,
/datum/artifact_effect/cellcharge,
/datum/artifact_effect/celldrain,
/datum/artifact_effect/gasco2,
/datum/artifact_effect/gasnitro,
/datum/artifact_effect/gasoxy,
/datum/artifact_effect/gasphoron,
/datum/artifact_effect/gassleeping,
/datum/artifact_effect/goodfeeling,
/datum/artifact_effect/heal,
/datum/artifact_effect/heat,
/datum/artifact_effect/hurt,
/datum/artifact_effect/radiate)
/datum/artifact_effect/light,
/datum/artifact_effect/light/darkness,
/datum/artifact_effect/gravity,
/datum/artifact_effect/noise,
/datum/artifact_effect/roboheal,
/datum/artifact_effect/robohurt)


//used in rituals to determine the value of things
Expand Down
19 changes: 19 additions & 0 deletions code/datums/mood_events/artifact_events.dm
@@ -0,0 +1,19 @@
/datum/mood_event/artifact_effect_good_major
description = "<span class='nicegreen'>Wooo! What is going on?</span>"
mood_change = 10
timeout = 10 MINUTES

/datum/mood_event/artifact_effect_good_minor
description = "<span class='nicegreen'>I feel strange, but also very relaxed...</span>"
mood_change = 5
timeout = 5 MINUTES

/datum/mood_event/artifact_effect_bad_major
description = "<span class='warning'>It feels like a gaggle of geese are pecking at my skull.</span>"
mood_change = -10
timeout = 10 MINUTES

/datum/mood_event/artifact_effect_bad_minor
description = "<span class='warning'>I feel strange and uneasy...</span>"
mood_change = -5
timeout = 5 MINUTES
29 changes: 29 additions & 0 deletions code/modules/reagents/reagent_containers/food/cans.dm
Expand Up @@ -133,6 +133,35 @@
icon_state = "waterbottle"
list_reagents = list("water" = 30)

///chem list, minus foods/drinks/base chems/paint and special chems, only for waterbottle/relic
#define RELIC_WATER_CHEM_LIST list(\
"stoxin2", "inaprovaline", "ryetalyn", "paracetamol", "tramadol", "oxycodone", "sterilizine", "leporazine",\
"kelotane", "dermaline", "dexalin", "dextromethorphan", "dexalinp", "tricordrazine", "anti_toxin", "thermopsis",\
"synaptizine", "hyronalin", "arithrazine", "alkysine", "imidazoline", "aurisine", "peridaxon", "kyphotorin",\
"bicaridine", "hyperzine", "cryoxadone", "clonexadone", "rezadone", "spaceacillin", "ethylredoxrazine",\
"vitamin", "lipozine", "stimulants", "nanocalcium", "toxin", "amatoxin", "mutagen", "phoron", "lexorin",\
"slimejelly", "cyanide", "minttoxin", "carpotoxin", "zombiepowder", "mindbreaker", "plantbgone", "stoxin",\
"chloralhydrate", "potassium_chloride", "potassium_chlorophoride", "beer2", "mutetoxin", "sacid", "pacid",\
"alphaamanitin", "aflatoxin", "chefspecial", "dioxin", "mulligan", "mutationtoxin", "amutationtoxin", "space_drugs",\
"serotrotium", "cryptobiolin", "impedrezene", "ectoplasm", "methylphenidate", "methylphenidate", "citalopram",\
"citalopram", "paroxetine", "paroxetine", "lube", "plasticide", "glycerol", "nitroglycerin",\
"thermite", "virusfood", "fuel", "cleaner", "xenomicrobes", "fluorosurfactant", "foaming_agent", "nicotine",\
"ammonia", "glue", "diethylamine", "luminophore","nanites", "nanites2", "nanobots", "mednanobots", "ectoplasm")

/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle/relic
desc = "A bottle of water filled with unknown liquids. It seems to be radiating some kind of energy."
list_reagents = list()

/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle/relic/atom_init()
var/reagents = volume
while(reagents)
var/newreagent = rand(1, min(reagents, 30))
list_reagents += list(pick(RELIC_WATER_CHEM_LIST) = newreagent)
reagents -= newreagent
..()

#undef RELIC_WATER_CHEM_LIST

/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind
name = "Space Mountain Wind"
desc = "Blows right through you like a space wind."
Expand Down
44 changes: 15 additions & 29 deletions code/modules/research/experiment.dm
Expand Up @@ -45,25 +45,12 @@
"biotech" = 0,
)

// So we don't give points for researching non-artifact item
var/list/artifact_types = list(
/obj/item/clothing/glasses/hud/mining/ancient,
/obj/machinery/auto_cloner,
/obj/machinery/power/supermatter,
/obj/structure/constructshell,
/obj/machinery/giga_drill,
/obj/structure/cult/pylon,
/obj/mecha/working/hoverpod,
/obj/machinery/replicator,
/obj/machinery/power/crystal,
/obj/machinery/artifact
)

var/list/saved_tech_levels = list() // list("materials" = list(1, 4, ...), ...)
var/list/saved_autopsy_weapons = list()
var/list/saved_artifacts = list()
var/list/saved_symptoms = list()
var/list/saved_slimecores = list()
//xenoarcheology stuff
var/list/saved_artifacts = list()

/datum/experiment_data/proc/init_known_tech()
for(var/tech in tech_points_rarity)
Expand Down Expand Up @@ -136,19 +123,18 @@
else
points += rand(5,10) * 200 // 1000-2000 points for random weapon

for(var/list/artifact in I.scanned_artifacts)
if(!(artifact["type"] in artifact_types)) // useless
continue

for(var/list/scanning_artifact in I.scanned_artifacts)
var/already_scanned = FALSE
for(var/list/our_artifact in saved_artifacts)
if(our_artifact["type"] == artifact["type"] && our_artifact["first_effect"] == artifact["first_effect"] && our_artifact["second_effect"] == artifact["second_effect"])
for(var/list/stored_artifact in saved_artifacts)
if(stored_artifact["type"] == scanning_artifact["type"] && stored_artifact["first_effect"] == scanning_artifact["first_effect"] && stored_artifact["second_effect"] == scanning_artifact["second_effect"])
already_scanned = TRUE
break

if(!already_scanned)
points += rand(5,10) * 1000 // 5000-10000 points for random artifact
saved_artifacts += list(artifact)
points += 10000 //10000 points for main effect
if(scanning_artifact["second_effect"] != "")
points += 5000 //5000 points for secondary effect
saved_artifacts += list(scanning_artifact)

for(var/symptom in I.scanned_symptoms)
if(saved_symptoms[symptom])
Expand Down Expand Up @@ -191,14 +177,14 @@
for(var/weapon in O.saved_autopsy_weapons)
saved_autopsy_weapons |= weapon

for(var/list/artifact in O.saved_artifacts)
for(var/list/scanning_artifact in O.saved_artifacts)
var/has_artifact = FALSE
for(var/list/our_artifact in saved_artifacts)
if(our_artifact["type"] == artifact["type"] && our_artifact["first_effect"] == artifact["first_effect"] && our_artifact["second_effect"] == artifact["second_effect"])
for(var/list/stored_artifact in saved_artifacts)
if(stored_artifact["type"] == scanning_artifact["type"] && stored_artifact["first_effect"] == scanning_artifact["first_effect"] && stored_artifact["second_effect"] == scanning_artifact["second_effect"])
has_artifact = TRUE
break
if(!has_artifact)
saved_artifacts += list(artifact)
saved_artifacts += list(scanning_artifact)

for(var/symptom in O.saved_symptoms)
saved_symptoms[symptom] = O.saved_symptoms[symptom]
Expand Down Expand Up @@ -353,8 +339,8 @@
if(istype(target, /obj/item/weapon/paper/artifact_info))
var/obj/item/weapon/paper/artifact_info/report = target
if(report.artifact_type)
for(var/list/artifact in scanned_artifacts)
if(artifact["type"] == report.artifact_type && artifact["first_effect"] == report.artifact_first_effect && artifact["second_effect"] == report.artifact_second_effect)
for(var/list/scanning_artifact in scanned_artifacts)
if(scanning_artifact["type"] == report.artifact_type && scanning_artifact["first_effect"] == report.artifact_first_effect && scanning_artifact["second_effect"] == report.artifact_second_effect)
to_chat(user, "<span class='notice'>[src] already has data about this artifact report</span>")
return

Expand Down
6 changes: 3 additions & 3 deletions code/modules/research/xenoarchaeology/artifact/artifact.dm
Expand Up @@ -24,7 +24,7 @@
// 5;/obj/structure/constructshell,\ //
5;/obj/machinery/syndicate_beacon,\
25;/obj/machinery/power/supermatter/shard,\
// 50;/obj/structure/cult/pylon,\ //
50;/obj/random/mecha/wreckage,\
100;/obj/machinery/auto_cloner,\
100;/obj/machinery/giga_drill,\
100;/obj/mecha/working/hoverpod,\
Expand Down Expand Up @@ -104,8 +104,8 @@
var/obj/O = new spawn_type(get_turf(src))
if(istype(O,/obj/machinery/artifact))
var/obj/machinery/artifact/A = O
if(A.my_effect)
A.my_effect.artifact_id = artifact_find.artifact_id
if(A.first_effect)
A.first_effect.artifact_id = artifact_find.artifact_id
visible_message("<span class='danger'>[src] suddenly crumbles away.</span>")
else
user.visible_message("<span class='danger'>[src] suddenly crumbles away.</span>",\
Expand Down
Expand Up @@ -5,24 +5,25 @@
icon_num = 0
density = TRUE
being_used = 0
need_inicial = 0
need_init = FALSE
anchored = TRUE
light_color = "#24c1ff"
var/health = 200
health = 200
var/anomaly_spawn_list = list ("gravitational anomaly" = 1, "flux wave anomaly" = 1, "bluespace anomaly" = 6, "pyroclastic anomaly" = 1, "vortex anomaly" = 1,)


/obj/machinery/artifact/bluespace_crystal/atom_init()
. = ..()
init_turfs_around()
health = rand(150, 300)
my_effect = new /datum/artifact_effect/tesla(src)
my_effect.trigger = TRIGGER_VIEW // TRIGGER_NEAR
first_effect = new /datum/artifact_effect/tesla(src)
first_effect.trigger = TRIGGER_PROXY
desc = "A blue strange crystal"
icon_num = ARTIFACT_CRYSTAL_BLUE
set_light(4)

/obj/machinery/artifact/bluespace_crystal/tesla_act(power)
tesla_zap(src, 1, power/2)
tesla_zap(src, 1, power / 2)
return

/obj/machinery/artifact/bluespace_crystal/Destroy()
Expand All @@ -44,8 +45,6 @@
anom.origin_tech = "phorontech=[rand(3,7)];powerstorage=[rand(2,5)];biotech=[rand(3,7)]"
if("vortex anomaly")
anom.origin_tech = "materials=[rand(3,7)];combat=[rand(2,5)];engineering=[rand(2,5)]"

tesla_zap(src,7,2500000)
if(prob(50))
teleport()
return ..()
Expand Down

0 comments on commit a0f68ba

Please sign in to comment.