Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xenoarchaeology part code readability, some artifact changes #7933

Merged
merged 47 commits into from Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
02fd91a
makes effect code worse
Morar1 Sep 2, 2021
180b5ac
makes artifact code worse, also some effects touches
Morar1 Sep 3, 2021
3cf32fb
little accident after testing prev commit
Morar1 Sep 3, 2021
fc8c4a6
DoEffectDestroy and final touches
Morar1 Sep 4, 2021
9256311
Update artifact_unknown.dm
Morar1 Sep 4, 2021
18a6c4d
why that was deleted
Morar1 Sep 4, 2021
3729aaa
i forgor
Morar1 Sep 4, 2021
3b79377
renames stuff around, max_charge for pulse effect, no holder checks i…
Morar1 Sep 6, 2021
f93209e
Update taucetistation.dme
Morar1 Sep 6, 2021
b1fea34
buffs second effect spawn rate
Morar1 Sep 6, 2021
1f6af97
more coode + relic water + chem var + gas/poltergeist dead talk no more
Morar1 Sep 7, 2021
89fe5c8
adds more effects, renames stuff around, changes code little bit, cha…
Morar1 Sep 8, 2021
335a97f
9 + 10
Morar1 Sep 8, 2021
5f377aa
adds mecha wreckage to a artifact_find poool
Morar1 Sep 8, 2021
f028a4f
Update artifact_unknown.dm
Morar1 Sep 8, 2021
7b8c7e0
linter time
Morar1 Sep 8, 2021
d46ddf1
Merge branch 'master' into xenoarchorsmth
Morar1 Sep 8, 2021
8acddbd
Update artifact_unknown.dm
Morar1 Sep 8, 2021
69ec2f0
heal_overall_damage revert, moods for artifact effects
Morar1 Sep 8, 2021
d96433f
Update taucetistation.dme
Morar1 Sep 8, 2021
97268cd
mood_event better type
Morar1 Sep 8, 2021
d97f3ea
sprite doesnt change trigger method, remove the comment
Morar1 Sep 8, 2021
666715f
trailing spaces and requested stuff
Morar1 Sep 8, 2021
fb5b23a
returns in a concrete procs, var/used_power = ;more whitespace removal
Morar1 Sep 8, 2021
552a1c2
removes invoke_async in ToggleActivate, grav change to range, removes…
Morar1 Sep 8, 2021
5f5bcf2
проверку не прошел
Morar1 Sep 8, 2021
36cb12d
timer
Morar1 Sep 8, 2021
448d474
removes scan delay in a trigger_proxy thing in a process
Morar1 Sep 9, 2021
a30879e
tab
Morar1 Sep 9, 2021
a44e4b6
bugs, pick_n_take to pick cos i messed up
Morar1 Sep 9, 2021
51e2c34
its like console print testing here
Morar1 Sep 9, 2021
f7537c5
base procs were made wrong and i was blind okay? thanking visual stud…
Morar1 Sep 9, 2021
e07789d
turf to step
Morar1 Sep 9, 2021
656fc03
Update code/datums/mood_events/artifact_events.dm
Morar1 Sep 10, 2021
0e643ed
requested stuff
Morar1 Sep 10, 2021
155cad0
blind
Morar1 Sep 10, 2021
cbfaf7a
blind x2
Morar1 Sep 10, 2021
d9e98f5
no ecs but ill do the rest
Morar1 Sep 10, 2021
6f38ea5
... as anything ...
Morar1 Sep 10, 2021
d7c400e
idk ill move this define to relic water
Morar1 Sep 10, 2021
15f11b3
timeout to mood_events
Morar1 Sep 10, 2021
86d46e4
Merge branch 'master' into xenoarchorsmth
LudwigVonChesterfield Sep 13, 2021
f68fa72
renames stuff around, rnd points for artifact paper scans, deletes no…
Morar1 Sep 14, 2021
19714e8
type_name moving
Morar1 Sep 14, 2021
3cded6c
oaky this thing works again
Morar1 Sep 14, 2021
dfe7d29
oopsie whoopsie
Morar1 Sep 14, 2021
ab17957
Update artifact_harvester.dm
Morar1 Sep 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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(\
Morar1 marked this conversation as resolved.
Show resolved Hide resolved
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